Hyprland dotfiles
refactor: toggle minimize uses jq, add gmail
4 files changed, +19 -6
+6-1UserConfigs/UserKeybinds.conf
| @@ -54,7 +54,7 @@ bind = $mainMod ALT, R, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, r | ||
| 54 | 54 | bind = $mainMod ALT, E, exec, $scriptsDir/RofiEmoji.sh # emoji menu |
| 55 | 55 | # bind = $mainMod, S, exec, $scriptsDir/RofiSearch.sh # Google search using rofi |
| 56 | 56 | bind = $mainMod ALT, O, exec, $scriptsDir/ChangeBlur.sh # Toggle blur settings |
| 57 | -bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF | |
| 57 | +# bind = $mainMod SHIFT, G, exec, $scriptsDir/GameMode.sh # Toggle animations ON/OFF | |
| 58 | 58 | bind = $mainMod ALT, L, exec, $scriptsDir/ChangeLayout.sh # Toggle Master or Dwindle Layout |
| 59 | 59 | bind = $mainMod ALT, V, exec, $scriptsDir/ClipManager.sh # Clipboard Manager |
| 60 | 60 | bind = $mainMod CTRL, R, exec, $scriptsDir/RofiThemeSelector.sh # KooL Rofi Menu Theme Selector |
| @@ -103,8 +103,13 @@ bind = $mainMod SHIFT, C, exec, gnome-calendar | ||
| 103 | 103 | # to unbind |
| 104 | 104 | #bind = $mainMod ALT, P, submap, reset |
| 105 | 105 | #submap = reset |
| 106 | + | |
| 107 | +# Easy access (Minimized Popups) | |
| 106 | 108 | bind = $mainMod, o, exec, $UserScripts/ToggleMinimize.sh hubstaff /home/huncho/Hubstaff/HubstaffClient.bin.x86_64 |
| 107 | 109 | bind = $mainMod shift, p, exec, $UserScripts/ToggleMinimize.sh proton protonvpn-app |
| 108 | 110 | bind = $mainMod, x, exec, $UserScripts/ToggleMinimize.sh ledger ledger |
| 111 | +bind = $mainMod, z, exec, $UserScripts/ToggleMinimize.sh zoho zoho-mail-desktop | |
| 112 | +bind = $mainMod, g, exec, $UserScripts/ToggleMinimize.sh chrome-fmgjjmmmlfnkbppncabfkddbjimcfncm-Default 'gtk-launch gmail' | |
| 113 | +# bind = $mainMod, g, exec, gtk-launch gmail | |
| 109 | 114 | |
| 110 | 115 | bind = $mainMod, i, exec, foot -a floating-term sh -c 'hyprctl clients | nvim' # Show the current hyprland client info |
+6-0UserConfigs/WindowRules.conf
| @@ -41,3 +41,9 @@ windowrule = float on, center on, size monitor_w*0.95 monitor_h*0.9, match:class | ||
| 41 | 41 | |
| 42 | 42 | # Crypto wallets |
| 43 | 43 | windowrule = float on, center on, size 500 800, match:title ^(_crx_nkbihfbeogaeaoehlefnkodbefgpgknn|_crx_bhhhlbepdkbapadjdnnojkbgioiodbic|_crx_bfnaelmomeimhlpmgjnjophhpkkoljpa)$ |
| 44 | + | |
| 45 | +# Zoho | |
| 46 | +windowrule = float on, center on, size monitor_w*0.95 monitor_h*0.9, match:class Zoho Mail - Desktop | |
| 47 | + | |
| 48 | +# Gmail | |
| 49 | +windowrule = float on, center on, size monitor_w*0.95 monitor_h*0.9, match:class chrome-fmgjjmmmlfnkbppncabfkddbjimcfncm-Default |
+6-4UserScripts/ToggleMinimize.sh
| @@ -1,9 +1,11 @@ | ||
| 1 | 1 | #!/bin/bash |
| 2 | 2 | |
| 3 | -details=$(hyprctl clients | grep -i "$1" -B 2 -A 15) | |
| 4 | -class=$(echo "$details" | grep -oP '(?<=class: ).*') | |
| 3 | +details=$(hyprctl clients -j | jq -r '.[] | select(.class | test("'"$1"'"; "i"))') | |
| 4 | +class=$(echo "$details" | jq -r '.class') | |
| 5 | +workspace=$(echo "$details" | jq -r '.workspace.name') | |
| 6 | +echo "$class $workspace" | |
| 5 | 7 | |
| 6 | -# Launch hubstaff and exit if not open | |
| 8 | +# Launch app and exit if class is not found | |
| 7 | 9 | if [ -z "$details" ]; then |
| 8 | 10 | $2 &>/dev/null & |
| 9 | 11 | exit 0 |
| @@ -12,7 +14,7 @@ fi | ||
| 12 | 14 | cur_workspace=$(hyprctl activeworkspace -j | jq '.id') |
| 13 | 15 | |
| 14 | 16 | # Toggle minimized |
| 15 | -if echo "$details" | grep -q "special:minimized"; then | |
| 17 | +if [ "$workspace" = "special:minimized" ]; then | |
| 16 | 18 | # Bring to current workspace |
| 17 | 19 | echo "moving to workspace: $cur_workspace" |
| 18 | 20 | hyprctl dispatch movetoworkspace "$cur_workspace", "class:$class" |
+1-1configs/Keybinds.conf
| @@ -31,7 +31,7 @@ bind = $mainMod, P, pseudo, # dwindle | ||
| 31 | 31 | bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3 |
| 32 | 32 | |
| 33 | 33 | # group |
| 34 | -bind = $mainMod, G, togglegroup # toggle group | |
| 34 | +# bind = $mainMod, G, togglegroup # toggle group | |
| 35 | 35 | bind = $mainMod CTRL, tab, changegroupactive # change focus to another window |
| 36 | 36 | |
| 37 | 37 | # Cycle windows if floating bring to top |