button and script to create and switch to a new workspace

This commit is contained in:
2025-06-19 09:52:45 +02:00
parent 85483b87de
commit 9aea7f501b
6 changed files with 70 additions and 32 deletions
+13 -2
View File
@@ -11,7 +11,9 @@
"spacing": 2, // Gaps between modules (px)
"modules-left": [
"custom/rofi",
"hyprland/workspaces",
// "hyprland/workspaces",
// "custom/workspacenew",
"group/workspaceactions",
"hyprland/window",
//"hyprland/submap",
//"idle_inhibitor",
@@ -55,6 +57,7 @@
"format": "󰐥",
"tooltip": false,
"on-click": "wlogout",
"on-click-right": "hyprctl dispatch killactive",
"min-length": 2,
"max-length": 2
},
@@ -66,7 +69,6 @@
// "on-click-middle": "pkill -9 fuzzel",
"on-click": "eww open main --toggle",
"on-click-right": "pkill fuzzel || fuzzel",
"on-click-middle": "hyprctl dispatch killactive",
"min-length": 2,
"max-length": 2
},
@@ -214,6 +216,10 @@
},
// Hyprland
"group/workspaceactions": {
"modules": ["hyprland/workspaces", "custom/workspacenew"],
"orientation": "inherit"
},
"hyprland/workspaces": {
"all-outputs": true,
"format": "{name}",
@@ -223,6 +229,11 @@
"sort-by-number": true,
"active-only": false
},
"custom/workspacenew": {
"format": "+",
"tooltip": false,
"on-click": "~/.scripts/workspace-new.sh"
},
"hyprland/window": {
"max-length": 100,
"separate-outputs": true,
+11 -1
View File
@@ -37,6 +37,7 @@ tooltip {
border: 3px solid @overlay0;
}
#custom-workspacenew,
#workspaces button {
padding: 3px 5px; /* Adjusted padding to reduce height */
margin: 3px 5px; /* Reduced margin slightly */
@@ -60,13 +61,22 @@ tooltip {
background-color: @red;
}
#workspaces {
#workspaceactions {
background-color: alpha(@base, 0.6);
border-radius: 14px;
padding: 3px 6px; /* Adjusted padding to reduce height */
border: 3px solid @blue;
}
#workspaces {
padding: 0px;
margin: 0px;
}
#custom-workspacenew:hover {
background-color: alpha(@blue, 0.3);
}
#window {
background-color: alpha(@base, 0.6);
font-size: 15px; /* Slightly smaller font size */