Add set_audio_sink, weather, grade

This commit is contained in:
Roland Thomas Jr 2023-06-29 14:14:27 -04:00
parent d4249a957f
commit 55be7db85f
4 changed files with 30 additions and 0 deletions

View File

@ -22,6 +22,7 @@ python = f'alacritty {opaque_config} -e python'
vpn_vta = 'alacritty -e /home/roland/.local/bin/vpn' vpn_vta = 'alacritty -e /home/roland/.local/bin/vpn'
bjendal = 'alacritty -e /home/roland/.local/bin/bjendal' bjendal = 'alacritty -e /home/roland/.local/bin/bjendal'
lumar = 'alacritty -e /home/roland/.local/bin/lumar' lumar = 'alacritty -e /home/roland/.local/bin/lumar'
set_audio_sink = '/home/roland/.local/bin/set_audio_sink'
cmatrix = 'alacritty -e cmatrix' cmatrix = 'alacritty -e cmatrix'
rofi = 'rofi -combi-modi window,drun,ssh -theme nord -font "hack 12" -show drun -icon-theme "Papirus" -show-icons' rofi = 'rofi -combi-modi window,drun,ssh -theme nord -font "hack 12" -show drun -icon-theme "Papirus" -show-icons'
qtile_dir = '/home/roland/.config/qtile/' qtile_dir = '/home/roland/.config/qtile/'
@ -156,6 +157,7 @@ keys = [
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
Key([mod], "w", lazy.window.kill(), desc="Kill focused window"), Key([mod], "w", lazy.window.kill(), desc="Kill focused window"),
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
Key([mod, "control"], "s", lazy.spawn(set_audio_sink), desc="Reset Audio Sink"),
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
Key([mod], "p", lazy.spawn('xset s activate'), desc="Lock Session"), Key([mod], "p", lazy.spawn('xset s activate'), desc="Lock Session"),
Key([mod], "r", lazy.spawn(rofi), desc="Launch rofi"), Key([mod], "r", lazy.spawn(rofi), desc="Launch rofi"),

6
.local/bin/grade Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env sh
git checkout -b grade
git add grade.adoc
git commit -m "Add grade"
git push --set-upstream origin grade

19
.local/bin/set_audio_sink Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
# Load the module until it fails
while pactl load-module module-detect; do
:
done
if [ "$DISPLAY" = ":0" ]; then
if ! pactl set-default-sink alsa_output.0.hdmi-stereo; then
pactl set-default-sink alsa_output.1.hdmi-stereo
fi
echo "$DISPLAY set audio"
elif [ "$DISPLAY" = ":10.0" ]; then
pactl set-default-sink xrdp-sink
echo "$DISPLAY set audio"
else
echo "The DISPLAY variable is set to: $DISPLAY, but not to :0 or :10.0"
fi

3
.local/bin/weather Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env sh
curl wttr.in/Grovetown