Compare commits

...

2 Commits

2 changed files with 30 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ argenctl binding set normal Super Return sh "kitty --single-instance --instance-
# Reload config # Reload config
argenctl binding set normal Super+Shift R exec "$0" argenctl binding set normal Super+Shift R exec "$0"
argenctl binding set normal Super P exec fuzzel
argenctl binding set normal Super+Shift L exec waylock argenctl binding set normal Super+Shift L exec waylock
argenctl binding set normal Super+Shift T sh "lupan-set-theme toggle" argenctl binding set normal Super+Shift T sh "lupan-set-theme toggle"
@@ -115,5 +116,30 @@ argenctl mode declare passthrough
argenctl binding set normal Super Grave mode enter passthrough argenctl binding set normal Super Grave mode enter passthrough
argenctl binding set passthrough Super Grave mode enter normal argenctl binding set passthrough Super Grave mode enter normal
# Select/swap window by index
for num in 1 2 3 4 5 6 7 8 9; do
idx=$((num - 1))
argenctl binding set normal Super $num sh "
argenctl window focus \$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
"
argenctl binding set normal Super+Shift $num sh "
context_id=\$(argenctl context list --json | jq -r '.[] | select(.current) | .id')
length=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | length')
focused_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .focused_window')
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
focused_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$focused_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
dest_output_id=\$(argenctl window list --json | jq -r \".[] | select(.id == \\\"\$dest_window\\\") | .contexts[] | select(.id = \$context_id) | .output_id\")
if [ -n \"\$focused_output_id\" -a \"\$focused_output_id\" = \"\$dest_output_id\" ]; then
for i in \$(seq \$length); do
if [ \"\$focused_window\" = \"\$dest_window\" ]; then
break
fi
argenctl window swap next
dest_window=\$(argenctl context list --json | jq -r '.[] | select(.current) | .windows | .[$idx]')
done
fi
"
done
# Rules # Rules
argenctl rule add float --app-id "my-app" argenctl rule add float --app-id "my-app"

View File

@@ -1,9 +1,9 @@
os: os:
edit: 'nvim {{filename}}' edit: 'kak {{filename}}'
editAtLine: 'nvim +{{line}} {{filename}}' editAtLine: 'kak +{{line}} {{filename}}'
editAtLineAndWait: 'nvim +{{line}} {{filename}}' editAtLineAndWait: 'kak +{{line}} {{filename}}'
editInTerminal: true editInTerminal: true
openDirInEditor: 'nvim {{dir}}' openDirInEditor: 'kak -e "nnn-open {{dir}}"'
gui: gui:
nerdFontsVersion: "3" nerdFontsVersion: "3"