From 81842c8b3912b5657d7a05b5dbc3924f03301e58 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 9 Feb 2023 08:19:36 -0600 Subject: fix generics to use /bin/sh, not /sbin/sh --- barmenu | 2 +- barmenu_run | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/barmenu b/barmenu index a43a079..83a2ab1 100755 --- a/barmenu +++ b/barmenu @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -z "$WAYLAND_DISPLAY" -a -n "$DISPLAY" ]; then dmenu -i -F $@ diff --git a/barmenu_run b/barmenu_run index 6ff709f..55acffe 100755 --- a/barmenu_run +++ b/barmenu_run @@ -1,3 +1,3 @@ -#!/sbin/sh +#!/bin/sh dmenu_path | barmenu "$@" | ${SHELL:-"/bin/sh"} & -- cgit v1.2.3 From dbee0aab13c3dff4bac390f3ba75da9b3d55322d Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 9 Feb 2023 11:08:45 -0600 Subject: add backlight generic command (light or xbacklight) --- bl | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 bl diff --git a/bl b/bl new file mode 100644 index 0000000..f220e4f --- /dev/null +++ b/bl @@ -0,0 +1,47 @@ +#!/bin/sh + +## Backlight controller generic: use either light or xbacklight + +CMD=`crcparse bl` + +case "$CMD" in + "light") + case "$1" in + "-i") + light -A "$2" + ;; + "-d") + light -U "$2" + ;; + "-s") + light -S "$1" + ;; + "-g") + light -G + ;; + "*") + printf "$CMD: $1 not understood. Treating it as a direct command." + light "$@" + ;; + esac + ;; + "xbacklight") + case "$1" in + "-i") + xbacklight -inc "$2" + ;; + "-d") + xbacklight -dec "$2" + ;; + "-s") + xbacklight -set "$1" + ;; + "-g") + xbacklight -get + ;; + "*") + printf "$CMD: $1 not understood. Treating it as a direct command." + xbacklight "$@" + ;; + esac +esac -- cgit v1.2.3 From 4ec61c0f9527e4f0ecce57a8b869270d8a42734e Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 9 Feb 2023 11:11:15 -0600 Subject: fix bl (typo for -s) --- bl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 bl diff --git a/bl b/bl old mode 100644 new mode 100755 index f220e4f..de3b133 --- a/bl +++ b/bl @@ -14,7 +14,7 @@ case "$CMD" in light -U "$2" ;; "-s") - light -S "$1" + light -S "$2" ;; "-g") light -G @@ -34,7 +34,7 @@ case "$CMD" in xbacklight -dec "$2" ;; "-s") - xbacklight -set "$1" + xbacklight -set "$2" ;; "-g") xbacklight -get -- cgit v1.2.3