From 7884c798b53b0d2f8c7fa7825be38e20104678f4 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Wed, 1 Apr 2026 19:01:40 +0200 Subject: [PATCH] Regenerated --- Droidnix/README.html | 646 ++++++++++-------- Droidnix/README.org | 71 +- Droidnix/generated/.config/waybar/config | 13 +- .../waybar/scripts/bluetooth-status.sh | 4 - .../.config/waybar/scripts/hyprscroll-menu.sh | 8 + .../waybar/scripts/hyprscroll-overflow.sh | 26 + .../modules/traveldroid/desktop/waybar.nix | 11 +- 7 files changed, 481 insertions(+), 298 deletions(-) create mode 100644 Droidnix/generated/.config/waybar/scripts/hyprscroll-menu.sh create mode 100644 Droidnix/generated/.config/waybar/scripts/hyprscroll-overflow.sh diff --git a/Droidnix/README.html b/Droidnix/README.html index c9878cbc5..33be78635 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,112 +204,114 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -325,26 +327,26 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. It allows users to choose between Hyprland and Mangowc as their window manager, with shared and WM-specific configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • -
  • Mangowc
  • +
  • Core
  • +
  • Hyprland
  • +
  • Mangowc
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland and MangoWC support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -357,9 +359,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -370,16 +372,16 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

First Setup

-
+
+

First Setup

+
  1. Clone this repository.
  2. Run the setup script: ./setup_droid.
  3. @@ -409,9 +411,9 @@ The .assets/ folder contains all static files, such as configs, scr This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

flake.nix

-
+
+

flake.nix

+

The Nix flake definition for Droidnix.

@@ -480,9 +482,9 @@ The Nix flake definition for Droidnix.
-
-

generated/hosts/traveldroid/host.nix

-
+
+

generated/hosts/traveldroid/host.nix

+
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
 
@@ -540,9 +542,9 @@ in
 
-
-

generated/hosts/traveldroid/hardware-configuration.nix

-
+
+

generated/hosts/traveldroid/hardware-configuration.nix

+
  1. Boot into NixOS Live ISO or your installed system.
  2. Open a terminal.
  3. @@ -600,9 +602,9 @@ in
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
{ config, pkgs, lib, flakeRoot, ... }:
 
@@ -651,17 +653,17 @@ in
 
-
-

Following are the imported modules

+
+

Following are the imported modules

-
-

generated/traveldroid/modules/apps

-
+
+

generated/traveldroid/modules/apps

+
-
-

generated/modules/traveldroid/apps/2_b_installed.nix

-
+
+

generated/modules/traveldroid/apps/2_b_installed.nix

+

This installs a list of apps

@@ -769,9 +771,9 @@ in {
-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -825,9 +827,9 @@ com.todoist.Todoist
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -885,9 +887,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -926,9 +928,9 @@ in
-
-

.config/starship.toml

-
+
+

.config/starship.toml

+

These are config files for .config

@@ -1217,9 +1219,9 @@ crust = "#181926"
-
-

generated/modules/traveldroid/apps/thunar.nix

-
+
+

generated/modules/traveldroid/apps/thunar.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1259,9 +1261,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1294,9 +1296,9 @@ in
-
-

.config/wofi/config

-
+
+

.config/wofi/config

+

These are config files for .config/wofi

@@ -1343,9 +1345,9 @@ prompt = >
-
-

.config/wofi/style.css

-
+
+

.config/wofi/style.css

+

These are config files for .config/wofi

@@ -1434,9 +1436,9 @@ These are config files for .config/wofi
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1456,9 +1458,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1521,9 +1523,9 @@ in
-
-

=generated/.config/zsh/.zshrc

-
+
+

=generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -1544,9 +1546,9 @@ fi
-
-

generated/modules/traveldroid/apps/emacs/emacs.nix

-
+
+

generated/modules/traveldroid/apps/emacs/emacs.nix

+

This installs emacs

@@ -1642,9 +1644,9 @@ in
-
-

generated/.config/emacs/early-init.el

-
+
+

generated/.config/emacs/early-init.el

+

This contaions emacs

@@ -1745,9 +1747,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -2158,13 +2160,13 @@ the top of the file."
-
-

generated/modules/traveldroid/desktop

-
+
+

generated/modules/traveldroid/desktop

+
-
-

generated/modules/traveldroid/desktop/fonts.nix

-
+
+

generated/modules/traveldroid/desktop/fonts.nix

+

This file installs and configures fonts

@@ -2182,9 +2184,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -2210,9 +2212,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -2259,9 +2261,9 @@ in
-
-

.config/hypr/animations.conf

-
+
+

.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -2282,9 +2284,9 @@ animations {
-
-

.config/hypr/behaviour.conf

-
+
+

.config/hypr/behaviour.conf

+

These are config files for .config/hypr

@@ -2326,9 +2328,9 @@ misc {
-
-

.config/hypr/bindings.conf

-
+
+

.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -2491,9 +2493,9 @@ bind = $mainMod, W, exec, zen
-
-

.config/hypr/exec-once.conf

-
+
+

.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -2509,9 +2511,9 @@ exec-once = sh ~/Wallpapers/scripts/wallpaper.sh &
-
-

.config/hypr/hypridle.conf

-
+
+

.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -2536,9 +2538,9 @@ listener {
-
-

.config/hypr/hyprland.conf

-
+
+

.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -2585,9 +2587,9 @@ misc {
-
-

.config/hypr/hyprlock.conf

-
+
+

.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -2628,9 +2630,9 @@ label {
-
-

.config/hypr/layer-rules.conf

-
+
+

.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -2645,9 +2647,9 @@ layerrule = blur on, ignore_alpha 1, match:namespace swaync-notification-window
-
-

.config/hypr/layout.conf

-
+
+

.config/hypr/layout.conf

+

These are config files for .config/hypr

@@ -2657,9 +2659,9 @@ These are config files for .config/hypr
-
-

.config/hypr/monitor-rules.conf

-
+
+

.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -2670,9 +2672,9 @@ monitor=DP-1,3840x1080@144,1920x0,1
-
-

.config/hypr/scripts/layout-selector.sh

-
+
+

.config/hypr/scripts/layout-selector.sh

+

These are config files for .config/hypr/scripts

@@ -2715,9 +2717,9 @@ hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
-
-

.config/hypr/theming.css

-
+
+

.config/hypr/theming.css

+

These are config files for .config/hypr

@@ -2766,9 +2768,9 @@ decoration {
-
-

.config/hypr/window-rules.conf

-
+
+

.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -2797,9 +2799,9 @@ windowrulev2 = floatclass:Wofi,opacity:0.9,blur:15
-
-

.config/hypr/workspace-rules.conf

-
+
+

.config/hypr/workspace-rules.conf

+

These are config files for .config/hypr

@@ -2825,9 +2827,9 @@ workspace = 10
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -2921,9 +2923,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -3010,9 +3012,9 @@ in
 
-
-

.config/stylix/stylix.conf

-
+
+

.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -3049,9 +3051,9 @@ icons = {
-
-

.config/stylix/palette.json

-
+
+

.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -3081,9 +3083,9 @@ These are config files for .config/stylix
-
-

.config/stylix/palette.html

-
+
+

.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -3161,9 +3163,9 @@ These are config files for .config/stylix
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -3193,8 +3195,17 @@ in text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = 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; + } }; }; }; @@ -3220,9 +3231,9 @@ in
-
-

.config/waybar/config

-
+
+

.config/waybar/config

+

These are config files for waybar

@@ -3233,7 +3244,10 @@ These are config files for waybar //"modules-left": ["hyprland/window"], - "modules-center": ["hyprland/workspaces" ], + "modules-center": [ + "hyprland/workspaces", + "custom/hyprscroll_overflow" + ], "modules-right": [ "idle_inhibitor", @@ -3251,6 +3265,14 @@ These are config files for waybar "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": { "tooltip": false, @@ -3355,9 +3377,9 @@ These are config files for waybar
-
-

.config/waybar/style.css

-
+
+

.config/waybar/style.css

+

These are config files for waybar

@@ -3591,23 +3613,20 @@ window#waybar {
-
-

.config/waybar/scripts/bluetooth-status.sh

-
+
+

.config/waybar/scripts/bluetooth-status.sh

+

These are config files for waybar

#!/usr/bin/env bash
-
 bt_connected=""
-
 while read -r _ mac name_rest; do
     if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
         bt_connected+="$name_rest\n"
     fi
 done < <(bluetoothctl devices)
-
 # icon
 if [ -n "$bt_connected" ]; then
     icon=""
@@ -3616,16 +3635,71 @@ else
     icon=""
     tooltip="No devices connected"
 fi
-
 # ALWAYS produce valid JSON
 printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
 
-
-

.config/waypaper/config.ini

-
+
+

.config/waybar/scripts/hyprscroll-overflow.sh

+
+

+These are config files for waybar +

+
+
#!/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\"}"
+
+
+
+
+
+

.config/waybar/scripts/hyprscroll-menu.sh

+
+

+These are config files for waybar +

+
+
#!/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
+
+
+
+
+
+

.config/waypaper/config.ini

+

These are config files for waypaper

@@ -3662,9 +3736,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -3694,9 +3768,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -3750,13 +3824,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/bluetooth.nix

+
{ lib, config, pkgs, home-manager, ... }:
 
@@ -3777,9 +3851,9 @@ in
 
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -3806,9 +3880,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/login-tuigreet.nix

-
+
+

generated/modules/traveldroid/system/login-tuigreet.nix

+

This sets up tuigreeter which is not fancy but imo fits the aesthetic I am aiming for

@@ -3862,9 +3936,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -3926,9 +4000,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 
@@ -3945,13 +4019,13 @@ This sets the networking.
 
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/henrov.nix

-
+
+

generated/users/henrov.nix

+

This is the default user, just search and replace henrov another name if you want to change

@@ -4009,9 +4083,9 @@ in

These are all the prepared config files

-
-

.config/waybar/style.css

-
+
+

.config/waybar/style.css

+

These are config files for .config/waybar

@@ -4245,9 +4319,9 @@ window#waybar {
-
-

.config/waypaper/config.ini

-
+
+

.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -4284,9 +4358,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

.config/zed/settings.json

-
+
+

.config/zed/settings.json

+

These are config files for .config/zed

@@ -4326,7 +4400,7 @@ These are config files for .config/zed

Author: Henro Veijer

-

Created: 2026-03-31 di 22:44

+

Created: 2026-04-01 wo 19:01

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index 03d6cb51f..52583811f 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -2599,8 +2599,17 @@ in text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = 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-center": ["hyprland/workspaces" ], + "modules-center": [ + "hyprland/workspaces", + "custom/hyprscroll_overflow" + ], "modules-right": [ "idle_inhibitor", @@ -2651,6 +2663,14 @@ These are config files for waybar "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": { "tooltip": false, @@ -2987,15 +3007,12 @@ window#waybar { These are config files for waybar #+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never #!/usr/bin/env bash - bt_connected="" - while read -r _ mac name_rest; do if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then bt_connected+="$name_rest\n" fi done < <(bluetoothctl devices) - # icon if [ -n "$bt_connected" ]; then icon="" @@ -3004,11 +3021,53 @@ else icon="" tooltip="No devices connected" fi - # ALWAYS produce valid JSON printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip" #+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= diff --git a/Droidnix/generated/.config/waybar/config b/Droidnix/generated/.config/waybar/config index defe291ee..ebadef218 100644 --- a/Droidnix/generated/.config/waybar/config +++ b/Droidnix/generated/.config/waybar/config @@ -4,7 +4,10 @@ //"modules-left": ["hyprland/window"], - "modules-center": ["hyprland/workspaces" ], + "modules-center": [ + "hyprland/workspaces", + "custom/hyprscroll_overflow" + ], "modules-right": [ "idle_inhibitor", @@ -22,6 +25,14 @@ "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": { "tooltip": false, diff --git a/Droidnix/generated/.config/waybar/scripts/bluetooth-status.sh b/Droidnix/generated/.config/waybar/scripts/bluetooth-status.sh index 72f7165b6..866bda9c0 100644 --- a/Droidnix/generated/.config/waybar/scripts/bluetooth-status.sh +++ b/Droidnix/generated/.config/waybar/scripts/bluetooth-status.sh @@ -1,13 +1,10 @@ #!/usr/bin/env bash - bt_connected="" - while read -r _ mac name_rest; do if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then bt_connected+="$name_rest\n" fi done < <(bluetoothctl devices) - # icon if [ -n "$bt_connected" ]; then icon="" @@ -16,6 +13,5 @@ else icon="" tooltip="No devices connected" fi - # ALWAYS produce valid JSON printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip" diff --git a/Droidnix/generated/.config/waybar/scripts/hyprscroll-menu.sh b/Droidnix/generated/.config/waybar/scripts/hyprscroll-menu.sh new file mode 100644 index 000000000..ecae904b3 --- /dev/null +++ b/Droidnix/generated/.config/waybar/scripts/hyprscroll-menu.sh @@ -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 diff --git a/Droidnix/generated/.config/waybar/scripts/hyprscroll-overflow.sh b/Droidnix/generated/.config/waybar/scripts/hyprscroll-overflow.sh new file mode 100644 index 000000000..0af06215d --- /dev/null +++ b/Droidnix/generated/.config/waybar/scripts/hyprscroll-overflow.sh @@ -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\"}" diff --git a/Droidnix/generated/modules/traveldroid/desktop/waybar.nix b/Droidnix/generated/modules/traveldroid/desktop/waybar.nix index 55116093b..d9e9edbf2 100644 --- a/Droidnix/generated/modules/traveldroid/desktop/waybar.nix +++ b/Droidnix/generated/modules/traveldroid/desktop/waybar.nix @@ -23,8 +23,17 @@ in text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = 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; + } }; }; };