Commit a123d3d

Ansari <ping@ansari.wtf>
2025-12-17 16:43:59
Refactor keybinds and workspace rules; update waybar configuration and styles; replace deprecated scripts with new implementations
1 parent 038406a
Changed files (8)
.config/hypr/modules/keybinds.conf
@@ -13,8 +13,8 @@ bind = $mainMod CTRL,     s,swapwindow, d
 bind = $mainMod CTRL,     d,  swapwindow, r  
 bind = $mainMod,    TAB, hyprexpo:expo, toggle
 
-bind = $mainMod, S, togglespecialworkspace, magic
-bind = $mainMod SHIFT, TAB, movetoworkspace, special:magic
+bind = $mainMod, S, togglespecialworkspace, scratchpad
+bind = $mainMod SHIFT, TAB, movetoworkspace, special:scratchpad
 
 #CUSTOM SCRIPTS and Commands
 bind = $mainMod,    SPACE,  exec, $menu
@@ -57,11 +57,21 @@ bindm = $mainMod, mouse:273, resizewindow
 # To move around workspaces
 bind = $mainMod, mouse_up, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -lt 10 ] && hyprctl dispatch workspace $((ws+1))
 bind = $mainMod, mouse_down, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -gt 1 ] && hyprctl dispatch workspace $((ws-1))
-bind = , mouse:275, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -gt 1 ] && hyprctl dispatch workspace $((ws-1))
+
+# Move to Previous (Stops at 1)
+bind = , mouse:275, exec, \
+ws=$(hyprctl activeworkspace -j | jq '.id'); \
+[ "$ws" -gt 1 ] && hyprctl dispatch workspace $((ws - 1))
+
+# Move to Next (1, 2, 3 are persistent; 4+ only if they exist)
 bind = , mouse:276, exec, \
 ws=$(hyprctl activeworkspace -j | jq '.id'); \
-tws=$(hyprctl workspaces -j | jq 'map(.id) | map(select(. >= 0)) | max // 0'); \
-[ "$ws" -lt "$tws" ] && hyprctl dispatch workspace $((ws+1))
+max=$(hyprctl workspaces -j | jq '[.[] | select(.id > 0) | .id] | max'); \
+if [ "$ws" -lt 3 ]; then \
+    hyprctl dispatch workspace $((ws + 1)); \
+elif [ "$ws" -lt "$max" ]; then \
+    hyprctl dispatch workspace $((ws + 1)); \
+fi
 
 input {
     kb_layout = us
.config/hypr/modules/monitors.conf
@@ -13,6 +13,7 @@ windowrule = tag +floating-window, match:class (xdg-desktop-portal-gtk), match:t
 windowrule = rounding 8, match:tag pop
 
 
-
 # Apps Rules
+windowrule = workspace 1, match:class ^(zen)$
+windowrule = workspace 2, match:class ^(code|code-oss|Code-Insiders)$
 windowrule = workspace special:music, match:class ^(chrome-music\.youtube\..*)$
\ No newline at end of file
.config/waybar/config.jsonc
@@ -7,32 +7,37 @@
   "modules-center": ["hyprland/workspaces#main"],
   "modules-right": [
     "hyprland/workspaces#special",
+    "custom/special_workspaces",
     "custom/brightness",
     "pulseaudio",
     "custom/power"
   ],
+
   "hyprland/workspaces#main": {
     "disable-scroll": false,
-    "format": "{icon}",
-    "active-only": true,
     "show-special": false,
-      "persistent-workspaces": {
-    "*": [1, 2, 3]
-  },
+    "format": "{icon}",
     "format-icons": {
       "1": "",
       "2": "",
-      "3": ""
+      "3": "",
+      "music": "󰎆"
+    },
+    "persistent-workspaces": {
+      "*": ["1", "2", "3"]
     }
   },
+
   "hyprland/workspaces#special": {
-    "format": "{icon}",
+    "disable-scroll": false,
     "show-special": true,
-    "ignore-workspaces": ["1", "2", "3"],
+    "format": "{icon}",
     "format-icons": {
-      "music": "󰝚"
-    }
+      "music": "󰎆"
+    },
+    "ignore-workspaces": ["^([0-9]|10)$"]
   },
+
   "clock": {
     "interval": 1,
     "timezone": "Asia/Kolkata",
.config/waybar/style.css
@@ -73,7 +73,9 @@ menuitem:hover {
 
 #workspaces.special {
   padding: 0px;
+  padding-top: 0.5px;
   margin-right: 5px;
+  font-size: 16px;
 }
 
 #workspaces.main button,
.local/share/applications/YT Music.desktop
@@ -2,7 +2,7 @@
 Version=1.0
 Name=YT Music
 Comment=YT Music
-Exec=/home/robin/.wraith/scripts/launch-webapp https://music.youtube.com
+Exec=/home/robin/.wraith/bin/launch-webapp https://music.youtube.com
 Terminal=false
 Type=Application
 Icon=/home/robin/.assets/icons/YT Music.png
.wraith/scripts/install-webapp → .wraith/bin/install-webapp
File renamed without changes
.wraith/scripts/launch-webapp → .wraith/bin/launch-webapp
@@ -4,7 +4,7 @@ browser=$(xdg-settings get default-web-browser)
 
 case $browser in
 google-chrome* | brave-browser* | microsoft-edge* | opera* | vivaldi* | helium*) ;;
-*) browser="chromium.desktop" ;;
+*) browser="chromium" ;;
 esac
 
-exec setsid uwsm-app -- chromium --app="$1" "${@:2}"
\ No newline at end of file
+exec setsid uwsm-app -- $browser --app="$1" "${@:2}"
\ No newline at end of file
.zshrc
@@ -13,8 +13,8 @@ export ANDROID_SWT=/usr/share/java
 export JAVA_HOME=/usr/lib/jvm/java-8-openjdk
 export NVM_DIR="$HOME/.nvm"
 export FZF_DEFAULT_OPTS="--layout=reverse --height=40%"
-export WRAITH_SCRIPTS="$HOME/.wraith/scripts"
-export PATH="$PATH:$BUN_INSTALL/bin:$ANDROID_HOME/platform-tools:$JAVA_HOME:$ANDROID_HOME/emulator:$WRAITH_SCRIPTS"
+export WRAITH_BIN="$HOME/.wraith/bin"
+export PATH="$PATH:$BUN_INSTALL/bin:$ANDROID_HOME/platform-tools:$JAVA_HOME:$ANDROID_HOME/emulator:$WRAITH_BIN"
 #--------------------------------------------------------------------------------
 # SOURCING
 #--------------------------------------------------------------------------------