diff --git a/bin/i3-focus.sh b/bin/i3-focus.sh new file mode 100755 index 0000000..57fa2d7 --- /dev/null +++ b/bin/i3-focus.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# loops over i3 ipc events to prevent unnesecary polling + +while :; do + # infinite loop + i3_msg=$(i3-msg -t SUBSCRIBE '[ "window" , "output" ]') + window=$(echo "$i3_msg" | gojq 'if .change == "focus" then .container.window_properties end | if .title == "tmux" then .title else .class end' | tr -d '"') + case "$window" in + 'st-256color') echo 'st' ;; + 'Brave-browser') echo 'Brave' ;; + *) echo "$window" ;; + esac +done diff --git a/editors/nvim/config/spell/en.utf-8.add b/editors/nvim/config/spell/en.utf-8.add index dac80cf..3ca18f4 100644 --- a/editors/nvim/config/spell/en.utf-8.add +++ b/editors/nvim/config/spell/en.utf-8.add @@ -3,3 +3,8 @@ L3 Pset Kalynn Appt +EPR +S983 +Airpods +swiffer +postlab diff --git a/editors/nvim/config/spell/en.utf-8.add.spl b/editors/nvim/config/spell/en.utf-8.add.spl index 7ea7764..b8c134e 100644 Binary files a/editors/nvim/config/spell/en.utf-8.add.spl and b/editors/nvim/config/spell/en.utf-8.add.spl differ diff --git a/gui/i3/base.conf b/gui/i3/base.conf index 5ccbae7..305d584 100644 --- a/gui/i3/base.conf +++ b/gui/i3/base.conf @@ -23,8 +23,9 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-blur --nofork # auto starting default applications # assign [class="st-256color"] 1 # assign [title="startup-browser"] 2 +for_window [instance="startup-tmux"] move to workspace $ws1 -exec --no-startup-id i3-msg "workspace 1; exec st -e tmux" +exec --no-startup-id exec st -n 'startup-tmux'-e tmux exec --no-startup-id i3-msg "workspace 2; exec brave" # Use pactl to adjust volume in PulseAudio. diff --git a/gui/polybar/config.ini b/gui/polybar/config.ini index dd60c03..39db387 100644 --- a/gui/polybar/config.ini +++ b/gui/polybar/config.ini @@ -46,7 +46,7 @@ inherit = section/base-bar ; height height = 24pt ; modules -modules-left = xworkspaces focus spotify spotify-len todo +modules-left = xworkspaces focus-fast spotify spotify-len todo ;modules-left = xworkspaces spotify spotify-len modules-center = weather-desktop modules-right = pulseaudio memory cpu temperature eth dev-bat seafile calendar-sync bg-selector quotes date powermenu @@ -88,6 +88,12 @@ type = custom/script interval = 0.2 exec = ~/.dotfiles/bin/focus_class +[module/focus-fast] +; correct title size +type = custom/script +tail = true +exec = ~/.dotfiles/bin/i3-focus.sh + [module/pulseaudio] type = internal/pulseaudio