Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bin/omarchy-menu
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ show_setup_security_menu() {
}

show_setup_config_menu() {
case $(menu "Setup" " Defaults\n Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar\n󰞅 XCompose") in
case $(menu "Setup" " Defaults\n Hyprland\n Hypridle\n Hyprlock\n Sunsetr\n Swayosd\n󰌧 Walker\n󰍜 Waybar\n󰞅 XCompose") in
*Defaults*) open_in_editor ~/.config/uwsm/default ;;
*Hyprland*) open_in_editor ~/.config/hypr/hyprland.conf ;;
*Hypridle*) open_in_editor ~/.config/hypr/hypridle.conf && omarchy-restart-hypridle ;;
*Hyprlock*) open_in_editor ~/.config/hypr/hyprlock.conf ;;
*Hyprsunset*) open_in_editor ~/.config/hypr/hyprsunset.conf && omarchy-restart-hyprsunset ;;
*Sunsetr*) open_in_editor ~/.config/sunsetr/sunsetr.toml && omarchy-restart-sunsetr ;;
*Swayosd*) open_in_editor ~/.config/swayosd/config.toml && omarchy-restart-swayosd ;;
*Walker*) open_in_editor ~/.config/walker/config.toml && omarchy-restart-walker ;;
*Waybar*) open_in_editor ~/.config/waybar/config.jsonc && omarchy-restart-waybar ;;
Expand Down Expand Up @@ -475,9 +475,9 @@ show_update_channel_menu() {
esac
}
show_update_process_menu() {
case $(menu "Restart" " Hypridle\n Hyprsunset\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
case $(menu "Restart" " Hypridle\n Sunsetr\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
*Hypridle*) omarchy-restart-hypridle ;;
*Hyprsunset*) omarchy-restart-hyprsunset ;;
*Sunsetr*) omarchy-restart-sunsetr ;;
*Swayosd*) omarchy-restart-swayosd ;;
*Walker*) omarchy-restart-walker ;;
*Waybar*) omarchy-restart-waybar ;;
Expand All @@ -486,11 +486,11 @@ show_update_process_menu() {
}

show_update_config_menu() {
case $(menu "Use default config" " Hyprland\n Hypridle\n Hyprlock\n Hyprsunset\n󱣴 Plymouth\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
case $(menu "Use default config" " Hyprland\n Hypridle\n Hyprlock\n Sunsetr\n󱣴 Plymouth\n Swayosd\n󰌧 Walker\n󰍜 Waybar") in
*Hyprland*) present_terminal omarchy-refresh-hyprland ;;
*Hypridle*) present_terminal omarchy-refresh-hypridle ;;
*Hyprlock*) present_terminal omarchy-refresh-hyprlock ;;
*Hyprsunset*) present_terminal omarchy-refresh-hyprsunset ;;
*Sunsetr*) present_terminal omarchy-refresh-sunsetr ;;
*Plymouth*) present_terminal omarchy-refresh-plymouth ;;
*Swayosd*) present_terminal omarchy-refresh-swayosd ;;
*Walker*) present_terminal omarchy-refresh-walker ;;
Expand Down
6 changes: 0 additions & 6 deletions bin/omarchy-refresh-hyprsunset

This file was deleted.

5 changes: 5 additions & 0 deletions bin/omarchy-refresh-sunsetr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# Reset sunsetr config to Omarchy defaults and restart
omarchy-refresh-config sunsetr/sunsetr.toml
omarchy-restart-sunsetr
3 changes: 0 additions & 3 deletions bin/omarchy-restart-hyprsunset

This file was deleted.

3 changes: 3 additions & 0 deletions bin/omarchy-restart-sunsetr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

omarchy-restart-app sunsetr
40 changes: 24 additions & 16 deletions bin/omarchy-toggle-nightlight
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
#!/bin/bash

# Default temperature values
ON_TEMP=4000
OFF_TEMP=6000
# Toggle nightlight (blue light filter) on/off
#
# Default temperatures based on research:
# Day: 6500K - standard monitor calibration, matches noon sunlight
# Night: 3500K - warm light to reduce eye strain and support circadian rhythm
# (consensus default from f.lux research, gammastep, redshift)

# Ensure hyprsunset is running
if ! pgrep -x hyprsunset; then
setsid uwsm-app -- hyprsunset &
sleep 1 # Give it time to register
DAY_TEMP=6500
NIGHT_TEMP=3500

# Start sunsetr if not running
if ! pgrep -x sunsetr >/dev/null; then
setsid uwsm-app -- sunsetr &
sleep 1
fi

# Query the current temperature
CURRENT_TEMP=$(hyprctl hyprsunset temperature 2>/dev/null | grep -oE '[0-9]+')
# Get current temperature
CURRENT_TEMP=$(sunsetr get static_temp 2>/dev/null | grep -oE '[0-9]+' || echo "$DAY_TEMP")

restart_nightlighted_waybar() {
if grep -q "custom/nightlight" ~/.config/waybar/config.jsonc; then
omarchy-restart-waybar # restart waybar in case user has waybar module for hyprsunset
if grep -q "custom/nightlight" ~/.config/waybar/config.jsonc 2>/dev/null; then
omarchy-restart-waybar
fi
}

if [[ "$CURRENT_TEMP" == "$OFF_TEMP" ]]; then
hyprctl hyprsunset temperature $ON_TEMP
notify-send " Nightlight screen temperature"
if [[ "$CURRENT_TEMP" -ge "$DAY_TEMP" ]]; then
# Currently day temp (or higher) -> switch to night
sunsetr set static_temp=$NIGHT_TEMP
notify-send " Nightlight on (${NIGHT_TEMP}K)"
restart_nightlighted_waybar
else
hyprctl hyprsunset temperature $OFF_TEMP
notify-send " Daylight screen temperature"
# Currently night temp -> switch to day
sunsetr set static_temp=$DAY_TEMP
notify-send " Nightlight off (${DAY_TEMP}K)"
restart_nightlighted_waybar
fi
14 changes: 0 additions & 14 deletions config/hypr/hyprsunset.conf

This file was deleted.

59 changes: 59 additions & 0 deletions config/sunsetr/sunsetr.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Sunsetr - Blue light filter for Wayland
# https://github.com/disluckyguy/sunsetr
#
# Sunsetr is NOT started automatically. To enable:
# 1. Manual toggle: Press SUPER+CTRL+N or use Omarchy Menu > Trigger > Toggle > Nightlight
# 2. Auto-start: Add to ~/.config/hypr/autostart.conf:
# exec-once = uwsm-app -- sunsetr
#
# After enabling, sunsetr will automatically adjust color temperature
# based on your location and time of day (geo mode) or your manual settings.

# Backend selection
# Options: "auto", "hyprland", "hyprsunset", "wayland"
backend = "auto"

# Transition mode - how color temperature changes throughout the day
# Options:
# "geo" - Automatic based on sunrise/sunset at your location (recommended)
# "static" - Fixed temperature, no automatic changes
# "finish_by" - Transition completes by sunset/sunrise time
# "start_at" - Transition starts at sunset/sunrise time
# "center" - Transition centered on sunset/sunrise time
transition_mode = "static"

# Static mode settings (used when transition_mode = "static")
# Standard daylight is 6500K - this means no color shift when first started
static_temp = 6500
static_gamma = 100

# Day/Night temperatures (used in geo and time-based modes)
# Research-based defaults:
# - 6500K: Standard monitor calibration, matches noon sunlight
# - 3500K: Warm incandescent, reduces blue light for evening use
# (consensus default from f.lux research, gammastep, redshift)
day_temp = 6500
night_temp = 3500

# Gamma adjustment (10-200%)
# 100% = no change, lower = dimmer
# Research suggests 80-90% at night can help, but 100% is simpler
day_gamma = 100
night_gamma = 100

# Smooth transitions
smoothing = true
startup_duration = 0.5 # Seconds to fade in on start (0.1-60, 0 = instant)
shutdown_duration = 0.5 # Seconds to fade out on stop (0.1-60, 0 = instant)
adaptive_interval = 1 # Base interval for smooth transitions (1-1000ms)

# Transition timing (for time-based modes)
update_interval = 60 # How often to update during transitions (10-300 seconds)
transition_duration = 45 # Length of dawn/dusk transition (5-120 minutes)

# Manual sunrise/sunset times (used if geo mode can't determine location)
sunrise = "06:00:00"
sunset = "19:00:00"

# Geolocation is auto-detected on first run when using geo mode.
# To set manually, run: sunsetr geo
6 changes: 3 additions & 3 deletions default/omarchy-skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ cat $(which omarchy-theme-set)
├── envs.conf # Environment variables
├── autostart.conf # Startup applications
├── hypridle.conf # Idle behavior (screen off, lock, suspend)
├── hyprlock.conf # Lock screen appearance
└── hyprsunset.conf # Night light / blue light filter
└── hyprlock.conf # Lock screen appearance
```

**Key behaviors:**
Expand Down Expand Up @@ -159,6 +158,7 @@ cat $(which omarchy-theme-set)
| lazygit | `~/.config/lazygit/config.yml` |
| starship | `~/.config/starship.toml` |
| git | `~/.config/git/config` |
| sunsetr | `~/.config/sunsetr/sunsetr.toml` |
| walker | `~/.config/walker/config.toml` |

## Safe Customization Patterns
Expand Down Expand Up @@ -363,7 +363,7 @@ This creates a new migration file and outputs its path without opening an editor
- "Add a keybinding for Super+E to open file manager" -> Check existing bindings first, add `unbind` if needed, then add `bind` in `~/.config/hypr/bindings.conf`
- "Configure my external monitor" -> Edit `~/.config/hypr/monitors.conf`
- "Make the window gaps smaller" -> Edit `~/.config/hypr/looknfeel.conf`
- "Set up night light to turn on at sunset" -> `omarchy-toggle-nightlight` or edit `~/.config/hypr/hyprsunset.conf`
- "Set up night light to turn on at sunset" -> `omarchy-toggle-nightlight` or edit `~/.config/sunsetr/sunsetr.toml`
- "Customize the catppuccin theme colors" -> Create `~/.config/omarchy/themes/catppuccin-custom/` by copying from stock, then edit
- "Run a script every time I change themes" -> Create `~/.config/omarchy/hooks/theme-set`
- "Reset waybar to defaults" -> `omarchy-refresh-waybar`
2 changes: 1 addition & 1 deletion install/omarchy-base.packages
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ hyprland-guiutils
hyprland-preview-share-picker
hyprlock
hyprpicker
hyprsunset
sunsetr
imagemagick
impala
imv
Expand Down
20 changes: 20 additions & 0 deletions migrations/1767914078.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
echo "Switch from hyprsunset to sunsetr for blue light filtering"

# Install sunsetr from AUR
if ! command -v sunsetr &>/dev/null; then
yay -S --noconfirm --needed sunsetr
fi

# Stop hyprsunset if running
pkill -x hyprsunset 2>/dev/null || true

# Remove hyprsunset package (if installed)
if pacman -Qi hyprsunset &>/dev/null; then
sudo pacman -Rns --noconfirm hyprsunset 2>/dev/null || true
fi

# Remove old config
rm -f ~/.config/hypr/hyprsunset.conf

# Install new sunsetr config
omarchy-refresh-sunsetr