~kris/dots

srice

ref: c8d9c68937f2c331a6bac47481ed40147fe73cba srice/.config/eww/scripts/toggle_night_mode.sh -rwxr-xr-x 402 bytes
c8d9c689 — Kris Yotam shell migration: fish -> mksh, reorganize bin/, wallpaper cleanup 4 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