diff --git a/content/Configuring/Uncommon-tips-&-tricks.md b/content/Configuring/Uncommon-tips-&-tricks.md index a06b210..5cbe540 100644 --- a/content/Configuring/Uncommon-tips-&-tricks.md +++ b/content/Configuring/Uncommon-tips-&-tricks.md @@ -294,7 +294,7 @@ Dependencies : 1. add this to your config ```ini -exec-once = foot --server +exec-once = foot --server -c $XDG_CONFIG_HOME/foot/foot.ini bind = ALT, TAB, exec, $HOME/.config/hypr/scripts/alttab/enable.sh 'down' bind = ALT SHIFT, TAB, exec, $HOME/.config/hypr/scripts/alttab/enable.sh 'up' @@ -322,6 +322,7 @@ windowrule = match:class alttab, border_size 0 ```bash {filename="alttab.sh"} #!/usr/bin/env bash +hyprctl -q dispatch submap alttab start=$1 address=$(hyprctl -j clients | jq -r 'sort_by(.focusHistoryID) | .[] | select(.workspace.id >= 0) | "\(.address)\t\(.title)"' | fzf --color prompt:green,pointer:green,current-bg:-1,current-fg:green,gutter:-1,border:bright-black,current-hl:red,hl:red \ @@ -337,7 +338,7 @@ address=$(hyprctl -j clients | jq -r 'sort_by(.focusHistoryID) | .[] | select(.w awk -F"\t" '{print $1}') if [ -n "$address" ] ; then - hyprctl --batch -q "dispatch focuswindow address:$address ; dispatch alterzorder top" + echo "$address" > $XDG_RUNTIME_DIR/hypr/alttab/address fi hyprctl -q dispatch submap reset @@ -354,8 +355,8 @@ line="$1" IFS=$'\t' read -r addr _ <<< "$line" dim=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES} -grim -t png -l 0 -w "$addr" ~/.config/hypr/scripts/alttab/preview.png -chafa --animate false -s "$dim" "$XDG_CONFIG_HOME/hypr/scripts/alttab/preview.png" +grim -t png -l 0 -w "$addr" $XDG_RUNTIME_DIR/hypr/alttab/preview.png +chafa --animate false --dither=none -s "$dim" "$XDG_RUNTIME_DIR/hypr/alttab/preview.png" ``` 4. create file `touch $XDG_CONFIG_HOME/hypr/scripts/alttab/disable.sh && chmod +x $XDG_CONFIG_HOME/hypr/scripts/alttab/disable.sh` and add: @@ -370,7 +371,10 @@ hyprctl -q --batch "keyword unbind ALT, TAB ; keyword unbind ALT SHIFT, TAB ; ke 5. create file `touch $XDG_CONFIG_HOME/hypr/scripts/alttab/enable.sh && chmod +x $XDG_CONFIG_HOME/hypr/scripts/alttab/enable.sh` and add: ```bash {filename="enable.sh"} #!/usr/bin/env bash -hyprctl -q --batch "keyword animations:enabled false ; dispatch exec footclient -a alttab ~/.config/hypr/scripts/alttab/alttab.sh $1 ; keyword unbind ALT, TAB ; keyword unbind ALT SHIFT, TAB ; dispatch submap alttab" +mkdir -p $XDG_RUNTIME_DIR/hypr/alttab +hyprctl -q --batch "keyword animations:enabled false; keyword unbind ALT, TAB ; keyword unbind ALT SHIFT, TAB" +footclient -a alttab $HOME/.config/hypr/scripts/alttab/alttab.sh $1 +hyprctl --batch -q "dispatch focuswindow address:$(cat $XDG_RUNTIME_DIR/hypr/alttab/address) ; dispatch alterzorder top" ``` ## Config versioning