scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit dc98cba24cb5f1f3e260c49fc61add4a113a1df0
parent af05c6c366ce928818848a3d8c897e7c52ae9d0f
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 19 Jun 2023 08:25:41 +0200

Update to status (now I use a statusbar)

Diffstat:
MMakefile | 5+----
Rbrightness -> old/brightness | 0
Rnotify-status -> old/notify-status | 0
Rtogglemute -> old/togglemute | 0
Rvolume -> old/volume | 0
Mstatus | 10++++++++--
Axroot-update | 8++++++++
7 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,6 @@ PREFIX = /usr/local SCRIPTS = addressgrep \ battery-checknow \ battery-status \ - brightness \ clip \ config-backup \ cth \ @@ -19,7 +18,6 @@ SCRIPTS = addressgrep \ ffmpeg-facecam \ mail-compose \ mergepdf \ - notify-status \ open-file \ open-stdin \ open-url \ @@ -35,17 +33,16 @@ SCRIPTS = addressgrep \ templess \ terminal \ theme \ - togglemute \ translate \ trash \ urlgrep \ virename \ - volume \ websearch \ xedit \ xedit-filter \ xplumb \ xprop-active-window-id \ + xroot-update \ xwallpaper-random-notify all: install diff --git a/brightness b/old/brightness diff --git a/notify-status b/old/notify-status diff --git a/togglemute b/old/togglemute diff --git a/volume b/old/volume diff --git a/status b/status @@ -10,9 +10,15 @@ sep=${1:-" | "} -time=$(date +"%H:%M:%S") +time=$(date +"%H:%M") date=$(date +"%d %B %Y, %A") +if [ "$(pulsemixer --get-mute)" -eq 1 ]; then + volume="Audio muted" +else + volume="Volume: $(pulsemixer --get-volume | awk '{print $1}')%%" +fi + bat="/sys/class/power_supply/BAT0" if [ -d $bat ]; then battery="Battery: $(cat $bat/capacity)%% $(cat $bat/status)" @@ -28,6 +34,6 @@ network="Network: $(nmcli device status | head -n 2 | tail -n 1 | sed 's/ *$//' events=$(sdep-list past | wc -l) -printf "$time$sep$date$sep$battery$sep$network" +printf "$network$sep$volume$sep$battery$sep$date$sep$time" [ "$events" != "0" ] && printf "$sep$events TODO task(s)" printf "\n" diff --git a/xroot-update b/xroot-update @@ -0,0 +1,8 @@ +#!/bin/sh + +# Updates the xroot window with info from status +# Requires: status + +# Usage: xroot-update + +xsetroot -name " $(status) "