~kris/dots

srice

ref: f5fc91419850ee5f2652bdce0dcc214de18b4a22 srice/.config/eww/scripts/toggle_night_mode.sh -rwxr-xr-x 402 bytes
f5fc9141 — Kris Yotam add wallpapermenu script (was untracked); auto-detect output so cw works on any machine 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# File untuk menyimpan status
STATUS_FILE="/tmp/night_mode_status"

# Cek status saat ini
if [ -f "$STATUS_FILE" ] && [ "$(cat $STATUS_FILE)" = "on" ]; then
    # Matikan night mode dan RESET gamma ke default
    pkill -x redshift
    redshift -x  # Reset gamma
    echo "off" > "$STATUS_FILE"
else
    # Nyalakan night mode
    redshift -O 3400 -b 0.9 &
    echo "on" > "$STATUS_FILE"
fi