From ad001c7ff232a07a07474cfbe3871f99901fa960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferit=20Yi=C4=9Fit=20BALABAN?= Date: Fri, 10 Nov 2023 21:02:03 +0300 Subject: [PATCH] Add script to set desktop environment timer and change background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ferit Yiğit BALABAN --- utility/run_at_day.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 utility/run_at_day.sh diff --git a/utility/run_at_day.sh b/utility/run_at_day.sh new file mode 100755 index 0000000..689d4cf --- /dev/null +++ b/utility/run_at_day.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Ferit Yiğit BALABAN, +# desktop environment timer, 2023 +# + +select="/home/ferit/shoka/500-599 pictures/502 landscape/cringe/light/wallhaven-gpz2g7.jpg" +wallpaper="$HOME/.config/navi/img_background_light" +current_dir=$(dirname "${BASH_SOURCE[0]}") + +# Set GTK theme to light mode +gsettings set org.gnome.desktop.interface gtk-theme "WhiteSur-Light-blue" +gsettings set org.gnome.desktop.interface color-scheme 'prefer-light' +bash "$current_dir/toggle_vscode_theme.sh" light + +# Set keyboard brightness to 0 if first launch, otherwise don't change +if [ "$1" != "nobright" ]; then + brightnessctl -qd 'asus::kbd_backlight' set 0 +fi + +# Set screen backlight to 50% if first launch, otherwise don't change +if [ "$1" != "nobright" ]; then + brightnessctl -q set 50% +fi + +cp "$select" "$wallpaper" +hyprctl hyprpaper wallpaper "eDP-1, $wallpaper" >/dev/null +if hyprctl monitors | grep -q 'Monitor HDMI-A-1'; then + hyprctl hyprpaper wallpaper "HDMI-A-1, $wallpaper" >/dev/null +fi + +# change desktop background +# if pgrep "hyprpaper" > /dev/null +# then +# killall hyprpaper && hyprpaper >/dev/null & disown +# else +# hyprpaper >/dev/null & disown +# fi + +# generate and set color scheme +wal -nqei "$select" >/dev/null