local: changed and updated scripts

master
tiyn 9 months ago
parent 62c161c3c1
commit 923fba39f4

@ -29,12 +29,12 @@ super + m
thunderbird thunderbird
super + bracketright super + bracketright
mic_toggle lmc mute_toggle
super + backslash super + backslash
sound_toggle lmc deaf_toggle
super + shift + l super + shift + l
change_keymap keymap_toggle
super + shift + r super + shift + r
pkill -usr1 -x sxhkd ; notify-send -u low 'SXHKD' 'Reloaded config' pkill -usr1 -x sxhkd ; notify-send -u low 'SXHKD' 'Reloaded config'
@ -43,7 +43,7 @@ super + Return
$TERMINAL $TERMINAL
Print Print
screenshotmenu screenshot_menu
super + shift + space super + shift + space
dunstctl close-all dunstctl close-all
@ -53,9 +53,9 @@ super + F5
super + F6 super + F6
touchpad_toggle touchpad_toggle
super + F7 super + F7
dmenumount mount_menu
super + F8 super + F8
dmenuumount umount_menu
super + F9 super + F9
sudo -A systemctl restart NetworkManager ; notify-send -u low 'Network' 'Restartet NM' sudo -A systemctl restart NetworkManager ; notify-send -u low 'Network' 'Restartet NM'
super + F10 super + F10
@ -66,9 +66,9 @@ super + F12
prompt "Reboot computer?" "sudo -A reboot now" prompt "Reboot computer?" "sudo -A reboot now"
XF86AudioMute XF86AudioMute
sound_toggle lmc deaf_toggle
XF86AudioMicMute XF86AudioMicMute
mic_toggle lmc mute_toggle
XF86AudioLowerVolume XF86AudioLowerVolume
lmc down lmc down
XF86AudioRaiseVolume XF86AudioRaiseVolume

@ -2,7 +2,7 @@
while read file while read file
do do
case "$1" in case "$1" in
"w") setbg "$file" & ;; "w") background_set "$file" & ;;
"c") "c")
[ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ~/.config/bmdirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ -z "$destdir" ] && exit [ -z "$destdir" ] && exit

@ -2,38 +2,75 @@
# A general audio interface for LARBS. # A general audio interface for LARBS.
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice # Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
# Heavily extended and updated to a pipewire system
[ -z "$2" ] && num="5" || num="$2" [ -z "$2" ] && num="5" || num="$2"
case "$1" in case "$1" in
up) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%+ ;; up) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%+
down) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%- ;; pkill -RTMIN+4 $STATUSBAR ;;
deaf) wpctl set-mute @DEFAULT_SINK@ 1;; down) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%-
undeaf) wpctl set-mute @DEFAULT_SINK@ 0;; pkill -RTMIN+4 $STATUSBAR ;;
mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1;; deaf) wpctl set-mute @DEFAULT_SINK@ 1
unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0;; pkill -RTMIN+4 $STATUSBAR ;;
previous) playerctl previous;; undeaf) wpctl set-mute @DEFAULT_SINK@ 0
playpause) playerctl play-pause;; pkill -RTMIN+4 $STATUSBAR ;;
next) playerctl next;; mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1
shuffle) playerctl shuffle toggle;; pkill -RTMIN+4 $STATUSBAR ;;
loop) playerctl loop none;; unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0
*) cat << EOF pkill -RTMIN+4 $STATUSBAR ;;
deaf_toggle)
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/etc/sxhkd/audio/sound_resumed.wav
fi ;;
mute_toggle)
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
lmc mute
lmc undeaf
paplay ~/.local/bin/etc/sxhkd/audio/mic_muted.wav
else
lmc unmute
lmc undeaf
paplay ~/.local/bin/etc/sxhkd/audio/mic_activated.wav
fi ;;
previous) playerctl previous
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
playpause) playerctl play-pause
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
next) playerctl next
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
shuffle) playerctl shuffle toggle
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
loop) playerctl loop none
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
*) cat << EOF
lmc: cli music interface for pulse for those with divine intellect too lmc: cli music interface for pulse for those with divine intellect too
grand to remember the pamixer commands. grand to remember the pamixer commands.
Allowed options: Allowed options:
up NUM Increase volume (5% default) up NUM Increase volume (5% default)
down NUM Decrease volume (5% default) down NUM Decrease volume (5% default)
mute mute microphone mute Mute microphone
unmute unmute microphone unmute Unmute microphone
deaf deaf sound deaf Deaf sound
undeaf undeaf sound undeaf Undeaf sound
previous play previous song in player deaf_toggle Toggle between deaf and undeaf
playpause toggle play or pause in player mute_toggle Toggle between mute and unmute
next play next song in player previous Play previous song in player
playpause Toggle play or pause in player
next Play next song in player
all else Print this message all else Print this message
EOF EOF
esac esac
pkill -RTMIN+4 $STATUSBAR
sleep 1 && pkill -RTMIN+9 $STATUSBAR

@ -1,10 +0,0 @@
#!/bin/sh
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
lmc mute
lmc undeaf
paplay ~/.local/bin/etc/sxhkd/audio/mic_muted.wav
else
lmc unmute
lmc undeaf
paplay ~/.local/bin/etc/sxhkd/audio/mic_activated.wav
fi

@ -1,10 +0,0 @@
#!/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/etc/sxhkd/audio/sound_resumed.wav
fi

@ -8,4 +8,4 @@ extern=HDMI2
(xrandr | grep "$extern disconnected") (xrandr | grep "$extern disconnected")
(xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && setbg) & exit) (xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && setbg) & exit)
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off (xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off
setbg background_set

@ -36,7 +36,7 @@ export NOTMUCH_CONFIG="${XDG_CONFIG_HOME}/notmuch-config"
export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc" export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc"
export NUGET_PACKAGES="${XDG_CACHE_HOME}/nugetpackages" export NUGET_PACKAGES="${XDG_CACHE_HOME}/nugetpackages"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass" export PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass"
export SUDO_ASKPASS="${HOME}/.local/bin/tools/dmenupass" export SUDO_ASKPASS="${HOME}/.local/bin/tools/pw_menu"
export TMUX_TMPDIR="${XDG_CACHE_HOME}/tmux" export TMUX_TMPDIR="${XDG_CACHE_HOME}/tmux"
export WGETRC="${XDG_CONFIG_HOME}/wgetrc" export WGETRC="${XDG_CONFIG_HOME}/wgetrc"
export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" export ZDOTDIR="${XDG_CONFIG_HOME}/zsh"

@ -7,7 +7,7 @@ xrandr --auto
[ -f "$HOME/.config/xorg/xdefaults" ] && xrdb -merge "$HOME/.config/xorg/xdefaults" # global resources [ -f "$HOME/.config/xorg/xdefaults" ] && xrdb -merge "$HOME/.config/xorg/xdefaults" # global resources
[ -f "$HOME/.config/xorg/xpcspec" ] && xrdb -merge "$HOME/.config/xorg/xpcspec" # local resources [ -f "$HOME/.config/xorg/xpcspec" ] && xrdb -merge "$HOME/.config/xorg/xpcspec" # local resources
setbg background_set
csum="" csum=""
new_csum=$(sha1sum $(which dwm)) new_csum=$(sha1sum $(which dwm))

Loading…
Cancel
Save