From f13778fe52cb0fc97e1b5a96711990ea6c024284 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Fri, 31 Dec 2021 10:57:34 -0500 Subject: [PATCH] Additional waybar commands --- waybar/waybar-audio.sh | 9 +++++++++ waybar/waybar-keyboard.sh | 10 ++++++++++ waybar/waybar-mpd.sh | 10 ++++++++++ waybar/waybar-todo.sh | 9 +++++++++ 4 files changed, 38 insertions(+) create mode 100755 waybar/waybar-audio.sh create mode 100755 waybar/waybar-keyboard.sh create mode 100755 waybar/waybar-mpd.sh create mode 100755 waybar/waybar-todo.sh diff --git a/waybar/waybar-audio.sh b/waybar/waybar-audio.sh new file mode 100755 index 0000000..e0dc2a1 --- /dev/null +++ b/waybar/waybar-audio.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +RUNNING=$(pgrep pavucontrol) + +if [ "$RUNNING" ]; then + kill $RUNNING 2&>1 /dev/null +else + /usr/bin/pavucontrol +fi diff --git a/waybar/waybar-keyboard.sh b/waybar/waybar-keyboard.sh new file mode 100755 index 0000000..5c49617 --- /dev/null +++ b/waybar/waybar-keyboard.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +FILE=/home/jpm/.config/onscreen-keyboard +if [ -f $FILE ]; then + rm $FILE + busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false +else + touch $FILE + busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true +fi diff --git a/waybar/waybar-mpd.sh b/waybar/waybar-mpd.sh new file mode 100755 index 0000000..f35af59 --- /dev/null +++ b/waybar/waybar-mpd.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +RUNNING=$(pgrep ncmpcpp) + +if [ "$RUNNING" ]; then + kill $RUNNING 2&>1 /dev/null +else + echo "starting" + /usr/bin/xterm -e /usr/bin/ncmpcpp +fi diff --git a/waybar/waybar-todo.sh b/waybar/waybar-todo.sh new file mode 100755 index 0000000..83397ac --- /dev/null +++ b/waybar/waybar-todo.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +RUNNING=$(pgrep todotxt-machine) + +if [ "$RUNNING" ]; then + kill $RUNNING 2&>1 /dev/null +else + /usr/bin/xterm -e "/home/jpm/.local/bin/todotxt-machine /home/jpm/nextcloud/phone/todo.txt" +fi