Integrate dynamic colorschemes into applications

Makes polybar use Xresources color values for its colors. Resets rofi
values to their default after being overwritten by the base16 themes.
Makes qutebrowser include the colorscheme in its configuration file.

Ignore dynamically generated colorschemes in .gitignore file.
This commit is contained in:
Marty Oehme 2020-01-31 01:22:47 +01:00
parent 6ed90134a3
commit ad8decb4ef
7 changed files with 28 additions and 9 deletions

6
.gitignore vendored
View file

@ -44,3 +44,9 @@ tags
.vim .vim
# End of https://www.gitignore.io/api/vim,linux # End of https://www.gitignore.io/api/vim,linux
# Ignore dynamic colorschemes set by styler
colorscheme.vim
colorscheme
colorscheme.py
colorscheme.rasi

View file

@ -47,6 +47,13 @@ endif
" set truecolor (neovim) " set truecolor (neovim)
set termguicolors set termguicolors
" load colorscheme from dynamic file
" first one is here to make airline behave correctly without reload
runtime colorscheme.vim
" this one is here to override anything set by default in colorscheme plugin
" loading
autocmd VimEnter * runtime colorscheme.vim
" sets tabs to be 2 characters, expanded into spaces, but still removable with " sets tabs to be 2 characters, expanded into spaces, but still removable with
" one press of backspace. " one press of backspace.
" great explanation: http://vimcasts.org/transcripts/2/en/ " great explanation: http://vimcasts.org/transcripts/2/en/

View file

@ -18,14 +18,14 @@
[colors] [colors]
;background = ${xrdb:color0:#222} ;background = ${xrdb:color0:#222}
background = #222 background = ${xrdb:background}
background-alt = #444 background-alt = ${xrdb:color8}
;foreground = ${xrdb:color7:#222} ;foreground = ${xrdb:color7:#222}
foreground = #dfdfdf foreground = ${xrdb:foreground}
foreground-alt = #555 foreground-alt = ${xrdb:color3}
primary = #ffb52a primary = ${xrdb:color1}
secondary = #e60053 secondary = ${xrdb:color4}
alert = #bd2c40 alert = ${xrdb:color2}
[settings] [settings]
; The throttle settings lets the eventloop swallow up til X events ; The throttle settings lets the eventloop swallow up til X events

View file

@ -61,8 +61,8 @@ c.tabs.title.format = '{index} {audio}{perc}{current_title}'
c.tabs.position = "right" c.tabs.position = "right"
c.tabs.width = "15%" c.tabs.width = "15%"
# give the browser nice nord theme colors # give the browser nice theme colors
config.source('themes/base16-gruvbox-dark.py') config.source('colorscheme.py')
# Status bar # Status bar
# should be visible to prevent 'jumping' bug, see https://github.com/qutebrowser/qutebrowser/issues/2236 # should be visible to prevent 'jumping' bug, see https://github.com/qutebrowser/qutebrowser/issues/2236

View file

@ -22,6 +22,7 @@
#listview { #listview {
spacing: 5px; spacing: 5px;
lines: 100; lines: 100;
border: 0px;
} }
#entry { #entry {

View file

@ -10,6 +10,7 @@
* but try to keep the two separated as much as possible, so we can adjust global options easily from here * but try to keep the two separated as much as possible, so we can adjust global options easily from here
*/ */
//default import
@import "colorschemes/gruvbox-dark.rasi" @import "colorschemes/gruvbox-dark.rasi"
* { * {

View file

@ -30,6 +30,10 @@ super + x
super + BackSpace super + BackSpace
rofi -modi "powermenu:~/.config/rofi/modes/powermenu" -show powermenu -theme themes/powermenu rofi -modi "powermenu:~/.config/rofi/modes/powermenu" -show powermenu -theme themes/powermenu
# quick-switching of theme using styler
super + F8
styler set $(styler list themes | rofi -dmenu -theme /themes/dmenu -matching fuzzy)
# enable function (/media) key functionality # enable function (/media) key functionality
# TODO: set up next song, previous song, pause, etc # TODO: set up next song, previous song, pause, etc
# see: https://www.reddit.com/r/i3wm/comments/3a6nh3/help_how_to_use_function_keys_in_i3_config/ # see: https://www.reddit.com/r/i3wm/comments/3a6nh3/help_how_to_use_function_keys_in_i3_config/