mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-19 08:17:47 +02:00
Compare commits
No commits in common. "d0ef41d9689037d2f5c298f068136b3348cadf54" and "b25a478cfa84c46747c5430c593facf2b351af56" have entirely different histories.
d0ef41d968
...
b25a478cfa
@ -34,11 +34,9 @@ super + backslash
|
||||
lmc deaf_toggle
|
||||
super + bracketleft
|
||||
dnd toggle
|
||||
super + apostrophe
|
||||
lmc tap_toggle
|
||||
|
||||
super + shift + l
|
||||
keymap toggle
|
||||
keymap_toggle
|
||||
|
||||
super + shift + r
|
||||
pkill -usr1 -x sxhkd ; notify-send -u low 'SXHKD' 'Reloaded config'
|
||||
@ -47,15 +45,15 @@ super + Return
|
||||
$TERMINAL
|
||||
|
||||
Print
|
||||
screenshot
|
||||
screenshot_menu
|
||||
|
||||
super + shift + space
|
||||
dunstctl close-all
|
||||
|
||||
super + F5
|
||||
monitor toggle
|
||||
monitor_toggle
|
||||
super + F6
|
||||
touchpad toggle
|
||||
touchpad_toggle
|
||||
super + F7
|
||||
mount_menu
|
||||
super + F8
|
||||
|
@ -2,8 +2,7 @@
|
||||
while read file
|
||||
do
|
||||
case "$1" in
|
||||
"w") wallpaper desktop "$file" & ;;
|
||||
"l") wallpaper lock "$file" & ;;
|
||||
"w") background_set "$file" & ;;
|
||||
"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" ] && exit
|
||||
|
@ -4,11 +4,6 @@
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
# Heavily extended and updated to a pipewire system
|
||||
|
||||
Device="Audio Adapter (Unitek Y-247A) Mono"
|
||||
Name=$(wpctl status | grep "$Device")
|
||||
Id=$( echo $Name | cut -d '.' -f 1 | cut -c 5-)
|
||||
Node=$(wpctl inspect $Id | grep node.name | cut -d '=' -f 2)
|
||||
|
||||
[ -z "$2" ] && num="5" || num="$2"
|
||||
|
||||
case "$1" in
|
||||
@ -59,19 +54,6 @@ case "$1" in
|
||||
loop) playerctl loop none
|
||||
sleep 1
|
||||
pkill -RTMIN+9 $STATUSBAR ;;
|
||||
tap) wpctl set-volume $Id 0.2
|
||||
touch ~/.local/state/loopback.lock
|
||||
pw-loopback -C $Node &
|
||||
notify-send -u low 'sxhkd' "Started loopback of $Device" ;;
|
||||
untap) killall pw-loopback
|
||||
rm ~/.local/state/loopback.lock
|
||||
notify-send -u low 'sxhkd' "Stopped all loopbacks" ;;
|
||||
tap_toggle)
|
||||
if [ -f ~/.local/state/loopback.lock ]; then
|
||||
lmc untap
|
||||
else
|
||||
lmc tap
|
||||
fi ;;
|
||||
*) cat << EOF
|
||||
lmc: cli music interface for pulse for those with divine intellect too
|
||||
grand to remember the pamixer commands.
|
||||
@ -81,18 +63,13 @@ Allowed options:
|
||||
down NUM Decrease volume (5% default)
|
||||
mute Mute microphone
|
||||
unmute Unmute microphone
|
||||
mute_toggle Toggle between mute and unmute
|
||||
deaf Deaf sound
|
||||
undeaf Undeaf sound
|
||||
deaf_toggle Toggle between deaf and undeaf
|
||||
playpause Toggle play or pause in player
|
||||
mute_toggle Toggle between mute and unmute
|
||||
previous Play previous song in player
|
||||
playpause Toggle play or pause in player
|
||||
next Play next song in player
|
||||
shuffle Toggle the shuffle mode
|
||||
loop Toggle the loop mode
|
||||
tap Start loopback for device
|
||||
untap Stop all active loopbacks
|
||||
tap_toggle Start or stop loopback depending if it is already running
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
layout=$(setxkbmap -query | grep "layout" | awk '{print $NF}') #| grep -q 'ru$' && $(setxkbmap de ; notify-send -u low 'SXHKD' 'Set keymap to german') || $(setxkbmap de ru ; notify-send -u low 'SXHKD' 'Set keymap to russian')
|
||||
variant=$(setxkbmap -query | grep "variant" | awk '{print $NF}')
|
||||
echo $variant
|
||||
|
||||
case "$1" in
|
||||
toggle) if [ "$layout" = "de" -a "$variant" = "nodeadkeys" ]
|
||||
then
|
||||
setxkbmap de && notify-send -u low 'SXHKD' 'Set keymap to german'
|
||||
elif [ "$layout" = "de" -a "$variant" = "" ]
|
||||
then
|
||||
setxkbmap de ru && notify-send -u low 'SXHKD' 'Set keymap to russian (german)'
|
||||
elif [ "$layout" = "de" -a "$variant" = "ru" ]
|
||||
then
|
||||
setxkbmap de nodeadkeys && notify-send -u low 'SXHKD' 'Set keymap to german (nodeadkeys)'
|
||||
fi ;;
|
||||
*) cat << EOF
|
||||
keymap: cli script to change the keymap quickly.
|
||||
|
||||
Allowed options:
|
||||
toggle Loop through the different keymaps
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
14
.local/bin/etc/sxhkd/keymap_toggle
Executable file
14
.local/bin/etc/sxhkd/keymap_toggle
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
layout=$(setxkbmap -query | grep "layout" | awk '{print $NF}') #| grep -q 'ru$' && $(setxkbmap de ; notify-send -u low 'SXHKD' 'Set keymap to german') || $(setxkbmap de ru ; notify-send -u low 'SXHKD' 'Set keymap to russian')
|
||||
variant=$(setxkbmap -query | grep "variant" | awk '{print $NF}')
|
||||
echo $variant
|
||||
if [ "$layout" = "de" -a "$variant" = "nodeadkeys" ]
|
||||
then
|
||||
setxkbmap de && notify-send -u low 'SXHKD' 'Set keymap to german'
|
||||
elif [ "$layout" = "de" -a "$variant" = "" ]
|
||||
then
|
||||
setxkbmap de ru && notify-send -u low 'SXHKD' 'Set keymap to russian (german)'
|
||||
elif [ "$layout" = "de" -a "$variant" = "ru" ]
|
||||
then
|
||||
setxkbmap de nodeadkeys && notify-send -u low 'SXHKD' 'Set keymap to german (nodeadkeys)'
|
||||
fi
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# toggle external monitor
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
intern=LVDS1
|
||||
extern=HDMI2
|
||||
|
||||
case "$1" in
|
||||
toggle) (xrandr | grep "$extern disconnected")
|
||||
(xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && wallpaper desktop) & exit)
|
||||
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off
|
||||
wallpaper desktop
|
||||
;;
|
||||
*) cat << EOF
|
||||
monitor: cli script to enable and disable monitors.
|
||||
|
||||
Allowed options:
|
||||
toggle Toggle the set monitor on and off
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
11
.local/bin/etc/sxhkd/monitor_toggle
Executable file
11
.local/bin/etc/sxhkd/monitor_toggle
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# toggle external monitor
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
intern=LVDS1
|
||||
extern=HDMI2
|
||||
(xrandr | grep "$extern disconnected")
|
||||
(xrandr --listactivemonitors | grep $extern) || ((xrandr --output $extern --right-of $intern --auto && setbg) & exit)
|
||||
(xrandr --listactivemonitors | grep $extern) && xrandr --output $extern --off
|
||||
background_set
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle touchpad. Requires xf86-input-synaptics.
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
case "$1" in
|
||||
toggle) (synclient | grep "TouchpadOff.*1" && synclient TouchpadOff=0)>/dev/null && notify-send "TouchPad reactivated." && exit
|
||||
synclient TouchpadOff=1 && notify-send "TouchPad deactivated." ;;
|
||||
*) cat << EOF
|
||||
touchpad: cli script to enable and disable the touchpad.
|
||||
|
||||
Allowed options:
|
||||
toggle Toggle the touchpad on and off
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
7
.local/bin/etc/sxhkd/touchpad_toggle
Executable file
7
.local/bin/etc/sxhkd/touchpad_toggle
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Toggle touchpad. Requires xf86-input-synaptics.
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
(synclient | grep "TouchpadOff.*1" && synclient TouchpadOff=0)>/dev/null && notify-send "TouchPad reactivated." && exit
|
||||
synclient TouchpadOff=1 && notify-send "TouchPad deactivated."
|
15
.local/bin/tools/background_set
Executable file
15
.local/bin/tools/background_set
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
|
||||
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -f "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;;
|
||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen." ;;
|
||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||
esac
|
||||
|
||||
xwallpaper --zoom "$bgloc"
|
13
.local/bin/tools/lock_set
Executable file
13
.local/bin/tools/lock_set
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/lock"
|
||||
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -f "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing lock background..." ;;
|
||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random lock background chosen." ;;
|
||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||
esac
|
@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
case "$1" in
|
||||
desktop) bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/bg"
|
||||
trueloc="$(readlink -f "$2")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -f "$(readlink -f "$2")" "$bgloc" && notify-send -i "$bgloc" "Desktop wallpaper has been changed." ;;
|
||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random desktop wallpaper chosen." ;;
|
||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||
esac
|
||||
xwallpaper --zoom "$bgloc" ;;
|
||||
lock) bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/lock"
|
||||
trueloc="$(readlink -f "$2")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -f "$(readlink -f "$2")" "$bgloc" && notify-send -i "$bgloc" "Lock screen wallpaper has been changed." ;;
|
||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random lock screen wallpaper chosen." ;;
|
||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||
esac ;;
|
||||
*) cat << EOF
|
||||
wallpaper: cli script to set and reset the wallpaper of the desktop and lock
|
||||
screen.
|
||||
|
||||
Allowed options:
|
||||
desktop [PATH] Set the wallpaper of the desktop to the specified path.
|
||||
If no path is given reset it.
|
||||
lock [PATH] Set the wallpaper of the lock screen to the specified path.
|
||||
If no path is given reset it.
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
2
.xinitrc
2
.xinitrc
@ -7,7 +7,7 @@ xrandr --auto
|
||||
[ -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
|
||||
|
||||
wallpaper desktop
|
||||
background_set
|
||||
|
||||
csum=""
|
||||
new_csum=$(sha1sum $(which dwm))
|
||||
|
Loading…
x
Reference in New Issue
Block a user