Disable built-in clipboard and mouse support, bye bye elogind.

This commit is contained in:
Bartek Stalewski 2023-10-19 00:41:28 +02:00
parent 964626d973
commit a14e732e40
3 changed files with 22 additions and 11 deletions

View File

@ -26,10 +26,6 @@ def autostop():
autostop = os.path.expanduser('~/.config/qtile/stop.sh')
subprocess.run([autostop])
@hook.subscribe.suspend
def suspend():
qtile.spawn("swaylock --image ~/.config/qtile/wallpaper.img")
mod = "mod4"
groups = [
Group("1", label="\uf292"),
@ -79,13 +75,13 @@ keys = [
# WM control
Key([mod], "f", lazy.window.toggle_floating()),
Key([mod], "q", lazy.window.kill()),
Key([mod, "control", "shift"], "l", lazy.spawn("swaylock --image ~/.config/qtile/wallpaper.img")),
Key([mod, "control", "shift"], "l", lazy.spawn("physlock")),
Key([mod, "control", "shift"], "q", lazy.shutdown()),
Key([mod, "control", "shift"], "r", lazy.reload_config()),
Key([mod], "r", lazy.reload_config()),
# media keys
Key([], "XF86AudioMute", lazy.spawn("pactl set-sink-mute @DEFAULT_SINK@ toggle")),
Key([], "XF86AudioMicMute", lazy.spawn("sb-volume key")),
Key([], "XF86AudioMute", lazy.spawn("sb-volume mute")),
Key([], "XF86AudioMicMute", lazy.spawn("sb-volume micmute")),
Key([], "XF86AudioRaiseVolume", lazy.spawn("sb-volume inc")),
Key([], "XF86AudioLowerVolume", lazy.spawn("sb-volume dec")),
Key([], "XF86MonBrightnessUp", lazy.spawn("doas xbacklight -inc 10")),

View File

@ -12,6 +12,18 @@ key_micmute() {
esac
}
key_mute() {
state=$(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}')
case ${state} in
yes)
echo 0 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness
pactl set-sink-mute @DEFAULT_SINK@ 0 ;;
no)
echo 1 | doas tee /sys/devices/platform/thinkpad_acpi/leds/platform::mute/brightness
pactl set-sink-mute @DEFAULT_SINK@ 1 ;;
esac
}
vol_decrease() {
pactl set-sink-volume @DEFAULT_SINK@ -5%
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk -F' / *' '{print $2}')
@ -28,11 +40,12 @@ if [ $1 ]; then
case $1 in
dec) vol_decrease ;;
inc) vol_increase ;;
key) key_micmute ;;
micmute) key_micmute ;;
mute) key_mute ;;
esac
else
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="mic muted" || micmute=""
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute} audio muted" || printf "$micmute"
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && mute="audio muted" || mute=""
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && printf "${mute} mic muted" || printf "${mute}"
fi

View File

@ -17,7 +17,9 @@ opt.relativenumber = false
opt.wrap = true
opt.writebackup = false
opt.clipboard = ""
opt.foldcolumn = "0"
opt.mouse = ""
-- opt.laststatus = 2
-- opt.mouse = ""
-- opt.scrolloff = 5