Regenerated
This commit is contained in:
+400
-329
File diff suppressed because it is too large
Load Diff
+94
-29
@@ -2621,13 +2621,13 @@ in
|
|||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
".config/waybar/scripts/workspaceswindows.sh" = {
|
".config/waybar/scripts/hypr-workspaces.sh" = {
|
||||||
text = builtins.readFile "${assetPath}/scripts/workspaceswindows.sh";
|
text = builtins.readFile "${assetPath}/scripts/hypr-workspaces.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
".config/waybar/scripts/workspaceswindowsmenu.sh" = {
|
".config/waybar/scripts/hypr-workspacesmenu.sh" = {
|
||||||
text = builtins.readFile "${assetPath}/scripts/workspaceswindowsmenu.sh";
|
text = builtins.readFile "${assetPath}/scripts/hypr-workspacesmenu.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
@@ -2663,7 +2663,10 @@ These are config files for waybar
|
|||||||
|
|
||||||
//"modules-left": ["hyprland/window"],
|
//"modules-left": ["hyprland/window"],
|
||||||
|
|
||||||
"modules-center": ["hyprland/workspaces" ],
|
"modules-center": [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
"custom/hypr-workspaces"
|
||||||
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"idle_inhibitor",
|
"idle_inhibitor",
|
||||||
@@ -2678,6 +2681,15 @@ These are config files for waybar
|
|||||||
"clock",
|
"clock",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"custom/hypr-workspaces": {
|
||||||
|
"exec": "~/.config/waybar/scripts/hypr-workspaces.sh",
|
||||||
|
"interval": 2,
|
||||||
|
"return-type": "json",
|
||||||
|
"format": "{name}",
|
||||||
|
"on-click": "~/.config/waybar/scripts/hypr-workspacesmenu.sh",
|
||||||
|
"tooltip": true
|
||||||
|
}
|
||||||
|
|
||||||
"custom/bluetooth": {
|
"custom/bluetooth": {
|
||||||
"exec": "~/.config/waybar/scripts/bluetooth-status.sh",
|
"exec": "~/.config/waybar/scripts/bluetooth-status.sh",
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
@@ -2824,6 +2836,28 @@ window#waybar {
|
|||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Hyprland Workspaces module */
|
||||||
|
#custom-hypr-workspaces {
|
||||||
|
display: flex;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-hypr-workspaces > * {
|
||||||
|
padding: 0 6px;
|
||||||
|
border-radius: 10px;
|
||||||
|
min-width: 50px;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(45deg, @blue, @green);
|
||||||
|
color: @text;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-hypr-workspaces > *:hover {
|
||||||
|
background: linear-gradient(45deg, @green, @blue);
|
||||||
|
}
|
||||||
|
|
||||||
#clock,
|
#clock,
|
||||||
#idle_inhibitor,
|
#idle_inhibitor,
|
||||||
#battery,
|
#battery,
|
||||||
@@ -2906,29 +2940,60 @@ fi
|
|||||||
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =.config/waybar/scripts/workspaceswindows.sh=
|
** =.config/waybar/scripts/hypr-workspaces.sh=
|
||||||
These are config files for waybar
|
These are config files for waybar
|
||||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/workspaceswindows.sh :noweb yes :mkdirp yes :eval never
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never
|
||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Get active workspace ID
|
# Get all workspaces
|
||||||
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
# Using hyprctl JSON output
|
||||||
|
workspaces=$(hyprctl workspaces -j)
|
||||||
|
|
||||||
# Count clients in the active workspace
|
# Initialize output JSON
|
||||||
clients=$(hyprctl -j clients | jq --argjson w "$active_ws" '[.[] | select(.workspace.id==$w)] | length')
|
json="["
|
||||||
|
|
||||||
# Output valid JSON for Waybar
|
index=0
|
||||||
if [ "$clients" -eq 0 ]; then
|
for ws in $(echo "$workspaces" | jq -r '.[] | @base64'); do
|
||||||
echo "{\"text\":\"$active_ws\"}"
|
_jq() {
|
||||||
else
|
echo "$ws" | base64 --decode | jq -r "$1"
|
||||||
echo "{\"text\":\"$active_ws ★ $clients\"}"
|
}
|
||||||
fi
|
|
||||||
|
|
||||||
|
ws_id=$(_jq '.id')
|
||||||
|
ws_name=$(_jq '.name')
|
||||||
|
|
||||||
|
# Get windows in this workspace
|
||||||
|
windows=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$ws_id) | \"\(.id): \(.title)\"")
|
||||||
|
|
||||||
|
# Format tooltip: sequential numbering
|
||||||
|
tooltip=""
|
||||||
|
count=1
|
||||||
|
while read -r win; do
|
||||||
|
tooltip+="$count. $win\n"
|
||||||
|
count=$((count+1))
|
||||||
|
done <<< "$windows"
|
||||||
|
|
||||||
|
# If no windows
|
||||||
|
if [ -z "$tooltip" ]; then
|
||||||
|
tooltip="No windows"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output JSON for Waybar
|
||||||
|
json+=$(jq -n \
|
||||||
|
--arg name "$ws_name" \
|
||||||
|
--arg tooltip "$tooltip" \
|
||||||
|
'{text: $name, tooltip: $tooltip}')
|
||||||
|
|
||||||
|
index=$((index+1))
|
||||||
|
[ $index -lt $(echo "$workspaces" | jq length) ] && json+=","
|
||||||
|
done
|
||||||
|
|
||||||
|
json+="]"
|
||||||
|
echo "$json"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =.config/waybar/scripts/workspaceswindowsmenu.sh=
|
** =.config/waybar/scripts/hypr-workspacesmenu.sh=
|
||||||
These are config files for waybar
|
These are config files for waybar
|
||||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/workspaceswindowsmenu.sh :noweb yes :mkdirp yes :eval never
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspacesmenu.sh :noweb yes :mkdirp yes :eval never
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
clients=$(hyprctl clients -j | jq -r \
|
clients=$(hyprctl clients -j | jq -r \
|
||||||
@@ -3382,7 +3447,7 @@ window#waybar {
|
|||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.overflow {
|
#custom-hypr-workspaces.overflow {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @text;
|
color: @text;
|
||||||
@@ -3395,14 +3460,14 @@ window#waybar {
|
|||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.overflow {
|
#custom-hypr-workspaces.overflow {
|
||||||
background:
|
background:
|
||||||
linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))
|
linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))
|
||||||
padding-box,
|
padding-box,
|
||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.hidden {
|
#custom-hypr-workspaces.hidden {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -3486,12 +3551,12 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* =========================================================
|
/* =========================================================
|
||||||
* Hyprscroll overflow indicator (custom/workspaceswindows)
|
* Hyprscroll overflow indicator (custom/hypr-workspaces)
|
||||||
* States: .ok, .overflow, .error
|
* States: .ok, .overflow, .error
|
||||||
* ========================================================= */
|
* ========================================================= */
|
||||||
|
|
||||||
/* Default (no overflow): subtle pill, still hoverable for tooltip */
|
/* Default (no overflow): subtle pill, still hoverable for tooltip */
|
||||||
#custom-workspaceswindows.ok {
|
#custom-hypr-workspaces.ok {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @subtext1;
|
color: @subtext1;
|
||||||
@@ -3503,7 +3568,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make it feel interactive (hover) */
|
/* Make it feel interactive (hover) */
|
||||||
#custom-workspaceswindows.ok:hover {
|
#custom-hypr-workspaces.ok:hover {
|
||||||
color: @text;
|
color: @text;
|
||||||
background-color: @surface1;
|
background-color: @surface1;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
@@ -3511,7 +3576,7 @@ window#waybar {
|
|||||||
|
|
||||||
/* Overflow state: you already have this; keep it.
|
/* Overflow state: you already have this; keep it.
|
||||||
Optional: add hover tweak so it "pops" a bit. */
|
Optional: add hover tweak so it "pops" a bit. */
|
||||||
#custom-workspaceswindows.overflow:hover {
|
#custom-hypr-workspaces.overflow:hover {
|
||||||
background:
|
background:
|
||||||
linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
|
linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
|
||||||
padding-box,
|
padding-box,
|
||||||
@@ -3519,7 +3584,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Error state: clear but not screaming */
|
/* Error state: clear but not screaming */
|
||||||
#custom-workspaceswindows.error {
|
#custom-hypr-workspaces.error {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @text;
|
color: @text;
|
||||||
@@ -3531,7 +3596,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Optional: if you keep .hidden in the script for any reason */
|
/* Optional: if you keep .hidden in the script for any reason */
|
||||||
#custom-workspaceswindows.hidden {
|
#custom-hypr-workspaces.hidden {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
|
|
||||||
//"modules-left": ["hyprland/window"],
|
//"modules-left": ["hyprland/window"],
|
||||||
|
|
||||||
"modules-center": ["hyprland/workspaces" ],
|
"modules-center": [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
"custom/hypr-workspaces"
|
||||||
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"idle_inhibitor",
|
"idle_inhibitor",
|
||||||
@@ -19,6 +22,15 @@
|
|||||||
"clock",
|
"clock",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"custom/hypr-workspaces": {
|
||||||
|
"exec": "~/.config/waybar/scripts/hypr-workspaces.sh",
|
||||||
|
"interval": 2,
|
||||||
|
"return-type": "json",
|
||||||
|
"format": "{name}",
|
||||||
|
"on-click": "~/.config/waybar/scripts/hypr-workspacesmenu.sh",
|
||||||
|
"tooltip": true
|
||||||
|
}
|
||||||
|
|
||||||
"custom/bluetooth": {
|
"custom/bluetooth": {
|
||||||
"exec": "~/.config/waybar/scripts/bluetooth-status.sh",
|
"exec": "~/.config/waybar/scripts/bluetooth-status.sh",
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Get all workspaces
|
||||||
|
# Using hyprctl JSON output
|
||||||
|
workspaces=$(hyprctl workspaces -j)
|
||||||
|
|
||||||
|
# Initialize output JSON
|
||||||
|
json="["
|
||||||
|
|
||||||
|
index=0
|
||||||
|
for ws in $(echo "$workspaces" | jq -r '.[] | @base64'); do
|
||||||
|
_jq() {
|
||||||
|
echo "$ws" | base64 --decode | jq -r "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
ws_id=$(_jq '.id')
|
||||||
|
ws_name=$(_jq '.name')
|
||||||
|
|
||||||
|
# Get windows in this workspace
|
||||||
|
windows=$(hyprctl clients -j | jq -r ".[] | select(.workspace.id==$ws_id) | \"\(.id): \(.title)\"")
|
||||||
|
|
||||||
|
# Format tooltip: sequential numbering
|
||||||
|
tooltip=""
|
||||||
|
count=1
|
||||||
|
while read -r win; do
|
||||||
|
tooltip+="$count. $win\n"
|
||||||
|
count=$((count+1))
|
||||||
|
done <<< "$windows"
|
||||||
|
|
||||||
|
# If no windows
|
||||||
|
if [ -z "$tooltip" ]; then
|
||||||
|
tooltip="No windows"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Output JSON for Waybar
|
||||||
|
json+=$(jq -n \
|
||||||
|
--arg name "$ws_name" \
|
||||||
|
--arg tooltip "$tooltip" \
|
||||||
|
'{text: $name, tooltip: $tooltip}')
|
||||||
|
|
||||||
|
index=$((index+1))
|
||||||
|
[ $index -lt $(echo "$workspaces" | jq length) ] && json+=","
|
||||||
|
done
|
||||||
|
|
||||||
|
json+="]"
|
||||||
|
echo "$json"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
clients=$(hyprctl clients -j | jq -r \
|
||||||
|
".[] | select(.workspace.id==$active_ws) | \"\(.address)|\(.title)\"")
|
||||||
|
choice=$(echo "$clients" | cut -d'|' -f2 | wofi -dmenu -j -p "Windows")
|
||||||
|
[ -z "$choice" ] && exit 0
|
||||||
|
addr=$(echo "$clients" | grep "|$choice" | head -n1 | cut -d'|' -f1)
|
||||||
|
hyprctl dispatch focuswindow address:$addr
|
||||||
@@ -66,7 +66,7 @@ window#waybar {
|
|||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.overflow {
|
#custom-hypr-workspaces.overflow {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @text;
|
color: @text;
|
||||||
@@ -79,14 +79,14 @@ window#waybar {
|
|||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.overflow {
|
#custom-hypr-workspaces.overflow {
|
||||||
background:
|
background:
|
||||||
linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))
|
linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))
|
||||||
padding-box,
|
padding-box,
|
||||||
linear-gradient(45deg, @blue, @green) border-box;
|
linear-gradient(45deg, @blue, @green) border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-workspaceswindows.hidden {
|
#custom-hypr-workspaces.hidden {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -170,12 +170,12 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* =========================================================
|
/* =========================================================
|
||||||
* Hyprscroll overflow indicator (custom/workspaceswindows)
|
* Hyprscroll overflow indicator (custom/hypr-workspaces)
|
||||||
* States: .ok, .overflow, .error
|
* States: .ok, .overflow, .error
|
||||||
* ========================================================= */
|
* ========================================================= */
|
||||||
|
|
||||||
/* Default (no overflow): subtle pill, still hoverable for tooltip */
|
/* Default (no overflow): subtle pill, still hoverable for tooltip */
|
||||||
#custom-workspaceswindows.ok {
|
#custom-hypr-workspaces.ok {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @subtext1;
|
color: @subtext1;
|
||||||
@@ -187,7 +187,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make it feel interactive (hover) */
|
/* Make it feel interactive (hover) */
|
||||||
#custom-workspaceswindows.ok:hover {
|
#custom-hypr-workspaces.ok:hover {
|
||||||
color: @text;
|
color: @text;
|
||||||
background-color: @surface1;
|
background-color: @surface1;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
@@ -195,7 +195,7 @@ window#waybar {
|
|||||||
|
|
||||||
/* Overflow state: you already have this; keep it.
|
/* Overflow state: you already have this; keep it.
|
||||||
Optional: add hover tweak so it "pops" a bit. */
|
Optional: add hover tweak so it "pops" a bit. */
|
||||||
#custom-workspaceswindows.overflow:hover {
|
#custom-hypr-workspaces.overflow:hover {
|
||||||
background:
|
background:
|
||||||
linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
|
linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1))
|
||||||
padding-box,
|
padding-box,
|
||||||
@@ -203,7 +203,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Error state: clear but not screaming */
|
/* Error state: clear but not screaming */
|
||||||
#custom-workspaceswindows.error {
|
#custom-hypr-workspaces.error {
|
||||||
padding: 0px 1px;
|
padding: 0px 1px;
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
color: @text;
|
color: @text;
|
||||||
@@ -215,7 +215,7 @@ window#waybar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Optional: if you keep .hidden in the script for any reason */
|
/* Optional: if you keep .hidden in the script for any reason */
|
||||||
#custom-workspaceswindows.hidden {
|
#custom-hypr-workspaces.hidden {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ in
|
|||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
".config/waybar/scripts/workspaceswindows.sh" = {
|
".config/waybar/scripts/hypr-workspaces.sh" = {
|
||||||
text = builtins.readFile "${assetPath}/scripts/workspaceswindows.sh";
|
text = builtins.readFile "${assetPath}/scripts/hypr-workspaces.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
".config/waybar/scripts/workspaceswindowsmenu.sh" = {
|
".config/waybar/scripts/hypr-workspacesmenu.sh" = {
|
||||||
text = builtins.readFile "${assetPath}/scripts/workspaceswindowsmenu.sh";
|
text = builtins.readFile "${assetPath}/scripts/hypr-workspacesmenu.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user