Oooh I'm hypnotized
This commit is contained in:
parent
fab483191f
commit
a6b87ee942
10 changed files with 98 additions and 70 deletions
39
.local/bin/art
Executable file
39
.local/bin/art
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Show icon in slstatus:
|
||||
# Video [ REC ]
|
||||
# Audio [ REC ]
|
||||
#
|
||||
# amolinae's recording tool
|
||||
screencast(){
|
||||
case $(printf "%s\n" " Mic ON" " Mic OFF" | fuzzel -d -l 3) 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 "art" "Recording stopped" || \
|
||||
notify-send "art" "No recording process found"
|
||||
}
|
||||
|
||||
menu(){
|
||||
case $(printf "%s\n" " Screencast" " Video only" " Stop recording" | fuzzel -d -l 4) in
|
||||
" Screencast") screencast;;
|
||||
" Video only") video;;
|
||||
" Stop recording") kill;;
|
||||
*) kill;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-h) echo "usage: aws [-h]" >&2; exit 1; ;;
|
||||
*) menu ;;
|
||||
esac
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# amolinae's wayland screenshotter
|
||||
notify(){
|
||||
notify-send "aws" "screenshot copied to clipboard"
|
||||
}
|
||||
|
|
10
.local/bin/emojimenu
Executable file
10
.local/bin/emojimenu
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get user selection via fuzzel from emoji file.
|
||||
chosen="$(cut -d ';' -f1 ~/.local/share/misc/chars/* | fuzzel -d -l 16 -w 32 | sed "s/ .*//")"
|
||||
|
||||
# Exit if none chosen.
|
||||
[ -z "$chosen" ] && exit
|
||||
|
||||
printf "%s" "$chosen" | wl-copy
|
||||
notify-send "emojimenu" "'$chosen' copied to clipboard." &
|
|
@ -1,20 +0,0 @@
|
|||
#!/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
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/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
|
29
.local/bin/sysutils
Executable file
29
.local/bin/sysutils
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
case $(printf "%s\n" " Lock session" " Log out" " Kill process" " Suspend" " Reboot" " Shut down" | fuzzel -d -l 7) in
|
||||
" Lock session")
|
||||
swaylock
|
||||
;;
|
||||
" Log out")
|
||||
if pidof dwl > /dev/null; then
|
||||
kill "$(pidof dwl)"
|
||||
elif pidof river > /dev/null; then
|
||||
kill "$(pidof river)"
|
||||
fi
|
||||
;;
|
||||
" Kill process")
|
||||
ps -o pid,comm,user | \
|
||||
awk -v u="$USER" '$3 == u { print $1, $2 }' | \
|
||||
fuzzel -d -l 10 -p "Kill: " | awk '{ print $1 }' | \
|
||||
xargs -r kill
|
||||
;;
|
||||
" Suspend")
|
||||
loginctl suspend
|
||||
;;
|
||||
" Reboot")
|
||||
loginctl reboot
|
||||
;;
|
||||
" Shut down")
|
||||
loginctl poweroff
|
||||
esac
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/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