Browse Source

Cleanup. Fix for breaking changes in elvish and kakoune.

master
SolitudeSF 1 year ago
parent
commit
8be6d9e523
No known key found for this signature in database
5 changed files with 15 additions and 8 deletions
  1. 0
    1
      bspwm
  2. 2
    0
      elvish/lib/config.elv
  3. 0
    2
      elvish/lib/timer.elv
  4. 1
    0
      elvish/lib/util.elv
  5. 12
    5
      kak/kakrc

+ 0
- 1
bspwm View File

@@ -14,7 +14,6 @@ bspc rule -a Firefox desktop='^2'
bspc rule -a mpv state=floating
bspc rule -a Peek state=floating
bspc rule -a kittyfloat state=floating
bspc rule -a "league of legends.exe" state=floating
bspc rule -a TelegramDesktop desktop='^3'
bspc rule -a Hexchat desktop='^3'
bspc rule -a Ripcord desktop='^3'

+ 2
- 0
elvish/lib/config.elv View File

@@ -5,9 +5,11 @@ ntrtmp = $conf/ntr/templates
fn list [@a]{
fd . -L -t f $@a
}

fn select [@a]{
sk --height=35% --layout=reverse -m $@a
}

fn edit [&type='' @a]{
settype = []
if (not-eq $type '') {

+ 0
- 2
elvish/lib/timer.elv View File

@@ -7,8 +7,6 @@ m = 0
h = 0
composed = ''

fn pad [a]{ if (< $a 10) { put '0'$a } }

util:add-after-readline [_]{ start = (date +%s) }
util:add-before-readline {
delta = (- (date +%s) $start)

+ 1
- 0
elvish/lib/util.elv View File

@@ -26,6 +26,7 @@ fn switch [a b]{
}

fn pad [a b &with=' ' &left=$true]{
a = (to-string $a)
p = (repeat (- $b (count $a)) $with | joins '')
if $left {
put $p$a

+ 12
- 5
kak/kakrc View File

@@ -12,7 +12,6 @@ decl -hidden regex curword
set global ui_options ncurses_assistant=none
set global scrolloff 7,7
set global autoreload yes
set global kitty_window_type kitty
set global grepcmd 'rg -iHL --column'
set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
%val{cursor_line}:%val{cursor_char_column} {{mode_info}}
@@ -57,10 +56,10 @@ map global normal -docstring 'comment block' '<a-#>' ': comment-block<ret>'
map global normal -docstring 'delete to end of line' D <a-l>d
map global normal -docstring 'yank to end of line' Y <a-l>

map global user -docstring 'add phantom selection' f ': phantom-sel-add-selection<ret>'
map global user -docstring 'clear all phantom selections' <a-f> ': phantom-sel-select-all<ret>: phantom-sel-clear<ret>'
map global user -docstring 'next phantom selection' F ': phantom-sel-iterate-next<ret>'
map global user -docstring 'previous phantom selection' <a-F> ': phantom-sel-iterate-prev<ret>'
map global user -docstring 'add phantom selection' f ': phantom-selection-add-selection<ret>'
map global user -docstring 'clear all phantom selections' <a-f> ': phantom-selection-select-all<ret>: phantom-selection-clear<ret>'
map global user -docstring 'next phantom selection' F ': phantom-selection-iterate-next<ret>'
map global user -docstring 'previous phantom selection' <a-F> ': phantom-selection-iterate-prev<ret>'

map global normal -docstring 'select view' <a-%> ': select-view<ret>'
map global view -docstring 'select view' s '<esc>: select-view<ret>'
@@ -120,6 +119,10 @@ def toggle-highlighter -params .. -docstring 'Toggle highlighter' %{
}
}

def type -params 1 -docstring 'Set buffer filetype' %{
set buffer filetype %arg{1}
}

def lint-on-write -docstring 'Activate linting on buffer write' %{
lint-enable
hook buffer BufWritePost .* lint
@@ -155,6 +158,10 @@ def clean-trailing-whitespace -docstring 'Remove trailing whitespace' %{

# Hooks

hook global ModuleLoad kitty %{
set global kitty_window_type kitty
}

hook global WinDisplay .* info-buffers
hook global NormalIdle .* %{ try %{ exec -draft '<a-i>w: palette-status<ret>' } }
hook global BufWritePost .* %{ git show-diff }

Loading…
Cancel
Save