Compare commits

...

2 Commits

Author SHA1 Message Date
85f7da444e argen: add switch to session 2026-06-01 23:50:20 +02:00
90786cef74 argen: use foot in server mode 2026-06-01 22:09:55 +02:00
4 changed files with 50 additions and 1 deletions

View File

@@ -3,10 +3,19 @@
wlr-randr --output DP-1 --mode 3840x2160 --scale 2
wlr-randr --output HDMI-A-1 --mode 3840x2160 --scale 2 --left-of DP-1
foot --server &
argenctl config set label-mode modifier
# Terminal
argenctl binding set normal Super Return sh "kitty --single-instance --instance-group default"
#argenctl binding set normal Super Return sh "kitty --single-instance --instance-group default"
argenctl binding set normal Super Return sh "
if [ -e ~/.lightmode ]; then
exec footclient -o initial-color-theme=light
else
exec footclient -o initial-color-theme=dark
fi
"
# Reload config
argenctl binding set normal Super+Shift R exec "$0"
@@ -141,5 +150,7 @@ for num in 1 2 3 4 5 6 7 8 9; do
"
done
argenctl binding set normal Super+Shift S exec ~/.config/argen/session.sh
# Rules
argenctl rule add float --app-id "my-app"

29
argen/.config/argen/session.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
id=$(for name in $(ls ~/.config/argen/sessions/*.sh); do echo $(basename "${name%.sh}"); done | fuzzel -d -p'session> ')
if argenctl context list | grep "^${id}\$"; then
argenctl context switch "${id}"
exit
fi
argenctl context new "$id"
first=$(argenctl output list --json | jq -r '.[0].id')
length=$(argenctl output list --json | jq -r 'length')
for n in $(seq $length); do
current=$(argenctl output list --json | jq -r '.[] | select(.focused).id')
if [ "$current" = "$first" ]; then
break
fi
argenctl output focus next
done
if [ -e ~/.lightmode ]; then
THEME=light
else
THEME=dark
fi
export TERMINAL="footclient -o initial-color-theme=$THEME"
exec sh ~/.config/argen/sessions/"${id}.sh"

View File

@@ -0,0 +1,3 @@
argenctl output focus next
argenctl sh "$TERMINAL -D ~/dotfiles kak"

View File

@@ -0,0 +1,6 @@
argenctl exec librewolf
sleep 1
argenctl output focus next
argenctl exec qutebrowser