{"id":50879634,"url":"https://github.com/prostopasta/xfce-night-switch","last_synced_at":"2026-06-15T13:00:13.763Z","repository":{"id":364932997,"uuid":"1269040966","full_name":"prostopasta/xfce-night-switch","owner":"prostopasta","description":"Automatic dark/light theme switcher for XFCE — panel launcher, icon picker, solar scheduling, i18n","archived":false,"fork":false,"pushed_at":"2026-06-15T07:00:56.000Z","size":75,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T07:23:02.015Z","etag":null,"topics":["auto-dark","bash","dark-mode","gtk","i18n","linux","night-switch","panel-applet","sunrise-sunset","xfce","xfce4","yad"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prostopasta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-14T08:30:55.000Z","updated_at":"2026-06-15T06:57:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/prostopasta/xfce-night-switch","commit_stats":null,"previous_names":["prostopasta/xfce-night-switch"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/prostopasta/xfce-night-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prostopasta%2Fxfce-night-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prostopasta%2Fxfce-night-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prostopasta%2Fxfce-night-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prostopasta%2Fxfce-night-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prostopasta","download_url":"https://codeload.github.com/prostopasta/xfce-night-switch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prostopasta%2Fxfce-night-switch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34363557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-dark","bash","dark-mode","gtk","i18n","linux","night-switch","panel-applet","sunrise-sunset","xfce","xfce4","yad"],"created_at":"2026-06-15T13:00:12.557Z","updated_at":"2026-06-15T13:00:13.744Z","avatar_url":"https://github.com/prostopasta.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/banner.svg\" alt=\"xfce-night-switch\" width=\"880\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/prostopasta/xfce-night-switch/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/prostopasta/xfce-night-switch?label=latest\u0026color=4cadcc\" alt=\"Latest release\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/prostopasta/xfce-night-switch/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/downloads/prostopasta/xfce-night-switch/total?color=brightgreen\" alt=\"Downloads\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT License\"/\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/XFCE-4.16%2B-4cadcc.svg\" alt=\"XFCE 4.16+\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/bash-5.0%2B-4EAA25.svg\" alt=\"Bash 5+\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/i18n-en%20%7C%20ru%20%7C%20custom-orange.svg\" alt=\"i18n\"/\u003e\n\u003c/p\u003e\n\n---\n\n**xfce-night-switch** is a day/night GTK theme switcher for XFCE with a panel launcher, graphical settings dialog, Terminator terminal profile sync, location-aware scheduling, and full i18n.\n\n**The problem:** XFCE has no built-in dark mode schedule. Terminator has no way to auto-switch terminal profiles when the system switches between dark and light modes. Existing solutions are either genmon plugins requiring manual polling, Python packages with heavy dependencies, or simple scripts with no GUI.\n\n**The solution:** A self-contained bash toolset — a panel launcher with an arrow menu, a graphical settings dialog (yad) for theme and icon selection, and sunrise/sunset scheduling with zero runtime dependencies beyond what ships with a standard XFCE desktop.\n\n---\n\n## Features\n\n| Feature | xfce-night-switch | [xfce4-night-mode](https://github.com/bimlas/xfce4-night-mode) | [AutomaThemely](https://github.com/C2N14/AutomaThemely) | [xfce4-theme-switcher](https://github.com/UdeshyaDhungana/xfce4-theme-switcher) |\n|---|:---:|:---:|:---:|:---:|\n| Panel launcher with icon | ✅ | GenMon text | ❌ | ❌ |\n| Live icon changes day↔night | ✅ | ❌ | ❌ | ❌ |\n| Graphical icon picker (96+ icons) | ✅ | ❌ | ❌ | ❌ |\n| GTK theme selector (scans system) | ✅ | ❌ | ❌ | ❌ |\n| Terminator profile sync | ✅ | ❌ | ❌ | ❌ |\n| Icons scaled to panel size | ✅ | ❌ | ❌ | ❌ |\n| Time-based schedule | ✅ | ✅ | ✅ | ❌ |\n| Sunrise/sunset by location | ✅ | ✅ | ✅ | ❌ |\n| City search (OpenStreetMap) | ✅ | ❌ | ❌ | ❌ |\n| GUI settings dialog | ✅ | ❌ | ✅ | ❌ |\n| Panel selection (multi-panel) | ✅ | ❌ | ❌ | ❌ |\n| Multi-language UI | ✅ en/ru/custom | ❌ | ❌ | ❌ |\n| No Python/pip dependencies | ✅ | ✅ | ❌ | ✅ |\n| .deb package | ✅ | ❌ | ❌ | ❌ |\n| One-command install | ✅ | ✅ | ✅ | ❌ |\n\n---\n\n## Quick install\n\n### Option A — .deb package (Ubuntu / Debian / Mint, recommended)\n\n```bash\n# Download and install latest release (one line)\nwget -qO- https://api.github.com/repos/prostopasta/xfce-night-switch/releases/latest \\\n  | grep browser_download_url | grep '\\.deb' | cut -d'\"' -f4 \\\n  | xargs wget -O xfce-night-switch.deb \u0026\u0026 sudo dpkg -i xfce-night-switch.deb\n```\n\n`dpkg` runs `xfce-night-switch-setup` automatically for `$SUDO_USER`. The panel launcher is added, cron is configured, systemd service is enabled — no manual steps needed.\n\nTo remove:\n```bash\nsudo dpkg -r xfce-night-switch      # remove (keeps config)\nsudo dpkg -P xfce-night-switch      # purge (removes config too)\n```\n\n### Option B — git clone (any distro)\n\n```bash\ngit clone https://github.com/prostopasta/xfce-night-switch.git\ncd xfce-night-switch\nbash install.sh\n```\n\n---\n\n## How it works\n\n```\n                      ┌─────────────────────────────────────────┐\n                      │         XFCE Panel (dynamic ID)         │\n                      │  ┌──────────┐  ┌──────────────────────┐ │\n                      │  │  ☀️/🌙   │  │  ⚙️ Theme Settings   │ │\n                      │  │ (toggle) │  │  (arrow menu item)   │ │\n                      │  └────┬─────┘  └──────────┬───────────┘ │\n                      └───────┼───────────────────┼─────────────┘\n                              │                   │\n              toggle-theme.sh │ theme-settings.sh │\n                              │                   │\n            ┌─────────────────▼───────────────────▼────────────────┐\n            │                  GTK Theme switch                    │\n            │   xfconf-query + gsettings + xfwm4 theme             │\n            └──────────┬───────────────────────────────────────────┘\n                       │\n         ┌─────────────┼────────────────────────────────┐\n         │             │                                │\n         ▼             ▼                                ▼\n  Terminator     Panel icon update              auto-theme.sh\n  profile switch  (launcher-N/*.desktop)        (cron, every min)\n  (DBus)          day ☀️ / night 🌙            time or location mode\n                                                (NOAA sunrise/sunset)\n```\n\n### Panel launcher\n\nThe launcher is installed at `~/.config/xfce4/panel/launcher-N/` where `N` is a free plugin ID ≥ 100, detected automatically and saved to `~/.config/theme-switcher/config`. Two entries:\n\n- **Left item** — toggle between day/night theme instantly\n- **Arrow** — opens settings dialog\n\nThe panel icon updates on every toggle and every cron run (every minute). If you have multiple panels, the installer detects the one with the clock and places the launcher there. You can move it via **Settings → Panel launcher**.\n\n### Settings dialog\n\n`theme-settings.sh` is a `yad`-based GUI with these sections:\n\n```\n┌────────────────────────────────────────────────┐\n│  Theme Switcher Settings                       │\n├──────────────────────┬─────────────────────────┤\n│  🌙 Night icon       │  Tango • weather..      │\n│  ☀️ Day icon         │  Humanity • clear       │\n│  🎨 Themes           │  [opens theme dialog]   │\n│  🖥️ Panel launcher   │  panel-0 (plugin-100)   │\n│  ⏱️ Auto-switcher    │  ✓ By location          │\n│  🌐 App language     │  English                │\n│  🔄 Restart panel    │                         │\n└──────────────────────┴─────────────────────────┘\n```\n\n**Theme dialog** (`🎨 Themes`) scans `/usr/share/themes/` and `~/.themes/` for installed GTK themes. Pick separate themes for day and night mode. Same for Terminator profiles — reads `~/.config/terminator/config` and lists available profiles.\n\n---\n\n## Terminator profile sync\n\nXFCE has no built-in way to switch Terminator terminal profiles when the system dark/light mode changes. This is a common pain point — Terminator's profiles are static and there is no hook for system theme changes.\n\n**xfce-night-switch solves this** by:\n\n1. Switching the active profile for all open Terminator windows via DBus on every toggle or schedule event\n2. Updating the `profile =` setting in layout blocks of `~/.config/terminator/config` so new terminal windows open with the correct profile\n\n**Setup:**\n\n1. Create two profiles in Terminator: **Preferences → Profiles** (e.g. `light-theme` and `dark-theme`)\n2. Open **theme-settings → 🎨 Themes** — pick the profiles in the day/night dropdowns\n3. Done — Terminator will switch automatically\n\n**If you don't use Terminator**, set both profiles to `default` — no effect.\n\n---\n\n## Requirements\n\n| Package | Used for | Likely pre-installed |\n|---|---|---|\n| `bash` 5+ | All scripts | ✅ |\n| `yad` | Settings GUI | Usually yes on XFCE |\n| `xfconf-query` | Panel/XFCE config | ✅ XFCE |\n| `gsettings` | GTK theme switching | ✅ GLib |\n| `inkscape` | SVG icon rendering | Often yes |\n| `imagemagick` (`convert`) | PNG scaling fallback | Usually yes |\n| `curl` | City search, IP geolocation | ✅ |\n| `python3` | NOAA sunrise/sunset | ✅ |\n| `python3-dbus` | Terminator profile switching | `apt install python3-dbus` |\n\nNo `pip install`, no virtualenvs, no Node.js.\n\n---\n\n## Configuration\n\nConfig lives at `~/.config/theme-switcher/config`:\n\n```bash\n# GTK themes — use 'theme-settings' GUI to pick from installed themes\nLIGHT_THEME=\"Adwaita\"\nDARK_THEME=\"Adwaita-dark\"\n\n# Terminator profiles (must match [[ProfileName]] in ~/.config/terminator/config)\nTERM_PROFILE_LIGHT=\"default\"\nTERM_PROFILE_DARK=\"default\"\n\n# Icons\nICON_DAY=\"weather-clear\"\nICON_NIGHT=\"$HOME/.local/share/icons/hicolor/scalable/apps/theme-moon.svg\"\n\n# Scheduling\nAUTO_SWITCHER=\"enabled\"          # enabled | disabled\nAUTO_MODE=\"time\"                 # time | location\nDAY_START=\"07:00\"\nDAY_END=\"18:00\"\nLATITUDE=\"\"                      # used in location mode\nLONGITUDE=\"\"\nAPP_LANG=\"en\"                    # en | ru | custom code\n```\n\nEdit via `theme-settings` GUI or directly. The file is never overwritten on reinstall.\n\n---\n\n## Adding a custom language\n\n```bash\ncp ~/.config/theme-switcher/locales/en.sh ~/.config/theme-switcher/locales/de.sh\nnano ~/.config/theme-switcher/locales/de.sh\n# Select in settings: App language → de\n```\n\n---\n\n## Sunrise/sunset accuracy\n\n`sunrise-sunset.py` uses the [NOAA Solar Calculator](https://gml.noaa.gov/grad/solcalc/) algorithm implemented in pure Python stdlib. Accuracy: ±1 minute for most latitudes. Polar regions (above 66°N / below 66°S) with midnight sun or polar night fall back to time-based mode.\n\n---\n\n## Similar projects\n\n| Project | Stars | Approach | XFCE panel | GUI | Location |\n|---|---|---|---|---|---|\n| [bimlas/xfce4-night-mode](https://github.com/bimlas/xfce4-night-mode) | 109⭐ | GenMon plugin, shell | Text only | ❌ | ✅ |\n| [C2N14/AutomaThemely](https://github.com/C2N14/AutomaThemely) | 202⭐ | Python, multi-DE | ❌ | ✅ | ✅ |\n| [UdeshyaDhungana/xfce4-theme-switcher](https://github.com/UdeshyaDhungana/xfce4-theme-switcher) | 10⭐ | Shell | ❌ | ❌ | ❌ |\n| **xfce-night-switch** (this) | — | Shell + yad | ✅ icon+menu | ✅ | ✅ |\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprostopasta%2Fxfce-night-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprostopasta%2Fxfce-night-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprostopasta%2Fxfce-night-switch/lists"}