Regenerated
This commit is contained in:
+360
-286
File diff suppressed because it is too large
Load Diff
+65
-6
@@ -2599,8 +2599,17 @@ in
|
|||||||
text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh";
|
text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
".config/waybar/scripts/hyprscroll-overflow.sh" = {
|
||||||
|
text = builtins.readFile "${assetPath}/scripts/hyprscroll-overflow.sh";
|
||||||
|
force = true;
|
||||||
|
executable = true;
|
||||||
|
}
|
||||||
|
".config/waybar/scripts/hyprscroll-menu.sh" = {
|
||||||
|
text = builtins.readFile "${assetPath}/scripts/hyprscroll-menu.sh";
|
||||||
|
force = true;
|
||||||
|
executable = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -2633,7 +2642,10 @@ These are config files for waybar
|
|||||||
|
|
||||||
//"modules-left": ["hyprland/window"],
|
//"modules-left": ["hyprland/window"],
|
||||||
|
|
||||||
"modules-center": ["hyprland/workspaces" ],
|
"modules-center": [
|
||||||
|
"hyprland/workspaces",
|
||||||
|
"custom/hyprscroll_overflow"
|
||||||
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"idle_inhibitor",
|
"idle_inhibitor",
|
||||||
@@ -2651,6 +2663,14 @@ These are config files for waybar
|
|||||||
"custom/notifications",
|
"custom/notifications",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"custom/hyprscroll_overflow": {
|
||||||
|
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
||||||
|
"interval": 2,
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
||||||
|
"tooltip": true
|
||||||
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"custom/notifications": {
|
"custom/notifications": {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
@@ -2987,15 +3007,12 @@ window#waybar {
|
|||||||
These are config files for waybar
|
These are config files for waybar
|
||||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
bt_connected=""
|
bt_connected=""
|
||||||
|
|
||||||
while read -r _ mac name_rest; do
|
while read -r _ mac name_rest; do
|
||||||
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
||||||
bt_connected+="$name_rest\n"
|
bt_connected+="$name_rest\n"
|
||||||
fi
|
fi
|
||||||
done < <(bluetoothctl devices)
|
done < <(bluetoothctl devices)
|
||||||
|
|
||||||
# icon
|
# icon
|
||||||
if [ -n "$bt_connected" ]; then
|
if [ -n "$bt_connected" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
@@ -3004,11 +3021,53 @@ else
|
|||||||
icon=""
|
icon=""
|
||||||
tooltip="No devices connected"
|
tooltip="No devices connected"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ALWAYS produce valid JSON
|
# ALWAYS produce valid JSON
|
||||||
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** =.config/waybar/scripts/hyprscroll-overflow.sh=
|
||||||
|
These are config files for waybar
|
||||||
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hyprscroll-overflow.sh :noweb yes :mkdirp yes :eval never
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Get active workspace
|
||||||
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
# Get workspace info
|
||||||
|
ws=$(hyprctl workspaces -j | jq ".[] | select(.id==$active_ws)")
|
||||||
|
# Layout (requires hyprscroll plugin)
|
||||||
|
layout=$(echo "$ws" | jq -r '.layout // "unknown"')
|
||||||
|
# Window count
|
||||||
|
clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
|
||||||
|
count=$(echo "$clients" | jq 'length')
|
||||||
|
# Visible windows (heuristic: fullscreen or floating doesn't matter, we count all)
|
||||||
|
# If you use hyprscroll, visible windows ≈ 1 (current focus)
|
||||||
|
visible=1
|
||||||
|
# Build tooltip (list all windows)
|
||||||
|
tooltip=$(echo "$clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
|
||||||
|
# Conditions
|
||||||
|
if [[ "$layout" != "scrolling" ]]; then
|
||||||
|
echo '{"text": "", "class": "hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if (( count <= visible )); then
|
||||||
|
echo '{"text": "", "class": "hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
# Output star + count
|
||||||
|
echo "{\"text\": \"★ $count\", \"tooltip\": \"$tooltip\", \"class\": \"overflow\"}"
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** =.config/waybar/scripts/hyprscroll-menu.sh=
|
||||||
|
These are config files for waybar
|
||||||
|
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hyprscroll-menu.sh :noweb yes :mkdirp yes :eval never
|
||||||
|
#!/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 | rofi -dmenu -p "Windows")
|
||||||
|
[ -z "$choice" ] && exit 0
|
||||||
|
addr=$(echo "$clients" | grep "|$choice" | head -n1 | cut -d'|' -f1)
|
||||||
|
hyprctl dispatch focuswindow address:$addr
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
** =.config/waypaper/config.ini=
|
** =.config/waypaper/config.ini=
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
|
|
||||||
//"modules-left": ["hyprland/window"],
|
//"modules-left": ["hyprland/window"],
|
||||||
|
|
||||||
"modules-center": ["hyprland/workspaces" ],
|
"modules-center": [
|
||||||
|
"hyprland/workspaces",
|
||||||
|
"custom/hyprscroll_overflow"
|
||||||
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"idle_inhibitor",
|
"idle_inhibitor",
|
||||||
@@ -22,6 +25,14 @@
|
|||||||
"custom/notifications",
|
"custom/notifications",
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"custom/hyprscroll_overflow": {
|
||||||
|
"exec": "~/.config/waybar/scripts/hyprscroll-overflow.sh",
|
||||||
|
"interval": 2,
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "~/.config/waybar/scripts/hyprscroll-menu.sh",
|
||||||
|
"tooltip": true
|
||||||
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"custom/notifications": {
|
"custom/notifications": {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
bt_connected=""
|
bt_connected=""
|
||||||
|
|
||||||
while read -r _ mac name_rest; do
|
while read -r _ mac name_rest; do
|
||||||
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
||||||
bt_connected+="$name_rest\n"
|
bt_connected+="$name_rest\n"
|
||||||
fi
|
fi
|
||||||
done < <(bluetoothctl devices)
|
done < <(bluetoothctl devices)
|
||||||
|
|
||||||
# icon
|
# icon
|
||||||
if [ -n "$bt_connected" ]; then
|
if [ -n "$bt_connected" ]; then
|
||||||
icon=""
|
icon=""
|
||||||
@@ -16,6 +13,5 @@ else
|
|||||||
icon=""
|
icon=""
|
||||||
tooltip="No devices connected"
|
tooltip="No devices connected"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ALWAYS produce valid JSON
|
# ALWAYS produce valid JSON
|
||||||
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
|
||||||
|
|||||||
@@ -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 | rofi -dmenu -p "Windows")
|
||||||
|
[ -z "$choice" ] && exit 0
|
||||||
|
addr=$(echo "$clients" | grep "|$choice" | head -n1 | cut -d'|' -f1)
|
||||||
|
hyprctl dispatch focuswindow address:$addr
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Get active workspace
|
||||||
|
active_ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
# Get workspace info
|
||||||
|
ws=$(hyprctl workspaces -j | jq ".[] | select(.id==$active_ws)")
|
||||||
|
# Layout (requires hyprscroll plugin)
|
||||||
|
layout=$(echo "$ws" | jq -r '.layout // "unknown"')
|
||||||
|
# Window count
|
||||||
|
clients=$(hyprctl clients -j | jq "[.[] | select(.workspace.id==$active_ws)]")
|
||||||
|
count=$(echo "$clients" | jq 'length')
|
||||||
|
# Visible windows (heuristic: fullscreen or floating doesn't matter, we count all)
|
||||||
|
# If you use hyprscroll, visible windows ≈ 1 (current focus)
|
||||||
|
visible=1
|
||||||
|
# Build tooltip (list all windows)
|
||||||
|
tooltip=$(echo "$clients" | jq -r '.[].title' | sed ':a;N;$!ba;s/\n/\\n/g')
|
||||||
|
# Conditions
|
||||||
|
if [[ "$layout" != "scrolling" ]]; then
|
||||||
|
echo '{"text": "", "class": "hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if (( count <= visible )); then
|
||||||
|
echo '{"text": "", "class": "hidden"}'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
# Output star + count
|
||||||
|
echo "{\"text\": \"★ $count\", \"tooltip\": \"$tooltip\", \"class\": \"overflow\"}"
|
||||||
@@ -23,8 +23,17 @@ in
|
|||||||
text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh";
|
text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh";
|
||||||
force = true;
|
force = true;
|
||||||
executable = true;
|
executable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
".config/waybar/scripts/hyprscroll-overflow.sh" = {
|
||||||
|
text = builtins.readFile "${assetPath}/scripts/hyprscroll-overflow.sh";
|
||||||
|
force = true;
|
||||||
|
executable = true;
|
||||||
|
}
|
||||||
|
".config/waybar/scripts/hyprscroll-menu.sh" = {
|
||||||
|
text = builtins.readFile "${assetPath}/scripts/hyprscroll-menu.sh";
|
||||||
|
force = true;
|
||||||
|
executable = true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user