mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-29 17:25:34 +00:00
Compare commits
12 Commits
f061060796
...
7de6986353
Author | SHA1 | Date | |
---|---|---|---|
7de6986353 | |||
11a5082632 | |||
e2a4b4a3e8 | |||
2fdf3fab10 | |||
07a406ec79 | |||
b889d0d667 | |||
f59c3a52c6 | |||
241b950ee6 | |||
c036dafc8a | |||
edc2b7d692 | |||
79b6af74af | |||
1165f2ab93 |
@ -7,7 +7,7 @@ A collection of config files and scripts for Fedora GNU/Linux.
|
||||
Run the following command to install
|
||||
|
||||
```sh
|
||||
cd ~ && git clone git@github.com:AquaMorph/dotfiles.git && sh ~/dotfiles/scripts/setup.sh
|
||||
cd ~ && git clone git@github.com:AquaMorph/dotfiles.git && sh ~/dotfiles/install.sh
|
||||
```
|
||||
Install the needed Python packages
|
||||
|
||||
|
@ -126,7 +126,7 @@ font:
|
||||
#style: Italic
|
||||
|
||||
# Point size
|
||||
size: 14.0
|
||||
size: 16.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
@ -48,6 +48,8 @@ for_window [class="steam_app_945360" title="Among Us"] exec --no-startup-id cat
|
||||
# Starting Overwatch
|
||||
for_window [class="overwatch.exe" title="Overwatch"] move to workspace $wsGames
|
||||
for_window [class="overwatch.exe" title="Overwatch"] exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0
|
||||
for_window [class="steam_app_2357570" title="Overwatch"] move to workspace $wsGames
|
||||
for_window [class="steam_app_2357570" title="Overwatch"] exec --no-startup-id cat ~/.config/g13/overwatch.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/overwatch.lpbm > /tmp/g13-0
|
||||
for_window [class="battle.net.exe" title="Battle.net"] move to workspace $wsGames
|
||||
for_window [class="battle.net.exe" title="Blizzard Battle.net"] move to workspace $wsGames
|
||||
for_window [class="Lutris"] move to workspace $ws4
|
||||
@ -85,7 +87,6 @@ for_window [class="^Show-splash-gtk$"] move to workspace $wsBitwig
|
||||
for_window [class="^Bitwig Studio$"] move to workspace $wsBitwig
|
||||
for_window [class="com.bitwig.BitwigStudio"] exec sleep 1; move to workspace $wsBitwig
|
||||
|
||||
|
||||
# Fall Guys
|
||||
for_window [title="FallGuys_client"] move to workspace $wsGames
|
||||
for_window [title="FallGuys_client"] exec --no-startup-id cat ~/.config/g13/fall-guys.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/fall-guys.lpbm > /tmp/g13-0
|
||||
@ -100,7 +101,6 @@ for_window [class="portal2_linux" title="PORTAL 2 - OpenGL"] exec --no-startup-i
|
||||
for_window [class="TPH.x86_64" title="Two Point Hospital"] move to workspace $wsGames
|
||||
for_window [class="TPH.x86_64" title="Two Point Hospital"] exec --no-startup-id cat ~/.config/g13/two-point-hospital.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/two-point-hospital.lpbm > /tmp/g13-0
|
||||
|
||||
|
||||
# Minecraft
|
||||
for_window [class="Minecraft*" title="Minecraft*"] move to workspace $wsGames
|
||||
for_window [class="Minecraft*" title="Minecraft*"] exec --no-startup-id cat ~/.config/g13/minecraft.bind > /tmp/g13-0 && sleep .1 && cat ~/.config/g13/minecraft.lpbm > /tmp/g13-0
|
||||
|
@ -8,11 +8,7 @@ fi
|
||||
dotdir=~/dotfiles
|
||||
|
||||
# src dest sudo
|
||||
files=($dotdir/.zprofile ~/ 'n'
|
||||
$dotdir/.zshrc ~/ 'n'
|
||||
$dotdir/alacritty ~/.config/ 'n'
|
||||
$dotdir/g13 ~/.config/ 'n'
|
||||
$dotdir/gtk-3.0/settings.ini ~/.config/gtk-3.0/ 'n'
|
||||
files=($dotdir/gtk-3.0/settings.ini ~/.config/gtk-3.0/ 'n'
|
||||
$dotdir/gtk-4.0/settings.ini ~/.config/gtk-4.0/ 'n'
|
||||
$dotdir/i3 ~/.config/ 'n'
|
||||
$dotdir/i3status ~/.config/ 'n'
|
||||
@ -118,8 +114,16 @@ function systemd {
|
||||
systemctl --user enable i3wm-close-window
|
||||
}
|
||||
|
||||
function stow_dotfiles {
|
||||
stow wireplumber
|
||||
stow zsh
|
||||
stow alacritty
|
||||
stow g13
|
||||
}
|
||||
|
||||
setup
|
||||
systemd
|
||||
update
|
||||
dotfiles
|
||||
stow_dotfiles
|
||||
emacs
|
@ -1,6 +1,6 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Kill Pulse
|
||||
# Kill Pulse.
|
||||
function killPulse() {
|
||||
systemctl --user stop pulseaudio.socket
|
||||
systemctl --user stop pulseaudio.service
|
||||
@ -8,7 +8,7 @@ function killPulse() {
|
||||
killall pulseaudio
|
||||
}
|
||||
|
||||
# Start Pulseaudio properly
|
||||
# Start Pulseaudio properly.
|
||||
function fixPulse() {
|
||||
PULSE="$(alsamixer 2>&1 | killall alsamixer)"
|
||||
if [[ $PULSE == *'Connection refused'* ]]; then
|
||||
@ -22,7 +22,7 @@ function fixPulse() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Start up programs that use audio
|
||||
# Start up programs that use audio.
|
||||
function launchi3() {
|
||||
if [ -z "$skipi3" ]; then
|
||||
echo Opening i3wm sound workspaces
|
||||
@ -31,6 +31,34 @@ function launchi3() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Set up sinks.
|
||||
function setupSinks() {
|
||||
pactl set-default-sink speakers
|
||||
pactl set-default-source sm7b
|
||||
}
|
||||
|
||||
# Connect sinks to audio interface
|
||||
function connectSinks() {
|
||||
pw-link speakers:monitor_FL alsa_output.usb-Focusrite_Clarett__8Pre_00002325-00.pro-output-0:playback_AUX0
|
||||
pw-link speakers:monitor_FR alsa_output.usb-Focusrite_Clarett__8Pre_00002325-00.pro-output-0:playback_AUX1
|
||||
|
||||
pw-link alsa_input.usb-Focusrite_Clarett__8Pre_00002325-00.pro-input-0:capture_AUX3 sm7b:input_FL
|
||||
pw-link alsa_input.usb-Focusrite_Clarett__8Pre_00002325-00.pro-input-0:capture_AUX3 sm7b:input_FR
|
||||
return $?
|
||||
}
|
||||
|
||||
function renameInterface() {
|
||||
for n in `seq 0 17` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:capture:capture_${n}" http://jackaudio.org/metadata/pretty-name "capture_$((n+1))"
|
||||
done
|
||||
for n in `seq 0 19` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:playback:playback_${n}" http://jackaudio.org/metadata/pretty-name "playback_$((n+1))"
|
||||
done
|
||||
for n in `seq 0 19` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:playback:monitor_${n}" http://jackaudio.org/metadata/pretty-name "monitor_$((n+1))"
|
||||
done
|
||||
}
|
||||
|
||||
# arg parser
|
||||
for arg in "$@"
|
||||
do
|
||||
@ -41,39 +69,18 @@ do
|
||||
done
|
||||
|
||||
# Wire sinks
|
||||
pactl set-default-sink speakers
|
||||
pactl set-default-source sm7b
|
||||
sleep 1.5
|
||||
pw-link -o && pw-link -i
|
||||
sleep 1.5
|
||||
pw-link speakers:monitor_FL alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-output:playback_FL
|
||||
pw-link speakers:monitor_FR alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-output:playback_FR
|
||||
pw-link speakers:monitor_FL alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-output:playback_AUX0
|
||||
pw-link speakers:monitor_FR alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-output:playback_AUX1
|
||||
pw-link speakers:monitor_FL alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.pro-output-0:playback_AUX0
|
||||
pw-link speakers:monitor_FR alsa_output.usb-Focusrite_Scarlett_18i20_USB-00.pro-output-0:playback_AUX1
|
||||
pw-link speakers:monitor_FL alsa_output.usb-Focusrite_Clarett__8Pre_00002325-00.pro-output-0:playback_AUX0
|
||||
pw-link speakers:monitor_FR alsa_output.usb-Focusrite_Clarett__8Pre_00002325-00.pro-output-0:playback_AUX1
|
||||
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-input:capture_RR sm7b:input_FL
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-input:capture_RR sm7b:input_FR
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-input:capture_AUX3 sm7b:input_FL
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.multichannel-input:capture_AUX3 sm7b:input_FR
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.pro-input-0:capture_AUX3 sm7b:input_FL
|
||||
pw-link alsa_input.usb-Focusrite_Scarlett_18i20_USB-00.pro-input-0:capture_AUX3 sm7b:input_FR
|
||||
pw-link alsa_input.usb-Focusrite_Clarett__8Pre_00002325-00.pro-input-0:capture_AUX3 sm7b:input_FL
|
||||
pw-link alsa_input.usb-Focusrite_Clarett__8Pre_00002325-00.pro-input-0:capture_AUX3 sm7b:input_FR
|
||||
setupSinks
|
||||
connectSinks
|
||||
status=$?
|
||||
while [[ $status -eq 0 ]]; do
|
||||
echo "Connecting Sinks"
|
||||
connectSinks
|
||||
status=$?
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Rename Audio Devices
|
||||
for n in `seq 0 17` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:capture:capture_${n}" http://jackaudio.org/metadata/pretty-name "capture_$((n+1))"
|
||||
done
|
||||
for n in `seq 0 19` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:playback:playback_${n}" http://jackaudio.org/metadata/pretty-name "playback_$((n+1))"
|
||||
done
|
||||
for n in `seq 0 19` ; do
|
||||
jack_property -p -s "alsa:pcm:2:hw:2,0:playback:monitor_${n}" http://jackaudio.org/metadata/pretty-name "monitor_$((n+1))"
|
||||
done
|
||||
#renameInterface
|
||||
|
||||
# Eurorack audio interface
|
||||
sh ~/.config/scripts/audio/es9start.sh
|
||||
|
@ -54,7 +54,7 @@ focused = i3.get_tree().find_focused()
|
||||
command = sys.argv[1]
|
||||
|
||||
if command in ['back', 'forward']:
|
||||
if focused.window_instance not in ['overwatch.exe']:
|
||||
if focused.window_instance not in ['overwatch.exe', 'hl2_linux']:
|
||||
if sys.argv[1] == 'forward':
|
||||
i3.command('workspace prev_on_output')
|
||||
else:
|
||||
|
@ -19,7 +19,6 @@ programVersion=$(yabridgectl --version | filterVersion)
|
||||
url=$(curl -s https://api.github.com/repos/robbert-vdh/yabridge/releases | \
|
||||
grep .tar.gz | grep releases/download | \
|
||||
grep -Po 'https://[^"]*.tar.gz' | grep -v ubuntu | head -n 1)
|
||||
url='https://github.com'$url
|
||||
urlVersion=$(echo $url | filterVersion | head -n 1)
|
||||
|
||||
# Check if installed to the most recent version
|
||||
|
@ -0,0 +1 @@
|
||||
load_script("/home/aqua/.config/wireplumber/scripts/auto-connect-ports.lua")
|
155
wireplumber/.config/wireplumber/scripts/auto-connect-ports.lua
Normal file
155
wireplumber/.config/wireplumber/scripts/auto-connect-ports.lua
Normal file
@ -0,0 +1,155 @@
|
||||
-- As explained on: https://bennett.dev/auto-link-pipewire-ports-wireplumber/
|
||||
--
|
||||
-- This script keeps my stereo-null-sink connected to whatever output I'm currently using.
|
||||
-- I do this so Pulseaudio (and Wine) always sees a stereo output plus I can swap the output
|
||||
-- without needing to reconnect everything.
|
||||
|
||||
-- Link two ports together
|
||||
function link_port(output_port, input_port)
|
||||
if not input_port or not output_port then
|
||||
return false
|
||||
end
|
||||
|
||||
local link_args = {
|
||||
["link.input.node"] = input_port.properties["node.id"],
|
||||
["link.input.port"] = input_port.properties["object.id"],
|
||||
|
||||
["link.output.node"] = output_port.properties["node.id"],
|
||||
["link.output.port"] = output_port.properties["object.id"],
|
||||
|
||||
-- The node never got created if it didn't have this field set to something
|
||||
["object.id"] = nil,
|
||||
|
||||
-- I was running into issues when I didn't have this set
|
||||
["object.linger"] = true,
|
||||
|
||||
["node.description"] = "Link created by auto_connect_ports"
|
||||
}
|
||||
|
||||
local link = Link("link-factory", link_args)
|
||||
link:activate(1)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- Automatically link ports together by their specific audio channels.
|
||||
--
|
||||
-- ┌──────────────────┐ ┌───────────────────┐
|
||||
-- │ │ │ │
|
||||
-- │ FL ├────────►│ AUX0 │
|
||||
-- │ OUTPUT │ │ │
|
||||
-- │ FR ├────────►│ AUX1 INPUT │
|
||||
-- │ │ │ │
|
||||
-- └──────────────────┘ │ AUX2 │
|
||||
-- │ │
|
||||
-- └───────────────────┘
|
||||
--
|
||||
-- -- Call this method inside a script in global scope
|
||||
--
|
||||
-- auto_connect_ports {
|
||||
--
|
||||
-- -- A constraint for all the required ports of the output device
|
||||
-- output = Constraint { "node.name"}
|
||||
--
|
||||
-- -- A constraint for all the required ports of the input device
|
||||
-- input = Constraint { .. }
|
||||
--
|
||||
-- -- A mapping of output audio channels to input audio channels
|
||||
--
|
||||
-- connections = {
|
||||
-- ["FL"] = "AUX0"
|
||||
-- ["FR"] = "AUX1"
|
||||
-- }
|
||||
--
|
||||
-- }
|
||||
--
|
||||
function auto_connect_ports(args)
|
||||
local output_om = ObjectManager {
|
||||
Interest {
|
||||
type = "port",
|
||||
args["output"],
|
||||
Constraint { "port.direction", "equals", "out" }
|
||||
}
|
||||
}
|
||||
|
||||
local input_om = ObjectManager {
|
||||
Interest {
|
||||
type = "port",
|
||||
args["input"],
|
||||
Constraint { "port.direction", "equals", "in" }
|
||||
}
|
||||
}
|
||||
|
||||
local all_links = ObjectManager {
|
||||
Interest {
|
||||
type = "link",
|
||||
}
|
||||
}
|
||||
|
||||
local unless = nil
|
||||
|
||||
if args["unless"] then
|
||||
unless = ObjectManager {
|
||||
Interest {
|
||||
type = "port",
|
||||
args["unless"],
|
||||
Constraint { "port.direction", "equals", "in" }
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
function _connect()
|
||||
local delete_links = unless and unless:get_n_objects() > 0
|
||||
|
||||
print("Delete links", delete_links)
|
||||
|
||||
for output_name, input_name in pairs(args.connect) do
|
||||
local output = output_om:lookup { Constraint { "audio.channel", "equals", output_name } }
|
||||
local input = input_om:lookup { Constraint { "audio.channel", "equals", input_name } }
|
||||
|
||||
if delete_links then
|
||||
delete_link(all_links, output, input)
|
||||
else
|
||||
link_port(output, input)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
output_om:connect("object-added", _connect)
|
||||
input_om:connect("object-added", _connect)
|
||||
all_links:connect("object-added", _connect)
|
||||
|
||||
output_om:activate()
|
||||
input_om:activate()
|
||||
all_links:activate()
|
||||
|
||||
if unless then
|
||||
unless:connect("object-added", _connect)
|
||||
unless:connect("object-removed", _connect)
|
||||
unless:activate()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- pw-cli list-objects | grep object.path
|
||||
|
||||
-- Connect to speakers
|
||||
auto_connect_ports {
|
||||
output = Constraint { "object.path", "matches", "speakers:*" },
|
||||
input = Constraint { "object.path", "matches", "alsa:pcm:2:hw:2,0:playback:*" },
|
||||
connect = {
|
||||
["FL"] = "AUX0",
|
||||
["FR"] = "AUX1"
|
||||
}
|
||||
}
|
||||
|
||||
-- Connect to mic
|
||||
auto_connect_ports {
|
||||
output = Constraint { "object.path", "matches", "alsa:pcm:2:hw:2,0:capture:*" },
|
||||
input = Constraint { "object.path", "matches", "sm7b-processed:" },
|
||||
connect = {
|
||||
["AUX0"] = "FL",
|
||||
["AUX1"] = "FR"
|
||||
}
|
||||
}
|
@ -1,6 +1,13 @@
|
||||
HISTFILE=~/.zsh_history
|
||||
HISTSIZE=99999999
|
||||
SAVEHIST=99999999
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd() { vcs_info }
|
||||
zstyle ':vcs_info:git:*' formats '%b '
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='%F{white}%n% @%m%f %F{blue}%~%f %F{red}${vcs_info_msg_0_}%f$ '
|
||||
|
||||
setopt appendhistory autocd extendedglob nomatch notify
|
||||
unsetopt beep
|
||||
bindkey -e
|
Loading…
x
Reference in New Issue
Block a user