Regenerated
This commit is contained in:
+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
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user