Refactor of the hypr config
This commit is contained in:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
# Needs To start first
|
||||
exec-once = hypridle
|
||||
exec-once = hyprpaper
|
||||
# now via:
|
||||
exec-once = bash -c 'sleep 2 && ~/.config/hypr/scripts/wallpapers/random_wallpaper.sh > ~/.config/hypr/scripts/wallpapers/random_wallpaper.log'
|
||||
exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
exec-once = systemctl --user start hyprpolkitagent
|
||||
exec-once = sleep 2 && hyprctl reload
|
||||
@@ -0,0 +1,12 @@
|
||||
# bind = modifier (win/shift/alt/CTRL), other_button, exec, command
|
||||
# bind = $mod SHIFT, 1, movetoworkspace, 1
|
||||
|
||||
# Umlaute / German compatability on english Keyboard
|
||||
bind = $mod, a, exec, wtype "ä"
|
||||
bind = $mod SHIFT, a, exec, wtype "Ä"
|
||||
bind = $mod, o, exec, wtype "ö"
|
||||
bind = $mod SHIFT, o, exec, wtype "Ö"
|
||||
bind = $mod, u, exec, wtype "ü"
|
||||
bind = $mod SHIFT, u, exec, wtype "Ü"
|
||||
bind = $mod, s, exec, wtype "ß"
|
||||
bind = $mod SHIFT, e, exec, wtype "€"
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
general {
|
||||
hide_cursor = true
|
||||
no_fade_in = false
|
||||
grace = 0
|
||||
disable_loading_bar = true
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = ~/Pictures/Wallpapers/Static/blurred.jpg
|
||||
blur_passes = 0
|
||||
}
|
||||
|
||||
# -- time --
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%H:%M")"
|
||||
color = 0xFFceca75
|
||||
font_size = 80
|
||||
font_family = JetBrains Mono ExtraBold
|
||||
position = 0, 140
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# -- quote --
|
||||
label {
|
||||
monitor =
|
||||
text = - PAIN IS REAL, BUT SO IS HOPE -
|
||||
color = 0xFFa5d0bb
|
||||
font_size = 12
|
||||
font_family = JetBrains Mono ExtraLight
|
||||
position = 0, 80
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# -- greeting --
|
||||
label {
|
||||
monitor =
|
||||
text = Heya $USER :3
|
||||
color = 0xFFceca75
|
||||
font_size = 20
|
||||
font_family = JetBrains Mono Light
|
||||
position = 0, 0
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# -- password input --
|
||||
input-field {
|
||||
monitor =
|
||||
size = 230, 40
|
||||
outline_thickness = 0
|
||||
dots_size = 0.2
|
||||
dots_spacing = 0.4
|
||||
dots_center = true
|
||||
inner_color = 0xFF4b4900
|
||||
font_color = 0xFFceca75
|
||||
fade_on_empty = false
|
||||
placeholder_text = unlock the magic...
|
||||
fail_color = 0xFFffb4ab
|
||||
hide_input = false
|
||||
position = 0, -50
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
wallpaper {
|
||||
monitor = *
|
||||
path = /home/honney/Pictures/Wallpapers/Japanes_tempel_dark.png
|
||||
fit_mode = cover
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
disable_while_typing = false
|
||||
natural_scroll = true
|
||||
scroll_factor = 0.15
|
||||
tap-and-drag = true
|
||||
}
|
||||
sensitivity = 0 # -1.0 to 1.0; 0 means no modification.
|
||||
numlock_by_default = true
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
monitor=,preferred,auto,auto
|
||||
|
||||
# Getting monitor info:
|
||||
# hyprctl monitors -j
|
||||
#
|
||||
#
|
||||
# Example:
|
||||
# monitorv2 {
|
||||
# output = desc:BNQ BenQ EX2710U Y8P00876019
|
||||
# mode = 3840x2160@144
|
||||
# position = 0x0
|
||||
# scale = 1
|
||||
# bitdepth = 10
|
||||
# supports_hdr = 1
|
||||
# transform = 0
|
||||
# supports_wide_color = 1
|
||||
# sdr_min_luminance = 1000
|
||||
# sdr_max_luminance = 400
|
||||
# }
|
||||
#
|
||||
# monitor = desc:LG Electronics LG ULTRAFINE 503NTKF3L437, 3840x2160@60, 0x-2160, 1, transform, 2, bitdepth, 10, cm, wide
|
||||
#
|
||||
# monitor = desc:LG Electronics LG ULTRAGEAR 107MAKR2RE65, 1920x1080@144, -1920x-1080, 1, transform, 2
|
||||
@@ -0,0 +1,17 @@
|
||||
# To get monitor names: hyprctl monitors -j
|
||||
#
|
||||
# To get the class/name: hyprctl clients -j | jq '.[] | select(.workspace.id == ID_OF_THE_WORKSPACE)'
|
||||
# hyprctl clients -j | jq '.[] | select(.workspace.id == )'
|
||||
#
|
||||
# To enable scrolling
|
||||
# workspace = 1, monitor:desc:BNQ BenQ EX2710U Y8P00876019, layout:scrolling, layoutopt:direction:right
|
||||
#
|
||||
# to put a specific workspace on a monitor
|
||||
# workspace = 3, monitor:desc:LG Electronics LG ULTRAFINE 503NTKF3L437
|
||||
#
|
||||
# How to set windowrules:
|
||||
# windowrule {
|
||||
# name = Discord
|
||||
# match:class = .*discord.*
|
||||
# workspace = 4
|
||||
# }
|
||||
@@ -0,0 +1 @@
|
||||
NAME|CLASS|COMMAND|WORKSPACE
|
||||
Executable
+101
@@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||
CONFIG="$SCRIPT_DIR/workspace"
|
||||
|
||||
declare -A TARGETS
|
||||
|
||||
echo "Using config: $CONFIG"
|
||||
|
||||
if [[ ! -f "$CONFIG" ]]; then
|
||||
echo "[ERROR] Config file not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[DEBUG] Config contents:"
|
||||
cat "$CONFIG"
|
||||
echo "[DEBUG] ---------------------"
|
||||
|
||||
LINE_NUM=0
|
||||
|
||||
# -------------------------
|
||||
# Launch applications
|
||||
# -------------------------
|
||||
is_running() {
|
||||
local CLASS="$1"
|
||||
hyprctl clients -j | jq -e --arg class "$CLASS" \
|
||||
'.[] | select(.class == $class)' >/dev/null
|
||||
}
|
||||
|
||||
while IFS='|' read -r NAME CLASS COMMAND WORKSPACE; do
|
||||
[[ -z "${NAME:-}" ]] && continue
|
||||
|
||||
[[ "$NAME" == "NAME" ]] && {
|
||||
echo "[DEBUG] Skipping header row"
|
||||
continue
|
||||
}
|
||||
|
||||
echo "[DEBUG] Processing: $NAME ($CLASS)"
|
||||
|
||||
if is_running "$CLASS"; then
|
||||
echo "[INFO] $NAME already running, skipping"
|
||||
else
|
||||
echo "[INFO] Launching $NAME"
|
||||
|
||||
if pgrep -f "$COMMAND" >/dev/null 2>&1; then
|
||||
echo "[INFO] $NAME already running (pgrep match)"
|
||||
else
|
||||
if command -v "$COMMAND" >/dev/null 2>&1; then
|
||||
nohup "$COMMAND" >/dev/null 2>&1 &
|
||||
else
|
||||
echo "[WARN] '$COMMAND' not in PATH, trying desktop ID..."
|
||||
nohup gtk-launch "$CLASS" >/dev/null 2>&1 &
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
TARGETS["$CLASS"]="$WORKSPACE"
|
||||
|
||||
done < "$CONFIG"
|
||||
|
||||
echo "[INFO] Waiting for windows..."
|
||||
|
||||
declare -A DONE
|
||||
|
||||
# -------------------------
|
||||
# Wait + move windows
|
||||
# -------------------------
|
||||
while true; do
|
||||
ALL_DONE=true
|
||||
|
||||
for CLASS in "${!TARGETS[@]}"; do
|
||||
[[ -n "${DONE[$CLASS]:-}" ]] && continue
|
||||
|
||||
WORKSPACE="${TARGETS[$CLASS]}"
|
||||
|
||||
WIN=$(hyprctl clients -j |
|
||||
jq -r --arg class "$CLASS" \
|
||||
'.[] | select(.class == $class) | .address' |
|
||||
head -n1)
|
||||
|
||||
if [[ -z "$WIN" ]]; then
|
||||
echo "[DEBUG] Waiting for window class: $CLASS"
|
||||
ALL_DONE=false
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "[INFO] Found $CLASS -> $WIN (workspace $WORKSPACE)"
|
||||
|
||||
hyprctl dispatch movetoworkspacesilent "$WORKSPACE,address:$WIN"
|
||||
|
||||
DONE["$CLASS"]=1
|
||||
done
|
||||
|
||||
if $ALL_DONE; then
|
||||
echo "[INFO] All windows moved."
|
||||
break
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
done
|
||||
@@ -0,0 +1,3 @@
|
||||
NAME|CLASS|COMMAND|WORKSPACE
|
||||
Floorp|floorp|floorp|3
|
||||
KeePassXC|org.keepassxc.KeePassXC|keepassxc|401
|
||||
Reference in New Issue
Block a user