diff options
Diffstat (limited to 'dotfiles')
19 files changed, 732 insertions, 22 deletions
diff --git a/dotfiles/common/.config/gtk-3.0/gtk.css b/dotfiles/common/.config/gtk-3.0/gtk.css index a1d4c13..cffaf78 100644 --- a/dotfiles/common/.config/gtk-3.0/gtk.css +++ b/dotfiles/common/.config/gtk-3.0/gtk.css @@ -1,6 +1,6 @@ .window-frame, .window-frame:backdrop { box-shadow: 0 0 0 black; /* removes shadow completely */ border-style: none; - margin: 1; /* this retains the ability to resize with the mouse, if 1px is too narrow, set some higher values */ + margin: 1px; /* this retains the ability to resize with the mouse, if 1px is too narrow, set some higher values */ border-radius: 0; } diff --git a/dotfiles/common/.config/systemd/user/xdg-desktop-portal-gtk.service.d/environment.conf b/dotfiles/common/.config/systemd/user/xdg-desktop-portal-gtk.service.d/environment.conf deleted file mode 100644 index e8c5e8f..0000000 --- a/dotfiles/common/.config/systemd/user/xdg-desktop-portal-gtk.service.d/environment.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -Environment="DISPLAY=:0" -Environment="XAUTHORITY=/home/cjennings/.Xauthority"
\ No newline at end of file diff --git a/dotfiles/common/.Xresources b/dotfiles/dwm/.Xresources index 96e4803..4b35809 100644 --- a/dotfiles/common/.Xresources +++ b/dotfiles/dwm/.Xresources @@ -10,8 +10,8 @@ Xft.hintstyle: hintfull Xft.hinting: 1 Xft.antialias: 1 Xft.rgba: rgb -Xcursor.size: 32 -Xcursor.theme: Vimix-white-cursors +Xcursor.size: 24 +Xcursor.theme: Bibata-Modern-Ice !! Emacs Emacs*toolBar: 0 diff --git a/dotfiles/common/.config/conky/conky.conf b/dotfiles/dwm/.config/conky/conky.conf index 09ee8ea..09ee8ea 100644 --- a/dotfiles/common/.config/conky/conky.conf +++ b/dotfiles/dwm/.config/conky/conky.conf diff --git a/dotfiles/common/.config/flameshot/flameshot.ini b/dotfiles/dwm/.config/flameshot/flameshot.ini index 8874b3b..8874b3b 100644 --- a/dotfiles/common/.config/flameshot/flameshot.ini +++ b/dotfiles/dwm/.config/flameshot/flameshot.ini diff --git a/dotfiles/common/.config/picom.conf b/dotfiles/dwm/.config/picom.conf index 0b65df7..0b65df7 100644 --- a/dotfiles/common/.config/picom.conf +++ b/dotfiles/dwm/.config/picom.conf diff --git a/dotfiles/common/.config/redshift.conf b/dotfiles/dwm/.config/redshift.conf index 92b61bf..92b61bf 100644 --- a/dotfiles/common/.config/redshift.conf +++ b/dotfiles/dwm/.config/redshift.conf diff --git a/dotfiles/common/.config/touchpad-indicator/touchpad-indicator.conf b/dotfiles/dwm/.config/touchpad-indicator/touchpad-indicator.conf index 51a9907..51a9907 100644 --- a/dotfiles/common/.config/touchpad-indicator/touchpad-indicator.conf +++ b/dotfiles/dwm/.config/touchpad-indicator/touchpad-indicator.conf diff --git a/dotfiles/common/.xinitrc b/dotfiles/dwm/.xinitrc index 991f507..991f507 100755 --- a/dotfiles/common/.xinitrc +++ b/dotfiles/dwm/.xinitrc diff --git a/dotfiles/hyprland/.config/easyeffects/output/dt770-pro-250-harman-eq.json b/dotfiles/hyprland/.config/easyeffects/output/dt770-pro-250-harman-eq.json new file mode 100644 index 0000000..8774a0f --- /dev/null +++ b/dotfiles/hyprland/.config/easyeffects/output/dt770-pro-250-harman-eq.json @@ -0,0 +1,199 @@ +{ + "output": { + "blocklist": [], + "equalizer": { + "input-gain": -4.7, + "output-gain": 0.0, + "mode": "IIR", + "num-bands": 9, + "split-channels": false, + "left": { + "band0": { + "frequency": 45.0, + "gain": -4.7, + "q": 0.4, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 102.0, + "gain": 7.0, + "q": 5.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 134.0, + "gain": -3.8, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 217.0, + "gain": 5.5, + "q": 2.3, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 2400.0, + "gain": -1.4, + "q": 4.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 3350.0, + "gain": 5.0, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 5200.0, + "gain": 0.7, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 6200.0, + "gain": -5.6, + "q": 4.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 10000.0, + "gain": -6.0, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + }, + "right": { + "band0": { + "frequency": 45.0, + "gain": -4.7, + "q": 0.4, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 102.0, + "gain": 7.0, + "q": 5.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 134.0, + "gain": -3.8, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 217.0, + "gain": 5.5, + "q": 2.3, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 2400.0, + "gain": -1.4, + "q": 4.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 3350.0, + "gain": 5.0, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 5200.0, + "gain": 0.7, + "q": 3.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 6200.0, + "gain": -5.6, + "q": 4.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 10000.0, + "gain": -6.0, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + } + }, + "plugins_order": [ + "equalizer" + ] + } +} diff --git a/dotfiles/hyprland/.config/easyeffects/output/pixel-buds-pro-2-harman-eq.json b/dotfiles/hyprland/.config/easyeffects/output/pixel-buds-pro-2-harman-eq.json new file mode 100644 index 0000000..056e216 --- /dev/null +++ b/dotfiles/hyprland/.config/easyeffects/output/pixel-buds-pro-2-harman-eq.json @@ -0,0 +1,219 @@ +{ + "output": { + "blocklist": [], + "equalizer": { + "input-gain": -2.8, + "output-gain": 0.0, + "mode": "IIR", + "num-bands": 10, + "split-channels": false, + "left": { + "band0": { + "frequency": 105.0, + "gain": 2.1, + "q": 0.7, + "type": "Lo-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 1384.0, + "gain": -4.3, + "q": 2.82, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 670.0, + "gain": 1.5, + "q": 1.78, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 41.0, + "gain": 0.8, + "q": 1.26, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 4720.0, + "gain": -3.1, + "q": 6.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 10000.0, + "gain": -0.6, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 3725.0, + "gain": 2.9, + "q": 6.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 2565.0, + "gain": 1.7, + "q": 4.21, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 153.0, + "gain": 0.7, + "q": 2.47, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band9": { + "frequency": 6024.0, + "gain": 0.7, + "q": 4.95, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + }, + "right": { + "band0": { + "frequency": 105.0, + "gain": 2.1, + "q": 0.7, + "type": "Lo-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 1384.0, + "gain": -4.3, + "q": 2.82, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 670.0, + "gain": 1.5, + "q": 1.78, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 41.0, + "gain": 0.8, + "q": 1.26, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 4720.0, + "gain": -3.1, + "q": 6.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 10000.0, + "gain": -0.6, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 3725.0, + "gain": 2.9, + "q": 6.0, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 2565.0, + "gain": 1.7, + "q": 4.21, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 153.0, + "gain": 0.7, + "q": 2.47, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band9": { + "frequency": 6024.0, + "gain": 0.7, + "q": 4.95, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + } + }, + "plugins_order": [ + "equalizer" + ] + } +} diff --git a/dotfiles/hyprland/.config/easyeffects/output/pxc-550-ii-harman-eq.json b/dotfiles/hyprland/.config/easyeffects/output/pxc-550-ii-harman-eq.json new file mode 100644 index 0000000..c400419 --- /dev/null +++ b/dotfiles/hyprland/.config/easyeffects/output/pxc-550-ii-harman-eq.json @@ -0,0 +1,219 @@ +{ + "output": { + "blocklist": [], + "equalizer": { + "input-gain": -3.0, + "output-gain": 0.0, + "mode": "IIR", + "num-bands": 10, + "split-channels": false, + "left": { + "band0": { + "frequency": 105.0, + "gain": 2.5, + "q": 0.7, + "type": "Lo-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 185.0, + "gain": -3.5, + "q": 1.35, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 2997.0, + "gain": 3.1, + "q": 1.24, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 4429.0, + "gain": 3.2, + "q": 5.98, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 5270.0, + "gain": -5.7, + "q": 4.03, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 10000.0, + "gain": -2.6, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 49.0, + "gain": -0.8, + "q": 1.84, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 359.0, + "gain": 0.8, + "q": 2.24, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 248.0, + "gain": -0.9, + "q": 4.62, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band9": { + "frequency": 735.0, + "gain": 0.4, + "q": 2.9, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + }, + "right": { + "band0": { + "frequency": 105.0, + "gain": 2.5, + "q": 0.7, + "type": "Lo-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band1": { + "frequency": 185.0, + "gain": -3.5, + "q": 1.35, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band2": { + "frequency": 2997.0, + "gain": 3.1, + "q": 1.24, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band3": { + "frequency": 4429.0, + "gain": 3.2, + "q": 5.98, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band4": { + "frequency": 5270.0, + "gain": -5.7, + "q": 4.03, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band5": { + "frequency": 10000.0, + "gain": -2.6, + "q": 0.7, + "type": "Hi-shelf", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band6": { + "frequency": 49.0, + "gain": -0.8, + "q": 1.84, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band7": { + "frequency": 359.0, + "gain": 0.8, + "q": 2.24, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band8": { + "frequency": 248.0, + "gain": -0.9, + "q": 4.62, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + }, + "band9": { + "frequency": 735.0, + "gain": 0.4, + "q": 2.9, + "type": "Bell", + "mode": "RLC (BT)", + "slope": "x1", + "mute": false, + "solo": false + } + } + }, + "plugins_order": [ + "equalizer" + ] + } +} diff --git a/dotfiles/hyprland/.config/hypr/hyprland.conf b/dotfiles/hyprland/.config/hypr/hyprland.conf index 34e44b6..67604c0 100644 --- a/dotfiles/hyprland/.config/hypr/hyprland.conf +++ b/dotfiles/hyprland/.config/hypr/hyprland.conf @@ -10,21 +10,32 @@ monitor=,preferred,auto,auto # ============================================================================ # Startup Applications # ============================================================================ +# Portal and D-Bus setup FIRST (other apps depend on these) +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = systemctl --user start xdg-desktop-portal-hyprland xdg-desktop-portal + +# Core services exec-once = hyprpm reload && sleep 1 && hyprctl dismissnotify -1 -exec-once = waybar +exec-once = /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh +exec-once = dunst > ~/.local/var/log/dunst-$(date +%Y-%m-%d-%H%M%S).log 2>&1 + +# Desktop appearance (after portal is ready) exec-once = swww-daemon && sleep 1 && swww img ~/pictures/wallpaper/trondheim-norway.jpg -exec-once = dunst -exec-once = hypridle +exec-once = waybar > ~/.local/var/log/waybar-$(date +%Y-%m-%d-%H%M%S).log 2>&1 +exec-once = set-theme "$(cat ~/.config/current-theme 2>/dev/null || echo hudson)" + +# Background services +exec-once = hypridle > ~/.local/var/log/hypridle-$(date +%Y-%m-%d-%H%M%S).log 2>&1 exec-once = /usr/lib/geoclue-2.0/demos/agent -exec-once = gammastep +exec-once = gammastep > ~/.local/var/log/gammastep-$(date +%Y-%m-%d-%H%M%S).log 2>&1 exec-once = blueman-applet -exec-once = /usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh -exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = easyeffects --gapplication-service exec-once = mpd + +# Apps that can start later exec-once = signal-desktop --start-in-tray --ozone-platform=wayland exec-once = protonmail-bridge --no-window exec-once = insync start -exec-once = set-theme "$(cat ~/.config/current-theme 2>/dev/null || echo hudson)" # ============================================================================ # Environment Variables @@ -106,6 +117,13 @@ misc { } # ============================================================================ +# Debug (temporary - disable when stable) +# ============================================================================ +debug { + disable_logs = false +} + +# ============================================================================ # XWayland # ============================================================================ xwayland { @@ -255,6 +273,7 @@ workspace = special:monitor, on-created-empty:foot --app-id foot-monitor gotop workspace = special:music, on-created-empty:foot --app-id foot-music ncmpcpp workspace = special:htop, on-created-empty:foot --app-id foot-htop htop workspace = special:network, on-created-empty:foot --app-id foot-network nmtui +workspace = special:effects, on-created-empty:easyeffects # Keybindings (single bind per scratchpad - just toggle visibility) bind = $mod SHIFT, RETURN, togglespecialworkspace, term @@ -262,6 +281,7 @@ bind = $mod, A, togglespecialworkspace, audio bind = $mod, M, togglespecialworkspace, monitor bind = $mod, SLASH, togglespecialworkspace, music bind = $mod SHIFT, H, togglespecialworkspace, htop +bind = $mod SHIFT, A, togglespecialworkspace, effects # Window rules (using app-id/class matching, Hyprland 0.53+ syntax) # Terminal scratchpad @@ -294,6 +314,11 @@ windowrule = match:class ^(foot-network)$, float on windowrule = match:class ^(foot-network)$, size (monitor_w*0.6) (monitor_h*0.6) windowrule = match:class ^(foot-network)$, center on +# EasyEffects +windowrule = match:class ^(Easy Effects)$, float on +windowrule = match:class ^(Easy Effects)$, size (monitor_w*0.6) (monitor_h*0.6) +windowrule = match:class ^(Easy Effects)$, center on + # Calculator (not a scratchpad, just launches app) bind = $mod, X, exec, qalculate-gtk bind = $mod, C, exec, hyprpicker -a diff --git a/dotfiles/hyprland/.config/waybar/config b/dotfiles/hyprland/.config/waybar/config index fdff160..66e318b 100644 --- a/dotfiles/hyprland/.config/waybar/config +++ b/dotfiles/hyprland/.config/waybar/config @@ -1,7 +1,6 @@ { "layer": "top", "position": "top", - "height": 30, "spacing": 4, "margin-top": 6, "margin-left": 10, @@ -24,6 +23,7 @@ "group/sysmonitor": { "orientation": "horizontal", + "swap-icon-label": false, "modules": [ "cpu", "temperature", diff --git a/dotfiles/hyprland/.config/xdg-desktop-portal/portals.conf b/dotfiles/hyprland/.config/xdg-desktop-portal/portals.conf new file mode 100644 index 0000000..9cc87a2 --- /dev/null +++ b/dotfiles/hyprland/.config/xdg-desktop-portal/portals.conf @@ -0,0 +1,3 @@ +[preferred] +default=hyprland;gtk +org.freedesktop.impl.portal.Settings=none diff --git a/dotfiles/hyprland/.local/bin/start-hyprland b/dotfiles/hyprland/.local/bin/start-hyprland new file mode 100755 index 0000000..a5d191d --- /dev/null +++ b/dotfiles/hyprland/.local/bin/start-hyprland @@ -0,0 +1,11 @@ +#!/bin/sh +# Wrapper to launch Hyprland with persistent logging +# Shadows /usr/bin/start-hyprland when ~/.local/bin is in PATH + +LOG_DIR="$HOME/.local/var/log" +TIMESTAMP=$(date +%Y-%m-%d-%H%M%S) +LOG_FILE="$LOG_DIR/hyprland-$TIMESTAMP.log" + +mkdir -p "$LOG_DIR" + +exec /usr/bin/start-hyprland "$@" > "$LOG_FILE" 2>&1 diff --git a/dotfiles/hyprland/.local/bin/toggle-scratchpad b/dotfiles/hyprland/.local/bin/toggle-scratchpad index bb10ef7..b3da6b4 100755 --- a/dotfiles/hyprland/.local/bin/toggle-scratchpad +++ b/dotfiles/hyprland/.local/bin/toggle-scratchpad @@ -9,6 +9,17 @@ if [ -z "$NAME" ]; then exit 1 fi +# Auto-detect current Hyprland socket if env var is stale +if ! hyprctl version >/dev/null 2>&1; then + # Find the most recent Hyprland instance with a socket + for dir in /run/user/"$(id -u)"/hypr/*/; do + if [ -S "${dir}.socket.sock" ]; then + export HYPRLAND_INSTANCE_SIGNATURE="$(basename "$dir")" + break + fi + done +fi + STATEFILE="/tmp/scratchpad-$NAME-open" NOW=$(date +%s) diff --git a/dotfiles/hyprland/.local/bin/waybar-layout b/dotfiles/hyprland/.local/bin/waybar-layout index 6c45877..62470aa 100755 --- a/dotfiles/hyprland/.local/bin/waybar-layout +++ b/dotfiles/hyprland/.local/bin/waybar-layout @@ -3,17 +3,17 @@ # Shows current layout with nerd font icons # Layouts: master -> tab group (monocle) -> scrolling -> floating -# Get current layout -LAYOUT=$(hyprctl getoption general:layout -j | jq -r '.str') - -# Check if workspace has allfloat enabled -ALLFLOAT=$(hyprctl activeworkspace -j | jq -r '.hasfullscreenwindow') +# Check if hyprctl is reachable +if ! hyprctl version >/dev/null 2>&1; then + echo '{"text": "<span size='"'"'large'"'"'></span>", "tooltip": "Hyprland not connected"}' + exit 0 +fi -# Check if active window is floating -FLOATING=$(hyprctl activewindow -j 2>/dev/null | jq -r '.floating // false') +# Get current layout (redirect stderr to suppress connection errors) +LAYOUT=$(hyprctl getoption general:layout -j 2>/dev/null | jq -r '.str // "unknown"') # Check workspace rules for allfloat -WSRULES=$(hyprctl activeworkspace -j | jq -r '.rules // []') +WSRULES=$(hyprctl activeworkspace -j 2>/dev/null | jq -r '.rules // []') # Determine icon and tooltip if [ "$LAYOUT" = "master" ] && echo "$WSRULES" | grep -q "allfloat"; then diff --git a/dotfiles/hyprland/.profile.d/99-hyprland-autostart.sh b/dotfiles/hyprland/.profile.d/99-hyprland-autostart.sh new file mode 100644 index 0000000..9d80353 --- /dev/null +++ b/dotfiles/hyprland/.profile.d/99-hyprland-autostart.sh @@ -0,0 +1,26 @@ +# 99-hyprland-autostart.sh +# Auto-start Hyprland on TTY1 console login + +# Guard: only on TTY1, not SSH, no existing display +[ "$XDG_VTNR" = "1" ] || return 0 +[ -z "$SSH_TTY" ] || return 0 +[ -z "$WAYLAND_DISPLAY" ] || return 0 +[ -z "$DISPLAY" ] || return 0 +command -v Hyprland >/dev/null 2>&1 || return 0 + +# Skip if flag file exists (touch ~/.skip-hyprland to disable) +[ -f "$HOME/.skip-hyprland" ] && return 0 + +# Setup logging (same pattern as start-hyprland wrapper) +_hypr_log_dir="$HOME/.local/var/log" +mkdir -p "$_hypr_log_dir" +_hypr_log="$_hypr_log_dir/hyprland-$(date +%Y-%m-%d-%H%M%S).log" + +# Clear screen and start Hyprland (no exec = return to shell on exit) +clear +Hyprland >"$_hypr_log" 2>&1 + +# Hyprland exited - inform user +echo "Hyprland session ended. Type 'start-hyprland' to restart." + +unset _hypr_log_dir _hypr_log |
