commit 78f1dc8cd42106ea941351dd7c265e8375071204
parent b9305eddbd443db1fa43a74f404440945f4a555a
Author: linusbehrens <mail@linus-behrens.de>
Date: Sun, 13 Jul 2025 15:54:20 +0200
tmux color adjust
Diffstat:
7 files changed, 130 insertions(+), 0 deletions(-)
diff --git a/.scripts/dmenu-mac/dmenu/wBrightness b/.scripts/dmenu-mac/dmenu/wBrightness
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+(
+ echo "$(brightnessctl g) (current brightness)"
+ for b in 500 400 300 200 100 49 29 9 off; do
+ echo "$b"
+ done
+) | dmenu -i -l 9 | awk '{print $1}' | while read bri; do
+ if [ "$bri" = "off" ]; then
+ brightnessctl s 0
+ else
+ brightnessctl s "$bri"
+ fi
+done
+
+
+
+
+
diff --git a/.scripts/dmenu-mac/dmenu/wDir b/.scripts/dmenu-mac/dmenu/wDir
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+awk -F, '{
+ if ($2 != "") {
+ print $2
+ } else {
+ print $1
+ }
+}' /home/linus/scripts/directories.csv | dmenu -i -l 5 -p $(pwd)| while read selection; do
+ if [ -z "$selection" ]; then
+ exit 0
+ fi
+ awk -F, -v sel="$selection" '
+ $2 == sel { print $1; found=1 }
+ $2 == "" && $1 == sel { print $1; found=1 }
+ END { if (!found) exit 1 }
+ ' /home/linus/scripts/directories.csv | while read dir; do
+ cd "$dir" >/dev/null 2>&1 &
+ done
+done
+
diff --git a/.scripts/dmenu-mac/dmenu/wSys b/.scripts/dmenu-mac/dmenu/wSys
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+case "$(printf "kill\nzzz\nreboot\nshutdown" | dmenu -i -l 4)" in
+ kill) ps -u $USER -o pid,comm,%cpu,%mem | dmenu -i -l 10 -p Kill: | awk '{print $1}' | xargs -r kill ;;
+ zzz) slock systemctl suspend -i ;;
+ reboot) systemctl reboot -i ;;
+ shutdown) shutdown now ;;
+ *) exit 1 ;;
+esac
diff --git a/.scripts/dmenu-mac/dmenu/wVolume b/.scripts/dmenu-mac/dmenu/wVolume
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+(
+ #echo "$(pamixer --get-volume) (current volume)"
+ for v in 100 80 60 40 20 mute; do
+ echo "$v"
+ done
+ ) | dmenu -i -l 6 -p $(pamixer --get-volume) | awk '{print $1}' | while read vol; do
+ if [ "$vol" = "mute" ]; then
+ pamixer --mute
+ else
+ pamixer --set-volume "$vol"
+ fi
+done
+
+
+
+
diff --git a/.scripts/dmenu-mac/dmenu/wWallpaper b/.scripts/dmenu-mac/dmenu/wWallpaper
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+
+# $(ls -1 $HOME/dotfiles/wallpaper | wmenu -i)
+ls -1 -R $HOME/dotfiles/wallpaper | dmenu -i -l 10
+
+
diff --git a/.scripts/dmenu-mac/dmenu/wWebsites b/.scripts/dmenu-mac/dmenu/wWebsites
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+awk -F, '{
+ if ($2 != "") {
+ print $2
+ } else {
+ print $1
+ }
+}' $HOME/scripts/websites.csv | dmenu -i -l 10 | while read selection; do
+ if [ -z "$selection" ]; then
+ exit 0
+ fi
+ awk -F, -v sel="$selection" '
+ $2 == sel { print $1; found=1 }
+ $2 == "" && $1 == sel { print $1; found=1 }
+ END { if (!found) exit 1 }
+ ' $HOME/scripts/websites.csv | while read url; do
+ xdg-open "$url" >/dev/null 2>&1 &
+ done
+done
+
diff --git a/.scripts/dmenu-mac/dmenu/wWifi b/.scripts/dmenu-mac/dmenu/wWifi
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+awk -F, '{
+ if ($1 ~ /^nmcli/) {
+ # custom command + description
+ print $2
+ } else {
+ # regular SSID
+ print $1
+ }
+}' $HOME/scripts/wifi.csv | dmenu -i | while read selection; do
+ if [ -z "$selection" ]; then
+ exit 0
+ fi
+
+ # search for the selection
+ awk -F, -v sel="$selection" '
+ {
+ if ($1 ~ /^nmcli/ && $2 == sel) {
+ # custom command + description
+ cmd = $1
+ found = 1
+ } else if ($1 == sel) {
+ cmd = sprintf("nmcli device wifi connect \"%s\" password \"%s\"", $1, $2)
+ found = 1
+ }
+ }
+ END {
+ if (found) {
+ print cmd
+ }
+ }' $HOME/scripts/wifi.csv | while read cmd; do
+ eval "$cmd"
+ done
+done