From e680a708deb70966ebb7e15d60320f7c5e5f3ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Eahin=20Akkaya?= Date: Fri, 18 Mar 2022 01:48:16 +0300 Subject: [PATCH] Add new scripts --- scripts/autostart.sh | 21 +++++++++++++++++++++ scripts/keyboard_backlight.sh | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 scripts/autostart.sh create mode 100755 scripts/keyboard_backlight.sh diff --git a/scripts/autostart.sh b/scripts/autostart.sh new file mode 100755 index 0000000..83299f9 --- /dev/null +++ b/scripts/autostart.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +function run { + if ! pgrep $1 > /dev/null ; + then + $@& + fi +} + +#feh --bg-scale /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png + +nitrogen --save --set-zoom-fill ~/Pictures/Wallpapers/default.jpg +run picom & disown # --experimental-backends --vsync should prevent screen tearing on most setups if needed + +# Low battery notifier +#~/.config/qtile/scripts/check_battery.sh & disown + +# Start welcome +#run eos-welcome & disown +$HOME/.config/polybar/launch.sh & disown +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & disown # start polkit agent from GNOME diff --git a/scripts/keyboard_backlight.sh b/scripts/keyboard_backlight.sh new file mode 100755 index 0000000..e78553e --- /dev/null +++ b/scripts/keyboard_backlight.sh @@ -0,0 +1,25 @@ +#!/bin/bash + + + +brightness=`cat /sys/class/leds/asus::kbd_backlight/brightness` +max=3 +min=0 + + +if [ "$1" == "inc" ]; then + + brightness=`expr $brightness + 1` +else + brightness=`expr $brightness - 1` +fi + +if [ $brightness -gt 3 ]; then + brightness=3 +fi + +if [ $brightness -lt 0 ]; then + brightness=0 +fi + +echo $brightness > /sys/class/leds/asus::kbd_backlight/brightness