From cf695e70971bc27d6656a0902395ca6a6e4ca2f0 Mon Sep 17 00:00:00 2001 From: kevindirect Date: Sun, 16 Oct 2022 19:53:13 -0700 Subject: [PATCH] fix simplify colorscheme inconsistencies in qb, change rofi theme to arthur, set global them to always be dark --- .config/kak/kakrc | 21 ++++++++++++++------- .config/qutebrowser/config.py | 29 ++++++++++++----------------- .config/qutebrowser/config.yml | 3 ++- .config/rofi/config.rasi | 22 +--------------------- .config/rofi/dark.rasi | 20 ++++++++++++++++++++ .config/rofi/light.rasi | 20 ++++++++++++++++++++ .config/zathura/zathurarc | 2 ++ .profile | 2 +- 8 files changed, 72 insertions(+), 47 deletions(-) mode change 100644 => 120000 .config/rofi/config.rasi create mode 100644 .config/rofi/dark.rasi create mode 100644 .config/rofi/light.rasi diff --git a/.config/kak/kakrc b/.config/kak/kakrc index 2963c92..7a8ddac 100644 --- a/.config/kak/kakrc +++ b/.config/kak/kakrc @@ -11,12 +11,12 @@ evaluate-commands %sh{ timenow="$(date +%H%M)" timeday="$(date -d $TIMEDAY +%H%M)" timenight="$(date -d $TIMENIGHT +%H%M)" - if [ "$timenow" -gt "$timenight" ] || [ "$timenow" -lt "$timeday" ] ; then + if [ "$timenow" -ge "$timenight" ] || [ "$timenow" -lt "$timeday" ] ; then # echo "colorscheme tomorrow-timenight"; echo "colorscheme gruvbox-dark"; else - echo "colorscheme github"; - # echo "colorscheme gruvbox-light"; + # echo "colorscheme github"; + echo "colorscheme gruvbox-light"; fi } @@ -139,11 +139,18 @@ evaluate-commands %sh{ } plug "andreyorst/plug.kak" noload -# Plugins -# ─────── -# restart kakoune and run "plug-install" if a new plugin was added to plug.kak +# Plugins List +# ──────────── +# restart kakoune and run "plug-install" if a new plugin was added to this list -# kakoune-wiki plug "TeddyDD/kakoune-wiki" wiki-setup %sh{ echo $HOME/Documents/notes/} +plug "doppioandante/kakoune-julia-mode" +require-module julia-mode +hook global WinSetOption filetype=julia %{ + set buffer indentwidth 0 + julia-mode-start + julia-mode-enable-autocomplete +} + diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 7dc731f..6530ee2 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -9,7 +9,7 @@ def qb_config(): Top level config function. Set options from config.yml, find defaults in defaults.py (:config-write-py -d defaults.py to refresh). - Base16 schemes are loaded from .Xresources or a base16 yaml file via the 'custom.base16.file' option, + Base16 schemes are loaded from .Xresources or a base16 yaml file via the 'custom.base16.{color_scheme}.file' option, uses the default qutebrowser color scheme if this option is null or empty. """ with (config.configdir / 'config.yml').open() as f: @@ -20,16 +20,20 @@ def qb_config(): config.set(k, v) # CUSTOM - ## KEYBINDS for key, action in yaml_data['custom.keybinds'].items(): config.bind(key, action) - - ## THEMES - set_theme_base16(yaml_data['custom.base16.file']) - set_theme_daynight() - + color_scheme = get_color_scheme_daynight() + set_theme_base16(yaml_data[f'custom.base16.{color_scheme}.file']) + c.colors.webpage.preferred_color_scheme = color_scheme + c.colors.webpage.darkmode.enabled = color_scheme == 'dark' config.load_autoconfig(False) +def get_color_scheme_daynight(): + timenow = datetime.now().time() + timeday = datetime.strptime(os.getenv("TIMEDAY"), "%H:%M").time() + timenight = datetime.strptime(os.getenv("TIMENIGHT"), "%H:%M").time() + return 'dark' if (timenow >= timenight or timenow < timeday) else 'light' + def set_theme_base16(chosen): if (chosen): if ('.Xresources' in chosen): @@ -40,15 +44,6 @@ def set_theme_base16(chosen): base16 = yaml.safe_load(base16_file) qb_config_base16_load({k:'#'+v for k,v in base16.items()}) -def set_theme_daynight(): - timenow = datetime.now().time() - timeday = datetime.strptime(os.getenv("TIMEDAY"), "%H:%M").time() - timenight = datetime.strptime(os.getenv("TIMENIGHT"), "%H:%M").time() - if (timenow > timenight or timenow < timeday): - c.colors.webpage.preferred_color_scheme = 'dark' - else: - c.colors.webpage.preferred_color_scheme = 'light' - def read_xresources(prefix): """ Get ~/.Xresources file properties. @@ -299,7 +294,7 @@ def qb_config_base16_load(colors): c.colors.tabs.selected.even.bg = colors['base05'] # Background color for webpages if unset (or empty to use the theme's color). - # c.colors.webpage.bg = colors['base00'] + c.colors.webpage.bg = colors['base00'] qb_config() diff --git a/.config/qutebrowser/config.yml b/.config/qutebrowser/config.yml index e6a77f6..b9a77be 100644 --- a/.config/qutebrowser/config.yml +++ b/.config/qutebrowser/config.yml @@ -168,4 +168,5 @@ custom.keybinds: { } ## Base16 Scheme - can be .Xresources or a base16 yaml file -custom.base16.file: '/home/kev/.local/share/themes/base16/base16-gruvbox-scheme/gruvbox-dark-soft.yaml' +custom.base16.dark.file: '/home/kev/.local/share/themes/base16/base16-gruvbox-scheme/gruvbox-dark-hard.yaml' +custom.base16.light.file: '/home/kev/.local/share/themes/base16/base16-gruvbox-scheme/gruvbox-light-medium.yaml' diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi deleted file mode 100644 index 988ee9e..0000000 --- a/.config/rofi/config.rasi +++ /dev/null @@ -1,21 +0,0 @@ -// _/_/ _/ -// _/ _/_/ _/_/ _/ -// _/_/ _/ _/ _/_/_/_/ _/ -// _/ _/ _/ _/ _/ -// _/ _/_/ _/ _/ -// rofi config file. - -@theme "/usr/share/rofi/themes/paper-float.rasi" - -window { - modi: "window,run,ssh,drun"; - //lines: 5; - font: "hack 24"; - location: 2; - y-offset: -45%; - x-offset: 0; - show-icons: true; - dpi: 192; -} - - diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi new file mode 120000 index 0000000..110a03f --- /dev/null +++ b/.config/rofi/config.rasi @@ -0,0 +1 @@ +dark.rasi \ No newline at end of file diff --git a/.config/rofi/dark.rasi b/.config/rofi/dark.rasi new file mode 100644 index 0000000..6caa6cb --- /dev/null +++ b/.config/rofi/dark.rasi @@ -0,0 +1,20 @@ +// _/_/ _/ +// _/ _/_/ _/_/ _/ +// _/_/ _/ _/ _/_/_/_/ _/ +// _/ _/ _/ _/ _/ +// _/ _/_/ _/ _/ +// rofi config file. + +configuration { + modi: "window,run,ssh,drun"; + show-icons: true; + dpi: 272; +} + +@theme "/usr/share/rofi/themes/arthur.rasi" // alt: docu.rasi + +window { + y-offset: -5%; + x-offset: 0; +} + diff --git a/.config/rofi/light.rasi b/.config/rofi/light.rasi new file mode 100644 index 0000000..c927147 --- /dev/null +++ b/.config/rofi/light.rasi @@ -0,0 +1,20 @@ +// _/_/ _/ +// _/ _/_/ _/_/ _/ +// _/_/ _/ _/ _/_/_/_/ _/ +// _/ _/ _/ _/ _/ +// _/ _/_/ _/ _/ +// rofi config file. + +@theme "/usr/share/rofi/themes/paper-float.rasi" + +window { + modi: "window,run,ssh,drun"; + //lines: 5; + font: "hack 24"; + location: 2; + y-offset: -45%; + x-offset: 0; + show-icons: true; + dpi: 192; + } + diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index bf45da3..c451d1c 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -9,6 +9,8 @@ set statusbar-h-padding 0 set statusbar-v-padding 0 set page-padding 1 set selection-clipboard clipboard +set recolor 1 +set recolor-keephue 1 # KEYBINDS ## Document Navigation diff --git a/.profile b/.profile index 5eda3a6..62b6456 100644 --- a/.profile +++ b/.profile @@ -58,8 +58,8 @@ export PATH="$PATH:$(du "$XDG_SCRIPT_HOME" | cut -f2 | grep -v "$BLACKLIST" | tr export PATH="$JAVA_HOME:$PATH:$GOPATH/bin:$HOME/.julia/conda/3/bin" # Global day/night times for theming: -export TIMEDAY="07:00" export TIMENIGHT="18:00" +export TIMEDAY=$TIMENIGHT # Set less/man colors: export LESS=-R