hyprland: Remove focusmaster.sh

I don't actually use this.
This commit is contained in:
Donovan Glover 2023-05-16 11:03:12 -04:00
parent ae8fdd8ac7
commit 4ec4d25c14
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 0 additions and 41 deletions

View File

@ -1,39 +0,0 @@
#!/bin/sh
# Temporary make the animation a fade for effect
hyprctl keyword animation workspaces,1,12,default,fade
# Get the workspace ID of the current window
cw=`hyprctl activewindow -j`
oldWorkspaceID=`echo "$cw" | jq -r '.workspace.id'`
oldAddress=`echo "$cw" | jq -r '.address'`
# Get the number of windows on the workspace (0 = do nothing, 2 or more = swap)
numWindowsOnWorkspace=`hyprctl workspaces -j | jq -r ".[] | select(.id==$oldWorkspaceID) | .windows"`
if [[ "$numWindowsOnWorkspace" -gt 1 ]]; then
# Focus the master window
hyprctl dispatch layoutmsg focusmaster master
# If the master window is the same, focus the last window
nw=`hyprctl activewindow -j`
newAddress=`echo "$nw" | jq -r '.address'`
if [[ "$newAddress" == "$oldAddress" ]]; then
hyprctl dispatch focuscurrentorlast
# If the workspaces are not the same, revert & focus the first child instead
newWorkspaceID=`hyprctl activewindow -j | jq -r '.workspace.id'`
if [[ "$oldWorkspaceID" != "$newWorkspaceID" ]]; then
# Only do so if we're not in the special workspace
if [[ "$newWorkspaceID" != "-99" ]]; then
hyprctl dispatch focuscurrentorlast
hyprctl dispatch layoutmsg focusmaster
fi
fi
fi
fi
sleep 0.1
# Use the default animation once more.
hyprctl keyword animation workspaces,1,6,default,slidevert

View File

@ -134,7 +134,6 @@
bind = SUPER, Z, exec, rofi -show drun
bind = SUPER, Return, exec, ~/.config/hypr/swapmaster.sh
bind = SUPER, backslash, exec, ~/.config/hypr/focusmaster.sh
bind = SUPER, J, layoutmsg, cyclenext
bind = SUPER, K, layoutmsg, cycleprev
bind = SUPER_SHIFT, J, layoutmsg, swapnext
@ -1241,7 +1240,6 @@
c.content.headers.accept_language = 'ja-JP,en-US'
'';
};
xdg.configFile."hypr/focusmaster.sh".source = ./focusmaster.sh;
xdg.configFile."hypr/swapmaster.sh".source = ./swapmaster.sh;
xdg.configFile."hypr/tags.sh".source = ./tags.sh;
xdg = { userDirs = { enable = true; }; };