Skip to content

modified version of the multicolor theme from Awesome WM Copycats using the gorgeous ayu color palette.

License

Notifications You must be signed in to change notification settings

dadold/awesome-ayu

 
 

Repository files navigation

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.

Screenshoots

dark

dark colors scheme


mirage

mirage colors scheme


light

light colors scheme

Installation

Dependencies

Quick installation example

  1. 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
  2. Install Font Awesome 4 and mononoki

    # Debian / Ubuntu
    apt install fonts-font-awesome fonts-mononoki
    # Manjaro
    pamac build ttf-font-awesome-4 ttf-mononoki
  3. 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'
  4. Create your configuration file.

    cp themes/ayu/config.lua.template config.lua
  5. 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)
  6. install wpgtk to switch color schemes. (optional) JSON colorschemes and a Rofi template can be found in the wpg folder.

Configuration

The configuration file config.lua allows you to adjust the following parameters according to your needs.

Widget Parameters

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

Color scheme

use_xresources - Generate the color scheme from xrdb

Helper functions

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

Related projects and ports

About

modified version of the multicolor theme from Awesome WM Copycats using the gorgeous ayu color palette.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%