From dc98cba24cb5f1f3e260c49fc61add4a113a1df0 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 19 Jun 2023 08:25:41 +0200 Subject: Update to status (now I use a statusbar) --- old/brightness | 16 ++++++++++++++++ old/notify-status | 7 +++++++ old/togglemute | 18 ++++++++++++++++++ old/volume | 13 +++++++++++++ 4 files changed, 54 insertions(+) create mode 100755 old/brightness create mode 100755 old/notify-status create mode 100755 old/togglemute create mode 100755 old/volume (limited to 'old') diff --git a/old/brightness b/old/brightness new file mode 100755 index 0000000..a7294fb --- /dev/null +++ b/old/brightness @@ -0,0 +1,16 @@ +#!/bin/sh + +# Increase / decrease brightness, and pops up a notification +# Requires: xbacklight, a notification program such as herbe or notify-send +# Usage: brightness {inc|dec} n + +# ksh completion +# set -A complete_brightness_1 inc dec +# set -A complete_brightness_2 5 + +#notify="notify-send" +notify="herbe" + +pkill herbe # comment this too if not using herbe + +xbacklight -$1 $2 && $notify "Brightness: $(xbacklight | sed 's/\..*$//')%" diff --git a/old/notify-status b/old/notify-status new file mode 100755 index 0000000..73a9435 --- /dev/null +++ b/old/notify-status @@ -0,0 +1,7 @@ +#!/bin/sh + +# Simple script to send a notification displaying the output of status + +# Requires: status, herbe (or similar, e.g. notify-send) + +herbe "$(status '\n\n')" diff --git a/old/togglemute b/old/togglemute new file mode 100755 index 0000000..b799b02 --- /dev/null +++ b/old/togglemute @@ -0,0 +1,18 @@ +#!/bin/sh + +# Toggle mute state and notify +# Requires: pulsemixer, notify-send or similar + +#notify=notify-send +notify=herbe + +ismute=$(pulsemixer --toggle-mute --get-mute) + +if [ "$ismute" = "1" ]; then + m="muted" +else + m="unmuted" +fi + +pkill herbe # comment this line too if not using herbe +$notify "Audio $m" diff --git a/old/volume b/old/volume new file mode 100755 index 0000000..8dcd36a --- /dev/null +++ b/old/volume @@ -0,0 +1,13 @@ +#!/bin/sh + +# Change volume and notify +# Usage: volume {+n|-n} +# Requires: pulsemixer, notify-send or similar + +#notify=notify-send +notify=herbe + +newvol=$(pulsemixer --change-volume "$1" --get-volume | awk '{print $1}') + +pkill herbe # comment this line too if not using herbe +$notify "Volume" "$newvol%" -- cgit v1.3