~kris/dots

srice

ref: 2582f0c4173a4ad6a31e0cb759473c893cdc4e93 srice/.config/eww/scripts/toggle_night_mode.sh -rwxr-xr-x 402 bytes
2582f0c4 — Kris Yotam sb-cpu: portable temp source (Intel Core 0, AMD Tdie/Tctl, Asahi NVMe Composite fallback) 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