dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 5803cdbd0d96016ca99f67aa9f759baeb7231b0d
parent 9e48c4d65f6e7e53bc9485fd929591c13dd06619
Author: Alex Balgavy <alexander.balgavy@spaceapplications.com>
Date:   Fri, 17 May 2024 11:03:07 +0200

dwmblock scripts modifications

Diffstat:
Ascripts/dwmblock-date | 12++++++++++++
Mscripts/dwmblock-iss | 8++++----
Mscripts/dwmblock-volume | 3+++
3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/scripts/dwmblock-date b/scripts/dwmblock-date @@ -0,0 +1,12 @@ +#!/bin/sh +case "$BUTTON" in + 1) + if command -v cal >/dev/null 2>&1; then + setsid -f "$TERMINAL" -e cal + elif command -v emacsclient >/dev/null 2>&1; then + emacsclient -a '' -c -e '(progn (calendar) (delete-other-windows))' + fi + ;; + 6) "$TERMINAL" -e "$EDITOR" "$0";; +esac +date '+%b %d (%a) %I:%M%p' diff --git a/scripts/dwmblock-iss b/scripts/dwmblock-iss @@ -2,7 +2,7 @@ iss_stream_1="https://www.youtube.com/watch?v=P9C25Un7xaM" iss_stream_2="https://www.youtube.com/watch?v=jPTD2gnZFUw" show_iss_stream() { - setsid -f mpv --no-osc --loop=inf --no-terminal --profile=low-latency "$1" ; + setsid -f mpv --no-osc --loop=inf --no-terminal --profile=low-latency --volume=0 "$1" ; notify "ISS Tracker" "Opening stream..." } @@ -22,12 +22,12 @@ get_iss_diagram() { showimg() { setsid -f nsxiv "$1" ;} case $BUTTON in - 1) case "$(printf 'Map\nStream 1\nStream 2\nDiagram' | dmenu -i -l 3 -p "Choose:")" in + 1) case "$(printf 'Map\nStream 1 (Harmony)\nStream 2 (zenith)\nDiagram' | dmenu -i -l 3 -p "Choose:")" in 'Map') get_iss_pos && showimg "$iss_img";; - 'Stream 1') + 'Stream 1 (Harmony)') show_iss_stream "$iss_stream_1";; - 'Stream 2') + 'Stream 2 (zenith)') show_iss_stream "$iss_stream_2";; 'Diagram') get_iss_diagram && showimg "$iss_diagram";; diff --git a/scripts/dwmblock-volume b/scripts/dwmblock-volume @@ -6,6 +6,9 @@ case "$BUTTON" in 1) pgrep -f pulsemixer || setsid -f "$TERMINAL" -e pulsemixer pkill -RTMIN+6 dwmblocks;; + 3) + pactl -- set-source-mute "$source" toggle + pkill -RTMIN+6 dwmblocks;; 4) pactl -- set-sink-volume "$sink" +10% pkill -RTMIN+6 dwmblocks