From 2ee8453750e0f29b0c089e85bb91b814fc736fb1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 30 Jan 2020 17:08:07 +0100 Subject: [PATCH 1/7] Add styler theming framework Sets up basic theming program styler which can be called to change theming of various applications. --- styler/.local/bin/styler | 115 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 styler/.local/bin/styler diff --git a/styler/.local/bin/styler b/styler/.local/bin/styler new file mode 100755 index 0000000..f094b7d --- /dev/null +++ b/styler/.local/bin/styler @@ -0,0 +1,115 @@ +#!/usr/bin/env bash + +readonly BASE_PATH="${STYLER_DATA_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/styler}" +readonly DEBUG="${STYLER_ENABLE_DEBUG_MODE:-false}" + +readonly PACKAGE_PATH="$BASE_PATH/packages" +readonly PROCESSOR_PATH="$BASE_PATH/processors" + +main() { + local cmd="" + local ret=0 + + case "$1" in + -s | --set | set) + cmd="set_theme" + ;; + -v | --version | version) + printf "Program theming script.\n\n©Marty Oehme\n\nVersion: 0.1.0\n" + exit 0 + ;; + -h | --help | help | *) + cmd="usage" + ;; + esac + shift + + $cmd "$1" + ret=$((ret + $?)) + exit $ret +} + +usage() { + printf "%s\n" \ + "" \ + " styler - Quickly switch your linux style." \ + " Uses base16 themes to quickly set them for a variety of applications." \ + "" \ + " Usage: styler [-hv | set base16-themename]" \ + "" \ + " Options:" \ + "" \ + " -s | set Set the theme. Use any valid base16 theme name (without base16- prefix)." \ + "" \ + " -h | help Print out this help." \ + "" \ + " -v | version Print out program information." \ + "" \ + "" +} + +# retrieves all relevant packages from BASE_PATH/packages +# 'relevant' here means they follow github pattern of author/repository +get_packages() { + for author in "$PACKAGE_PATH"/*; do + # TODO should eventually be used to either distinguish between author/pkg and pkg packages + # or to spit out a warning if they should not be used. + # if grep -q -e '^base16-' <<<"$(basename -- "$author")"; then + # echo ERROR + # fi + for package in "$author"/*; do + [[ -e "$author" ]] || break + [[ -d "$package" ]] || break + printf "%s/%s\n" "$(basename -- "$author")" "$(basename -- "$package")" + done + done +} + +# retrieves all processors from BASE_PATH/processors +# 'relevant' here means they follow github pattern of author/repository +get_processors() { + for processor in "$PROCESSOR_PATH"/*; do + [[ -e "$processor" ]] || break + [[ -f "$processor" ]] || break + printf "%s\n" "$(basename -- "$processor")" + done +} + +set_theme() { + local theme="$1" + + local packages + packages="$(get_packages)" + if [[ -z "$packages" ]]; then + printf "ERROR: No base16 packages installed. Please install at least 1 base16 package in %s/.\n" "$PACKAGE_PATH" >&2 + exit 1 + fi + + local processors + processors="$(get_processors)" + if [[ -z "$processors" ]]; then + printf "ERROR: No application processors installed. Please install at least one processor in %s/.\n" "$PROCESSOR_PATH" >&2 + exit 1 + fi + + for pkg in $packages; do + local appext + + # filter the application a package targets, since base16 packages + # carry standard names this removes everything before base16- + # the result is the application it targets + # shellcheck disable=SC2001 + appext=$(sed "s|^[[:alnum:]]\{1,\}/base16-||" <<<"$pkg") + + # Compares application extension with existing processors and runs the appropriate processor if found + processor="$PROCESSOR_PATH/theme_$appext" + if [[ -f "$processor" ]]; then + "$processor" "$PACKAGE_PATH" "$pkg" "$theme" + else + printf "WARN: No processor found for application %s in %s. Make sure you install a processor for the application.\n" "$appext" "$PROCESSOR_PATH/" >&2 + fi + + done +} + +main "$@" From 4838aecb75c26b558155e4d2a5e1f6fbcc5166c2 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 30 Jan 2020 19:49:37 +0100 Subject: [PATCH 2/7] Add list function to styler Can list available themes, packages, and processors. Invoked by `styler list` and then the intended target. When invoked without any valid target will remind the user to supply one. `list`, `--list`, `-l` are aliases and perform the same function. Examples: `styler list themes` `styler --list packages` `styler -l processors` --- styler/.local/bin/styler | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/styler/.local/bin/styler b/styler/.local/bin/styler index f094b7d..650be57 100755 --- a/styler/.local/bin/styler +++ b/styler/.local/bin/styler @@ -1,7 +1,6 @@ #!/usr/bin/env bash readonly BASE_PATH="${STYLER_DATA_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/styler}" -readonly DEBUG="${STYLER_ENABLE_DEBUG_MODE:-false}" readonly PACKAGE_PATH="$BASE_PATH/packages" readonly PROCESSOR_PATH="$BASE_PATH/processors" @@ -14,6 +13,9 @@ main() { -s | --set | set) cmd="set_theme" ;; + -l | --list | list) + cmd="list" + ;; -v | --version | version) printf "Program theming script.\n\n©Marty Oehme\n\nVersion: 0.1.0\n" exit 0 @@ -75,6 +77,13 @@ get_processors() { done } +# retrieves all installed themes from all packages, appends applications they exist for +get_themes() { + local themes + themes=$(find "$PACKAGE_PATH" -type f -name 'base16-*') + echo "$themes" | sed "s/.*\\/base16-//" | sed "s/\\..*//" | sort | uniq +} + set_theme() { local theme="$1" @@ -112,4 +121,23 @@ set_theme() { done } +list() { + local selected="$1" + + case "$selected" in + packages) + get_packages + ;; + processors) + get_processors + ;; + themes) + get_themes + ;; + *) + echo "Please select one of packages | processors | themes to list." + ;; + esac +} + main "$@" From acbe002f87ea32519ceb69d85a7a3c1f33212c5a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 30 Jan 2020 21:12:08 +0100 Subject: [PATCH 3/7] Add download function to styler Can take input in the form user/repo and pulls packages from github into its package directory. Documented use of new function. Can download both processors and packages. Styler decides between both with their naming schemes, searching for `/base16-` or `baseproc16-` respectively. For example: username/base16-programname - package username/baseproc16-programname - processor If it can not determine it based on name alone, it will assume to be dealing with a processor but spit out a warning for the user. Styler processors use same layout as packages, such that package and processor directories are mirrors of each other. So: `chriskempson/base16-vim` lies in the packages directory, `marty-oehme/vim-processor` mirrors it. This opens up the way for custom processors. --- styler/.local/bin/styler | 67 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/styler/.local/bin/styler b/styler/.local/bin/styler index 650be57..24ae60e 100755 --- a/styler/.local/bin/styler +++ b/styler/.local/bin/styler @@ -5,6 +5,8 @@ readonly BASE_PATH="${STYLER_DATA_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/sty readonly PACKAGE_PATH="$BASE_PATH/packages" readonly PROCESSOR_PATH="$BASE_PATH/processors" +readonly VERSION="0.2.4" + main() { local cmd="" local ret=0 @@ -16,8 +18,11 @@ main() { -l | --list | list) cmd="list" ;; + -d | --download | download) + cmd="download" + ;; -v | --version | version) - printf "Program theming script.\n\n©Marty Oehme\n\nVersion: 0.1.0\n" + printf "Program theming script.\n\n©Marty Oehme\n\nVersion: %s\n" "$VERSION" exit 0 ;; -h | --help | help | *) @@ -43,6 +48,9 @@ usage() { "" \ " -s | set Set the theme. Use any valid base16 theme name (without base16- prefix)." \ "" \ + " -d | download Download a base16 template into the package directory or download a processor16" \ + " into the processor directory. Use user/repo format to automatically pull from github." \ + "" \ " -h | help Print out this help." \ "" \ " -v | version Print out program information." \ @@ -50,6 +58,13 @@ usage() { "" } +# base directory should always exist +base_dir_exists_or_create() { + [[ -d "$BASE_PATH" ]] || mkdir "$BASE_PATH" + [[ -d "$PACKAGE_PATH" ]] || mkdir "$PACKAGE_PATH" + [[ -d "$PROCESSOR_PATH" ]] || mkdir "$BASE_PATH" +} + # retrieves all relevant packages from BASE_PATH/packages # 'relevant' here means they follow github pattern of author/repository get_packages() { @@ -70,10 +85,16 @@ get_packages() { # retrieves all processors from BASE_PATH/processors # 'relevant' here means they follow github pattern of author/repository get_processors() { - for processor in "$PROCESSOR_PATH"/*; do - [[ -e "$processor" ]] || break - [[ -f "$processor" ]] || break - printf "%s\n" "$(basename -- "$processor")" + for author in "$PROCESSOR_PATH"/*; do + for package in "$author"/*; do + for processor in "$package"/*; do + [[ -e "$processor" ]] || break + [[ -f "$processor" ]] || break + if grep -q -e '/theme_[[:alnum:]]\{1,\}$' <<<"$processor"; then + printf "%s\n" "$(basename -- "$processor")" + fi + done + done done } @@ -111,7 +132,7 @@ set_theme() { appext=$(sed "s|^[[:alnum:]]\{1,\}/base16-||" <<<"$pkg") # Compares application extension with existing processors and runs the appropriate processor if found - processor="$PROCESSOR_PATH/theme_$appext" + processor=$(find "$PROCESSOR_PATH" -type f -name "theme_$appext") if [[ -f "$processor" ]]; then "$processor" "$PACKAGE_PATH" "$pkg" "$theme" else @@ -140,4 +161,38 @@ list() { esac } +download() { + local pkg="$1" + local page="https://github.com" + local repo="$page/$pkg" + + [[ -z "$pkg" ]] && { + echo "No package to download passed in. Please provide a package to download in the form user/repository." + exit 1 + } + + type git >/dev/null 2>&1 || { + echo "git is required to clone base16 package. Please install git." + exit 1 + } + + base_dir_exists_or_create + + if ! git ls-remote --exit-code -h "$repo" >/dev/null; then + echo "Repository $repo not found." + exit 1 + fi + + # if package has patter name/base16-program, put it in packages; if name/process16-program put it in processors + # if none of the above, assume it's a processor but warn the user + if grep -q -e '^[0-9A-Za-z-]\{1,\}/base16-[0-9A-Za-z-]\{1,\}$' <<<"$pkg"; then + git clone "$repo" "$PACKAGE_PATH/$pkg" + elif grep -q -e '^[0-9A-Za-z-]\{1,\}/process16-[0-9A-Za-z-]\{1,\}$' <<<"$pkg"; then + git clone "$repo" "$PROCESSOR_PATH/$pkg" + else + echo "Package does not fit default naming scheme of packages/processors. Assuming it is a processor but please check manually." + git clone "$repo" "$PROCESSOR_PATH/$pkg" + fi +} + main "$@" From edfb305ef305307daed90cac9188e9c7b7b429f8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 30 Jan 2020 21:58:31 +0100 Subject: [PATCH 4/7] Add theme function The theme function provides a quick but temporary switch to a specific theme. Themes can be applied with `styler theme [themename]`, they will be instantly applied to all enabled applications. They will be lost on restarts of the application or machine however. Themes can be applied permanently with `styler set [themename]`, they will be written into the application's settings. This *will* change things in your local filesystem, so be wary. Generally, processors should take the least invasive approach and use inclusion to append the theme to the application's other settings. But be *careful* with this option, and when in doubt double-check what the processors you have installed do before losing your settings. --- styler/.local/bin/styler | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/styler/.local/bin/styler b/styler/.local/bin/styler index 24ae60e..912079c 100755 --- a/styler/.local/bin/styler +++ b/styler/.local/bin/styler @@ -5,13 +5,16 @@ readonly BASE_PATH="${STYLER_DATA_PATH:-${XDG_DATA_HOME:-$HOME/.local/share}/sty readonly PACKAGE_PATH="$BASE_PATH/packages" readonly PROCESSOR_PATH="$BASE_PATH/processors" -readonly VERSION="0.2.4" +readonly VERSION="0.3.0" main() { local cmd="" local ret=0 case "$1" in + -t | --theme | theme) + cmd="switch_theme" + ;; -s | --set | set) cmd="set_theme" ;; @@ -46,7 +49,11 @@ usage() { "" \ " Options:" \ "" \ + " -t | theme Temporarily switch theme. Use any valid base16 theme name (without base16- prefix)." \ + " Theme will be lost upon restart, or application restarts." \ + "" \ " -s | set Set the theme. Use any valid base16 theme name (without base16- prefix)." \ + " Same as 'theme' option, but changes will be made permanent." \ "" \ " -d | download Download a base16 template into the package directory or download a processor16" \ " into the processor directory. Use user/repo format to automatically pull from github." \ @@ -105,8 +112,15 @@ get_themes() { echo "$themes" | sed "s/.*\\/base16-//" | sed "s/\\..*//" | sort | uniq } +# temporarily switch theme, same thing as setting, only with permanence flag turned off for processors +switch_theme() { + set_theme "$1" "false" +} + +# call processors for all installed packages set_theme() { local theme="$1" + local permanent="${2:-true}" local packages packages="$(get_packages)" @@ -134,7 +148,7 @@ set_theme() { # Compares application extension with existing processors and runs the appropriate processor if found processor=$(find "$PROCESSOR_PATH" -type f -name "theme_$appext") if [[ -f "$processor" ]]; then - "$processor" "$PACKAGE_PATH" "$pkg" "$theme" + "$processor" "$PACKAGE_PATH" "$pkg" "$theme" "$permanent" else printf "WARN: No processor found for application %s in %s. Make sure you install a processor for the application.\n" "$appext" "$PROCESSOR_PATH/" >&2 fi From 6ed90134a3c1b34eb44fed9ce606329b79477adf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 31 Jan 2020 00:13:06 +0100 Subject: [PATCH 5/7] Move Xresources to comply to XDG Moved Xresources to XDG compliant directory. Will make future styler settings easier. --- home/.Xresources | 12 ----- nvim/.config/nvim/colo.vim | 1 - shell/.config/shell/rc.d/autostartx.sh | 2 +- xresources/.config/xresources/Xresources | 11 +++++ .../.config/xresources/Xresources.d/fonts | 7 +++ xresources/.config/xresources/nord.Xresources | 48 ------------------- .../.config/xresources/urxvt.Xresources | 37 -------------- .../.config/xresources/xinitrc | 6 +-- 8 files changed, 22 insertions(+), 102 deletions(-) delete mode 100644 home/.Xresources delete mode 100644 nvim/.config/nvim/colo.vim create mode 100644 xresources/.config/xresources/Xresources create mode 100644 xresources/.config/xresources/Xresources.d/fonts delete mode 100644 xresources/.config/xresources/nord.Xresources delete mode 100644 xresources/.config/xresources/urxvt.Xresources rename home/.xinitrc => xresources/.config/xresources/xinitrc (93%) diff --git a/home/.Xresources b/home/.Xresources deleted file mode 100644 index 4988cbe..0000000 --- a/home/.Xresources +++ /dev/null @@ -1,12 +0,0 @@ -! ~/.Xresources - -! Setting up commonly changed vars -#define myfontsize 11 -#define myfont Fira Code -#define myOpacity 90 - -! Set up URxvt -#include ".config/Xresources/urxvt.Xresources" - -! Add Nord theme to every terminal emulator respecting Xresources -#include ".config/Xresources/nord.Xresources" diff --git a/nvim/.config/nvim/colo.vim b/nvim/.config/nvim/colo.vim deleted file mode 100644 index cc9ab5a..0000000 --- a/nvim/.config/nvim/colo.vim +++ /dev/null @@ -1 +0,0 @@ -colo nord diff --git a/shell/.config/shell/rc.d/autostartx.sh b/shell/.config/shell/rc.d/autostartx.sh index f598e0b..6a50795 100644 --- a/shell/.config/shell/rc.d/autostartx.sh +++ b/shell/.config/shell/rc.d/autostartx.sh @@ -1,5 +1,5 @@ #!/bin/sh if [ ! "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then - exec startx ~/.xinitrc + exec startx "$XDG_CONFIG_HOME"/xresources/xinitrc fi diff --git a/xresources/.config/xresources/Xresources b/xresources/.config/xresources/Xresources new file mode 100644 index 0000000..cd35b65 --- /dev/null +++ b/xresources/.config/xresources/Xresources @@ -0,0 +1,11 @@ +! ~/.Xresources + +! Setting up commonly changed vars +#define myfontsize 11 +#define myfont Iosevka Mono +#define myOpacity 90 + +! Font settings +#include "Xresources.d/fonts" + +! Colorscheme diff --git a/xresources/.config/xresources/Xresources.d/fonts b/xresources/.config/xresources/Xresources.d/fonts new file mode 100644 index 0000000..58faa41 --- /dev/null +++ b/xresources/.config/xresources/Xresources.d/fonts @@ -0,0 +1,7 @@ +Xft.antialias: 1 +Xft.autohint: 0 +Xft.dpi: 92 +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.lcdfilter: lcddefault +Xft.rgba: rgb diff --git a/xresources/.config/xresources/nord.Xresources b/xresources/.config/xresources/nord.Xresources deleted file mode 100644 index 3122e26..0000000 --- a/xresources/.config/xresources/nord.Xresources +++ /dev/null @@ -1,48 +0,0 @@ -! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -! title Nord XResources + -! project nord-xresources + -! version 0.1.0 + -! repository https://github.com/arcticicestudio/nord-xresources + -! author Arctic Ice Studio + -! email development@arcticicestudio.com + -! copyright Copyright (C) 2016 + -! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -#define nord0 #2E3440 -#define nord1 #3B4252 -#define nord2 #434C5E -#define nord3 #4C566A -#define nord4 #D8DEE9 -#define nord5 #E5E9F0 -#define nord6 #ECEFF4 -#define nord7 #8FBCBB -#define nord8 #88C0D0 -#define nord9 #81A1C1 -#define nord10 #5E81AC -#define nord11 #BF616A -#define nord12 #D08770 -#define nord13 #EBCB8B -#define nord14 #A3BE8C -#define nord15 #B48EAD - -*.foreground: nord4 -*.background: [myOpacity]nord0 -*.cursorColor: nord4 -*fading: 0 -*fadeColor: nord3 - -*.color0: nord1 -*.color1: nord11 -*.color2: nord14 -*.color3: nord13 -*.color4: nord9 -*.color5: nord15 -*.color6: nord8 -*.color7: nord5 -*.color8: nord3 -*.color9: nord11 -*.color10: nord14 -*.color11: nord13 -*.color12: nord9 -*.color13: nord15 -*.color14: nord7 -*.color15: nord6 diff --git a/xresources/.config/xresources/urxvt.Xresources b/xresources/.config/xresources/urxvt.Xresources deleted file mode 100644 index 5ff2d59..0000000 --- a/xresources/.config/xresources/urxvt.Xresources +++ /dev/null @@ -1,37 +0,0 @@ -!Font -URxvt.font: xft:myfont:size=myfontsize,style=medium -URxvt.boldFont: xft:myfont:size=myfontsize,style=bold -URxvt.italicFont: xft:myfont:size=myfontsize,style=italic -URxvt.boldItalicFont: xft:myfont:size=myfontsize,style=bold,italic -URxvt.letterSpace: -1 - -!UI -URxvt.scrollBar: false -URxvt.borderless: true -URxvt.saveLines: 20000 -URxvt.dynamicColors: true -URxvt.fading: 25 - -!Sane utility defaults -URxvt.loginShell: true -URxvt.scrollTtyKeypress: true -URxvt.scrollTtyOutput: false -URxvt.scrollWithBuffer: false -URxvt.skipScroll: true - -!Extensions -!Tabbing disabled by default (TMUX used for tabbed terminals) -!to enable tabbing comment the bottom line and uncomment the one above. -!URxvt.perl-ext-common: default,matcher,tabbed -URxvt.perl-ext-common: default,matcher - -! Link Clicking -URxvt.url-launcher: /usr/bin/xdg-open -URxvt.matcher.button: 1 -URxvt.matcher.rend.0: Uline Bold fg5 - -!Tab Styling -URxvt.tabbed.tabbar-fg: 2 -URxvt.tabbed.tabbar-bg: 0 -URxvt.tabbed.tab-fg: 3 -URxvt.tabbed.tab-bg: 0 diff --git a/home/.xinitrc b/xresources/.config/xresources/xinitrc similarity index 93% rename from home/.xinitrc rename to xresources/.config/xresources/xinitrc index f2f4a59..97fbf52 100644 --- a/home/.xinitrc +++ b/xresources/.config/xresources/xinitrc @@ -1,7 +1,7 @@ #!/bin/sh -userresources=$HOME/.Xresources -usermodmap=$HOME/.Xmodmap +userresources=$XDG_CONFIG_HOME/xresources/Xresources +usermodmap=$XDG_CONFIG_HOME/xresources/Xmodmap sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap @@ -37,7 +37,7 @@ fi setxkbmap -option ctrl:nocaps # sets default to EURkey layout, with possibility to switch to german # sets german layout to be default for the only pc I have with a german keyboard -if [[ $HOST == "marty-desk" ]] || [[ $HOSTNAME == "marty-desk" ]]; then +if [ "$HOST" = "marty-desk" ] || [ "$HOSTNAME" = "marty-desk" ]; then setxkbmap -layout de,eu else setxkbmap -layout eu,de From ad8decb4ef3ab6329fb9d1c207d7f9314aca6dcf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 31 Jan 2020 01:22:47 +0100 Subject: [PATCH 6/7] 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. --- .gitignore | 6 ++++++ nvim/.config/nvim/init.vim | 7 +++++++ polybar/.config/polybar/config | 14 +++++++------- qutebrowser/.config/qutebrowser/config.py | 4 ++-- rofi/.config/rofi/themes/dmenu.rasi | 1 + rofi/.config/rofi/themes/settings.rasi | 1 + sxhkd/.config/sxhkd/sxhkdrc | 4 ++++ 7 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 386e60b..b507a78 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,9 @@ tags .vim # End of https://www.gitignore.io/api/vim,linux + +# Ignore dynamic colorschemes set by styler +colorscheme.vim +colorscheme +colorscheme.py +colorscheme.rasi diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 304fe1c..224c670 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -47,6 +47,13 @@ endif " set truecolor (neovim) 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 " one press of backspace. " great explanation: http://vimcasts.org/transcripts/2/en/ diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index b9233bc..4222ae0 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -18,14 +18,14 @@ [colors] ;background = ${xrdb:color0:#222} -background = #222 -background-alt = #444 +background = ${xrdb:background} +background-alt = ${xrdb:color8} ;foreground = ${xrdb:color7:#222} -foreground = #dfdfdf -foreground-alt = #555 -primary = #ffb52a -secondary = #e60053 -alert = #bd2c40 +foreground = ${xrdb:foreground} +foreground-alt = ${xrdb:color3} +primary = ${xrdb:color1} +secondary = ${xrdb:color4} +alert = ${xrdb:color2} [settings] ; The throttle settings lets the eventloop swallow up til X events diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py index 6dbba74..53cdfa1 100644 --- a/qutebrowser/.config/qutebrowser/config.py +++ b/qutebrowser/.config/qutebrowser/config.py @@ -61,8 +61,8 @@ c.tabs.title.format = '{index} {audio}{perc}{current_title}' c.tabs.position = "right" c.tabs.width = "15%" -# give the browser nice nord theme colors -config.source('themes/base16-gruvbox-dark.py') +# give the browser nice theme colors +config.source('colorscheme.py') # Status bar # should be visible to prevent 'jumping' bug, see https://github.com/qutebrowser/qutebrowser/issues/2236 diff --git a/rofi/.config/rofi/themes/dmenu.rasi b/rofi/.config/rofi/themes/dmenu.rasi index c062465..46aab32 100644 --- a/rofi/.config/rofi/themes/dmenu.rasi +++ b/rofi/.config/rofi/themes/dmenu.rasi @@ -22,6 +22,7 @@ #listview { spacing: 5px; lines: 100; + border: 0px; } #entry { diff --git a/rofi/.config/rofi/themes/settings.rasi b/rofi/.config/rofi/themes/settings.rasi index f1d0f5c..93146a1 100644 --- a/rofi/.config/rofi/themes/settings.rasi +++ b/rofi/.config/rofi/themes/settings.rasi @@ -10,6 +10,7 @@ * 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" * { diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index d435e50..3896a7f 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -30,6 +30,10 @@ super + x super + BackSpace 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 # 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/ From e7b14a7a5af110393251b31fb8cd7b2caada4bd1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 1 Feb 2020 09:22:25 +0100 Subject: [PATCH 7/7] Update README.md with styler options Updated to reflect new capabilities of `styler` utility. --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cc63a71..abf8137 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,15 @@ # dotfiles Read-Me and Roadmap ## What's in these dotfiles + * [x] vim configuration for simple programming tasks (especially go/typescript/python/bash) and prose * [x] academic workflow tools, to allow quick citation, pdf compilation, and preview -* [x] simple, efficient polybar with package update notification, and spotify integration +* [x] simple, efficient polybar with package update notification, and spotify (mpris) integration * [x] tmux session management through `tm` and `tl` tools -* [x] quick terminal-wide color management through `sd`/`sD`/`sl`/`sL` commands, allowing two light and dark color-schemes -* [x] many vim color-schemes with quick light/dark switching (`F8`) and theme switch (`+F8`) +* [x] tmux fuzzy-searching of terminal sessions to switch to with hot-key (``) +* [x] system-wide color management (terminals, vim, qutebrowser, polybar, xresources) through `styler` command using [base16](http://chriskempson.com/projects/base16/) themes +* [x] quick theme switching by activating `styler` and fuzzy-searching themes with hot-key (`+F8`) +* [x] many vim color-schemes with quick light/dark switching (`F8`) and individual theme switch (`+F8`) * [x] quick directory jumping using z, with fzf integration * [x] fzf integrations for bibtex citation, vim buffer management, most recently used switching, shell command history, and more