Initial
This commit is contained in:
commit
c8734e660a
392 changed files with 21043 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
if pgrep gammastep &> /dev/null
|
||||
then
|
||||
echo '{"class": "activated", "tooltip": "activated"}'
|
||||
exit
|
||||
fi
|
||||
echo '{"class": "", "tooltip": "deactivated"}'
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
if pgrep gammastep
|
||||
then
|
||||
pkill --signal SIGKILL gammastep
|
||||
pkill -RTMIN+8 waybar
|
||||
exit
|
||||
fi
|
||||
gammastep &
|
||||
# send signal to update monitor
|
||||
pkill -RTMIN+8 waybar
|
||||
25
.config/waybar/waybar_ldelossa/custom/containers-monitor.sh
Normal file
25
.config/waybar/waybar_ldelossa/custom/containers-monitor.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
IFS=$'\n'
|
||||
|
||||
docker_containers=($(docker ps --format "{{ .Names }}\t{{ .Status }}" | column -t))
|
||||
n="${#docker_containers[@]}"
|
||||
|
||||
podman_containers=($(podman ps --format "{{ .Names }}\t{{ .Status }}" | column -t))
|
||||
n=$((n + "${#docker_containers[@]}"))
|
||||
|
||||
tooltip="Containers:"
|
||||
for con in "${docker_containers[@]}";
|
||||
do
|
||||
tooltip="$tooltip\n$con"
|
||||
done
|
||||
|
||||
for con in "${podman_containers[@]}";
|
||||
do
|
||||
tooltip="$tooltip\n$con"
|
||||
done
|
||||
|
||||
if [[ n -gt 0 ]]
|
||||
then
|
||||
echo "{\"class\": \"running\", \"text\": \"$n\", \"tooltip\": \"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
4
.config/waybar/waybar_ldelossa/custom/disk_stats.sh
Normal file
4
.config/waybar/waybar_ldelossa/custom/disk_stats.sh
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
alacritty -t fzf-switcher -e /home/louis/git/gopath/bin/gdu&
|
||||
|
||||
18
.config/waybar/waybar_ldelossa/custom/kvm-monitor.sh
Normal file
18
.config/waybar/waybar_ldelossa/custom/kvm-monitor.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
IFS=$'\n'
|
||||
|
||||
vms=($(virsh --connect qemu:///system list | grep -e "[0-9]\+"))
|
||||
n="${#vms[@]}"
|
||||
|
||||
tooltip="Virtual Machines:"
|
||||
for vm in "${vms[@]}";
|
||||
do
|
||||
tooltip="$tooltip\n$vm"
|
||||
done
|
||||
|
||||
if [[ n -gt 0 ]]
|
||||
then
|
||||
echo "{\"class\": \"running\", \"text\": \"$n\", \"tooltip\": \"$tooltip\"}"
|
||||
exit
|
||||
fi
|
||||
8
.config/waybar/waybar_ldelossa/custom/kvm.sh
Normal file
8
.config/waybar/waybar_ldelossa/custom/kvm.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
if ! pgrep virt-manager
|
||||
then
|
||||
virt-manager&
|
||||
fi
|
||||
|
||||
swaymsg workspace vm
|
||||
8
.config/waybar/waybar_ldelossa/custom/pulseaudio.sh
Normal file
8
.config/waybar/waybar_ldelossa/custom/pulseaudio.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
if ! pgrep pavucontrol
|
||||
then
|
||||
pavucontrol&
|
||||
fi
|
||||
|
||||
swaymsg workspace sound
|
||||
52
.config/waybar/waybar_ldelossa/custom/spotify/controls.sh
Normal file
52
.config/waybar/waybar_ldelossa/custom/spotify/controls.sh
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(playerctl -p spotify status)
|
||||
|
||||
if [[ -z $status ]]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $1 == "prev" ]]
|
||||
then
|
||||
playerctl -p spotify previous
|
||||
sleep .1
|
||||
# trigger the monitor to resync all
|
||||
# spotify elements
|
||||
pkill -RTMIN+4 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $1 == "next" ]]
|
||||
then
|
||||
playerctl -p spotify next
|
||||
sleep .1
|
||||
# trigger the monitor to resync all
|
||||
# spotify elements
|
||||
pkill -RTMIN+4 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
# if no option is provided we toggle
|
||||
# the play state and send a signal to
|
||||
# waybar to update it's css.
|
||||
if [[ $status == "Playing" ]]
|
||||
then
|
||||
playerctl -p spotify pause
|
||||
sleep .1
|
||||
# trigger the monitor to resync all
|
||||
# spotify elements
|
||||
pkill -RTMIN+4 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $status == "Paused" ]]
|
||||
then
|
||||
playerctl -p spotify play
|
||||
sleep .1
|
||||
# trigger the monitor to resync all
|
||||
# spotify elements
|
||||
pkill -RTMIN+4 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
27
.config/waybar/waybar_ldelossa/custom/spotify/metadata.sh
Normal file
27
.config/waybar/waybar_ldelossa/custom/spotify/metadata.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(playerctl -p spotify status)
|
||||
artist=$(playerctl -p spotify metadata xesam:artist)
|
||||
title=$(playerctl -p spotify metadata xesam:title)
|
||||
album=$(playerctl -p spotify metadata xesam:album)
|
||||
|
||||
if [[ -z $status ]]
|
||||
then
|
||||
# spotify is dead, we should die to.
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $status == "Playing" ]]
|
||||
then
|
||||
echo "{\"class\": \"playing\", \"text\": \"$artist - $title\", \"tooltip\": \"$artist - $title - $album\"}"
|
||||
pkill -RTMIN+5 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $status == "Paused" ]]
|
||||
then
|
||||
echo "{\"class\": \"paused\", \"text\": \"$artist - $title\", \"tooltip\": \"$artist - $title - $album\"}"
|
||||
pkill -RTMIN+5 waybar
|
||||
exit
|
||||
fi
|
||||
|
||||
18
.config/waybar/waybar_ldelossa/custom/spotify/monitor.sh
Normal file
18
.config/waybar/waybar_ldelossa/custom/spotify/monitor.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# we are a clock for the other
|
||||
# spotify elements.
|
||||
#
|
||||
# waybar will run this on an interval
|
||||
# and external processes can trigger this
|
||||
# with pkill -RTMIN+4 waybar
|
||||
sleep .1
|
||||
pkill -RTMIN+5 waybar
|
||||
|
||||
# if spotify is running, trigger the
|
||||
# render of the "quit" element.
|
||||
if pgrep spotify > /dev/null
|
||||
then
|
||||
pkill -RTMIN+6 waybar
|
||||
fi
|
||||
|
||||
20
.config/waybar/waybar_ldelossa/custom/spotify/play-pause.sh
Normal file
20
.config/waybar/waybar_ldelossa/custom/spotify/play-pause.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
status=$(playerctl -p spotify status)
|
||||
|
||||
if [[ -z $status ]]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $status == "Playing" ]]
|
||||
then
|
||||
echo "{\"class\": \"playing\", \"text\": \"\", \"tooltip\": \"$album\"}"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ $status == "Paused" ]]
|
||||
then
|
||||
echo "{\"class\": \"paused\", \"text\": \"\", \"tooltip\": \"$album\"}"
|
||||
exit
|
||||
fi
|
||||
13
.config/waybar/waybar_ldelossa/custom/spotify/quit.sh
Normal file
13
.config/waybar/waybar_ldelossa/custom/spotify/quit.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# quit closes spotify but triggers
|
||||
# the monitor to update which immediately
|
||||
# remove the widget instead of waiting for
|
||||
# the next monitor interval.
|
||||
|
||||
if pgrep spotify
|
||||
then
|
||||
kill -SIGINT $(pgrep spotify)
|
||||
fi
|
||||
|
||||
pkill -RTMIN+4 waybar
|
||||
15
.config/waybar/waybar_ldelossa/custom/stats.sh
Normal file
15
.config/waybar/waybar_ldelossa/custom/stats.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
swaymsg workspace stats
|
||||
if [ "$1" == "cpu" ]; then
|
||||
kitty "htop" "-s" "PERCENT_CPU"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" == "memory" ]; then
|
||||
kitty "htop" "-s" "M_RESIDENT"
|
||||
exit
|
||||
fi
|
||||
|
||||
kitty "htop"
|
||||
exit
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
if pgrep wf-recorder &> /dev/null
|
||||
then
|
||||
echo '{"class": "recording"}'
|
||||
exit
|
||||
fi
|
||||
echo '{"class": ""}'
|
||||
|
||||
9
.config/waybar/waybar_ldelossa/custom/wfrecord-record.sh
Normal file
9
.config/waybar/waybar_ldelossa/custom/wfrecord-record.sh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
wf-recorder -o $(swaymsg -r -t get_outputs | jq -r '.[] | select(.focused == true).name') -f $HOME/Videos/$(date -Is).mp4 &> /dev/null &
|
||||
notify-send ' screen cap started'
|
||||
sleep .1
|
||||
|
||||
# send signal to update monitor
|
||||
pkill -RTMIN+8 waybar
|
||||
|
||||
7
.config/waybar/waybar_ldelossa/custom/wfrecord-stop.sh
Normal file
7
.config/waybar/waybar_ldelossa/custom/wfrecord-stop.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
pkill -SIGINT wf-recorder && notify-send ' screen cap ended'
|
||||
sleep .1
|
||||
|
||||
# send signal to update monitor
|
||||
pkill -RTMIN+8 waybar
|
||||
Loading…
Add table
Add a link
Reference in a new issue