Compare commits
24 commits
4fd519c195
...
89a45d70e0
Author | SHA1 | Date | |
---|---|---|---|
89a45d70e0 | |||
2d3bdb626c | |||
7d0a850d71 | |||
79322bbe66 | |||
aaa595d199 | |||
c61a5e857b | |||
52127e6e5b | |||
b734408012 | |||
c3acd8f092 | |||
4ec086b57d | |||
2b92ee5d00 | |||
79c8405332 | |||
b5d7de7dd9 | |||
7dbc50c7e7 | |||
9239ceee5e | |||
5453c44d4a | |||
901b06cd69 | |||
e768243ad6 | |||
bb48012963 | |||
76a75297de | |||
dd7cf73aa9 | |||
3e511297df | |||
91fbf010e4 | |||
dd24af6c3c |
23 changed files with 397 additions and 286 deletions
|
@ -9,7 +9,7 @@ variables:
|
|||
username: lelgenio
|
||||
mail: disroot.org
|
||||
cursor_size: 24
|
||||
launcher: wofi
|
||||
launcher: bmenu
|
||||
terminal: kitty
|
||||
bar: waybar
|
||||
bar_pos: top
|
||||
|
@ -273,8 +273,8 @@ dotfiles: # {{{
|
|||
src: ./telegram.palette
|
||||
dst: ~/.local/share/TelegramDesktop/theme.tdesktop-palette
|
||||
kakoune:
|
||||
src: kakoune.kak
|
||||
dst: ~/.config/kak/kakrc
|
||||
src: kak
|
||||
dst: ~/.config/kak
|
||||
# }}}
|
||||
actions: #{{{
|
||||
notify: notify-send "Updating dotfiles" "{{@@ _dotfile_abs_dst.lstrip(env['HOME']) @@}}"
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
# env:
|
||||
env:
|
||||
# TERM variable
|
||||
#
|
||||
# This value is used to set the `$TERM` environment variable for
|
||||
# each instance of Alacritty. If it is not present, alacritty will
|
||||
# check the local terminfo database and use `alacritty` if it is
|
||||
# available, otherwise `xterm-256color` is used.
|
||||
# TERM: screen-256color
|
||||
TERM: xterm-256color
|
||||
|
||||
#window:
|
||||
# Window dimensions (changes require restart)
|
||||
|
|
|
@ -75,7 +75,7 @@ abbr dot "dotdrop install -f"
|
|||
|
||||
function edit-config #{{{
|
||||
pushd "{{@@ parent_dir ( _dotdrop_dotpath ) @@}}"
|
||||
{{@@ editor @@}} (git ls-files | fzf)
|
||||
{{@@ editor @@}} (git ls-files | wdmenu)
|
||||
popd
|
||||
end
|
||||
abbr ec edit-config
|
||||
|
|
13
dotfiles/kak/kakrc
Normal file
13
dotfiles/kak/kakrc
Normal file
|
@ -0,0 +1,13 @@
|
|||
# {{@@ header() @@}}
|
||||
# _ __ _
|
||||
# | |/ /__ _| | _____ _ _ _ __ ___
|
||||
# | ' // _` | |/ / _ \| | | | '_ \ / _ \
|
||||
# | . \ (_| | < (_) | |_| | | | | __/
|
||||
# |_|\_\__,_|_|\_\___/ \__,_|_| |_|\___|
|
||||
|
||||
|
||||
source "%val{config}/rc/plug.kak"
|
||||
source "%val{config}/rc/keys.kak"
|
||||
source "%val{config}/rc/usermode.kak"
|
||||
source "%val{config}/rc/hooks.kak"
|
||||
source "%val{config}/rc/colors.kak"
|
88
dotfiles/kak/rc/colors.kak
Normal file
88
dotfiles/kak/rc/colors.kak
Normal file
|
@ -0,0 +1,88 @@
|
|||
# {{@@ header() @@}}
|
||||
# this is not in colors/ because it loads plugins
|
||||
|
||||
{%@@ set accent = "rgb:%s" % accent_color.replace('#','') @@%}
|
||||
{%@@ set bg_light = "rgb:%s" % color.bg_light.replace('#','') @@%}
|
||||
{%@@ set bg_dark = "rgb:%s" % color.bg_dark.replace('#','') @@%}
|
||||
{%@@ set nontxt = "rgb:%s" % color.nontxt.replace('#','') @@%}
|
||||
|
||||
cursorline
|
||||
face global crosshairs_line default,{{@@ bg_dark @@}}
|
||||
|
||||
# For Code
|
||||
face global value default
|
||||
face global type yellow
|
||||
face global variable default
|
||||
face global module value
|
||||
face global function cyan
|
||||
face global string green
|
||||
face global keyword {{@@ accent @@}}
|
||||
face global operator yellow
|
||||
face global attribute green+b
|
||||
face global comment {{@@ bg_light @@}}
|
||||
face global documentation comment
|
||||
face global meta magenta
|
||||
face global builtin default+b
|
||||
|
||||
# For markup
|
||||
face global title blue
|
||||
face global header cyan
|
||||
face global mono green
|
||||
face global block magenta
|
||||
face global link cyan
|
||||
face global bullet cyan
|
||||
face global list yellow
|
||||
|
||||
# builtin faces
|
||||
face global Default default,default
|
||||
|
||||
face global PrimaryCursor default,{{@@ accent @@}}+fg
|
||||
face global PrimaryCursorEol PrimaryCursor
|
||||
face global PrimarySelection white,black+fg
|
||||
|
||||
face global SecondaryCursor default,default+rfg
|
||||
face global SecondaryCursorEol SecondaryCursor
|
||||
face global SecondarySelection white,black+fg
|
||||
|
||||
face global MenuForeground white,{{@@ accent @@}}
|
||||
face global MenuBackground white,{{@@ bg_dark @@}}
|
||||
face global MenuInfo cyan
|
||||
|
||||
face global Information default,{{@@ bg_dark @@}}
|
||||
face global Error white,default
|
||||
|
||||
face global StatusLine default,{{@@ nontxt @@}}
|
||||
face global StatusLineMode green,{{@@ nontxt @@}}
|
||||
face global StatusLineInfo default,{{@@ nontxt @@}}
|
||||
face global StatusLineValue default,{{@@ nontxt @@}}
|
||||
face global StatusCursor default,{{@@ accent @@}}
|
||||
|
||||
face global Prompt yellow,default
|
||||
face global MatchingChar default,default+b
|
||||
|
||||
# Goodies
|
||||
add-highlighter global/ number-lines -relative -hlcursor
|
||||
face global LineNumbers {{@@ bg_light @@}},default
|
||||
face global LineNumberCursor white,{{@@ bg_dark @@}}
|
||||
|
||||
add-highlighter global/ show-whitespaces
|
||||
face global Whitespace {{@@ nontxt @@}},default+f
|
||||
face global BufferPadding {{@@ nontxt @@}},default
|
||||
# highlight trailing whitespace
|
||||
add-highlighter global/ regex '\h*$' 0:red,red+g
|
||||
|
||||
|
||||
# Lsp
|
||||
{%@@ for obj, col in {
|
||||
'Error': 'red',
|
||||
'Warning': 'yellow',
|
||||
'Hint': 'blue',
|
||||
}.items() @@%}
|
||||
face global HighlightDiagnostic{{@@ obj @@}} {{@@ col @@}},default+bu
|
||||
face global Diagnostic{{@@ obj @@}} {{@@ col @@}},default+b
|
||||
face global TextDiagnostic{{@@ obj @@}} {{@@ col @@}},default+b
|
||||
face global InlayDiagnostic{{@@ obj @@}} {{@@ col @@}},default+bu
|
||||
{%@@ endfor @@%}
|
||||
|
||||
face global Reference yellow,default+b
|
||||
|
40
dotfiles/kak/rc/hooks.kak
Normal file
40
dotfiles/kak/rc/hooks.kak
Normal file
|
@ -0,0 +1,40 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
# not exactly hooks but ok
|
||||
set global tabstop 4
|
||||
set global scrolloff 8,8
|
||||
|
||||
# use spaces insted of tabs
|
||||
hook global InsertChar \t %{ exec -draft -itersel h@ } -group kakrc-replace-tabs-with-spaces
|
||||
|
||||
hook global NormalIdle .* %{ try %{
|
||||
lsp-highlight-references
|
||||
git show-diff
|
||||
palette-status
|
||||
} }
|
||||
|
||||
hook global BufOpenFile .* %{
|
||||
modeline-parse
|
||||
lsp-enable
|
||||
}
|
||||
|
||||
hook global WinCreate .* %{
|
||||
manual-indent-enable
|
||||
}
|
||||
|
||||
#completion with tab
|
||||
hook global InsertCompletionShow .* %{ try %{
|
||||
execute-keys -draft 'h<a-K>\h<ret>'
|
||||
map window insert <tab> <c-n>
|
||||
map window insert <s-tab> <c-p>
|
||||
} }
|
||||
|
||||
hook global InsertCompletionHide .* %{
|
||||
unmap window insert <tab> <c-n>
|
||||
unmap window insert <s-tab> <c-p>
|
||||
}
|
||||
|
||||
hook global RegisterModified '"' %{ nop %sh{
|
||||
printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 &
|
||||
}}
|
||||
|
42
dotfiles/kak/rc/keys.kak
Normal file
42
dotfiles/kak/rc/keys.kak
Normal file
|
@ -0,0 +1,42 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
{%@@ for old, new, gdoc, vdoc in [
|
||||
[ "h", key.left, "line begin", "scroll left" ],
|
||||
[ "l", key.right, "line right", "scroll right" ],
|
||||
[ "k", key.up, "buffer begin", "scroll up" ],
|
||||
[ "j", key.down, "buffer end", "scroll down" ],
|
||||
[ "i", key.insertMode, "first non blank", "" ],
|
||||
[ "n", key.next, "", "" ],
|
||||
[ "o", "h", "", "" ],
|
||||
] @@%}
|
||||
{%@@ set NEW, OLD = new.upper(), old.upper()@@%}
|
||||
{%@@ if vdoc @@%}
|
||||
map global view {{@@ old @@}} ''
|
||||
map global view {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ vdoc @@}}"
|
||||
{%@@ endif @@%}
|
||||
{%@@ if gdoc @@%}
|
||||
map global goto {{@@ old @@}} ''
|
||||
map global goto {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ gdoc @@}}"
|
||||
{%@@ endif @@%}
|
||||
map global normal {{@@ new @@}} {{@@ old @@}}
|
||||
map global normal {{@@ NEW @@}} {{@@ OLD @@}}
|
||||
map global normal <a-{{@@ new @@}}> <a-{{@@ old @@}}>
|
||||
map global normal <a-{{@@ NEW @@}}> <a-{{@@ OLD @@}}>
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ for old, new in {
|
||||
"j": key.down,
|
||||
"k": key.up,
|
||||
}.items() @@%}
|
||||
map global normal <a-{{@@ new @@}}> 10{{@@ old @@}}
|
||||
map global normal <a-{{@@ new.upper() @@}}> 10{{@@ old.upper() @@}}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ if key.layout == 'colemak' @@%}
|
||||
map global normal k s
|
||||
map global normal K S
|
||||
map global normal <c-k> <a-s>
|
||||
|
||||
map global normal t e
|
||||
|
||||
{%@@ endif @@%}
|
28
dotfiles/kak/rc/plug.kak
Normal file
28
dotfiles/kak/rc/plug.kak
Normal file
|
@ -0,0 +1,28 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
source "%val{config}/plugins/plug.kak/rc/plug.kak"
|
||||
|
||||
{%@@ for p in [ 'prelude', 'auto-pairs', 'manual-indent' ] @@%}
|
||||
plug 'alexherbo2/{{@@ p @@}}.kak'
|
||||
require-module '{{@@ p @@}}'
|
||||
{%@@ endfor @@%}
|
||||
auto-pairs-enable
|
||||
|
||||
plug 'h-youhei/kakoune-surround'
|
||||
|
||||
plug 'delapouite/kakoune-palette'
|
||||
plug 'insipx/kak-crosshairs'
|
||||
|
||||
plug "kak-lsp/kak-lsp" do %{
|
||||
cargo install --locked --force --path .
|
||||
}
|
||||
|
||||
def -hidden complete-snippets %{
|
||||
try %{
|
||||
lsp-snippets-select-next-placeholders
|
||||
# exec '<a-;>d'
|
||||
} catch %{
|
||||
exec -with-hooks '<c-n>'
|
||||
}
|
||||
}
|
||||
map global insert <c-e> "<a-;>: complete-snippets<ret>"
|
79
dotfiles/kak/rc/usermode.kak
Normal file
79
dotfiles/kak/rc/usermode.kak
Normal file
|
@ -0,0 +1,79 @@
|
|||
# {{@@ header() @@}}
|
||||
|
||||
map global user 'g' ': enter-user-mode lsp<ret>' -docstring 'lsp mode'
|
||||
map global user 'z' ':zoxide ' -docstring 'zoxide'
|
||||
|
||||
map global user 'c' ': comment-line<ret>' -docstring 'comment line'
|
||||
map global user 'C' ': comment-block<ret>' -docstring 'comment block'
|
||||
|
||||
map global user 'p' '<a-!> wl-paste -n <ret>' -docstring 'clipboard paste'
|
||||
map global user 'P' '! wl-paste -n <ret>' -docstring 'clipboard paste before'
|
||||
|
||||
declare-user-mode surround
|
||||
map global user 's' ': enter-user-mode surround<ret>' -docstring 'surround mode'
|
||||
map global surround 's' ': surround<ret>' -docstring 'surround'
|
||||
map global surround 'c' ': change-surround<ret>' -docstring 'change'
|
||||
map global surround 'd' ': delete-surround<ret>' -docstring 'delete'
|
||||
map global surround 't' ': surround-with-tag<ret>' -docstring 'surround with tag'
|
||||
map global surround 'g' ': select-surrounding-tag<ret>' -docstring 'select tag'
|
||||
|
||||
declare-user-mode git
|
||||
map global user 'v' ': enter-user-mode git<ret>' -docstring 'git vcs mode'
|
||||
map global git 's' ': git status<ret>' -docstring 'status'
|
||||
map global git 'a' ': git add<ret>' -docstring 'add current'
|
||||
map global git 'd' ': git diff %reg{%}<ret>' -docstring 'diff current'
|
||||
map global git 'r' ': git restore %reg{%}<ret>' -docstring 'restore current'
|
||||
map global git 'A' ': git add --all<ret>' -docstring 'add all'
|
||||
map global git 'D' ': git diff<ret>' -docstring 'diff all'
|
||||
map global git '<a-d>' ': git diff --staged<ret>' -docstring 'diff staged'
|
||||
map global git 'c' ': git commit -v<ret>' -docstring 'commit'
|
||||
|
||||
declare-user-mode find
|
||||
map global user 'f' ': enter-user-mode find<ret>' -docstring 'find mode'
|
||||
map global find 'f' ': find_file<ret>' -docstring 'file'
|
||||
map global find 'r' ': find_ripgrep<ret>' -docstring 'ripgrep all file'
|
||||
map global find 'g' ': find_git_file<ret>' -docstring 'git files'
|
||||
map global find 'c' ': find_dir<ret>' -docstring 'change dir'
|
||||
map global find 'b' ': find_buffer<ret>' -docstring 'find buffer'
|
||||
map global find 'd' ': find_delete<ret>' -docstring 'file to delete'
|
||||
|
||||
|
||||
define-command -hidden find_file \
|
||||
%{ edit -existing %sh{
|
||||
test "$PWD" -ne "$HOME" && args="-H"
|
||||
fd -tf "$args" | sed "/.git\//d" | wdmenu
|
||||
} }
|
||||
|
||||
define-command -hidden find_delete \
|
||||
%{ nop %sh{
|
||||
test "$PWD" -ne "$HOME" && args="-H"
|
||||
fd -tf "$args" | sed "/.git\//d" | wdmenu | xargs trash
|
||||
} }
|
||||
|
||||
define-command -hidden find_git_file \
|
||||
%{ edit -existing %sh{ git ls-files | wdmenu } }
|
||||
|
||||
define-command -hidden find_dir \
|
||||
%{ cd %sh{ fd -Htd | wdmenu } }
|
||||
|
||||
define-command -hidden find_buffer \
|
||||
%{ buffer %sh{
|
||||
printf "%s\n" $kak_buflist | wdmenu
|
||||
} }
|
||||
|
||||
define-command -hidden find_ripgrep \
|
||||
%{ eval %sh{
|
||||
patter=$( wdmenu -p "Regex")
|
||||
rg --column -n "$patter" | wdmenu |
|
||||
perl -ne 'print "edit \"$1\" \"$2\" \"$3\" " if /(.+):(\d+):(\d+):/'
|
||||
} }
|
||||
|
||||
|
||||
define-command -params .. \
|
||||
-shell-script-candidates 'zoxide query -l' \
|
||||
zoxide \
|
||||
%{
|
||||
cd %sh{ zoxide query "$@" }
|
||||
echo %sh{ pwd | sed "s|$HOME|~|" }
|
||||
}
|
||||
|
|
@ -1,222 +0,0 @@
|
|||
#plugins
|
||||
|
||||
source "%val{config}/plugins/plug.kak/rc/plug.kak"
|
||||
|
||||
{%@@ for p in [ 'prelude', 'auto-pairs', 'manual-indent' ] @@%}
|
||||
plug 'alexherbo2/{{@@ p @@}}.kak'
|
||||
require-module '{{@@ p @@}}'
|
||||
{%@@ endfor @@%}
|
||||
auto-pairs-enable
|
||||
|
||||
# Manual indent
|
||||
hook global WinCreate .* %{
|
||||
manual-indent-enable
|
||||
}
|
||||
|
||||
plug 'h-youhei/kakoune-surround'
|
||||
plug 'insipx/kak-crosshairs'
|
||||
|
||||
plug 'delapouite/kakoune-palette'
|
||||
|
||||
plug "andreyorst/fzf.kak"
|
||||
plug "kak-lsp/kak-lsp" do %{
|
||||
cargo install --locked --force --path .
|
||||
}
|
||||
|
||||
|
||||
#syntax
|
||||
|
||||
set global tabstop 4
|
||||
|
||||
#keys
|
||||
|
||||
{%@@ for old, new, gdoc, vdoc in [
|
||||
[ "h", key.left, "line begin", "scroll left" ],
|
||||
[ "l", key.right, "line right", "scroll right" ],
|
||||
[ "k", key.up, "buffer begin", "scroll up" ],
|
||||
[ "j", key.down, "buffer end", "scroll down" ],
|
||||
[ "i", key.insertMode, "first non blank", "" ],
|
||||
[ "n", key.next, "", "" ],
|
||||
[ "o", "h", "", "" ],
|
||||
] @@%}
|
||||
{%@@ set NEW, OLD = new.upper(), old.upper()@@%}
|
||||
{%@@ if vdoc @@%}
|
||||
map global view {{@@ old @@}} ''
|
||||
map global view {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ vdoc @@}}"
|
||||
{%@@ endif @@%}
|
||||
{%@@ if gdoc @@%}
|
||||
map global goto {{@@ old @@}} ''
|
||||
map global goto {{@@ new @@}} {{@@ old @@}} -docstring "{{@@ gdoc @@}}"
|
||||
{%@@ endif @@%}
|
||||
map global normal {{@@ new @@}} {{@@ old @@}}
|
||||
map global normal {{@@ NEW @@}} {{@@ OLD @@}}
|
||||
map global normal <a-{{@@ new @@}}> <a-{{@@ old @@}}>
|
||||
map global normal <a-{{@@ NEW @@}}> <a-{{@@ OLD @@}}>
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ for old, new in {
|
||||
"j": key.down,
|
||||
"k": key.up,
|
||||
}.items() @@%}
|
||||
map global normal <a-{{@@ new @@}}> 10{{@@ old @@}}
|
||||
map global normal <a-{{@@ new.upper() @@}}> 10{{@@ old.upper() @@}}
|
||||
{%@@ endfor @@%}
|
||||
|
||||
{%@@ if key.layout == 'colemak' @@%}
|
||||
map global normal k s
|
||||
map global normal K S
|
||||
map global normal <c-k> <a-s>
|
||||
|
||||
map global normal t e
|
||||
|
||||
{%@@ endif @@%}
|
||||
|
||||
#usermode
|
||||
map global user 'f' ': fzf-mode<ret>' -docstring 'fzf mode'
|
||||
map global user 'g' ': enter-user-mode lsp<ret>' -docstring 'lsp mode'
|
||||
|
||||
map global user 'c' ': comment-line<ret>' -docstring 'comment line'
|
||||
map global user 'C' ': comment-block<ret>' -docstring 'comment block'
|
||||
|
||||
map global user 'p' '<a-!> wl-paste -n <ret>' -docstring 'clipboard paste'
|
||||
map global user 'P' '! wl-paste -n <ret>' -docstring 'clipboard paste before'
|
||||
|
||||
declare-user-mode surround
|
||||
map global surround 's' ': surround<ret>' -docstring 'surround'
|
||||
map global surround 'c' ': change-surround<ret>' -docstring 'change'
|
||||
map global surround 'd' ': delete-surround<ret>' -docstring 'delete'
|
||||
map global surround 't' ': select-surrounding-tag<ret>' -docstring 'select tag'
|
||||
map global user 's' ': enter-user-mode surround<ret>' -docstring 'surround mode'
|
||||
|
||||
declare-user-mode git
|
||||
map global git 's' ': git status<ret>' -docstring 'status'
|
||||
map global git 'a' ': git add<ret>' -docstring 'add current'
|
||||
map global git 'A' ': git add .<ret>' -docstring 'add'
|
||||
map global git 'd' ': git diff %reg{%}<ret>' -docstring 'diff current'
|
||||
map global git 'D' ': git diff<ret>' -docstring 'diff'
|
||||
map global git '<a-d>' ': git diff --staged<ret>' -docstring 'diff staged'
|
||||
map global git 'c' ': git commit -v<ret>' -docstring 'commit'
|
||||
map global user 'v' ': enter-user-mode git<ret>' -docstring 'git vcs mode'
|
||||
|
||||
|
||||
# map global insert <s-tab> '<a-;><lt>'
|
||||
|
||||
#hooks
|
||||
|
||||
#completion with tab
|
||||
hook global InsertCompletionShow .* %{ try %{
|
||||
execute-keys -draft 'h<a-K>\h<ret>'
|
||||
map window insert <tab> <c-n>
|
||||
map window insert <s-tab> <c-p>
|
||||
} }
|
||||
hook global InsertCompletionHide .* %{
|
||||
unmap window insert <tab> <c-n>
|
||||
unmap window insert <s-tab> <c-p>
|
||||
}
|
||||
|
||||
hook global RegisterModified '"' %{ nop %sh{
|
||||
printf %s "$kak_main_reg_dquote" | wl-copy > /dev/null 2>&1 &
|
||||
}}
|
||||
|
||||
hook global NormalIdle .* %{ try %{
|
||||
git show-diff
|
||||
palette-status
|
||||
} }
|
||||
|
||||
hook global BufOpenFile .* %{
|
||||
modeline-parse
|
||||
}
|
||||
|
||||
# use spaces insted of tabs
|
||||
hook global InsertChar \t %{ exec -draft -itersel h@ } -group kakrc-replace-tabs-with-spaces
|
||||
|
||||
add-highlighter global/ number-lines -relative -hlcursor
|
||||
add-highlighter global/ show-whitespaces
|
||||
|
||||
#color
|
||||
|
||||
{%@@ set accent = "rgb:%s" % accent_color.replace('#','') @@%}
|
||||
{%@@ set bg_light = "rgb:%s" % color.bg_light.replace('#','') @@%}
|
||||
{%@@ set bg_dark = "rgb:%s" % color.bg_dark.replace('#','') @@%}
|
||||
{%@@ set nontxt = "rgb:%s" % color.nontxt.replace('#','') @@%}
|
||||
|
||||
# For Code
|
||||
face global value default
|
||||
face global type yellow
|
||||
face global variable default
|
||||
face global module value
|
||||
face global function cyan
|
||||
face global string green
|
||||
face global keyword {{@@ accent @@}}
|
||||
face global operator yellow
|
||||
face global attribute green+b
|
||||
face global comment {{@@ bg_light @@}}
|
||||
face global documentation comment
|
||||
face global meta magenta
|
||||
face global builtin default+b
|
||||
|
||||
# For markup
|
||||
face global title blue
|
||||
face global header cyan
|
||||
face global mono green
|
||||
face global block magenta
|
||||
face global link cyan
|
||||
face global bullet cyan
|
||||
face global list yellow
|
||||
|
||||
# builtin faces
|
||||
face global Default default,default
|
||||
|
||||
|
||||
cursorline
|
||||
face global crosshairs_line default,{{@@ bg_dark @@}}
|
||||
face global PrimaryCursor default,{{@@ accent @@}}+fg
|
||||
face global PrimaryCursorEol PrimaryCursor
|
||||
face global PrimarySelection white,black+fg
|
||||
|
||||
face global SecondaryCursor default,default+rfg
|
||||
face global SecondaryCursorEol SecondaryCursor
|
||||
face global SecondarySelection white,black+fg
|
||||
|
||||
|
||||
face global LineNumbers {{@@ bg_light @@}},default
|
||||
face global LineNumberCursor white,{{@@ bg_dark @@}}
|
||||
|
||||
face global MenuForeground white,{{@@ accent @@}}
|
||||
face global MenuBackground white,{{@@ bg_dark @@}}
|
||||
face global MenuInfo cyan
|
||||
|
||||
face global Information default,{{@@ bg_dark @@}}
|
||||
face global Error white,default
|
||||
|
||||
face global StatusLine default,{{@@ nontxt @@}}
|
||||
face global StatusLineMode green,{{@@ nontxt @@}}
|
||||
face global StatusLineInfo default,{{@@ nontxt @@}}
|
||||
face global StatusLineValue default,{{@@ nontxt @@}}
|
||||
face global StatusCursor default,{{@@ accent @@}}
|
||||
|
||||
face global Prompt yellow,default
|
||||
face global MatchingChar default,default+b
|
||||
|
||||
face global Whitespace {{@@ nontxt @@}},default+f
|
||||
face global BufferPadding blue,default
|
||||
# highlight trailing whitespace
|
||||
add-highlighter global/ regex '\h*$' 0:red,red+g
|
||||
|
||||
#lsp
|
||||
{%@@ set cols = {
|
||||
'Error': 'red',
|
||||
'Warning': 'yellow',
|
||||
'Hint': 'blue',
|
||||
} @@%}
|
||||
#{%@@ for obj, col in cols.items() @@%}#
|
||||
face global HighlightDiagnostic{{@@ obj @@}} {{@@ col @@}},default+bu
|
||||
face global Diagnostic{{@@ obj @@}} {{@@ col @@}},default+b
|
||||
face global TextDiagnostic{{@@ obj @@}} {{@@ col @@}},default+b
|
||||
face global InlayDiagnostic{{@@ obj @@}} {{@@ col @@}},default+bu
|
||||
#{%@@ endfor @@%}#
|
||||
|
||||
lsp-enable
|
||||
lsp-inlay-diagnostics-enable global
|
||||
|
||||
face global Reference yellow,default+b
|
|
@ -194,8 +194,8 @@ c.colors.tabs.odd.fg = color.txt
|
|||
c.colors.tabs.even.bg = color.bg
|
||||
c.colors.tabs.odd.bg = color.bg
|
||||
|
||||
c.colors.tabs.selected.even.fg = color.bg
|
||||
c.colors.tabs.selected.odd.fg = color.bg
|
||||
c.colors.tabs.selected.even.fg = color.txt
|
||||
c.colors.tabs.selected.odd.fg = color.txt
|
||||
c.colors.tabs.selected.even.bg = color.accent
|
||||
c.colors.tabs.selected.odd.bg = color.accent
|
||||
|
||||
|
@ -265,6 +265,14 @@ class key:
|
|||
next = "{{@@ key.next @@}}"
|
||||
|
||||
|
||||
def edbind(k, v):
|
||||
if editor == "kak":
|
||||
config.bind("<Alt-{}>".format(k), v)
|
||||
config.bind(k.upper(), "nop")
|
||||
else:
|
||||
config.bind(k.upper(), v)
|
||||
|
||||
|
||||
config.bind(",d", "spawn --verbose youtube-dl -fbest[ext=mp4] {url}")
|
||||
config.bind(",m", "spawn --userscript view_in_mpv")
|
||||
config.bind(",r", "spawn --userscript readability")
|
||||
|
@ -280,10 +288,7 @@ for k, v in {
|
|||
"T": "hint all tab",
|
||||
"H": "set-cmd-text -s :open -t",
|
||||
}.items():
|
||||
if editor == "kak":
|
||||
config.bind("<Alt-{}>".format(k), v)
|
||||
else:
|
||||
config.bind(k.upper(), v)
|
||||
edbind(k, v)
|
||||
|
||||
# {%@@ endif @@%}
|
||||
|
||||
|
@ -306,10 +311,7 @@ for k, v in {
|
|||
key.tabL: "tab-prev",
|
||||
key.tabR: "tab-next",
|
||||
}.items():
|
||||
if editor == "kak":
|
||||
config.bind("<Alt-{}>".format(k), v)
|
||||
else:
|
||||
config.bind(k.upper(), v)
|
||||
edbind(k, v)
|
||||
|
||||
# Bindings for caret mode
|
||||
config.bind(key.left, "move-to-prev-char", mode="caret")
|
||||
|
@ -317,6 +319,19 @@ config.bind(key.up, "move-to-prev-line", mode="caret")
|
|||
config.bind(key.down, "move-to-next-line", mode="caret")
|
||||
config.bind(key.right, "move-to-next-char", mode="caret")
|
||||
|
||||
# devtools
|
||||
config.unbind("wIh")
|
||||
config.unbind("wIj")
|
||||
config.unbind("wIk")
|
||||
config.unbind("wIl")
|
||||
|
||||
config.bind("wIf", "devtools-focus")
|
||||
config.bind("wIw", "devtools window")
|
||||
config.bind("wI" + key.left, "devtools left")
|
||||
config.bind("wI" + key.down, "devtools bottom")
|
||||
config.bind("wI" + key.up, "devtools top")
|
||||
config.bind("wI" + key.right, "devtools right")
|
||||
|
||||
# }}}
|
||||
|
||||
# vim: fdm=marker
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Copyright Cédric Picard 2014 -- License WTFPL
|
||||
# Inspired by Ranger's -- See https://github.com/hut/ranger
|
||||
#
|
||||
# Code shuffled around by Leonardo Eugênio 2020
|
||||
|
||||
set -e -u
|
||||
|
||||
end(){
|
||||
rm -r -- "$(dirname -- "${namebase}")"
|
||||
[ $# -ne 0 ] && echo $@ >&2
|
||||
exit $#
|
||||
}
|
||||
|
||||
if [ $# -ne 0 ] ; then
|
||||
{ for i in "$@" ; do printf "%s\n" "$i" ; done } | "$0"
|
||||
for i in "$@" ; do
|
||||
printf "%s\n" "$i"
|
||||
done | "$0"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
@ -15,28 +25,23 @@ namebase="$(mktemp -d)/blkrn"
|
|||
echo '# Modify filenames without removing any line, quitting aborts' \
|
||||
> "${namebase}.2"
|
||||
tee -- "${namebase}.1" >> "${namebase}.2"
|
||||
exec </dev/tty >/dev/tty \
|
||||
|| { echo 'Interactive terminal needed' >&2 ; exit 1; }
|
||||
exec </dev/tty >/dev/tty ||
|
||||
end 'Interactive terminal needed'
|
||||
|
||||
"$EDITOR" "${namebase}.2"
|
||||
"$EDITOR" -- "${namebase}.2"
|
||||
sed -i -- '1d' "${namebase}.2"
|
||||
|
||||
if [ $(wc -l < "${namebase}.1") -ne $(wc -l < "${namebase}.2") ] ; then
|
||||
rm -r -- "$(dirname -- "${namebase}")"
|
||||
echo "Wrong number of lines" >&2 ; exit 1
|
||||
fi
|
||||
! diff -- "${namebase}.1" "${namebase}.2" &> /dev/null || end "no changes"
|
||||
[ `wc -l < "${namebase}.1"` -eq `wc -l < "${namebase}.2"` ] || end "Wrong number of lines"
|
||||
|
||||
(echo '# Please review/modify this script or empty it to do nothing' \
|
||||
; while read -r l1 <&3 && read -r l2 <&4; do
|
||||
[ "$l1" = "$l2" ] || printf "%s\n%s\n" "$l1" "$l2"
|
||||
done 3<"${namebase}.1" 4<"${namebase}.2" \
|
||||
| sed 's/\([\\"$`]\)/\\\1/g;s/^.*$/"&"/' \
|
||||
| xargs -d"\n" -L2 echo 'mv -i --') \
|
||||
> "${namebase}.sh"
|
||||
{
|
||||
echo '# Please review/modify this script or empty it to do nothing'
|
||||
while read -r l1 <&3 && read -r l2 <&4; do
|
||||
[ "$l1" = "$l2" ] || printf "mv -Ti -- %q %q\n" "$l1" "$l2"
|
||||
done 3<"${namebase}.1" 4<"${namebase}.2"
|
||||
} > "${namebase}.sh"
|
||||
|
||||
if [ "$(wc -c < "${namebase}.sh")" -ne 0 ] ; then
|
||||
"$EDITOR" -- "${namebase}.sh"
|
||||
sh -e -- "${namebase}.sh"
|
||||
fi
|
||||
"$EDITOR" -- "${namebase}.sh"
|
||||
sh -e -- "${namebase}.sh"
|
||||
|
||||
rm -r -- "$(dirname "${namebase}")"
|
||||
end # exit normaly
|
||||
|
|
|
@ -36,18 +36,19 @@ delete(){
|
|||
}
|
||||
|
||||
usage(){
|
||||
cmdname=$(basename "$0")
|
||||
echo "Commands: "
|
||||
echo " $0 search -- searches the current playlist for songs and plays it"
|
||||
echo " $0 delete -- prompts to delete the current song"
|
||||
echo " $cmdname search -- Searches the current playlist for songs and plays it."
|
||||
echo " $cmdname delete -- Prompts to delete the current song."
|
||||
}
|
||||
|
||||
if [ "$1" = "delete" ]
|
||||
then
|
||||
delete
|
||||
elif [ "$1" = "search" ]
|
||||
then
|
||||
search
|
||||
else
|
||||
usage
|
||||
search
|
||||
fi
|
||||
case "$1" in
|
||||
delete)
|
||||
delete ;;
|
||||
search)
|
||||
search ;;
|
||||
*)
|
||||
usage
|
||||
search
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
opts="Fone\nSpeaker\nHDMI"
|
||||
out=$(printf $opts | wdmenu -p "Saida:")
|
||||
out=$(printf $opts | wdmenu -p "Output")
|
||||
vol=$(pamixer --get-volume)
|
||||
|
||||
if [ "$out" = "HDMI" ]
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
test $# -gt 0 &&
|
||||
cmd="$1" &&
|
||||
shift
|
||||
|
||||
# {%@@ if terminal == "alacritty" @@%} #
|
||||
command -v alacritty > /dev/null &&
|
||||
{
|
||||
test "$#" -gt "0" &&
|
||||
exec alacritty -e $@ ||
|
||||
exec alacritty -e "$cmd $@" ||
|
||||
exec alacritty
|
||||
} & exit
|
||||
# {%@@ else @@%} #
|
||||
command -v kitty > /dev/null &&
|
||||
exec kitty $@
|
||||
exec kitty $cmd "$@"
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
notify-send "Error" "Terminal program missing"
|
||||
|
|
|
@ -4,10 +4,10 @@ test -n "$SWAYSOCK" && swaymsg fullscreen off > /dev/null
|
|||
|
||||
# {%@@ if launcher == "wofi" @@%} #
|
||||
which wofi &> /dev/null &&
|
||||
exec wofi -d $argv
|
||||
exec wofi -d $@
|
||||
# {%@@ else @@%} #
|
||||
which bemenu &> /dev/null &&
|
||||
exec bmenu $argv
|
||||
exec bmenu $@
|
||||
# {%@@ endif @@%} #
|
||||
|
||||
notify-send "Error" "Launcher program missing"
|
||||
|
|
|
@ -25,7 +25,7 @@ main() {
|
|||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
|
||||
entry=`printf '%s\n' "${password_files[@]}" | "$dmenu" -p Password $@`
|
||||
entry=`printf '%s\n' "${password_files[@]}" | "$dmenu" -p "Password" $@`
|
||||
|
||||
[ -n "$entry" ] || exit
|
||||
|
||||
|
|
|
@ -379,7 +379,7 @@ bindsym $mod+escape mode Passthrough
|
|||
exec swayidle -w \
|
||||
before-sleep '$lock' \
|
||||
after-resume '$screenReload' \
|
||||
timeout 180 '$lock' \
|
||||
timeout 360 '$lock' \
|
||||
resume '$screenReload' \
|
||||
timeout 1800 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on";$screenReload' \
|
||||
|
@ -389,4 +389,4 @@ bindsym $mod+escape mode Passthrough
|
|||
|
||||
include /etc/sway/config.d/
|
||||
#}}}
|
||||
# vim:filetype=i3config:foldmethod=marker
|
||||
# vim:filetype=sh:foldmethod=marker
|
||||
|
|
|
@ -22,3 +22,6 @@ set -g pane-active-border-style "fg=#cc5757 bg=default"
|
|||
|
||||
set -g status-bg default
|
||||
set -g status off
|
||||
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -g terminal-overrides ",xterm-256color:Tc"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"custom/torrentD",
|
||||
"custom/torrentS",
|
||||
"custom/updates",
|
||||
"custom/caffeine",
|
||||
"pulseaudio",
|
||||
"network",
|
||||
"battery"
|
||||
|
@ -121,8 +122,8 @@
|
|||
"format": "{} ",
|
||||
"interval": 60,
|
||||
"exec-if":"sleep 60s",
|
||||
"exec": "yay -Qqu | wc -l | sed 's/^0$//'",
|
||||
"on-click": "terminal sh -c 'ping -qc1 archlinux.org >/dev/null && yay -Syu || yay -Su; pkill -SIGRTMIN+8 waybar; read'",
|
||||
"exec": "pacman -Qqu | wc -l | sed 's/^0$//'",
|
||||
"on-click": "terminal sh -c 'ping -qc1 archlinux.org >/dev/null && pacman -Syu || pacman -Su; pkill -SIGRTMIN+8 waybar; read'",
|
||||
"signal": 8
|
||||
},
|
||||
"custom/recording": {
|
||||
|
@ -149,8 +150,13 @@
|
|||
"exec":"transmission-remote -l | grep Seeding| wc -l | sed 's/^0$//'",
|
||||
"exec-if":"pidof transmission-daemon",
|
||||
"interval":180
|
||||
}
|
||||
|
||||
},
|
||||
"custom/caffeine":{
|
||||
"format":"{} ",
|
||||
"exec":"pidof caffeinated &>/dev/null &&echo ||echo 鈴",
|
||||
"on-click":"pidof caffeinated &&pkill caffeinated||caffeinated -d ",
|
||||
"interval": 1
|
||||
},
|
||||
|
||||
}
|
||||
// vim:ft=json
|
||||
|
|
|
@ -78,7 +78,8 @@ window#waybar.empty {
|
|||
#custom-updates,
|
||||
#custom-weather,
|
||||
#custom-torrentD,
|
||||
#custom-torrentS
|
||||
#custom-torrentS,
|
||||
#custom-caffeine
|
||||
{
|
||||
margin: 0 7px;
|
||||
color: {{@@ color.txt @@}};
|
||||
|
@ -95,7 +96,8 @@ window#waybar.empty {
|
|||
font-size: {{@@ font.size.big @@}}px;
|
||||
}
|
||||
#network,
|
||||
#pulseaudio
|
||||
#pulseaudio,
|
||||
#custom-caffeine
|
||||
{
|
||||
margin-top:-1px;
|
||||
font-size:16px;
|
||||
|
@ -118,3 +120,8 @@ window#waybar.empty {
|
|||
font-size: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ show=drun
|
|||
prompt=Iniciar:
|
||||
allow_images=true
|
||||
allow_markup=true
|
||||
no-actions=true
|
||||
term=terminal
|
||||
insensitive=true
|
||||
width=800
|
||||
|
|
|
@ -19,7 +19,7 @@ depends=(
|
|||
bemenu-wlroots j4-dmenu-desktop
|
||||
# Utility
|
||||
ruby-fusuma light mako kanshi udiskie redshift-wayland-git
|
||||
ydotool wtype
|
||||
ydotool wtype caffeinated
|
||||
# Configuration manager
|
||||
dotdrop
|
||||
|
||||
|
@ -84,6 +84,7 @@ depends=(
|
|||
libreoffice-fresh libreoffice-fresh-pt-br hunspell-pt-br papirus-libreoffice-theme
|
||||
|
||||
# Programing
|
||||
kakoune kak-lsp
|
||||
neovim python-pynvim neovim-symlinks ipython
|
||||
rust gcc gdb
|
||||
|
||||
|
|
Reference in a new issue