summaryrefslogtreecommitdiff
path: root/dotfiles/hyprland
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/hyprland')
-rw-r--r--dotfiles/hyprland/.config/hypr/hyprland.conf14
-rw-r--r--dotfiles/hyprland/.config/waypaper/config.ini6
-rwxr-xr-xdotfiles/hyprland/.local/bin/hypr-refocus-scratchpad24
-rw-r--r--dotfiles/hyprland/.local/share/applications/signal-desktop.desktop12
4 files changed, 47 insertions, 9 deletions
diff --git a/dotfiles/hyprland/.config/hypr/hyprland.conf b/dotfiles/hyprland/.config/hypr/hyprland.conf
index 1c4e17c..f258353 100644
--- a/dotfiles/hyprland/.config/hypr/hyprland.conf
+++ b/dotfiles/hyprland/.config/hypr/hyprland.conf
@@ -10,18 +10,19 @@ monitor=,preferred,auto,auto
# ============================================================================
# Startup Applications
# ============================================================================
-# Portal and D-Bus setup FIRST (other apps depend on these)
+# Portal and D-Bus setup FIRST, then waybar (needs portal for appearance query)
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
-exec-once = systemctl --user start xdg-desktop-portal-hyprland xdg-desktop-portal
+# Portal restart (not start) reconnects stale portals on Hyprland restart; waybar
+# chained after so it doesn't block 25s waiting for a dead portal's appearance query
+exec-once = systemctl --user restart xdg-desktop-portal-hyprland xdg-desktop-portal && waybar > ~/.local/var/log/waybar-$(date +%Y-%m-%d-%H%M%S).log 2>&1
# Core services
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
exec-once = hyprland-plugins-setup && sleep 1 && hyprctl dismissnotify -1
-# Desktop appearance (after portal is ready)
+# Desktop appearance
exec-once = swww-daemon && sleep 1 && swww img ~/pictures/wallpaper/trondheim-norway.jpg
-exec-once = waybar > ~/.local/var/log/waybar-$(date +%Y-%m-%d-%H%M%S).log 2>&1
# Background services
exec-once = hypridle > ~/.local/var/log/hypridle-$(date +%Y-%m-%d-%H%M%S).log 2>&1
@@ -32,9 +33,10 @@ exec-once = mpd
# Pyprland (scratchpads, magnify, etc.)
exec-once = pypr
+exec-once = hypr-refocus-scratchpad
-# Apps that can start later
-exec-once = signal-desktop --start-in-tray --ozone-platform=wayland
+# Apps that can start later (sleep ensures waybar tray is registered)
+exec-once = sleep 1 && signal-desktop --start-in-tray --ozone-platform=wayland
exec-once = protonmail-bridge --no-window
exec-once = insync start
diff --git a/dotfiles/hyprland/.config/waypaper/config.ini b/dotfiles/hyprland/.config/waypaper/config.ini
index 12e60fd..83b9ea4 100644
--- a/dotfiles/hyprland/.config/waypaper/config.ini
+++ b/dotfiles/hyprland/.config/waypaper/config.ini
@@ -2,12 +2,12 @@
language = en
folder = ~/pictures/wallpaper
monitors = All
-wallpaper = ~/pictures/wallpaper/dark-lion.jpg
+wallpaper = ~/pictures/wallpaper/trondheim-norway.jpg
show_path_in_tooltip = True
backend = swww
fill = fill
sort = name
-color = #ffffff
+color = #3D3846
subfolders = False
all_subfolders = False
show_hidden = False
@@ -15,7 +15,7 @@ show_gifs_only = False
zen_mode = False
post_command =
number_of_columns = 3
-swww_transition_type = simple
+swww_transition_type = none
swww_transition_step = 63
swww_transition_angle = 0
swww_transition_duration = 2
diff --git a/dotfiles/hyprland/.local/bin/hypr-refocus-scratchpad b/dotfiles/hyprland/.local/bin/hypr-refocus-scratchpad
new file mode 100755
index 0000000..7a4bb38
--- /dev/null
+++ b/dotfiles/hyprland/.local/bin/hypr-refocus-scratchpad
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Refocus visible scratchpad after a window closes.
+# Without this, closing a regular window while a scratchpad is visible
+# leaves focus on the regular workspace instead of the scratchpad.
+
+SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
+
+socat -U - "UNIX-CONNECT:$SOCKET" | while read -r line; do
+ if [[ "$line" == closewindow* ]]; then
+ # Check if a special workspace is active on the current monitor
+ special=$(hyprctl monitors -j | python3 -c "
+import json, sys
+for m in json.load(sys.stdin):
+ sw = m.get('specialWorkspace', {})
+ if sw.get('id', 0) != 0:
+ print(sw['name'])
+ break
+" 2>/dev/null)
+ if [[ -n "$special" ]]; then
+ # Focus the top window on the special workspace
+ hyprctl dispatch focuswindow "workspace:$special" &>/dev/null
+ fi
+ fi
+done
diff --git a/dotfiles/hyprland/.local/share/applications/signal-desktop.desktop b/dotfiles/hyprland/.local/share/applications/signal-desktop.desktop
new file mode 100644
index 0000000..834c510
--- /dev/null
+++ b/dotfiles/hyprland/.local/share/applications/signal-desktop.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Name=Signal
+Comment=Signal - Private Messenger
+Icon=signal-desktop
+Exec=signal-desktop --start-in-tray --ozone-platform=wayland -- %u
+Terminal=false
+Categories=Network;InstantMessaging;
+StartupWMClass=signal
+MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
+Keywords=sgnl;chat;im;messaging;messenger;security;privat;
+X-GNOME-UsesNotifications=true