diff --git a/examples/autostart.conf.example b/examples/autostart.conf.example new file mode 100755 index 0000000..b1d2409 --- /dev/null +++ b/examples/autostart.conf.example @@ -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 diff --git a/examples/bind.conf.example b/examples/bind.conf.example new file mode 100644 index 0000000..8ed3eca --- /dev/null +++ b/examples/bind.conf.example @@ -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 "€" \ No newline at end of file diff --git a/examples/hyprlock.conf.example b/examples/hyprlock.conf.example new file mode 100755 index 0000000..b6f8c9e --- /dev/null +++ b/examples/hyprlock.conf.example @@ -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 +} diff --git a/examples/hyprpaper.conf.example b/examples/hyprpaper.conf.example new file mode 100755 index 0000000..078cfe8 --- /dev/null +++ b/examples/hyprpaper.conf.example @@ -0,0 +1,5 @@ +wallpaper { + monitor = * + path = /home/honney/Pictures/Wallpapers/Japanes_tempel_dark.png + fit_mode = cover +} \ No newline at end of file diff --git a/examples/input.conf.example b/examples/input.conf.example new file mode 100644 index 0000000..ea8c01a --- /dev/null +++ b/examples/input.conf.example @@ -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 +} \ No newline at end of file diff --git a/examples/monitor.conf.example b/examples/monitor.conf.example new file mode 100644 index 0000000..6cec1c1 --- /dev/null +++ b/examples/monitor.conf.example @@ -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 \ No newline at end of file diff --git a/examples/workspace.conf.example b/examples/workspace.conf.example new file mode 100644 index 0000000..10f94cf --- /dev/null +++ b/examples/workspace.conf.example @@ -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 +# } \ No newline at end of file diff --git a/examples/workspace.example b/examples/workspace.example new file mode 100644 index 0000000..409d733 --- /dev/null +++ b/examples/workspace.example @@ -0,0 +1 @@ +NAME|CLASS|COMMAND|WORKSPACE \ No newline at end of file diff --git a/scripts/autostart/autostart.sh b/scripts/autostart/autostart.sh new file mode 100755 index 0000000..2f3b28b --- /dev/null +++ b/scripts/autostart/autostart.sh @@ -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 \ No newline at end of file diff --git a/scripts/autostart/workspace b/scripts/autostart/workspace new file mode 100644 index 0000000..615250e --- /dev/null +++ b/scripts/autostart/workspace @@ -0,0 +1,3 @@ +NAME|CLASS|COMMAND|WORKSPACE +Floorp|floorp|floorp|3 +KeePassXC|org.keepassxc.KeePassXC|keepassxc|401