diff --git a/configDots/alacritty/active_colourscheme.yml b/configDots/alacritty/active_colourscheme.yml new file mode 120000 index 0000000..ab8c348 --- /dev/null +++ b/configDots/alacritty/active_colourscheme.yml @@ -0,0 +1 @@ +ayu-light.colourscheme \ No newline at end of file diff --git a/configDots/alacritty/alacritty.yml b/configDots/alacritty/alacritty.yml new file mode 100644 index 0000000..a8a491a --- /dev/null +++ b/configDots/alacritty/alacritty.yml @@ -0,0 +1,14 @@ +font: + size: 10 + normal: + family: Inconsolata + style: Regular + bold: + family: Inconsolata + style: Bold + italic: + family: Inconsolata + style: Italic + +import: + - ~/.config/alacritty/active_colourscheme.yml diff --git a/configDots/alacritty/ayu-light.colourscheme b/configDots/alacritty/ayu-light.colourscheme new file mode 100644 index 0000000..c15a1f5 --- /dev/null +++ b/configDots/alacritty/ayu-light.colourscheme @@ -0,0 +1,25 @@ +colors: + primary: + background: '0xfafafa' + foreground: '0x5c6773' + cursor: + text: '0x5c6773' + cursor: '0xff6a00' + normal: + black: '0x000000' + red: '0xff3333' + green: '0x86b300' + yellow: '0xf29718' + blue: '0x41a6d9' + magenta: '0xf07178' + cyan: '0x4dbf99' + white: '0xffffff' + bright: + black: '0x323232' + red: '0xff6565' + green: '0xb8e532' + yellow: '0xffc94a' + blue: '0x73d8ff' + magenta: '0xffa3aa' + cyan: '0x7ff1cb' + white: '0xffffff' diff --git a/configDots/alacritty/sourcerer.colourscheme b/configDots/alacritty/sourcerer.colourscheme new file mode 100644 index 0000000..53cd1c1 --- /dev/null +++ b/configDots/alacritty/sourcerer.colourscheme @@ -0,0 +1,25 @@ +colors: + primary: + background: '#222222' + foreground: '#c2c2b0' + cursor: + text: '#c2c2b0' + cursor: '#c2c2b0' + normal: + black: '#111111' + red: '#aa4450' + green: '#719611' + yellow: '#cc8800' + blue: '#6688aa' + magenta: '#8f6f8f' + cyan: '#528b8b' + white: '#d3d3d3' + bright: + black: '#181818' + red: '#ff6a6a' + green: '#b1d631' + yellow: '#ff9800' + blue: '#90b0d1' + magenta: '#8181a6' + cyan: '#87ceeb' + white: '#c1cdc1' diff --git a/simpleDots/bin/switchTermColours.sh b/simpleDots/bin/switchTermColours.sh new file mode 100755 index 0000000..c52d77b --- /dev/null +++ b/simpleDots/bin/switchTermColours.sh @@ -0,0 +1,57 @@ +#!/bin/sh +############################################################################### +## +# Switch alacritty colourscheme from light to dark and back +# +# +# +############################################################################### + + +if [ ! -d ~/.config/alacritty ] +then + echo "Alacritty config dir not found." + exit 1 +fi + +if [ ! -f ~/.config/alacritty/sourcerer.colourscheme ] +then + echo "Expected Sourcerer colourscheme not fround." + exit 1 +fi + +if [ ! -f ~/.config/alacritty/ayu-light.colourscheme ] +then + echo "Expected AYU-Light colourscheme not fround." + exit 1 +fi + +grep --fixed-strings --silent '~/.config/alacritty/active_colourscheme.yml' ~/.config/alacritty/alacritty.yml +rc=$? +if [ $rc -ne 0 ] +then + echo "Include for colourscheme not found in config." + exit 1 +fi + +cd ~/.config/alacritty + +if [ ! -L active_colourscheme.yml ] +then + rm -f active_colourscheme.yml + ln --force --symbolic sourcerer.colourscheme active_colourscheme.yml + exit 0 +fi + +if [ $(readlink active_colourscheme.yml) -ef sourcerer.colourscheme ] +then + ln --force --symbolic ayu-light.colourscheme active_colourscheme.yml + exit 0 +fi + +if [ $(readlink active_colourscheme.yml) -ef ayu-light.colourscheme ] +then + ln --force --symbolic sourcerer.colourscheme active_colourscheme.yml + exit 0 +fi + diff --git a/simpleDots/i3/config b/simpleDots/i3/config index 0652e1f..ab3eeaa 100644 --- a/simpleDots/i3/config +++ b/simpleDots/i3/config @@ -239,6 +239,7 @@ bindsym F1 [instance="metask"] scratchpad show # Misc keybindings bindsym --release Print exec "scrot --select" bindsym $mod+c exec free42 +bindsym $mod+plus exec .bin/switchTermColours.sh bindsym $mod+XF86Calc exec free42 bindsym $mod+b exec ~/.bin/startBrowser.sh bindsym $mod+$alt+b exec ~/.bin/startAltBrowser.sh diff --git a/simpleDots/vim/vimrc b/simpleDots/vim/vimrc index f4c7e2f..cfe800d 100755 --- a/simpleDots/vim/vimrc +++ b/simpleDots/vim/vimrc @@ -75,6 +75,11 @@ if has('gui_running') set regexpengine=1 " fix js regex syntax endif +" Better colorhandling +if has('termguicolors') + set termguicolors +endif + let mapleader = "," " dont save .netrwhist history