fix: reorg dirs

This commit is contained in:
Barrett Ruth 2026-02-14 21:52:18 -05:00
parent e610f7d781
commit f9f756d80b
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
8 changed files with 55 additions and 15 deletions

View file

@ -8,7 +8,7 @@ fi
x setup
x mon
x bg ~/img/wp/one/progress.jpg ~/img/wp/one/lilies.jpg
x bg ~/Pictures/wp/one/progress.jpg ~/Pictures/wp/one/lilies.jpg
setxkbmap -layout us -variant colemak &
pgrep -u "$USER" -f clipmenud >/dev/null || clipmenud &
# dwmblocks &

View file

@ -107,7 +107,8 @@ bind = , A, exec, ctl audio out
bind = , C, exec, sh -lc 'cliphist list | fuzzel --dmenu --prompt="clip: " | cliphist decode | wl-copy'
bind = , K, exec, ctl keyboard next
bind = , O, exec, ctl ocr
bind = , P, exec, hypr pull
bind = , M, exec, ctl media
bind = , P, exec, ctl power
bind = , S, exec, ctl screenshot
bind = , T, exec, theme

View file

@ -13,17 +13,18 @@ let
[
"dev"
"Downloads"
"img"
"Pictures"
]
++ lib.optionals hostConfig.isLinux [
"img/screen"
"img/wp"
"Pictures/Screensavers"
"Pictures/Screenshots"
"Pictures/wp"
];
in
{
home.activation.createDirectories = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
for dir in ${lib.concatStringsSep " " directories}; do
$DRY_RUN_CMD mkdir -p "$HOME/$dir"
run mkdir -p "$HOME/$dir"
done
'';
@ -36,12 +37,12 @@ in
home.activation.linkWallpapers = lib.mkIf hostConfig.isLinux (
lib.hm.dag.entryAfter [ "createDirectories" ] ''
src="${repoDir}/config/screen"
dest="$HOME/img/screen"
dest="$HOME/Pictures/Screensavers"
if [ -d "$src" ]; then
for f in "$src"/*; do
[ -f "$f" ] || continue
name=$(basename "$f")
[ -L "$dest/$name" ] || $DRY_RUN_CMD ln -sf "$f" "$dest/$name"
[ -L "$dest/$name" ] || run ln -sf "$f" "$dest/$name"
done
fi
''

View file

@ -61,7 +61,7 @@ in
xdg.configFile."hypr/hyprpaper.conf".text = ''
wallpaper {
monitor =
path = ${config.home.homeDirectory}/img/screen/wallpaper.jpg
path = ${config.home.homeDirectory}/Pictures/Screensavers/wallpaper.jpg
}
splash = false
@ -75,7 +75,7 @@ in
background {
monitor =
path = ${config.home.homeDirectory}/img/screen/lock.jpg
path = ${config.home.homeDirectory}/Pictures/Screensavers/lock.jpg
}
animations {

View file

@ -62,6 +62,7 @@ in
cliphist
grim
slurp
wf-recorder
libnotify
brightnessctl
socat

View file

@ -11,7 +11,7 @@ require() {
case "$1" in
screenshot)
dir="$HOME/img/ss"
dir="$HOME/Pictures/Screenshots"
mkdir -p "$dir"
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
@ -24,7 +24,7 @@ screenshot)
;;
ocr)
require tesseract
dir="$HOME/img/ss"
dir="$HOME/Pictures/Screenshots"
mkdir -p "$dir"
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
@ -184,6 +184,43 @@ wifi)
;;
esac
;;
media)
if pgrep -x wf-recorder >/dev/null 2>&1; then
pkill -INT wf-recorder
notify-send -a ctl -t 2500 "recording saved"
exit 0
fi
require fuzzel grim slurp wl-copy wf-recorder hyprctl jq
ss_dir="$HOME/Pictures/Screenshots"
rec_dir="$HOME/Pictures/Recordings"
mkdir -p "$ss_dir" "$rec_dir"
desktop=" Capture Desktop"
area=" Capture Area"
rec_desktop=" Record Desktop"
rec_window=" Record Window"
chosen="$(printf '%s\n' "$desktop" "$area" "$rec_desktop" "$rec_window" | fuzzel --dmenu --hide-prompt --lines=4 --width=25 --no-icons)"
case "$chosen" in
"$desktop")
file="$ss_dir/$(date +'%Y-%m-%d_%H-%M-%S').png"
grim "$file" && wl-copy < "$file"
;;
"$area")
file="$ss_dir/$(date +'%Y-%m-%d_%H-%M-%S').png"
grim -g "$(slurp)" "$file" && wl-copy < "$file"
;;
"$rec_desktop")
file="$rec_dir/$(date +'%Y-%m-%d_%H-%M-%S').mp4"
notify-send -a ctl -t 2500 "recording started"
wf-recorder -f "$file" &
;;
"$rec_window")
geom=$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
file="$rec_dir/$(date +'%Y-%m-%d_%H-%M-%S').mp4"
notify-send -a ctl -t 2500 "recording started"
wf-recorder -g "$geom" -f "$file" &
;;
esac
;;
power)
require fuzzel
lock="󰌾 Lock"
@ -201,7 +238,7 @@ power)
esac
;;
*)
echo "Usage: ctl {screenshot|ocr|keyboard|audio|wifi|brightness|volume|power}" >&2
echo "Usage: ctl {screenshot|ocr|keyboard|audio|wifi|brightness|volume|media|power}" >&2
exit 1
;;
esac

View file

@ -13,7 +13,7 @@ except ImportError:
sys.exit(1)
HOME = os.environ["HOME"]
DIR = f"{HOME}/img/screen"
DIR = f"{HOME}/Pictures/Screensavers"
os.makedirs(DIR, exist_ok=True)

View file

@ -33,7 +33,7 @@ bg)
require xrandr feh
randr="$(xrandr | rg ' connected ')"
mons="$(echo "$randr" | wc -l)"
wpdir="$HOME"/img/wp
wpdir="$HOME"/Pictures/wp
[ "$1" ] && bgone="$1" || bgone="$wpdir"/one/cliff.jpg
cmd="feh --no-fehbg --bg-fill $bgone"