Regenerated

This commit is contained in:
2026-04-11 16:10:40 +02:00
parent 99ac636a53
commit a64217bfee
14 changed files with 721 additions and 458 deletions
+441 -379
View File
File diff suppressed because it is too large Load Diff
+119 -62
View File
@@ -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 \
@@ -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
@@ -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
+2 -1
View File
@@ -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
}
@@ -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"
@@ -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
@@ -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}'
@@ -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
@@ -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
+3 -3
View File
@@ -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",
@@ -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; };
@@ -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;
@@ -2,7 +2,6 @@
let
username = config.defaultUser or "henrov";
scriptsPath = flakeRoot + "/generated/.config/scripts";
scriptFiles = lib.filesystem.listFilesRecursive scriptsPath;
toRelative = file: