diff options
Diffstat (limited to '')
-rwxr-xr-x | pkgs/sources/scripts/source/apps/aumo.sh (renamed from sys/nixpkgs/pkgs/scripts/source/apps/aumo.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/apps/con2pdf.sh (renamed from sys/nixpkgs/pkgs/scripts/source/apps/con2pdf.sh) | 0 | ||||
-rw-r--r-- | pkgs/sources/scripts/source/apps/fupdate.1.md (renamed from sys/nixpkgs/pkgs/scripts/source/apps/fupdate.1.md) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/apps/fupdate.sh (renamed from sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/apps/git-edit-index.sh (renamed from sys/nixpkgs/pkgs/scripts/source/apps/git-edit-index.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/small_functions/brightness.sh | 80 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/small_functions/nato.py (renamed from sys/nixpkgs/pkgs/scripts/source/small_functions/nato.py) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/small_functions/screenshot_persistent.sh (renamed from sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_persistent.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/small_functions/screenshot_temporary.sh (renamed from sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_temporary.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/small_functions/update-sys.sh (renamed from sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/neorg_id_function.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/add.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/context.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_start.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_stop.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/list.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/project.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/utils.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/workspace.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/neorg/sh/main.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/spodi/sh/download.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/download.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/spodi/sh/update.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/update.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/spodi/spodi.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/spodi/spodi.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/specific/ytcc/description.sh (renamed from sys/nixpkgs/pkgs/scripts/source/specific/ytcc/description.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/battery.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/battery.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/hibernate.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/hibernate.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/ll.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/ll.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/lock.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/lock.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/lyrics.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/lyrics.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/mpc-fav.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-fav.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/mpc-rm.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-rm.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/mpc.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/mpc.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/show.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/show.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/sort_song.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/sort_song.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/virsh-del.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/virsh-del.sh) | 0 | ||||
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/yti.sh (renamed from sys/nixpkgs/pkgs/scripts/source/wrappers/yti.sh) | 0 |
38 files changed, 80 insertions, 0 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/aumo.sh b/pkgs/sources/scripts/source/apps/aumo.sh index 84d39deb..84d39deb 100755 --- a/sys/nixpkgs/pkgs/scripts/source/apps/aumo.sh +++ b/pkgs/sources/scripts/source/apps/aumo.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/con2pdf.sh b/pkgs/sources/scripts/source/apps/con2pdf.sh index 08bf8998..08bf8998 100755 --- a/sys/nixpkgs/pkgs/scripts/source/apps/con2pdf.sh +++ b/pkgs/sources/scripts/source/apps/con2pdf.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.1.md b/pkgs/sources/scripts/source/apps/fupdate.1.md index 710e8fb7..710e8fb7 100644 --- a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.1.md +++ b/pkgs/sources/scripts/source/apps/fupdate.1.md diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh b/pkgs/sources/scripts/source/apps/fupdate.sh index 4322610a..4322610a 100755 --- a/sys/nixpkgs/pkgs/scripts/source/apps/fupdate.sh +++ b/pkgs/sources/scripts/source/apps/fupdate.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/apps/git-edit-index.sh b/pkgs/sources/scripts/source/apps/git-edit-index.sh index e73dc53c..e73dc53c 100755 --- a/sys/nixpkgs/pkgs/scripts/source/apps/git-edit-index.sh +++ b/pkgs/sources/scripts/source/apps/git-edit-index.sh diff --git a/pkgs/sources/scripts/source/small_functions/brightness.sh b/pkgs/sources/scripts/source/small_functions/brightness.sh new file mode 100755 index 00000000..a7272279 --- /dev/null +++ b/pkgs/sources/scripts/source/small_functions/brightness.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +help() { + cat <<EOF +This is a system brightness manager + +USAGE: + $NAME up [VALUE] | down [VALUE] + +OPTIONS: + --help | -h + Output this help and exit. + + --version | -v + Output the version and exit. + +COMMANDS: + up [VALUE] + Increase the brightness by VALUE or 5%. + + down [VALUE] + Decrease the brightness by VALUE or 5%. + +ARGUMENTS: + VALUE := [[seq 0 100]] + The amount to increase/decrease the brightness. In percentage +EOF +} + +BACKLIGHT="/sys/class/%BACKLIGHT_NAME" + +brightness() { + offset="$1" + + max="$(cat $BACKLIGHT/max_brightness)" + cur="$(cat $BACKLIGHT/brightness)" + percentage="$(echo | awk --assign=cur="$cur" --assign=max="$max" '{printf cur / max}')" + + new="$(echo | awk --assign=per="$percentage" --assign=offset="$offset" '{printf per + (offset / 10)}')" + + output="$(echo | awk --assign=new="$new" --assign=max="$max" '{printf max * new}')" + + msg "echo \"$output\" > $BACKLIGHT/brightness" +} + +for arg in "$@"; do + case "$arg" in + "--help" | "-h") + help + exit 0 + ;; + "--version" | "-v") + version + exit 0 + ;; + esac +done + +case "$1" in +"up") + shift 1 + value="5" + [ -n "$1" ] && value="$1" + brightness "+$value" + ;; +"down") + shift 1 + value="-5" + [ -n "$1" ] && value="$1" + brightness "-$value" + ;; +*) + die "The command '$1' does not exist! See '--help' for a list" + ;; +esac + +# vim: ft=sh diff --git a/sys/nixpkgs/pkgs/scripts/source/small_functions/nato.py b/pkgs/sources/scripts/source/small_functions/nato.py index e9d15f56..e9d15f56 100755 --- a/sys/nixpkgs/pkgs/scripts/source/small_functions/nato.py +++ b/pkgs/sources/scripts/source/small_functions/nato.py diff --git a/sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_persistent.sh b/pkgs/sources/scripts/source/small_functions/screenshot_persistent.sh index 4308b8d2..4308b8d2 100755 --- a/sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_persistent.sh +++ b/pkgs/sources/scripts/source/small_functions/screenshot_persistent.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_temporary.sh b/pkgs/sources/scripts/source/small_functions/screenshot_temporary.sh index 8968ca79..8968ca79 100755 --- a/sys/nixpkgs/pkgs/scripts/source/small_functions/screenshot_temporary.sh +++ b/pkgs/sources/scripts/source/small_functions/screenshot_temporary.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh b/pkgs/sources/scripts/source/small_functions/update-sys.sh index d28247f6..d28247f6 100755 --- a/sys/nixpkgs/pkgs/scripts/source/small_functions/update-sys.sh +++ b/pkgs/sources/scripts/source/small_functions/update-sys.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/neorg_id_function.sh b/pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh index 865ecacf..865ecacf 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/neorg_id_function.sh +++ b/pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/add.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh index 5a830a10..5a830a10 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/add.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/context.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh index 7095847d..7095847d 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/context.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh index 5a138982..5a138982 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_start.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh index 2423dd44..2423dd44 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_start.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_stop.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh index e4ff0b94..e4ff0b94 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/f_stop.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/list.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh index 10659457..10659457 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/list.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/project.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh index 64591850..64591850 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/project.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh index a0a9ab8d..a0a9ab8d 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/utils.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh index c3843e8e..c3843e8e 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/utils.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/workspace.sh b/pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh index d5eb2fca..d5eb2fca 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/workspace.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh b/pkgs/sources/scripts/source/specific/neorg/sh/main.sh index 559351b9..559351b9 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh +++ b/pkgs/sources/scripts/source/specific/neorg/sh/main.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/download.sh b/pkgs/sources/scripts/source/specific/spodi/sh/download.sh index fe9746c8..fe9746c8 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/download.sh +++ b/pkgs/sources/scripts/source/specific/spodi/sh/download.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/update.sh b/pkgs/sources/scripts/source/specific/spodi/sh/update.sh index a289cf58..a289cf58 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/sh/update.sh +++ b/pkgs/sources/scripts/source/specific/spodi/sh/update.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/spodi.sh b/pkgs/sources/scripts/source/specific/spodi/spodi.sh index 475fd48a..475fd48a 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/spodi/spodi.sh +++ b/pkgs/sources/scripts/source/specific/spodi/spodi.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/ytcc/description.sh b/pkgs/sources/scripts/source/specific/ytcc/description.sh index ae9107b9..ae9107b9 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/ytcc/description.sh +++ b/pkgs/sources/scripts/source/specific/ytcc/description.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/battery.sh b/pkgs/sources/scripts/source/wrappers/battery.sh index e650ba5d..e650ba5d 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/battery.sh +++ b/pkgs/sources/scripts/source/wrappers/battery.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/hibernate.sh b/pkgs/sources/scripts/source/wrappers/hibernate.sh index 30868fd1..30868fd1 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/hibernate.sh +++ b/pkgs/sources/scripts/source/wrappers/hibernate.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/ll.sh b/pkgs/sources/scripts/source/wrappers/ll.sh index f689ba44..f689ba44 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/ll.sh +++ b/pkgs/sources/scripts/source/wrappers/ll.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/lock.sh b/pkgs/sources/scripts/source/wrappers/lock.sh index 3101ef9a..3101ef9a 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/lock.sh +++ b/pkgs/sources/scripts/source/wrappers/lock.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/lyrics.sh b/pkgs/sources/scripts/source/wrappers/lyrics.sh index 02a147c8..02a147c8 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/lyrics.sh +++ b/pkgs/sources/scripts/source/wrappers/lyrics.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-fav.sh b/pkgs/sources/scripts/source/wrappers/mpc-fav.sh index 795a4875..795a4875 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-fav.sh +++ b/pkgs/sources/scripts/source/wrappers/mpc-fav.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-rm.sh b/pkgs/sources/scripts/source/wrappers/mpc-rm.sh index 94e0634b..94e0634b 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc-rm.sh +++ b/pkgs/sources/scripts/source/wrappers/mpc-rm.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc.sh b/pkgs/sources/scripts/source/wrappers/mpc.sh index 5aae5cdb..5aae5cdb 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/mpc.sh +++ b/pkgs/sources/scripts/source/wrappers/mpc.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/show.sh b/pkgs/sources/scripts/source/wrappers/show.sh index ae2bdb13..ae2bdb13 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/show.sh +++ b/pkgs/sources/scripts/source/wrappers/show.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/sort_song.sh b/pkgs/sources/scripts/source/wrappers/sort_song.sh index e2978507..e2978507 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/sort_song.sh +++ b/pkgs/sources/scripts/source/wrappers/sort_song.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/virsh-del.sh b/pkgs/sources/scripts/source/wrappers/virsh-del.sh index c3de5484..c3de5484 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/virsh-del.sh +++ b/pkgs/sources/scripts/source/wrappers/virsh-del.sh diff --git a/sys/nixpkgs/pkgs/scripts/source/wrappers/yti.sh b/pkgs/sources/scripts/source/wrappers/yti.sh index a69ffa74..a69ffa74 100755 --- a/sys/nixpkgs/pkgs/scripts/source/wrappers/yti.sh +++ b/pkgs/sources/scripts/source/wrappers/yti.sh |