fix: reorg dirs
This commit is contained in:
parent
e610f7d781
commit
f9f756d80b
8 changed files with 55 additions and 15 deletions
|
|
@ -8,7 +8,7 @@ fi
|
||||||
|
|
||||||
x setup
|
x setup
|
||||||
x mon
|
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 &
|
setxkbmap -layout us -variant colemak &
|
||||||
pgrep -u "$USER" -f clipmenud >/dev/null || clipmenud &
|
pgrep -u "$USER" -f clipmenud >/dev/null || clipmenud &
|
||||||
# dwmblocks &
|
# dwmblocks &
|
||||||
|
|
|
||||||
|
|
@ -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 = , C, exec, sh -lc 'cliphist list | fuzzel --dmenu --prompt="clip: " | cliphist decode | wl-copy'
|
||||||
bind = , K, exec, ctl keyboard next
|
bind = , K, exec, ctl keyboard next
|
||||||
bind = , O, exec, ctl ocr
|
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 = , S, exec, ctl screenshot
|
||||||
bind = , T, exec, theme
|
bind = , T, exec, theme
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,17 +13,18 @@ let
|
||||||
[
|
[
|
||||||
"dev"
|
"dev"
|
||||||
"Downloads"
|
"Downloads"
|
||||||
"img"
|
"Pictures"
|
||||||
]
|
]
|
||||||
++ lib.optionals hostConfig.isLinux [
|
++ lib.optionals hostConfig.isLinux [
|
||||||
"img/screen"
|
"Pictures/Screensavers"
|
||||||
"img/wp"
|
"Pictures/Screenshots"
|
||||||
|
"Pictures/wp"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.activation.createDirectories = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.createDirectories = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
for dir in ${lib.concatStringsSep " " directories}; do
|
for dir in ${lib.concatStringsSep " " directories}; do
|
||||||
$DRY_RUN_CMD mkdir -p "$HOME/$dir"
|
run mkdir -p "$HOME/$dir"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
@ -36,12 +37,12 @@ in
|
||||||
home.activation.linkWallpapers = lib.mkIf hostConfig.isLinux (
|
home.activation.linkWallpapers = lib.mkIf hostConfig.isLinux (
|
||||||
lib.hm.dag.entryAfter [ "createDirectories" ] ''
|
lib.hm.dag.entryAfter [ "createDirectories" ] ''
|
||||||
src="${repoDir}/config/screen"
|
src="${repoDir}/config/screen"
|
||||||
dest="$HOME/img/screen"
|
dest="$HOME/Pictures/Screensavers"
|
||||||
if [ -d "$src" ]; then
|
if [ -d "$src" ]; then
|
||||||
for f in "$src"/*; do
|
for f in "$src"/*; do
|
||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
name=$(basename "$f")
|
name=$(basename "$f")
|
||||||
[ -L "$dest/$name" ] || $DRY_RUN_CMD ln -sf "$f" "$dest/$name"
|
[ -L "$dest/$name" ] || run ln -sf "$f" "$dest/$name"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ in
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
wallpaper {
|
wallpaper {
|
||||||
monitor =
|
monitor =
|
||||||
path = ${config.home.homeDirectory}/img/screen/wallpaper.jpg
|
path = ${config.home.homeDirectory}/Pictures/Screensavers/wallpaper.jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
splash = false
|
splash = false
|
||||||
|
|
@ -75,7 +75,7 @@ in
|
||||||
|
|
||||||
background {
|
background {
|
||||||
monitor =
|
monitor =
|
||||||
path = ${config.home.homeDirectory}/img/screen/lock.jpg
|
path = ${config.home.homeDirectory}/Pictures/Screensavers/lock.jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ in
|
||||||
cliphist
|
cliphist
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
|
wf-recorder
|
||||||
libnotify
|
libnotify
|
||||||
brightnessctl
|
brightnessctl
|
||||||
socat
|
socat
|
||||||
|
|
|
||||||
43
scripts/ctl
43
scripts/ctl
|
|
@ -11,7 +11,7 @@ require() {
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
screenshot)
|
screenshot)
|
||||||
dir="$HOME/img/ss"
|
dir="$HOME/Pictures/Screenshots"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
|
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
|
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
|
||||||
|
|
@ -24,7 +24,7 @@ screenshot)
|
||||||
;;
|
;;
|
||||||
ocr)
|
ocr)
|
||||||
require tesseract
|
require tesseract
|
||||||
dir="$HOME/img/ss"
|
dir="$HOME/Pictures/Screenshots"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
|
file="$dir/$(openssl rand -hex 10)-$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||||
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
|
if [ "${XDG_SESSION_TYPE:-}" = "wayland" ]; then
|
||||||
|
|
@ -184,6 +184,43 @@ wifi)
|
||||||
;;
|
;;
|
||||||
esac
|
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)
|
power)
|
||||||
require fuzzel
|
require fuzzel
|
||||||
lock=" Lock"
|
lock=" Lock"
|
||||||
|
|
@ -201,7 +238,7 @@ power)
|
||||||
esac
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ except ImportError:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
HOME = os.environ["HOME"]
|
HOME = os.environ["HOME"]
|
||||||
DIR = f"{HOME}/img/screen"
|
DIR = f"{HOME}/Pictures/Screensavers"
|
||||||
os.makedirs(DIR, exist_ok=True)
|
os.makedirs(DIR, exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ bg)
|
||||||
require xrandr feh
|
require xrandr feh
|
||||||
randr="$(xrandr | rg ' connected ')"
|
randr="$(xrandr | rg ' connected ')"
|
||||||
mons="$(echo "$randr" | wc -l)"
|
mons="$(echo "$randr" | wc -l)"
|
||||||
wpdir="$HOME"/img/wp
|
wpdir="$HOME"/Pictures/wp
|
||||||
|
|
||||||
[ "$1" ] && bgone="$1" || bgone="$wpdir"/one/cliff.jpg
|
[ "$1" ] && bgone="$1" || bgone="$wpdir"/one/cliff.jpg
|
||||||
cmd="feh --no-fehbg --bg-fill $bgone"
|
cmd="feh --no-fehbg --bg-fill $bgone"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue