https://github.com/braun-steven/audamo
Automatically set linux themes based on time or local sunrise and sunset.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Keywords
Repository
Automatically set linux themes based on time or local sunrise and sunset.
Basic Info
- Host: GitHub
- Owner: braun-steven
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://www.steven-braun.com/audamo/
- Size: 1.01 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Audamo

Audamo is a project designed to smoothly provide what fully featured desktop environments such as Gnome and KDE provide: An automated transition of themes between light and dark mode depending on time or location. This is particularly helpful for non-desktop environments such as i3wm, sway, hyprland, awesomewm, bspwm, dwm, and many more. Audamo can be configured to switch themes based on sunrise/sunset times at a given or inferred location or simply by a specified schedule. Additionally, Audamo allows for the execution of custom scripts during theme changes, enabling users to hook additional scripts into the theme toggle process.
Until now, Audamo can set the following theme elements (config.toml values in brackets; see also Configuration):
- GTK theme (
theme) - Icon theme (
icon) - Cursor theme (
cursor) - GTK color-scheme preference
A user-specified script (custom-script-path) can be run with every theme change, allowing for additional customization; see also Custom Script.
Installation
Install Script
Install conveniently with the install script.
bash
bash <(curl -s -L https://raw.githubusercontent.com/braun-steven/audamo/main/install.sh)
Dependencies
Audamo requires the following Python packages to be installed (see requirements.txt for more specific versions):
astralrequeststomli
Arch Linux (AUR)
Audamo is available in the AUR as audamo:
bash
paru -S audamo
You can now copy the default system-wide configuration into your user config:
bash
cp /usr/share/audamo/config.toml $XDG_CONFIG_HOME/audamo/config.toml
Usage
Audamo is intended to be run as a background process that checks for location or time and, based on this, applies dark or light settings defined in config.toml.
Systemd
We provide systemd user units to run audamo --daemon as a serviced service as well:
bash
systemctl --user enable --now audamo.service
Daemon Mode
If systemd is not available or not desired, audamo can also be run in daemon mode:
bash
audamo --daemon
Manual
Instead of using Audamo as a service/daemon, you can run it manually with a single invocation. Based on the config.toml settings, this will update the theme to light/dark mode:
``` bash $ audamo --help usage: audamo [-h] [-l] [-d] [--debug] [--list-themes] [--daemon] [-v] [-c CONFIG] [--print-config]
Automatically set the system theme based on time or local sunrise and sunset.
options: -h, --help show this help message and exit -l, --light Force theme to light mode. (default: False) -d, --dark Force theme to dark mode. (default: False) --debug Enable debug logging to console. (default: False) --list-themes List available themes, cursors, and icons. (default: False) --daemon Run as a daemon to continuously monitor the time. (default: False) -v, --version show program's version number and exit -c CONFIG, --config CONFIG Specify the configuration file to use (default: None) --print-config Print the configuration file and exit. (default: False) ```
Configuration
Audamo can be configured by editing the config.toml file. The user configuration should be placed at $XDG_CONFIG_HOME/audamo/config.toml.
``` toml
Specify location by latitude and longitude
[general] latitude = "" longitude = ""
Time in the format "%H:%M"
sunrise = "08:00" sunset = "20:00"
Theme mode:
- "location": sets the theme based on sunrise/sunset at given location
- "time": sets the theme
mode = "location"
Custom script that also gets executed with a single argument which is either "light" or "dark"
This script may contain user specified sed instructions to e.g. replace the vim theme like "sed -i s/colorscheme dark/colorscheme light/g ~/.vimrc" or similar
Make sure that the script has a proper shebang, e.g. "#!/bin/sh" for shell scripts
custom-script-path = ""
Light theme elements
Set values to "" if they should not be changed
[light] theme = "Adwaita" icon = "Adwaita" cursor = "Adwaita"
Dark theme elements
Set values to "" if they should not be changed
[dark] theme = "Adwaita-dark" icon = "Adwaita" cursor = "Adwaita" ```
Custom Script
A custom script can get executed every time audamo is run. The script path can be configured in config.toml with the custom-script-path variable. The script is run with a single argument which is either "light" or "dark". This script may contain user-specified sed instructions to replace the vim theme like sed e.g. -i s/colorscheme dark/colorscheme light/g ~/.vimrc or similar. Make sure that the script has a proper shebang, e.g. #!/bin/sh for shell scripts.
An example script can be found in example-custom-script.sh:
```bash
!/usr/bin/env sh
This script takes a single argument, either "light" or "dark".
THEME="$1" case $THEME in light) # Sway background swaymsg "output * bg ~/lakesidedeer-light.png fill"
# Alacritty
sed -i 's/nord/github_light/g' ~/.config/alacritty/alacritty.toml
# Vim
sed -i 's/background=dark/background=light/g' ~/.vimrc
;;
dark)
# Sway background
swaymsg "output * bg ~/lakesidedeer-dark.png fill"
# Alacritty
sed -i 's/github_light/nord/g' ~/.config/alacritty/alacritty.toml
# Vim
sed -i 's/background=light/background=dark/g' ~/.vimrc
;;
*)
echo "Invalid argument. Please use 'light' or 'dark'."
exit 1
;;
esac ```
Uninstall
If Audamo was installed via the install script, it can likewise be uninstalled with the uninstall script:
bash
bash <(curl -s -L https://raw.githubusercontent.com/braun-steven/audamo/main/uninstall.sh)
Changelog
Version 1.1.4
- Add fallbacks to location fetching and config parsing logic
Version 1.1.3
- Fix a timezone bug for sunrise/sunset
Version 1.1.2
- Hotfix slip of syntax error
Version 1.1.1
- Remove sleep until the next sunrise/sunset as this was not compatible with suspending systems
Version 1.1.0
- Add print config flag
- Implement sleep until the next sunrise/sunset
- Fix theme detection when the theme does not have an
index.themefile - Rewrite core logic
- Get rid of timezonefinder dependency
- Remove systemd timer and make the service start the daemon
Owner
- Name: Steven Braun
- Login: braun-steven
- Kind: user
- Company: @ml-research
- Website: www.steven-braun.com
- Twitter: sbraunmz
- Repositories: 9
- Profile: https://github.com/braun-steven
PhD Student at the AIML Lab @ml-research, Technical University of Darmstadt
GitHub Events
Total
- Issues event: 2
- Watch event: 2
- Issue comment event: 6
- Push event: 5
Last Year
- Issues event: 2
- Watch event: 2
- Issue comment event: 6
- Push event: 5
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: about 14 hours
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 7.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: about 14 hours
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 7.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Woutuuur (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Requests ==2.31.0
- astral ==3.2
- colorlog ==6.8.2
- pytz ==2024.1
- timezonefinder ==6.4.1
- Requests ==2.31.0
- astral ==3.2
- pytz ==2024.1
- timezonefinder ==6.4.1
- github-pages ~> 231 development
- jekyll-feed ~> 0.12 development
- http_parser.rb ~> 0.6.0
- json >= 0
- minima ~> 2.5
- tzinfo >= 1, < 3
- tzinfo-data >= 0
- wdm ~> 0.1.1
- webrick ~> 1.8
- activesupport 7.1.3.2
- addressable 2.8.6
- base64 0.2.0
- bigdecimal 3.1.6
- bundler 2.5.4
- coffee-script 2.4.1
- coffee-script-source 1.12.2
- colorator 1.1.0
- commonmarker 0.23.10
- concurrent-ruby 1.2.3
- connection_pool 2.4.1
- dnsruby 1.70.0
- drb 2.2.1
- em-websocket 0.5.3
- ethon 0.16.0
- eventmachine 1.2.7
- execjs 2.9.1
- faraday 2.9.0
- faraday-net_http 3.1.0
- ffi 1.16.3
- forwardable-extended 2.6.0
- gemoji 4.1.0
- github-pages 231
- github-pages-health-check 1.18.2
- html-pipeline 2.14.3
- http_parser.rb 0.8.0
- i18n 1.14.1
- jekyll 3.9.5
- jekyll-avatar 0.8.0
- jekyll-coffeescript 1.2.2
- jekyll-commonmark 1.4.0
- jekyll-commonmark-ghpages 0.4.0
- jekyll-default-layout 0.1.5
- jekyll-feed 0.17.0
- jekyll-gist 1.5.0
- jekyll-github-metadata 2.16.1
- jekyll-include-cache 0.2.1
- jekyll-mentions 1.6.0
- jekyll-optional-front-matter 0.3.2
- jekyll-paginate 1.1.0
- jekyll-readme-index 0.3.0
- jekyll-redirect-from 0.16.0
- jekyll-relative-links 0.6.1
- jekyll-remote-theme 0.4.3
- jekyll-sass-converter 1.5.2
- jekyll-seo-tag 2.8.0
- jekyll-sitemap 1.4.0
- jekyll-swiss 1.0.0
- jekyll-theme-architect 0.2.0
- jekyll-theme-cayman 0.2.0
- jekyll-theme-dinky 0.2.0
- jekyll-theme-hacker 0.2.0
- jekyll-theme-leap-day 0.2.0
- jekyll-theme-merlot 0.2.0
- jekyll-theme-midnight 0.2.0
- jekyll-theme-minimal 0.2.0
- jekyll-theme-modernist 0.2.0
- jekyll-theme-primer 0.6.0
- jekyll-theme-slate 0.2.0
- jekyll-theme-tactile 0.2.0
- jekyll-theme-time-machine 0.2.0
- jekyll-titles-from-headings 0.5.3
- jekyll-watch 2.2.1
- jemoji 0.13.0
- json 2.7.1
- kramdown 2.4.0
- kramdown-parser-gfm 1.1.0
- liquid 4.0.4
- listen 3.9.0
- mercenary 0.3.6
- mini_portile2 2.8.5
- minima 2.5.1
- minitest 5.22.2
- mutex_m 0.2.0
- net-http 0.4.1
- nokogiri 1.16.2
- octokit 4.25.1
- pathutil 0.16.2
- public_suffix 5.0.4
- racc 1.7.3
- rb-fsevent 0.11.2
- rb-inotify 0.10.1
- rexml 3.2.6
- rouge 3.30.0
- rubyzip 2.3.2
- safe_yaml 1.0.5
- sass 3.7.4
- sass-listen 4.0.0
- sawyer 0.9.2
- simpleidn 0.2.1
- terminal-table 1.8.0
- typhoeus 1.4.1
- tzinfo 2.0.6
- unf 0.1.4
- unf_ext 0.0.9.1
- unicode-display_width 1.8.0
- uri 0.13.0
- webrick 1.8.1