Skip to content

Commit

Permalink
fix simplify colorscheme inconsistencies in qb, change rofi theme to …
Browse files Browse the repository at this point in the history
…arthur, set global them to always be dark
  • Loading branch information
kpa28-git committed Oct 17, 2022
1 parent ac7546e commit cf695e7
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 47 deletions.
21 changes: 14 additions & 7 deletions .config/kak/kakrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

29 changes: 12 additions & 17 deletions .config/qutebrowser/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand All @@ -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.
Expand Down Expand Up @@ -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()
3 changes: 2 additions & 1 deletion .config/qutebrowser/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
21 changes: 0 additions & 21 deletions .config/rofi/config.rasi

This file was deleted.

1 change: 1 addition & 0 deletions .config/rofi/config.rasi
20 changes: 20 additions & 0 deletions .config/rofi/dark.rasi
Original file line number Diff line number Diff line change
@@ -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;
}

20 changes: 20 additions & 0 deletions .config/rofi/light.rasi
Original file line number Diff line number Diff line change
@@ -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;
}

2 changes: 2 additions & 0 deletions .config/zathura/zathurarc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .profile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf695e7

Please sign in to comment.