mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-09 19:11:15 +02:00
tools: restructured
This commit is contained in:
30
.local/bin/etc/sxhkd/audio/lmc
Executable file
30
.local/bin/etc/sxhkd/audio/lmc
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# A general audio interface for LARBS.
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
[ -z "$2" ] && num="5" || num="$2"
|
||||
|
||||
case "$1" in
|
||||
up) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%+ ;;
|
||||
down) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%- ;;
|
||||
deaf) wpctl set-mute @DEFAULT_SINK@ 1;;
|
||||
undeaf) wpctl set-mute @DEFAULT_SINK@ 0;;
|
||||
mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1;;
|
||||
unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0;;
|
||||
*) cat << EOF
|
||||
lmc: cli music interface for pulse for those with divine intellect too
|
||||
grand to remember the pamixer commands.
|
||||
|
||||
Allowed options:
|
||||
up NUM Increase volume (5% default)
|
||||
down NUM Decrease volume (5% default)
|
||||
mute mute microphone
|
||||
unmute unmute microphone
|
||||
deaf deaf sound
|
||||
undeaf undeaf sound
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
||||
pkill -RTMIN+4 $STATUSBAR
|
BIN
.local/bin/etc/sxhkd/audio/mic_activated.wav
Normal file
BIN
.local/bin/etc/sxhkd/audio/mic_activated.wav
Normal file
Binary file not shown.
BIN
.local/bin/etc/sxhkd/audio/mic_muted.wav
Normal file
BIN
.local/bin/etc/sxhkd/audio/mic_muted.wav
Normal file
Binary file not shown.
10
.local/bin/etc/sxhkd/audio/mic_toggle
Executable file
10
.local/bin/etc/sxhkd/audio/mic_toggle
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
|
||||
paplay ~/.local/bin/tools/audio/mic_muted.wav
|
||||
lmc mute
|
||||
lmc undeaf
|
||||
else
|
||||
lmc unmute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/mic_activated.wav
|
||||
fi
|
BIN
.local/bin/etc/sxhkd/audio/sound_muted.wav
Normal file
BIN
.local/bin/etc/sxhkd/audio/sound_muted.wav
Normal file
Binary file not shown.
BIN
.local/bin/etc/sxhkd/audio/sound_resumed.wav
Normal file
BIN
.local/bin/etc/sxhkd/audio/sound_resumed.wav
Normal file
Binary file not shown.
10
.local/bin/etc/sxhkd/audio/sound_toggle
Executable file
10
.local/bin/etc/sxhkd/audio/sound_toggle
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
if amixer get Master | tail -2 | grep -q '\[on\]'; then
|
||||
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
|
||||
lmc mute
|
||||
lmc deaf
|
||||
else
|
||||
lmc mute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/sound_resumed.wav
|
||||
fi
|
18
.local/bin/etc/sxhkd/screenshotmenu
Executable file
18
.local/bin/etc/sxhkd/screenshotmenu
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Requires maim. It lets you choose the kind of screenshot to take,
|
||||
# including copying the image or even highlighting an area to copy.
|
||||
|
||||
output="$HOME/downloads/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
|
||||
xclip_img="xclip -sel clip -t image/png"
|
||||
xclip_txt="xclip -sel clip -t text/plain"
|
||||
|
||||
case "$(printf "a selected area\\na selected area (copy)\\ncurrent window\\ncurrent window (copy)\\nfull screen\\nfull screen (copy)\\ncolor picker (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
|
||||
"a selected area") maim -s $output ;;
|
||||
"a selected area (copy)") maim -s | ${xclip_img} ;;
|
||||
"current window") maim -i "$(xdotool getactivewindow)" $output ;;
|
||||
"current window (copy)") maim -i "$(xdotool getactivewindow)" | ${xclip_img} ;;
|
||||
"full screen") maim $output ;;
|
||||
"full screen (copy)") maim | ${xclip_img} ;;
|
||||
"color picker (copy)") xcolor |tr -d '\n' | ${xclip_txt} ;;
|
||||
esac
|
Reference in New Issue
Block a user