From a64217bfee200c9fcb5019d6dcf9262952e1b91a Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sat, 11 Apr 2026 16:10:40 +0200 Subject: [PATCH] Regenerated --- Droidnix/README.html | 820 ++++++++++-------- Droidnix/README.org | 181 ++-- Droidnix/generated/.config/hypr/bindings.conf | 14 +- .../generated/.config/hypr/exec-once.conf | 5 +- Droidnix/generated/.config/hypr/layout.conf | 3 +- .../.config/scripts/bluetooth-status.sh | 17 + .../.config/scripts/hypr-autocolwidth.sh | 47 + .../.config/scripts/hypr-workspaces.sh | 35 + .../.config/scripts/hypr-workspacesmenu.sh | 8 + .../.config/scripts/layout-selector.sh | 34 + Droidnix/generated/.config/waybar/config | 6 +- .../modules/traveldroid/desktop/hyprland.nix | 2 +- .../modules/traveldroid/desktop/waybar.nix | 6 +- .../traveldroid/system/copy_scripts.nix | 1 - 14 files changed, 721 insertions(+), 458 deletions(-) create mode 100644 Droidnix/generated/.config/scripts/bluetooth-status.sh create mode 100644 Droidnix/generated/.config/scripts/hypr-autocolwidth.sh create mode 100644 Droidnix/generated/.config/scripts/hypr-workspaces.sh create mode 100644 Droidnix/generated/.config/scripts/hypr-workspacesmenu.sh create mode 100644 Droidnix/generated/.config/scripts/layout-selector.sh diff --git a/Droidnix/README.html b/Droidnix/README.html index c2c7bc14d..03b95010a 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,125 +204,126 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -338,25 +339,25 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. with 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
  • +
  • Core
  • +
  • Hyprland
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

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

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -382,16 +383,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. @@ -412,9 +413,9 @@ The generated/ directory contains all generated configurations, div The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -492,9 +493,9 @@ com.todoist.Todoist This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

generated/flake.nix

-
+
+

generated/flake.nix

+

The Nix flake definition for Droidnix.

@@ -568,9 +569,9 @@ The Nix flake definition for Droidnix.
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
{ config, pkgs, lib, flakeRoot, ... }:
 
@@ -616,9 +617,9 @@ The Nix flake definition for Droidnix.
 
-
-

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. @@ -676,9 +677,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, ... }:
 
@@ -737,13 +738,13 @@ in
 
-
-

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

@@ -851,9 +852,9 @@ in {
-
-

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

-
+
+

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

+

This installs emacs

@@ -949,9 +950,9 @@ in
-
-

generated/modules/traveldroid/apps/flameshot.nix

-
+
+

generated/modules/traveldroid/apps/flameshot.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

@@ -990,9 +991,9 @@ in
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -1050,9 +1051,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -1091,9 +1092,9 @@ in
-
-

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

@@ -1134,9 +1135,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1169,9 +1170,9 @@ in
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1191,9 +1192,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1256,13 +1257,13 @@ in
-
-

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

@@ -1280,9 +1281,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -1308,9 +1309,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -1345,7 +1346,7 @@ in ".config/hypr/layer-rules.conf" = { source = "${assetPath}/layer-rules.conf"; force = true; }; ".config/hypr/layout.conf" = { source = "${assetPath}/layout.conf"; force = true; }; ".config/hypr/monitor-rules.conf" = { source = "${assetPath}/monitor-rules.conf"; force = true; }; - ".config/hypr/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; + ".config/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; ".config/hypr/theming.css" = { source = "${assetPath}/theming.css"; force = true; }; ".config/hypr/window-rules.conf" = { source = "${assetPath}/window-rules.conf"; force = true; }; ".config/hypr/workspace-rules.conf" = { source = "${assetPath}/workspace-rules.conf"; force = true; }; @@ -1357,9 +1358,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -1446,9 +1447,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -1547,9 +1548,9 @@ in
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -1575,17 +1576,17 @@ in text = builtins.replaceStrings ["henrov"] [username] (builtins.readFile "${assetPath}/style.css"); force = true; }; - ".config/waybar/scripts/bluetooth-status.sh" = { + ".config/scripts/bluetooth-status.sh" = { text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspaces.sh" = { + ".config/scripts/hypr-workspaces.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspaces.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspacesmenu.sh" = { + ".config/scripts/hypr-workspacesmenu.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspacesmenu.sh"; force = true; executable = true; @@ -1615,9 +1616,9 @@ in
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1647,9 +1648,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -1703,13 +1704,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/audio.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1727,9 +1728,9 @@ in
 
-
-

generated/modules/traveldroid/system/base-colors.nix

-
+
+

generated/modules/traveldroid/system/base-colors.nix

+
{ config, pkgs, flakeRoot, ... }:
 let
@@ -1751,9 +1752,9 @@ in
 
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/bluetooth.nix

+
{ lib, config, pkgs, home-manager, ... }:
 
@@ -1774,15 +1775,14 @@ in
 
-
-

generated/modules/traveldroid/system/copy_scripts.nix

-
+
+

generated/modules/traveldroid/system/copy_scripts.nix

+
{ lib, config, pkgs, flakeRoot, ... }:
 let
   username = config.defaultUser or "henrov";
   scriptsPath = flakeRoot + "/generated/.config/scripts";
-
   scriptFiles = lib.filesystem.listFilesRecursive scriptsPath;
 
   toRelative = file:
@@ -1812,9 +1812,9 @@ in
 
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -1841,9 +1841,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/gnome-keyring.nix

-
+
+

generated/modules/traveldroid/system/gnome-keyring.nix

+

This sets the dbus implementation

@@ -1891,9 +1891,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

@@ -1947,9 +1947,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -2012,9 +2012,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 
@@ -2030,9 +2030,9 @@ This sets the networking.
 
-
-

generated/modules/traveldroid/system/printing.nix

-
+
+

generated/modules/traveldroid/system/printing.nix

+

This sets the dbus implementation

@@ -2056,9 +2056,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/quickshell.nix

-
+
+

generated/modules/traveldroid/system/quickshell.nix

+

This sets the dbus implementation

@@ -2085,13 +2085,13 @@ This sets the dbus implementation
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/

-
+
+

generated/users/

+

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

@@ -2153,9 +2153,9 @@ in

These are all the prepared config files

-
-

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

-
+
+

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

+

This contaions emacs

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

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -2668,9 +2668,9 @@ the top of the file."
-
-

generated/.config/hypr/animations.conf

-
+
+

generated/.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -2691,9 +2691,9 @@ animations {
-
-

generated/.config/hypr/behaviour.conf

-
+
+

generated/.config/hypr/behaviour.conf

+

These are config files for .config/hypr

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

generated/.config/hypr/bindings.conf

-
+
+

generated/.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -2731,7 +2731,6 @@ bind = ALT, TAB, cyclenext, # switch layouts - # Hyprscrolling bind = $mainMod, period, layoutmsg, move +col bind = $mainMod, comma, layoutmsg, swapcol l @@ -2740,7 +2739,10 @@ bind = $mainMod, S, togglegroup # Cycle tabs in the group bind = $mainMod, L, changegroupactive, f bind = $mainMod, H, changegroupactive, b -bind = $mainMod, T, exec, ~/.config/hypr/scripts/layout-selector.sh +bind = $mainMod, T, exec, ~/.config/scripts/layout-selector.sh + +bind = $mod, W, layoutmsg, colresize +conf +bind = $mod SHIFT, W, layoutmsg, colresize -conf # Focus movement bind = $mainMod, H, movefocus, l @@ -2842,13 +2844,13 @@ bind = , XF86Sleep, exec, systemctl suspend bind = , XF86PowerOff, exec, systemctl poweroff bind = , XF86WakeUp, exec, systemctl suspend bind = $mainMod, L, exec, loginctl lock-session -# bind = $mainMod, X, exec, ~/.config/hypr/scripts/powermenu.sh +# bind = $mainMod, X, exec, ~/.config/scripts/powermenu.sh ######################### # Laptop lid settings ######################### -bindl = , switch:on:Lid Switch, exec, ~/.config/hypr/scripts/lid-action.sh -bindl = , switch:off:Lid Switch, exec, ~/.config/hypr/scripts/lid-restore.sh +bindl = , switch:on:Lid Switch, exec, ~/.config/scripts/lid-action.sh +bindl = , switch:off:Lid Switch, exec, ~/.config/scripts/lid-restore.sh ######################### # Start apps @@ -2861,7 +2863,7 @@ bind = $mainMod, W, exec, zen ######################### # Auto apps ######################### -bind = , workspace, exec, ~/.config/hypr/scripts/set-workspace-wallpaper.sh +bind = , workspace, exec, ~/.config/scripts/set-workspace-wallpaper.sh ######################### # System stuff @@ -2871,9 +2873,9 @@ bind = $mainMod, U, exec, kitty -e bash -lc "$HOME/.config/scripts/update.sh"
-
-

generated/.config/hypr/exec-once.conf

-
+
+

generated/.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -2884,17 +2886,18 @@ exec-once = systemd-run --user --scope --unit=elephant elephant exec-once = waybar exec-once = awww-daemon exec-once = awww img ~/Wallpapers/pictures/01.jpg -exec-once = ~/.config/hypr/scripts/set-workspace-wallpaper.sh -exec-once = ~/.config/hypr/scripts/workspace-listener.sh +exec-once = ~/.config/scripts/set-workspace-wallpaper.sh +exec-once = ~/.config/scripts/workspace-listener.sh exec-once = /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 exec-once = nextcloud --background +exec-once = ~/.config/scripts/hypr-autocolwidth.sh
-
-

generated/.config/hypr/hypridle.conf

-
+
+

generated/.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -2919,9 +2922,9 @@ listener {
-
-

generated/.config/hypr/hyprland.conf

-
+
+

generated/.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -2967,9 +2970,9 @@ misc {
-
-

generated/.config/hypr/hyprlock.conf

-
+
+

generated/.config/hypr/hyprlock.conf

+

These are config files for .config/hypr

@@ -3010,9 +3013,9 @@ label {
-
-

generated/.config/hypr/layer-rules.conf

-
+
+

generated/.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -3027,25 +3030,26 @@ layerrule = blur on, ignore_alpha 1, match:namespace swaync-notification-window
-
-

generated/.config/hypr/layout.conf

-
+
+

generated/.config/hypr/layout.conf

+

These are config files for .config/hypr

workspace_layouts = dwindle, master, scrolling, monocle
 scrolling {
-    column_width = 0.329
     fullscreen_on_one_column = true
+    column_width = 0.49        # default: 2 windows side by side
+    explicit_column_widths = 0.329, 0.5, 0.667, 1.0
 }
 
-
-

generated/.config/hypr/monitor-rules.conf

-
+
+

generated/.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -3056,54 +3060,9 @@ monitor=DP-1,3840x1080@144,1920x0,1
-
-

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

-
-

-These are config files for .config/hypr/scripts -

-
-
#!/usr/bin/env bash
-# layout-selector.sh
-# Select a workspace layout using Wofi, shows description, applies with layoutmsg
-
-# Define layouts and descriptions
-declare -A LAYOUTS=(
-    [dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively"
-    [master]="  Master: One main window, others stacked"
-    [scrolling]=" Scrolling: Vertical list, scroll through windows"
-    [monocle]="  Monocle: One window fills the screen"
-    [floating]="  Floating: Free move & resize"
-)
-ORDER=(dwindle master scrolling monocle floating)
-
-# Prepare Wofi menu: show "layoutname: description"
-MENU_ITEMS=()
-for key in "${ORDER[@]}"; do
-    MENU_ITEMS+=("$key: ${LAYOUTS[$key]}")
-done
-
-# Show selection menu via Wofi
-CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout")
-
-# Exit if cancelled
-[ -z "$CHOICE" ] && exit 0
-
-# Extract layout name from selection (before colon)
-LAYOUT_NAME="${CHOICE%%:*}"
-
-# Apply layout via layoutmsg
-hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME"
-
-# Show OSD feedback
-hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
-
-
-
-
-
-

generated/.config/hypr/theming.css

-
+
+

generated/.config/hypr/theming.css

+

These are config files for .config/hypr

@@ -3153,9 +3112,9 @@ decoration {
-
-

generated/.config/hypr/window-rules.conf

-
+
+

generated/.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -3193,9 +3152,9 @@ windowrule {
-
-

generated/.config/hypr/workspace-rules.conf

-
+
+

generated/.config/hypr/workspace-rules.conf

+

These are config files for .config/hypr

@@ -3220,9 +3179,112 @@ workspace = 10
-
-

generated/.config/scripts/power.sh

-
+
+

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

+
+

+Choose your layout +

+
+
#!/usr/bin/env bash
+# layout-selector.sh
+# Select a workspace layout using Wofi, shows description, applies with layoutmsg
+
+# Define layouts and descriptions
+declare -A LAYOUTS=(
+    [dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively"
+    [master]="  Master: One main window, others stacked"
+    [scrolling]=" Scrolling: Vertical list, scroll through windows"
+    [monocle]="  Monocle: One window fills the screen"
+    [floating]="  Floating: Free move & resize"
+)
+ORDER=(dwindle master scrolling monocle floating)
+
+# Prepare Wofi menu: show "layoutname: description"
+MENU_ITEMS=()
+for key in "${ORDER[@]}"; do
+    MENU_ITEMS+=("$key: ${LAYOUTS[$key]}")
+done
+
+# Show selection menu via Wofi
+CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout")
+
+# Exit if cancelled
+[ -z "$CHOICE" ] && exit 0
+
+# Extract layout name from selection (before colon)
+LAYOUT_NAME="${CHOICE%%:*}"
+
+# Apply layout via layoutmsg
+hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME"
+
+# Show OSD feedback
+hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
+
+
+
+
+
+

generated/.config/scripts/hypr-autocolwidth.sh

+
+

+These are config files for .config/scripts +

+
+
#!/usr/bin/env bash
+
+# Auto-adjust scrolling column width based on window count
+# Widths: 1 window = fullscreen (handled by hyprland)
+#         2 windows = 0.5 each
+#         3+ windows = 0.329 each
+
+get_window_count() {
+    local ws_id=$1
+    hyprctl clients -j | jq "[.[] | select(.workspace.id == $ws_id)] | length"
+}
+
+get_active_workspace() {
+    hyprctl activeworkspace -j | jq -r '.id'
+}
+
+set_column_width() {
+    local width=$1
+    hyprctl dispatch layoutmsg "colresize all $width"
+}
+
+handle_event() {
+    local event=$1
+
+    case "$event" in
+        openwindow*|closewindow*|movewindow*)
+            ws_id=$(get_active_workspace)
+            count=$(get_window_count "$ws_id")
+
+            if [ "$count" -le 1 ]; then
+                # fullscreen_on_one_column handles this
+                :
+            elif [ "$count" -eq 2 ]; then
+                set_column_width 0.5
+            else
+                set_column_width 0.329
+            fi
+            ;;
+    esac
+}
+
+# Listen to hyprland socket events
+socket="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
+
+socat -U - "UNIX-CONNECT:$socket" | while read -r line; do
+    handle_event "$line"
+done
+
+
+
+
+
+

generated/.config/scripts/power.sh

+

A file containing color variables

@@ -3279,9 +3341,9 @@ main
-
-

generated/.config/scripts/update.sh

-
+
+

generated/.config/scripts/update.sh

+

A file containing color variables

@@ -3301,9 +3363,9 @@ flatpak update -y
-
-

generated/.config/shared/colors.css

-
+
+

generated/.config/shared/colors.css

+

A file containing color variables

@@ -3343,9 +3405,9 @@ A file containing color variables
-
-

generated/.config/starship.toml

-
+
+

generated/.config/starship.toml

+

These are config files for Starship

@@ -3633,9 +3695,9 @@ crust = "#181926"
-
-

generated/.config/stylix/stylix.conf

-
+
+

generated/.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -3672,9 +3734,9 @@ icons = {
-
-

generated/.config/stylix/palette.json

-
+
+

generated/.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -3704,9 +3766,9 @@ These are config files for .config/stylix
-
-

generated/.config/stylix/palette.html

-
+
+

generated/.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -3784,9 +3846,9 @@ These are config files for .config/stylix
-
-

generated/.config/waybar/config

-
+
+

generated/.config/waybar/config

+

These are config files for waybar

@@ -3894,15 +3956,15 @@ These are config files for waybar "custom/windows": { "align": 0, "format": "{text}", - "exec": "~/.config/waybar/scripts/hypr-workspaces.sh", + "exec": "~/.config/scripts/hypr-workspaces.sh", "interval": 2, "return-type": "json", - "on-click": "~/.config/waybar/scripts/hypr-workspacesmenu.sh", + "on-click": "~/.config/scripts/hypr-workspacesmenu.sh", "tooltip": true }, "custom/bluetooth": { - "exec": "~/.config/waybar/scripts/bluetooth-status.sh", + "exec": "~/.config/scripts/bluetooth-status.sh", "interval": 5, "return-type": "json", "on-click": "blueman-manager", @@ -4038,9 +4100,9 @@ These are config files for waybar
-
-

generated/.config/waybar/style-dark.css

-
+
+

generated/.config/waybar/style-dark.css

+

This file contains all css for waybar

@@ -4249,9 +4311,9 @@ label#custom-windows:not(.active) {
-
-

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

-
+
+

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

+

These are config files for waybar

@@ -4277,9 +4339,9 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
-
-

generated/.config/waybar/scripts/hypr-workspaces.sh

-
+
+

generated/.config/scripts/hypr-workspaces.sh

+

These are config files for waybar

@@ -4323,9 +4385,9 @@ jq -c -n \
-
-

generated/.config/waybar/scripts/hypr-workspacesmenu.sh

-
+
+

generated/.config/scripts/hypr-workspacesmenu.sh

+

These are config files for waybar

@@ -4342,9 +4404,9 @@ hyprctl dispatch focuswindow address:$addr
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for waypaper

@@ -4381,9 +4443,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -4419,9 +4481,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/wofi/config

-
+
+

generated/.config/wofi/config

+

These are config files for .config/wofi

@@ -4470,9 +4532,9 @@ prompt = > ...
-
-

generated/.config/wofi/style.css

-
+
+

generated/.config/wofi/style.css

+

These are config files for .config/wofi

@@ -4567,9 +4629,9 @@ These are config files for .config/wofi
-
-

generated/.config/zed/settings.json

-
+
+

generated/.config/zed/settings.json

+

These are config files for Zed editor

@@ -4605,9 +4667,9 @@ These are config files for Zed editor
-
-

generated/.config/zsh/.zshrc

-
+
+

generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -4632,7 +4694,7 @@ fi

Author: Henro Veijer

-

Created: 2026-04-11 za 15:57

+

Created: 2026-04-11 za 16:10

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index 5990ddab7..df1c8fece 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -891,7 +891,7 @@ in ".config/hypr/layer-rules.conf" = { source = "${assetPath}/layer-rules.conf"; force = true; }; ".config/hypr/layout.conf" = { source = "${assetPath}/layout.conf"; force = true; }; ".config/hypr/monitor-rules.conf" = { source = "${assetPath}/monitor-rules.conf"; force = true; }; - ".config/hypr/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; + ".config/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; ".config/hypr/theming.css" = { source = "${assetPath}/theming.css"; force = true; }; ".config/hypr/window-rules.conf" = { source = "${assetPath}/window-rules.conf"; force = true; }; ".config/hypr/workspace-rules.conf" = { source = "${assetPath}/workspace-rules.conf"; force = true; }; @@ -1105,17 +1105,17 @@ in text = builtins.replaceStrings ["henrov"] [username] (builtins.readFile "${assetPath}/style.css"); force = true; }; - ".config/waybar/scripts/bluetooth-status.sh" = { + ".config/scripts/bluetooth-status.sh" = { text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspaces.sh" = { + ".config/scripts/hypr-workspaces.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspaces.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspacesmenu.sh" = { + ".config/scripts/hypr-workspacesmenu.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspacesmenu.sh"; force = true; executable = true; @@ -1285,7 +1285,6 @@ in let username = config.defaultUser or "henrov"; scriptsPath = flakeRoot + "/generated/.config/scripts"; - scriptFiles = lib.filesystem.listFilesRecursive scriptsPath; toRelative = file: @@ -2157,7 +2156,6 @@ bind = ALT, TAB, cyclenext, # switch layouts - # Hyprscrolling bind = $mainMod, period, layoutmsg, move +col bind = $mainMod, comma, layoutmsg, swapcol l @@ -2166,7 +2164,10 @@ bind = $mainMod, S, togglegroup # Cycle tabs in the group bind = $mainMod, L, changegroupactive, f bind = $mainMod, H, changegroupactive, b -bind = $mainMod, T, exec, ~/.config/hypr/scripts/layout-selector.sh +bind = $mainMod, T, exec, ~/.config/scripts/layout-selector.sh + +bind = $mod, W, layoutmsg, colresize +conf +bind = $mod SHIFT, W, layoutmsg, colresize -conf # Focus movement bind = $mainMod, H, movefocus, l @@ -2268,13 +2269,13 @@ bind = , XF86Sleep, exec, systemctl suspend bind = , XF86PowerOff, exec, systemctl poweroff bind = , XF86WakeUp, exec, systemctl suspend bind = $mainMod, L, exec, loginctl lock-session -# bind = $mainMod, X, exec, ~/.config/hypr/scripts/powermenu.sh +# bind = $mainMod, X, exec, ~/.config/scripts/powermenu.sh ######################### # Laptop lid settings ######################### -bindl = , switch:on:Lid Switch, exec, ~/.config/hypr/scripts/lid-action.sh -bindl = , switch:off:Lid Switch, exec, ~/.config/hypr/scripts/lid-restore.sh +bindl = , switch:on:Lid Switch, exec, ~/.config/scripts/lid-action.sh +bindl = , switch:off:Lid Switch, exec, ~/.config/scripts/lid-restore.sh ######################### # Start apps @@ -2287,7 +2288,7 @@ bind = $mainMod, W, exec, zen ######################### # Auto apps ######################### -bind = , workspace, exec, ~/.config/hypr/scripts/set-workspace-wallpaper.sh +bind = , workspace, exec, ~/.config/scripts/set-workspace-wallpaper.sh ######################### # System stuff @@ -2304,10 +2305,11 @@ exec-once = systemd-run --user --scope --unit=elephant elephant exec-once = waybar exec-once = awww-daemon exec-once = awww img ~/Wallpapers/pictures/01.jpg -exec-once = ~/.config/hypr/scripts/set-workspace-wallpaper.sh -exec-once = ~/.config/hypr/scripts/workspace-listener.sh +exec-once = ~/.config/scripts/set-workspace-wallpaper.sh +exec-once = ~/.config/scripts/workspace-listener.sh exec-once = /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 exec-once = nextcloud --background +exec-once = ~/.config/scripts/hypr-autocolwidth.sh #+END_SRC ** =generated/.config/hypr/hypridle.conf= @@ -2426,8 +2428,9 @@ These are config files for .config/hypr #+BEGIN_SRC conf :tangle generated/.config/hypr/layout.conf :noweb yes :mkdirp yes :eval never workspace_layouts = dwindle, master, scrolling, monocle scrolling { - column_width = 0.329 fullscreen_on_one_column = true + column_width = 0.49 # default: 2 windows side by side + explicit_column_widths = 0.329, 0.5, 0.667, 1.0 } #+END_SRC @@ -2438,45 +2441,6 @@ These are config files for .config/hypr monitor=DP-1,3840x1080@144,1920x0,1 #+END_SRC -** =generated/.config/hypr/scripts/layout-selector.sh= -These are config files for .config/hypr/scripts -#+BEGIN_SRC bash :tangle generated/.config/hypr/scripts/layout-selector.sh :noweb yes :mkdirp yes :eval never -#!/usr/bin/env bash -# layout-selector.sh -# Select a workspace layout using Wofi, shows description, applies with layoutmsg - -# Define layouts and descriptions -declare -A LAYOUTS=( - [dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively" - [master]=" Master: One main window, others stacked" - [scrolling]=" Scrolling: Vertical list, scroll through windows" - [monocle]=" Monocle: One window fills the screen" - [floating]=" Floating: Free move & resize" -) -ORDER=(dwindle master scrolling monocle floating) - -# Prepare Wofi menu: show "layoutname: description" -MENU_ITEMS=() -for key in "${ORDER[@]}"; do - MENU_ITEMS+=("$key: ${LAYOUTS[$key]}") -done - -# Show selection menu via Wofi -CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout") - -# Exit if cancelled -[ -z "$CHOICE" ] && exit 0 - -# Extract layout name from selection (before colon) -LAYOUT_NAME="${CHOICE%%:*}" - -# Apply layout via layoutmsg -hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME" - -# Show OSD feedback -hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000 -#+END_SRC - ** =generated/.config/hypr/theming.css= These are config files for .config/hypr #+BEGIN_SRC css :tangle generated/.config/hypr/theming.css :noweb yes :mkdirp yes :eval never @@ -2578,6 +2542,99 @@ workspace = 9 workspace = 10 #+END_SRC +** =generated/.config/scripts/layout-selector.sh= +Choose your layout +#+BEGIN_SRC bash :tangle generated/.config/scripts/layout-selector.sh :noweb yes :mkdirp yes :eval never +#!/usr/bin/env bash +# layout-selector.sh +# Select a workspace layout using Wofi, shows description, applies with layoutmsg + +# Define layouts and descriptions +declare -A LAYOUTS=( + [dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively" + [master]=" Master: One main window, others stacked" + [scrolling]=" Scrolling: Vertical list, scroll through windows" + [monocle]=" Monocle: One window fills the screen" + [floating]=" Floating: Free move & resize" +) +ORDER=(dwindle master scrolling monocle floating) + +# Prepare Wofi menu: show "layoutname: description" +MENU_ITEMS=() +for key in "${ORDER[@]}"; do + MENU_ITEMS+=("$key: ${LAYOUTS[$key]}") +done + +# Show selection menu via Wofi +CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout") + +# Exit if cancelled +[ -z "$CHOICE" ] && exit 0 + +# Extract layout name from selection (before colon) +LAYOUT_NAME="${CHOICE%%:*}" + +# Apply layout via layoutmsg +hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME" + +# Show OSD feedback +hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000 +#+END_SRC + +** =generated/.config/scripts/hypr-autocolwidth.sh= +These are config files for .config/scripts +#+BEGIN_SRC bash :tangle generated/.config/scripts/hypr-autocolwidth.sh :noweb yes :mkdirp yes :eval never +#!/usr/bin/env bash + +# Auto-adjust scrolling column width based on window count +# Widths: 1 window = fullscreen (handled by hyprland) +# 2 windows = 0.5 each +# 3+ windows = 0.329 each + +get_window_count() { + local ws_id=$1 + hyprctl clients -j | jq "[.[] | select(.workspace.id == $ws_id)] | length" +} + +get_active_workspace() { + hyprctl activeworkspace -j | jq -r '.id' +} + +set_column_width() { + local width=$1 + hyprctl dispatch layoutmsg "colresize all $width" +} + +handle_event() { + local event=$1 + + case "$event" in + openwindow*|closewindow*|movewindow*) + ws_id=$(get_active_workspace) + count=$(get_window_count "$ws_id") + + if [ "$count" -le 1 ]; then + # fullscreen_on_one_column handles this + : + elif [ "$count" -eq 2 ]; then + set_column_width 0.5 + else + set_column_width 0.329 + fi + ;; + esac +} + +# Listen to hyprland socket events +socket="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" + +socat -U - "UNIX-CONNECT:$socket" | while read -r line; do + handle_event "$line" +done +#+END_SRC + + + ** =generated/.config/scripts/power.sh= A file containing color variables #+BEGIN_SRC sh :tangle generated/.config/scripts/power.sh :noweb yes :mkdirp yes :eval never @@ -3206,15 +3263,15 @@ These are config files for waybar "custom/windows": { "align": 0, "format": "{text}", - "exec": "~/.config/waybar/scripts/hypr-workspaces.sh", + "exec": "~/.config/scripts/hypr-workspaces.sh", "interval": 2, "return-type": "json", - "on-click": "~/.config/waybar/scripts/hypr-workspacesmenu.sh", + "on-click": "~/.config/scripts/hypr-workspacesmenu.sh", "tooltip": true }, "custom/bluetooth": { - "exec": "~/.config/waybar/scripts/bluetooth-status.sh", + "exec": "~/.config/scripts/bluetooth-status.sh", "interval": 5, "return-type": "json", "on-click": "blueman-manager", @@ -3553,9 +3610,9 @@ label#custom-windows:not(.active) { } #+END_SRC -** =generated/.config/waybar/scripts/bluetooth-status.sh= +** =generated/.config/scripts/bluetooth-status.sh= 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/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never #!/usr/bin/env bash bt_connected="" while read -r _ mac name_rest; do @@ -3575,9 +3632,9 @@ fi printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip" #+END_SRC -** =generated/.config/waybar/scripts/hypr-workspaces.sh= +** =generated/.config/scripts/hypr-workspaces.sh= These are config files for waybar -#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never +#+BEGIN_SRC sh :tangle generated/.config/scripts/hypr-workspaces.sh :noweb yes :mkdirp yes :eval never #!/usr/bin/env bash # Get focused monitor name @@ -3615,9 +3672,9 @@ jq -c -n \ '{text:$text, tooltip:$tooltip, class:$class}' #+END_SRC -** =generated/.config/waybar/scripts/hypr-workspacesmenu.sh= +** =generated/.config/scripts/hypr-workspacesmenu.sh= These are config files for waybar -#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/hypr-workspacesmenu.sh :noweb yes :mkdirp yes :eval never +#+BEGIN_SRC sh :tangle generated/.config/scripts/hypr-workspacesmenu.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 \ diff --git a/Droidnix/generated/.config/hypr/bindings.conf b/Droidnix/generated/.config/hypr/bindings.conf index 70ef04e12..bb35f73eb 100644 --- a/Droidnix/generated/.config/hypr/bindings.conf +++ b/Droidnix/generated/.config/hypr/bindings.conf @@ -15,7 +15,6 @@ bind = ALT, TAB, cyclenext, # switch layouts - # Hyprscrolling bind = $mainMod, period, layoutmsg, move +col bind = $mainMod, comma, layoutmsg, swapcol l @@ -24,7 +23,10 @@ bind = $mainMod, S, togglegroup # Cycle tabs in the group bind = $mainMod, L, changegroupactive, f bind = $mainMod, H, changegroupactive, b -bind = $mainMod, T, exec, ~/.config/hypr/scripts/layout-selector.sh +bind = $mainMod, T, exec, ~/.config/scripts/layout-selector.sh + +bind = $mod, W, layoutmsg, colresize +conf +bind = $mod SHIFT, W, layoutmsg, colresize -conf # Focus movement bind = $mainMod, H, movefocus, l @@ -126,13 +128,13 @@ bind = , XF86Sleep, exec, systemctl suspend bind = , XF86PowerOff, exec, systemctl poweroff bind = , XF86WakeUp, exec, systemctl suspend bind = $mainMod, L, exec, loginctl lock-session -# bind = $mainMod, X, exec, ~/.config/hypr/scripts/powermenu.sh +# bind = $mainMod, X, exec, ~/.config/scripts/powermenu.sh ######################### # Laptop lid settings ######################### -bindl = , switch:on:Lid Switch, exec, ~/.config/hypr/scripts/lid-action.sh -bindl = , switch:off:Lid Switch, exec, ~/.config/hypr/scripts/lid-restore.sh +bindl = , switch:on:Lid Switch, exec, ~/.config/scripts/lid-action.sh +bindl = , switch:off:Lid Switch, exec, ~/.config/scripts/lid-restore.sh ######################### # Start apps @@ -145,7 +147,7 @@ bind = $mainMod, W, exec, zen ######################### # Auto apps ######################### -bind = , workspace, exec, ~/.config/hypr/scripts/set-workspace-wallpaper.sh +bind = , workspace, exec, ~/.config/scripts/set-workspace-wallpaper.sh ######################### # System stuff diff --git a/Droidnix/generated/.config/hypr/exec-once.conf b/Droidnix/generated/.config/hypr/exec-once.conf index c4ab00a25..0c7f971a7 100644 --- a/Droidnix/generated/.config/hypr/exec-once.conf +++ b/Droidnix/generated/.config/hypr/exec-once.conf @@ -4,7 +4,8 @@ exec-once = systemd-run --user --scope --unit=elephant elephant exec-once = waybar exec-once = awww-daemon exec-once = awww img ~/Wallpapers/pictures/01.jpg -exec-once = ~/.config/hypr/scripts/set-workspace-wallpaper.sh -exec-once = ~/.config/hypr/scripts/workspace-listener.sh +exec-once = ~/.config/scripts/set-workspace-wallpaper.sh +exec-once = ~/.config/scripts/workspace-listener.sh exec-once = /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 exec-once = nextcloud --background +exec-once = ~/.config/scripts/hypr-autocolwidth.sh diff --git a/Droidnix/generated/.config/hypr/layout.conf b/Droidnix/generated/.config/hypr/layout.conf index cbaa35f3b..70e1efb2f 100644 --- a/Droidnix/generated/.config/hypr/layout.conf +++ b/Droidnix/generated/.config/hypr/layout.conf @@ -1,5 +1,6 @@ workspace_layouts = dwindle, master, scrolling, monocle scrolling { - column_width = 0.329 fullscreen_on_one_column = true + column_width = 0.49 # default: 2 windows side by side + explicit_column_widths = 0.329, 0.5, 0.667, 1.0 } diff --git a/Droidnix/generated/.config/scripts/bluetooth-status.sh b/Droidnix/generated/.config/scripts/bluetooth-status.sh new file mode 100644 index 000000000..866bda9c0 --- /dev/null +++ b/Droidnix/generated/.config/scripts/bluetooth-status.sh @@ -0,0 +1,17 @@ +#!/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="" + tooltip=$(printf "%b" "$bt_connected") +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/scripts/hypr-autocolwidth.sh b/Droidnix/generated/.config/scripts/hypr-autocolwidth.sh new file mode 100644 index 000000000..edc040642 --- /dev/null +++ b/Droidnix/generated/.config/scripts/hypr-autocolwidth.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Auto-adjust scrolling column width based on window count +# Widths: 1 window = fullscreen (handled by hyprland) +# 2 windows = 0.5 each +# 3+ windows = 0.329 each + +get_window_count() { + local ws_id=$1 + hyprctl clients -j | jq "[.[] | select(.workspace.id == $ws_id)] | length" +} + +get_active_workspace() { + hyprctl activeworkspace -j | jq -r '.id' +} + +set_column_width() { + local width=$1 + hyprctl dispatch layoutmsg "colresize all $width" +} + +handle_event() { + local event=$1 + + case "$event" in + openwindow*|closewindow*|movewindow*) + ws_id=$(get_active_workspace) + count=$(get_window_count "$ws_id") + + if [ "$count" -le 1 ]; then + # fullscreen_on_one_column handles this + : + elif [ "$count" -eq 2 ]; then + set_column_width 0.5 + else + set_column_width 0.329 + fi + ;; + esac +} + +# Listen to hyprland socket events +socket="/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" + +socat -U - "UNIX-CONNECT:$socket" | while read -r line; do + handle_event "$line" +done diff --git a/Droidnix/generated/.config/scripts/hypr-workspaces.sh b/Droidnix/generated/.config/scripts/hypr-workspaces.sh new file mode 100644 index 000000000..2fe6dd730 --- /dev/null +++ b/Droidnix/generated/.config/scripts/hypr-workspaces.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Get focused monitor name +focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused==true) | .name') +monitor="${WAYBAR_OUTPUT_NAME:-$focused_monitor}" + +# Hide if not focused monitor +if [ "$monitor" != "$focused_monitor" ]; then + jq -c -n '{text:"", class:"hidden"}' + exit 0 +fi + +# Get active workspace on this monitor +active_ws=$(hyprctl monitors -j | jq -r \ + ".[] | select(.name==\"$monitor\") | .activeWorkspace.id") + +# Get clients +clients=$(hyprctl clients -j | jq -r \ + ".[] | select(.workspace.id==$active_ws) | \"\(.title)\"") + +count=$(echo "$clients" | grep -c '\S') + +# Hide if 0 or 1 clients — no point showing window switcher +if [ "$count" -le 1 ]; then + jq -c -n '{text:"", class:"hidden"}' + exit 0 +fi + +tooltip=$(echo "$clients" | sed 's/^/• /' | paste -sd '\n' -) + +jq -c -n \ + --arg text "$count" \ + --arg tooltip "$tooltip" \ + --arg class "active" \ + '{text:$text, tooltip:$tooltip, class:$class}' diff --git a/Droidnix/generated/.config/scripts/hypr-workspacesmenu.sh b/Droidnix/generated/.config/scripts/hypr-workspacesmenu.sh new file mode 100644 index 000000000..5fa46e33c --- /dev/null +++ b/Droidnix/generated/.config/scripts/hypr-workspacesmenu.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 | wofi -dmenu -j -p "Active apps" --style ~/.config/wofi/style.css) +[ -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/scripts/layout-selector.sh b/Droidnix/generated/.config/scripts/layout-selector.sh new file mode 100644 index 000000000..56f3a5ee2 --- /dev/null +++ b/Droidnix/generated/.config/scripts/layout-selector.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# layout-selector.sh +# Select a workspace layout using Wofi, shows description, applies with layoutmsg + +# Define layouts and descriptions +declare -A LAYOUTS=( + [dwindle]="舘 Dwindle: Auto-tiling, windows shrink progressively" + [master]=" Master: One main window, others stacked" + [scrolling]=" Scrolling: Vertical list, scroll through windows" + [monocle]=" Monocle: One window fills the screen" + [floating]=" Floating: Free move & resize" +) +ORDER=(dwindle master scrolling monocle floating) + +# Prepare Wofi menu: show "layoutname: description" +MENU_ITEMS=() +for key in "${ORDER[@]}"; do + MENU_ITEMS+=("$key: ${LAYOUTS[$key]}") +done + +# Show selection menu via Wofi +CHOICE=$(printf '%s\n' "${MENU_ITEMS[@]}" | wofi --dmenu --prompt "Select Layout") + +# Exit if cancelled +[ -z "$CHOICE" ] && exit 0 + +# Extract layout name from selection (before colon) +LAYOUT_NAME="${CHOICE%%:*}" + +# Apply layout via layoutmsg +hyprctl dispatch layoutmsg setlayout "$LAYOUT_NAME" + +# Show OSD feedback +hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000 diff --git a/Droidnix/generated/.config/waybar/config b/Droidnix/generated/.config/waybar/config index 769644446..2dd8bc1d1 100644 --- a/Droidnix/generated/.config/waybar/config +++ b/Droidnix/generated/.config/waybar/config @@ -101,15 +101,15 @@ "custom/windows": { "align": 0, "format": "{text}", - "exec": "~/.config/waybar/scripts/hypr-workspaces.sh", + "exec": "~/.config/scripts/hypr-workspaces.sh", "interval": 2, "return-type": "json", - "on-click": "~/.config/waybar/scripts/hypr-workspacesmenu.sh", + "on-click": "~/.config/scripts/hypr-workspacesmenu.sh", "tooltip": true }, "custom/bluetooth": { - "exec": "~/.config/waybar/scripts/bluetooth-status.sh", + "exec": "~/.config/scripts/bluetooth-status.sh", "interval": 5, "return-type": "json", "on-click": "blueman-manager", diff --git a/Droidnix/generated/modules/traveldroid/desktop/hyprland.nix b/Droidnix/generated/modules/traveldroid/desktop/hyprland.nix index acd82ecb8..b894b28aa 100644 --- a/Droidnix/generated/modules/traveldroid/desktop/hyprland.nix +++ b/Droidnix/generated/modules/traveldroid/desktop/hyprland.nix @@ -28,7 +28,7 @@ in ".config/hypr/layer-rules.conf" = { source = "${assetPath}/layer-rules.conf"; force = true; }; ".config/hypr/layout.conf" = { source = "${assetPath}/layout.conf"; force = true; }; ".config/hypr/monitor-rules.conf" = { source = "${assetPath}/monitor-rules.conf"; force = true; }; - ".config/hypr/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; + ".config/scripts/layout-selector.sh" = { source = "${assetPath}/scripts/layout-selector.sh"; executable = true; force = true; }; ".config/hypr/theming.css" = { source = "${assetPath}/theming.css"; force = true; }; ".config/hypr/window-rules.conf" = { source = "${assetPath}/window-rules.conf"; force = true; }; ".config/hypr/workspace-rules.conf" = { source = "${assetPath}/workspace-rules.conf"; force = true; }; diff --git a/Droidnix/generated/modules/traveldroid/desktop/waybar.nix b/Droidnix/generated/modules/traveldroid/desktop/waybar.nix index 999d3d8a7..ad1770a63 100644 --- a/Droidnix/generated/modules/traveldroid/desktop/waybar.nix +++ b/Droidnix/generated/modules/traveldroid/desktop/waybar.nix @@ -19,17 +19,17 @@ in text = builtins.replaceStrings ["henrov"] [username] (builtins.readFile "${assetPath}/style.css"); force = true; }; - ".config/waybar/scripts/bluetooth-status.sh" = { + ".config/scripts/bluetooth-status.sh" = { text = builtins.readFile "${assetPath}/scripts/bluetooth-status.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspaces.sh" = { + ".config/scripts/hypr-workspaces.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspaces.sh"; force = true; executable = true; }; - ".config/waybar/scripts/hypr-workspacesmenu.sh" = { + ".config/scripts/hypr-workspacesmenu.sh" = { text = builtins.readFile "${assetPath}/scripts/hypr-workspacesmenu.sh"; force = true; executable = true; diff --git a/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix b/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix index 21379330a..9cc77cc48 100644 --- a/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix +++ b/Droidnix/generated/modules/traveldroid/system/copy_scripts.nix @@ -2,7 +2,6 @@ let username = config.defaultUser or "henrov"; scriptsPath = flakeRoot + "/generated/.config/scripts"; - scriptFiles = lib.filesystem.listFilesRecursive scriptsPath; toRelative = file: