diff options
Diffstat (limited to 'dotfiles')
| -rw-r--r-- | dotfiles/common/pictures/coderman.png | bin | 0 -> 784501 bytes | |||
| -rw-r--r-- | dotfiles/common/pictures/ucb-lambda.png | bin | 0 -> 2200727 bytes | |||
| -rw-r--r-- | dotfiles/hyprland/.config/hypr/pyprland.toml | 55 | ||||
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/toggle-scratchpad | 40 |
4 files changed, 95 insertions, 0 deletions
diff --git a/dotfiles/common/pictures/coderman.png b/dotfiles/common/pictures/coderman.png Binary files differnew file mode 100644 index 0000000..0942fcf --- /dev/null +++ b/dotfiles/common/pictures/coderman.png diff --git a/dotfiles/common/pictures/ucb-lambda.png b/dotfiles/common/pictures/ucb-lambda.png Binary files differnew file mode 100644 index 0000000..2650bdc --- /dev/null +++ b/dotfiles/common/pictures/ucb-lambda.png diff --git a/dotfiles/hyprland/.config/hypr/pyprland.toml b/dotfiles/hyprland/.config/hypr/pyprland.toml new file mode 100644 index 0000000..64f4948 --- /dev/null +++ b/dotfiles/hyprland/.config/hypr/pyprland.toml @@ -0,0 +1,55 @@ +# Pyprland Configuration +# https://hyprland-community.github.io/pyprland/ + +[pyprland] +plugins = [ + "scratchpads", + "magnify", +] + +# ============================================================================ +# Magnify +# ============================================================================ +[magnify] +factor = 2 + +# ============================================================================ +# Scratchpads +# ============================================================================ +# Scratchpads use normal workspaces by default (not special workspaces), +# which prevents newly launched apps from being captured by the scratchpad. + +[scratchpads.term] +command = "foot --app-id foot-term tmux" +class = "foot-term" +size = "50% 60%" +position = "25% 20%" +animation = "fromBottom" + +[scratchpads.term2] +command = "foot --app-id foot-term2 tmux" +class = "foot-term2" +size = "50% 60%" +position = "25% 30%" +animation = "fromBottom" + +[scratchpads.audio] +command = "foot --app-id foot-audio pulsemixer" +class = "foot-audio" +size = "50% 60%" +position = "25% 20%" +animation = "fromBottom" + +[scratchpads.monitor] +command = "foot --app-id foot-monitor monitor-dashboard" +class = "foot-monitor" +size = "50% 60%" +position = "25% 20%" +animation = "fromBottom" + +[scratchpads.music] +command = "foot --app-id foot-music ncmpcpp" +class = "foot-music" +size = "60% 60%" +position = "20% 20%" +animation = "fromBottom" diff --git a/dotfiles/hyprland/.local/bin/toggle-scratchpad b/dotfiles/hyprland/.local/bin/toggle-scratchpad new file mode 100755 index 0000000..b3da6b4 --- /dev/null +++ b/dotfiles/hyprland/.local/bin/toggle-scratchpad @@ -0,0 +1,40 @@ +#!/bin/sh +# Toggle a special workspace from waybar click +# Tracks state to handle focus-loss auto-close issue +# Usage: toggle-scratchpad <name> + +NAME="$1" +if [ -z "$NAME" ]; then + echo "Usage: toggle-scratchpad <name>" + 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) + +# If state file exists and recent, scratchpad was open and just closed by focus loss +# Don't reopen it - user intended to close +if [ -f "$STATEFILE" ]; then + LAST=$(cat "$STATEFILE") + AGE=$((NOW - LAST)) + rm -f "$STATEFILE" + if [ "$AGE" -lt 2 ]; then + # Was just open, user clicked to close - don't reopen + exit 0 + fi +fi + +# Opening the scratchpad - mark timestamp +echo "$NOW" > "$STATEFILE" +hyprctl dispatch togglespecialworkspace "$NAME" |
