ayu is a simple theme with bright colors and comes in three versions — dark, mirage and light for all day long comfortable work.
This theme has been inspired by the multicolor theme from Awesome WM Copycats and uses the gorgeous ayu color palette.
-
Clone [lain][lain] and theme to
~/.config/awesome/
cd .config/awesome mkdir themes git clone https://github.com/MArpogaus/awesome-ayu.git themes/ayu git clone https://github.com/vicious-widgets/vicious.git vicious
-
Install Font Awesome 4 and mononoki
# Debian / Ubuntu apt install fonts-font-awesome fonts-mononoki # Manjaro pamac build ttf-font-awesome-4 ttf-mononoki
-
Download and install owfont
wget -O /usr/share/fonts/TTF/owfont-regular.ttf 'https://github.com/websygen/owfont/blob/master/fonts/owfont-regular.ttf?raw=true'
-
Create your configuration file.
cp themes/ayu/config.lua.template config.lua
-
Load the theme in your
rc.lua
local chosen_theme= "ayu" beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)) awful.screen.connect_for_each_screen(beautiful.at_screen_connect)
-
install wpgtk to switch color schemes. (optional) JSON colorschemes and a
Rofi
template can be found in thewpg
folder.
The configuration file config.lua
allows you to adjust the following parameters according to your needs.
city_id
- OWM id of your city. Find it here: https://openweathermap.org/find?q=
app_id
- OWM API key. Sign up here: https://home.openweathermap.org/users/sign_up
thermal_zone
- resource for temperature widget: https://vicious.readthedocs.io/en/latest/widgets.html#vicious-widgets-thermal
net_interface
- Network interface to monitor: https://vicious.readthedocs.io/en/latest/widgets.html#vicious-widgets-net
use_xresources
- Generate the color scheme from xrdb
You can use the following functions to dynamically change the used color scheme:
local set_dark = function()
local theme = beautiful.get()
theme:set_dark()
-- update awesome colorscheme
awful.screen.connect_for_each_screen(beautiful.at_screen_connect)
-- update gtk/rofi colorscheme
wpg("dark")
-- update sublime colorscheme
subl("dark")
end
local set_mirage = function()
local theme = beautiful.get()
theme:set_mirage()
-- update awesome colorscheme
awful.screen.connect_for_each_screen(beautiful.at_screen_connect)
-- update gtk/rofi colorscheme
wpg("mirage")
-- update sublime colorscheme
subl("mirage")
end
local set_light = function()
local theme = beautiful.get()
theme:set_light()
-- update awesome colorscheme
awful.screen.connect_for_each_screen(beautiful.at_screen_connect)
-- update gtk/rofi colorscheme
wpg("light")
-- update sublime colorscheme
subl("light")
end
Note: Using awful.screen.connect_for_each_screen(beautiful.at_screen_connect)
to update colors inside awesome, seams to cause significant performance issues when heavily used. Probably because old resources aren't freed properly. if you know a better way please let me know :)
I use the following function to switch colorschemes using wpgtk.
local function wpg( theme )
awful.spawn.with_shell(string.format("wpg -s %s.png", theme))
end
To update the colorscheme in sublime text accordingly, this function can be used.
local function subl( theme )
local subl_prefs = string.format("%s/.config/sublime-text-3/Packages/User/Preferences.sublime-settings", os.getenv("HOME"))
awful.spawn.with_shell(string.format("sed -i 's:ayu-\\(light\\|dark\\|mirage\\):ayu-%s:' '%s'", theme, subl_prefs))
end
ayu
for Ace: https://github.com/ayu-theme/ayu-aceayu
colors as NPM package: https://github.com/ayu-theme/ayu-colorsayu
for VSCode: https://github.com/teabyii/vscode-ayuayu
for XCode: https://github.com/vburojevic/ayu-xcode-themeayu
for Sublime Text 3: https://github.com/dempfi/ayu