upload dotfiles
This commit is contained in:
parent
c79eb9fc65
commit
ac383289c7
337 changed files with 3187 additions and 0 deletions
16
.local/bin/bwroot
Executable file
16
.local/bin/bwroot
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
ROOT=""$HOME"/Documents/alpchroot"
|
||||
|
||||
case "$1" in
|
||||
"") echo "usage: bwroot ARGUMENT" >&2; exit 1; ;;
|
||||
*)
|
||||
bwrap \
|
||||
--bind "$ROOT" / \
|
||||
--bind /proc /proc \
|
||||
--dev-bind /dev /dev \
|
||||
--bind "$PWD" "$PWD" \
|
||||
--bind "$HOME" "$HOME" \
|
||||
--unshare-all \
|
||||
"$@" ;;
|
||||
esac
|
2
.local/bin/camera
Executable file
2
.local/bin/camera
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
pkill -f /dev/video || mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --autofit=25% --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)
|
2
.local/bin/dwmlaunch
Executable file
2
.local/bin/dwmlaunch
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
zsh -lc "/usr/libexec/pipewire-launcher & slstatus | dbus-run-session dwl"
|
19
.local/bin/getvol
Executable file
19
.local/bin/getvol
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
dev=@DEFAULT_SINK@
|
||||
! [ "$1" = '-m' ] || { dev=@DEFAULT_SOURCE@; shift; }
|
||||
|
||||
vol="$(wpctl get-volume "$dev")"
|
||||
|
||||
[ "$vol" != "${vol%\[MUTED\]}" ] && echo "MUTED" && exit
|
||||
vol="${vol#Volume: }"
|
||||
|
||||
split() {
|
||||
# For ommiting the . without calling and external program.
|
||||
IFS=$2
|
||||
set -- $1
|
||||
printf '%s' "$@"
|
||||
}
|
||||
|
||||
vol="$(printf "%.0f" "$(split "$vol" ".")")"
|
||||
echo "$vol"
|
20
.local/bin/powermenu
Executable file
20
.local/bin/powermenu
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
# tofi powermenu
|
||||
case $(printf "%s\n" " Lock session" " Log out" " Suspend" " Reboot" " Shut down" | fuzzel -d) in
|
||||
" Lock session")
|
||||
swaylock
|
||||
;;
|
||||
" Log out")
|
||||
kill "$(pidof dwl)"
|
||||
;;
|
||||
" Suspend")
|
||||
loginctl suspend
|
||||
;;
|
||||
" Reboot")
|
||||
loginctl reboot
|
||||
;;
|
||||
" Shut down")
|
||||
loginctl poweroff
|
||||
esac
|
||||
|
33
.local/bin/recordscreen
Executable file
33
.local/bin/recordscreen
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh -x
|
||||
#
|
||||
# Show icon in slstatus: [ + () ]
|
||||
# [ + + () ]
|
||||
# [ () ]
|
||||
#
|
||||
screencast(){
|
||||
case $(printf "%s\n" " Mic ON" " Mic OFF" | fuzzel -d) in
|
||||
" Mic ON")
|
||||
wf-recorder -D -a -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4")
|
||||
;;
|
||||
" Mic OFF")
|
||||
wf-recorder -D --audio="$(pactl list short sources | grep output | awk '{print $2}')" -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4")
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
video(){
|
||||
wf-recorder -D -f ~/Videos/Recordings/recording_$(date +"%Y-%m-%d_%H:%M:%S.mp4")
|
||||
}
|
||||
|
||||
kill(){
|
||||
killall -s SIGINT wf-recorder && \
|
||||
notify-send "wf-recorder" "recording stopped" || \
|
||||
notify-send "ERROR" "No recording process found"
|
||||
}
|
||||
|
||||
case $(printf "%s\n" " Screencast" " Video only" " Stop recording" | fuzzel -d) in
|
||||
" Screencast") screencast;;
|
||||
" Video only") video;;
|
||||
" Stop recording") kill;;
|
||||
*) kill;;
|
||||
esac
|
12
.local/bin/tofiunicode
Executable file
12
.local/bin/tofiunicode
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
# The famous "get a menu of emojis to copy" script, ported to tofi (wayland).
|
||||
|
||||
# Get user selection via tofi from emoji file.
|
||||
chosen=$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d | sed "s/ .*//")
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
printf "%s" "$chosen" | wl-copy
|
||||
notify-send "'$chosen' copied to clipboard." &
|
Loading…
Add table
Add a link
Reference in a new issue