Regenerated
This commit is contained in:
+476
-386
File diff suppressed because it is too large
Load Diff
+82
-6
@@ -1257,6 +1257,7 @@ in
|
||||
pkgs.waypaper pkgs.socat ];
|
||||
|
||||
# Create the copy script using Home Manager, following Waybar style
|
||||
This can not be done using a prepared script
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
home.file = {
|
||||
@@ -1310,6 +1311,81 @@ in
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/awww/scripts/randomizeWallpapers.sh=
|
||||
Numbers all pictures in ~/Wallpapers/pictures in random order
|
||||
#+BEGIN_SRC sh :tangle generated/.config/awww/scripts/randomizeWallpapers.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
set -euo pipefail
|
||||
|
||||
WALLPAPER_DIR="$HOME/Wallpapers/pictures"
|
||||
echo "Wallpaper dir = $WALLPAPER_DIR"
|
||||
|
||||
randomize_and_rename_wallpapers() {
|
||||
echo "Randomizing JPG filenames..."
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
# Grab all jpg/JPG files
|
||||
files=("$WALLPAPER_DIR"/*.[jJ][pP][gG])
|
||||
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
echo "No JPG files found in $WALLPAPER_DIR"
|
||||
return
|
||||
fi
|
||||
|
||||
# Shuffle the array
|
||||
mapfile -t files < <(printf "%s\n" "${files[@]}" | shuf)
|
||||
|
||||
tmp_names=()
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
ext="${file##*.}"
|
||||
|
||||
# generate a random 16-character alphanumeric name
|
||||
while : ; do
|
||||
rand_name=$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c16)
|
||||
new_path="$WALLPAPER_DIR/$rand_name.$ext"
|
||||
if [[ ! -e "$new_path" ]]; then
|
||||
mv "$file" "$new_path"
|
||||
tmp_names+=("$new_path")
|
||||
echo "Renamed $file -> $new_path"
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Sequentially rename to 01.jpg ... 99.jpg
|
||||
counter=1
|
||||
for file in "${tmp_names[@]}"; do
|
||||
new_name=$(printf "%02d.jpg" "$counter")
|
||||
mv "$file" "$WALLPAPER_DIR/$new_name"
|
||||
echo "Final rename $file -> $WALLPAPER_DIR/$new_name"
|
||||
((counter++))
|
||||
[[ $counter -gt 99 ]] && break
|
||||
done
|
||||
|
||||
echo "Randomization complete."
|
||||
}
|
||||
|
||||
randomize_and_rename_wallpapers
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/awww/scripts/ws-daemon.sh=
|
||||
Little daemon that sets a workspace when user switches to a different workspace
|
||||
#+BEGIN_SRC sh :tangle generated/.config/awww/scripts/ws-daemon.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
set -euo pipefail
|
||||
|
||||
SOCK="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
exec socat -U - UNIX-CONNECT:"$SOCK" | while IFS= read -r line; do
|
||||
case "$line" in
|
||||
workspace\>\>*)
|
||||
WS="${line#workspace>>}"
|
||||
"$HOME/Wallpapers/scripts/ws-wallpaper.sh" "$WS"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
#+END_SRC
|
||||
|
||||
** =generated/modules/traveldroid/desktop/waybar.nix=
|
||||
This file installs and configures waybar
|
||||
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/desktop/waybar.nix :noweb yes :mkdirp yes :eval never
|
||||
@@ -2763,7 +2839,7 @@ bind = , XF86Calculator, exec, gnome-calculator
|
||||
#########################
|
||||
# System stuff
|
||||
#########################
|
||||
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
|
||||
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/system/scripts/update.sh; exec bash"
|
||||
bind = $mainMod, U, exec, qs -c updater
|
||||
#+END_SRC
|
||||
|
||||
@@ -2776,7 +2852,7 @@ exec-once = systemctl --user start --no-block xdg-desktop-portal
|
||||
exec-once = hypridle
|
||||
exec-once = awww-daemon
|
||||
exec-once = awww img ~/Wallpapers/pictures/01.jpg
|
||||
exec-once = ~/Wallpapers/scripts/ws-daemon.sh
|
||||
exec-once = ~/.config/awww/scripts/ws-daemon.sh
|
||||
exec-once = /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
|
||||
exec-once = nextcloud --background
|
||||
exec-once = waybar
|
||||
@@ -4077,9 +4153,9 @@ jq -c -n \
|
||||
'{text: $text, tooltip: $tooltip, class: $class, alt: $art}'
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/scripts/numlock-check.sh=
|
||||
** =generated/.config/system/scripts/numlock-check.sh=
|
||||
Count keyboards and enable numlock if more then 1, else disable
|
||||
#+BEGIN_SRC sh :tangle generated/.config/scripts/numlock-check.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
#+BEGIN_SRC sh :tangle generated/.config/system/scripts/numlock-check.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
# Tel toetsenborden met volledige toetsset (geen media-only apparaten)
|
||||
COUNT=$(libinput list-devices 2>/dev/null \
|
||||
| grep -A5 "Keyboard" \
|
||||
@@ -4095,9 +4171,9 @@ else
|
||||
fi
|
||||
#+END_SRC
|
||||
|
||||
** =generated/.config/scripts/power.sh=
|
||||
** =generated/.config/system/scripts/power.sh=
|
||||
Enables a terminal power menu
|
||||
#+BEGIN_SRC sh :tangle generated/.config/scripts/power.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
#+BEGIN_SRC sh :tangle generated/.config/system/scripts/power.sh :shebang "#!/usr/bin/env bash" :noweb yes :mkdirp yes :eval never
|
||||
#
|
||||
# Launch a power menu
|
||||
#
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get active workspace ID
|
||||
ws=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||
|
||||
# Format number with leading zero (01, 02, ...)
|
||||
num=$(printf "%02d" "$ws")
|
||||
|
||||
# Build wallpaper path
|
||||
wall="$HOME/Wallpapers/pictures/${num}.jpg"
|
||||
|
||||
# Check if file exists
|
||||
if [ -f "$wall" ]; then
|
||||
# Set wallpaper with smooth transition
|
||||
awww img "$wall" \
|
||||
--transition-type wipe \
|
||||
--transition-duration 0.5 \
|
||||
--transition-fps 60
|
||||
fi
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# -------------------------------
|
||||
# Config
|
||||
# -------------------------------
|
||||
HOME_DIR="$HOME"
|
||||
PICTURES_DIR="$HOME_DIR/Wallpapers/pictures"
|
||||
STATE_DIR="$HOME_DIR/.cache/hypr-wallpapers"
|
||||
NAMESPACE="main"
|
||||
|
||||
CURRENTPATH=/run/current-system/sw/bin
|
||||
|
||||
# Required environment variables
|
||||
: "${XDG_RUNTIME_DIR:?XDG_RUNTIME_DIR is not set}"
|
||||
: "${HYPRLAND_INSTANCE_SIGNATURE:?HYPRLAND_INSTANCE_SIGNATURE is not set}"
|
||||
: "${WAYLAND_DISPLAY:?WAYLAND_DISPLAY is not set}"
|
||||
|
||||
IPC_SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
# -------------------------------
|
||||
# Wait for Hyprland IPC socket
|
||||
# -------------------------------
|
||||
until [ -S "$IPC_SOCKET" ]; do
|
||||
echo "Waiting for Hyprland IPC socket..."
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# -------------------------------
|
||||
# Start awww-daemon if not already running
|
||||
# -------------------------------
|
||||
awww_SOCKET="$XDG_RUNTIME_DIR/awww/$NAMESPACE.sock"
|
||||
|
||||
if [ ! -S "$awww_SOCKET" ]; then
|
||||
if ! pgrep -f "awww-daemon.*--namespace $NAMESPACE" >/dev/null; then
|
||||
echo "Starting awww-daemon for namespace $NAMESPACE..."
|
||||
"$CURRENTPATH/awww-daemon" --namespace "$NAMESPACE" &
|
||||
sleep 0.5
|
||||
else
|
||||
echo "awww-daemon already running for namespace $NAMESPACE"
|
||||
fi
|
||||
fi
|
||||
|
||||
# -------------------------------
|
||||
# Load wallpapers
|
||||
# -------------------------------
|
||||
mapfile -t IMAGES < <(find "$PICTURES_DIR" -type f \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \))
|
||||
[ "${#IMAGES[@]}" -eq 0 ] && { echo "No wallpapers found in $PICTURES_DIR"; exit 1; }
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
|
||||
get_wallpaper() {
|
||||
local ws="$1"
|
||||
local mon="$2"
|
||||
local key="$STATE_DIR/ws${ws}_mon${mon}.txt"
|
||||
|
||||
if [ -f "$key" ]; then
|
||||
cat "$key"
|
||||
else
|
||||
local image="${IMAGES[RANDOM % ${#IMAGES[@]}]}"
|
||||
echo "$image" > "$key"
|
||||
echo "$image"
|
||||
fi
|
||||
}
|
||||
|
||||
# -------------------------------
|
||||
# Subscribe to workspace events
|
||||
# -------------------------------
|
||||
{
|
||||
echo '{"subscribe":["workspace"]}'
|
||||
"$CURRENTPATH/socat" - UNIX-CONNECT:"$IPC_SOCKET"
|
||||
} | while read -r line; do
|
||||
[[ "$line" =~ ^\{ ]] || continue
|
||||
|
||||
WS_NUM=$("$CURRENTPATH/jq" -r 'select(.type=="workspace" and .active==true) | .workspace' <<< "$line" 2>/dev/null || true)
|
||||
MONITOR=$("$CURRENTPATH/jq" -r '.monitor' <<< "$line" 2>/dev/null || true)
|
||||
|
||||
if [ -n "$WS_NUM" ] && [ -n "$MONITOR" ]; then
|
||||
WALLPAPER=$(get_wallpaper "$WS_NUM" "$MONITOR")
|
||||
echo "Setting wallpaper for workspace $WS_NUM on monitor $MONITOR: $WALLPAPER"
|
||||
"$CURRENTPATH/awww" img "$WALLPAPER" --resize stretch --namespace "$WS_NUM"
|
||||
fi
|
||||
done
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WS=$1
|
||||
|
||||
case "$WS" in
|
||||
0)
|
||||
awww img /home/henrov/Wallpapers/pictures/10.jpg --transition-type fade
|
||||
;;
|
||||
1)
|
||||
awww img /home/henrov/Wallpapers/pictures/01.jpg --transition-type fade
|
||||
;;
|
||||
2)
|
||||
awww img /home/henrov/Wallpapers/pictures/02.jpg --transition-type fade
|
||||
;;
|
||||
3)
|
||||
awww img /home/henrov/Wallpapers/pictures/03.jpg --transition-type fade
|
||||
;;
|
||||
4)
|
||||
awww img /home/henrov/Wallpapers/pictures/04.jpg --transition-type fade
|
||||
;;
|
||||
5)
|
||||
awww img /home/henrov/Wallpapers/pictures/05.jpg --transition-type fade
|
||||
;;
|
||||
6)
|
||||
awww img /home/henrov/Wallpapers/pictures/06.jpg --transition-type fade
|
||||
;;
|
||||
7)
|
||||
awww img /home/henrov/Wallpapers/pictures/07.jpg --transition-type fade
|
||||
;;
|
||||
8)
|
||||
awww img /home/henrov/Wallpapers/pictures/08.jpg --transition-type fade
|
||||
;;
|
||||
9)
|
||||
awww img /home/henrov/Wallpapers/pictures/09.jpg --transition-type fade
|
||||
;;
|
||||
esac
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SOCK="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
socat -U - UNIX-CONNECT:"$SOCK" | while read -r line; do
|
||||
exec socat -U - UNIX-CONNECT:"$SOCK" | while IFS= read -r line; do
|
||||
case "$line" in
|
||||
workspace>>*)
|
||||
workspace\>\>*)
|
||||
WS="${line#workspace>>}"
|
||||
~/Wallpapers/scripts/ws-wallpaper.sh "$WS"
|
||||
"$HOME/Wallpapers/scripts/ws-wallpaper.sh" "$WS"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||
set -euo pipefail
|
||||
|
||||
WALLPAPER_DIR="$HOME/Wallpapers/pictures"
|
||||
echo "Wallpaper dir = $WALLPAPER_DIR"
|
||||
|
||||
randomize_and_rename_wallpapers() {
|
||||
echo "Randomizing JPG filenames..."
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
# Grab all jpg/JPG files
|
||||
files=("$WALLPAPER_DIR"/*.[jJ][pP][gG])
|
||||
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
echo "No JPG files found in $WALLPAPER_DIR"
|
||||
return
|
||||
fi
|
||||
|
||||
# Shuffle the array
|
||||
mapfile -t files < <(printf "%s\n" "${files[@]}" | shuf)
|
||||
|
||||
tmp_names=()
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
ext="${file##*.}"
|
||||
|
||||
# generate a random 16-character alphanumeric name
|
||||
while : ; do
|
||||
rand_name=$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c16)
|
||||
new_path="$WALLPAPER_DIR/$rand_name.$ext"
|
||||
if [[ ! -e "$new_path" ]]; then
|
||||
mv "$file" "$new_path"
|
||||
tmp_names+=("$new_path")
|
||||
echo "Renamed $file -> $new_path"
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Sequentially rename to 01.jpg ... 99.jpg
|
||||
counter=1
|
||||
for file in "${tmp_names[@]}"; do
|
||||
new_name=$(printf "%02d.jpg" "$counter")
|
||||
mv "$file" "$WALLPAPER_DIR/$new_name"
|
||||
echo "Final rename $file -> $WALLPAPER_DIR/$new_name"
|
||||
((counter++))
|
||||
[[ $counter -gt 99 ]] && break
|
||||
done
|
||||
|
||||
echo "Randomization complete."
|
||||
}
|
||||
|
||||
randomize_and_rename_wallpapers
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||
set -euo pipefail
|
||||
|
||||
SOCK="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
exec socat -U - UNIX-CONNECT:"$SOCK" | while IFS= read -r line; do
|
||||
case "$line" in
|
||||
workspace\>\>*)
|
||||
WS="${line#workspace>>}"
|
||||
"$HOME/Wallpapers/scripts/ws-wallpaper.sh" "$WS"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -154,5 +154,5 @@ bind = , XF86Calculator, exec, gnome-calculator
|
||||
#########################
|
||||
# System stuff
|
||||
#########################
|
||||
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/scripts/update.sh; exec bash"
|
||||
# bind = $mainMod, U, exec, kitty --class update-term -e bash -lc "~/.config/system/scripts/update.sh; exec bash"
|
||||
bind = $mainMod, U, exec, qs -c updater
|
||||
|
||||
@@ -5,7 +5,7 @@ exec-once = systemctl --user start --no-block xdg-desktop-portal
|
||||
exec-once = hypridle
|
||||
exec-once = awww-daemon
|
||||
exec-once = awww img ~/Wallpapers/pictures/01.jpg
|
||||
exec-once = ~/Wallpapers/scripts/ws-daemon.sh
|
||||
exec-once = ~/.config/awww/scripts/ws-daemon.sh
|
||||
exec-once = /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1
|
||||
exec-once = nextcloud --background
|
||||
exec-once = waybar
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||
# Tel toetsenborden met volledige toetsset (geen media-only apparaten)
|
||||
COUNT=$(libinput list-devices 2>/dev/null \
|
||||
| grep -A5 "Keyboard" \
|
||||
| grep -c "kbd")
|
||||
|
||||
# Of via xinput / /proc alternatief:
|
||||
# COUNT=$(cat /proc/bus/input/devices | grep -B5 'KEY=.*[a-f0-9]\{10\}' | grep -c 'Name=')
|
||||
|
||||
if [ "$COUNT" -ge 2 ]; then
|
||||
numlockx on
|
||||
else
|
||||
numlockx off
|
||||
fi
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
||||
#
|
||||
# Launch a power menu
|
||||
#
|
||||
# Requires fzf and systemd (loginctl, systemctl)
|
||||
#
|
||||
# Author: Jesse Mirabel <sejjymvm@gmail.com>
|
||||
# Date: August 19, 2025
|
||||
# License: MIT
|
||||
|
||||
main() {
|
||||
local list=(
|
||||
" Lock"
|
||||
" Shutdown"
|
||||
" Reboot"
|
||||
" Logout"
|
||||
" Hibernate"
|
||||
" Suspend"
|
||||
)
|
||||
|
||||
local options=(
|
||||
"--border=sharp"
|
||||
"--border-label= Power Menu "
|
||||
"--cycle"
|
||||
"--ghost=Search"
|
||||
"--height=~100%"
|
||||
"--highlight-line"
|
||||
"--info=inline-right"
|
||||
"--pointer="
|
||||
"--reverse"
|
||||
)
|
||||
|
||||
local selected
|
||||
selected=$(printf "%s\n" "${list[@]}" | fzf "${options[@]}")
|
||||
|
||||
case $selected in
|
||||
Lock) loginctl lock-session ;;
|
||||
Shutdown) systemctl poweroff ;;
|
||||
Reboot) systemctl reboot ;;
|
||||
Logout) loginctl terminate-session "$XDG_SESSION_ID" ;;
|
||||
Hibernate) systemctl hibernate ;;
|
||||
Suspend) systemctl suspend ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
main
|
||||
@@ -18,6 +18,7 @@ in
|
||||
pkgs.waypaper pkgs.socat ];
|
||||
|
||||
# Create the copy script using Home Manager, following Waybar style
|
||||
This can not be done using a prepared script
|
||||
home-manager.users = {
|
||||
${username} = {
|
||||
home.file = {
|
||||
|
||||
Reference in New Issue
Block a user