use subprofiles

This commit is contained in:
lelgenio 2020-10-22 12:09:42 -03:00
parent be3cb32d43
commit 811383bee3
5 changed files with 65 additions and 31 deletions

View File

@ -13,28 +13,17 @@ variables:
terminal: kitty
bar: waybar
bar_pos: top
key:
layout: colemak
left: n
down: e
up: i
right: o
next: l
tabL: U
tabR: Y
insertMode: s
insertQuit: kk
font:
mono: Fira Code
interface: Inter
profiles:
profiles: #{{{
dark: # {{{
variables:
gtk_theme: materia-lelgenio-dark
kvantum_theme: MateriaDark
icon_theme: Papirus-Dark
cursor_theme: capitaine-cursors
color: #{{{
color:
type: dark
accent: '#D9534F'
bg: '#202020'
@ -51,7 +40,6 @@ profiles:
magenta: '#C397D8'
cyan: '#70C0BA'
white: '#EAEAEA'
# }}}
dotfiles:
- ALL
# }}}
@ -61,7 +49,7 @@ profiles:
kvantum_theme: Materia
icon_theme: Papirus-Light
cursor_theme: capitaine-cursors-light
color: # {{{
color:
type: light
accent: '#D9534F'
bg: '#E0E0E0'
@ -79,9 +67,42 @@ profiles:
cyan: '#70C0BA'
white: '#EAEAEA'
# }}}
colemak: #{{{
variables:
key:
layout: colemak
left: n
down: e
up: i
right: o
next: l
tabL: U
tabR: Y
insertMode: s
insertQuit: kk
#}}}
qwerty: #{{{
variables:
key:
layout: qwerty
left: h
down: j
up: k
right: l
next: l
tabL: I
tabR: O
insertMode: i
insertQuit: jj
#}}}
main: #{{{
dotfiles:
- ALL
# }}}
include:
- "{{@@ key_layout @@}}"
- "{{@@ color_type @@}}"
#}}}
#}}}
config: # {{{
backup: false
banner: false
@ -93,6 +114,15 @@ config: # {{{
- notify
func_file:
- funcs.py
dynvariables:
key_layout: |
if test -n "$_KEYBOARD_LAYOUT"; then
echo "$_KEYBOARD_LAYOUT"
else
grep lelgenio /etc/passwd &>/dev/null &&
echo colemak || echo qwerty
fi
color_type: test -n "$_COLOR_TYPE" && echo "$_COLOR_TYPE" || echo dark
# }}}
dotfiles: # {{{
nvim:

View File

@ -61,6 +61,9 @@ abbr gs git status
abbr gd git diff
abbr gp 'git pull; git push'
export _KEYBOARD_LAYOUT="{{@@ key_layout @@}}"
export _COLOR_TYPE="{{@@ color_type @@}}"
export DOTDROP_CONFIG="{{@@ _dotdrop_cfgpath @@}}"
export DOTDROP_PROFILE="{{@@ profile @@}}"
abbr dot "dotdrop install -f"

View File

@ -255,7 +255,7 @@ call plug#end()
noremap {{@@ key.insertMode.upper() @@}} I
" Keyboard Layout specific
" {%@@ if key.layout == "colemak" @@%} "
" {%@@ if key_layout == "colemak" @@%} "
" Insert on next line
noremap h o
@ -296,13 +296,7 @@ call plug#end()
xmap K <Plug>VSurround
xmap gK <Plug>VgSurround
" Custom surrounds
" d
let b:surround_100 = "{{@@ '#{{@@ \\r @@}}#' @@}}"
" s
let b:surround_115 = "{{@@ '#{%@@ \\r @@%}#\\n#{%@@ @@%}#' @@}}"
" {%@@ elif key.layout == "dvorak" @@%} "
" {%@@ elif key_layout == "dvorak" @@%} "
" Added benefits
noremap - $
@ -315,7 +309,7 @@ call plug#end()
nmap <C-k> :Files <CR>
nmap <C-b> :Buffers<CR>
" {%@@ elif key.layout == "qwerty" @@%} "
" {%@@ elif key_layout == "qwerty" @@%} "
" FZF bindings
nmap <C-b> :Buffers<CR>
@ -343,6 +337,13 @@ call plug#end()
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
" Custom surrounds, should work fine on all layouts
" d
autocmd FileType * let b:surround_100 = "{{@@ '{{@@ \\r @@}}' @@}}"
" s
autocmd FileType * let b:surround_115 = "{{@@ '#{%@@ \\r @@%}#\\n#{%@@ @@%}#' @@}}"
"}}}
" Lanugage Server{{{
"

View File

@ -80,9 +80,9 @@ c.completion.shrink = True
c.hints.border = "2px solid {{@@ color.accent @@}}"
# Characters used for hint strings.
# {%@@ if key.layout == "colemak" @@%} #
# {%@@ if key_layout == "colemak" @@%} #
c.hints.chars = "asrtdhneio"
# {%@@ elif key.layout == "dvorak" @@%} #
# {%@@ elif key_layout == "dvorak" @@%} #
c.hints.chars = "aoeuidnths"
# {%@@ endif @@%}
@ -275,7 +275,7 @@ config.bind(",r", "spawn --userscript readability")
config.bind(";e", "hint links spawn deemix '{hint-url}'")
config.bind(";m", "hint links spawn mpv --fs {hint-url}")
# {%@@ if key.layout == "colemak" @@%} #
# {%@@ if key_layout == "colemak" @@%} #
config.bind("t", "hint all")
config.bind("T", "hint all tab")

View File

@ -64,11 +64,11 @@
}
input * {
# {%@@ if key.layout == "colemak" @@%}
# {%@@ if key_layout == "colemak" @@%}
#
xkb_layout us(colemak)
xkb_options lv3:lsgt_switch
# {%@@ elif key.layout == "dvorak" @@%}
# {%@@ elif key_layout == "dvorak" @@%}
#
xkb_layout us(dvorak)
# {%@@ endif @@%}
@ -94,7 +94,7 @@ $mod+b exec qutebrowser
#start file manager
$mod+m exec thunar
$mod+j exec emoji
$mod+g exec emoji
# Kill focused window
$mod+x kill