Browse Source

Move dunst shortcuts. Reorganize kakoune plugins. Misc changes.

master
SolitudeSF 3 months ago
parent
commit
8d8d611f6e
No known key found for this signature in database
16 changed files with 147 additions and 137 deletions
  1. 2
    1
      firefox/userChrome.css
  2. 1
    1
      gitconfig.ini
  3. 47
    0
      kak/autoload/current-word.kak
  4. 8
    0
      kak/autoload/git-branch.kak
  5. 18
    0
      kak/autoload/kittyutils.kak
  6. 5
    53
      kak/kakrc
  7. 0
    0
      lc.ini
  8. 9
    9
      mpd
  9. 1
    1
      nim.nim
  10. 9
    9
      ntr/contexts/iosvkem
  11. 0
    35
      ntr/contexts/kiryuko
  12. 33
    0
      ntr/contexts/mysticaltutor
  13. 3
    9
      ntr/templates/dunst
  14. 5
    2
      setup
  15. 2
    16
      splug.toml
  16. 4
    1
      sxhkd

+ 2
- 1
firefox/userChrome.css View File

@@ -6,6 +6,7 @@
#sidebar {
max-width: none !important;
min-width: 0px !important;
width: 20em !important;
}

/* Hide sidebar header and outline */
@@ -14,5 +15,5 @@
}

#sidebar-box #sidebar-header {
display: none;
display: none !important;
}

+ 1
- 1
gitconfig.ini View File

@@ -22,7 +22,7 @@
[color]
ui = auto
[pull]
rebase = false
rebase = true
[commit]
gpgsign = true
[gpg]

+ 47
- 0
kak/autoload/current-word.kak View File

@@ -0,0 +1,47 @@
# Stolen from eraserhd

declare-option -hidden regex curword
declare-option -hidden regex curword_word_class

set-face global CurWord +b

add-highlighter global/current-word dynregex '%opt{curword}' 0:CurWord

define-command -override -hidden highlight-curword %{
eval -draft %{
try %{
execute-keys <space><a-i>w
set-option buffer curword "(?<!%opt{curword_word_class})\Q%val{selection}\E(?!%opt{curword_word_class})"
} catch %{
set-option buffer curword ''
}
}
}
define-command -override -hidden make-curword-word-class %{
evaluate-commands %sh{
eval set -- "$kak_quoted_opt_extra_word_chars"
word_class='['
while [ $# -ne 0 ]; do
case "$1" in
-) word_class="$word_class-";;
esac
shift
done
word_class="$word_class"'\w'
eval set -- "$kak_quoted_opt_extra_word_chars"
while [ $# -ne 0 ]; do
case "$1" in
"-") ;;
"]") word_class="$word_class"'\]';;
"'") word_class="$word_class''";;
*) word_class="$word_class$1";;
esac
shift
done
word_class="$word_class]"
printf "set-option window curword_word_class '%s'\\n" "$word_class"
}
}

hook -group highlight-curword global NormalIdle .* highlight-curword
hook -group highlight-curword global WinSetOption extra_word_chars=.* make-curword-word-class

+ 8
- 0
kak/autoload/git-branch.kak View File

@@ -0,0 +1,8 @@
declare-option -docstring "git branch holding the current buffer" str git_branch

hook global WinCreate .* %{
hook window NormalIdle .* %{ evaluate-commands %sh{
branch=$(cd "$(dirname "${kak_buffile}")" && git rev-parse --abbrev-ref HEAD 2>/dev/null)
[ -n "${branch}" ] && printf 'set window git_branch %%{%s}' "${branch}"
} }
}

+ 18
- 0
kak/autoload/kittyutils.kak View File

@@ -0,0 +1,18 @@
provide-module kittyutils %{

require-module kitty

define-command new-tab -params .. -command-completion -docstring '
new-tab [<commands>]: create a new kakoune client in new tab
The ''terminal-tab'' alias is being used to determine the user''s preferred terminal emulator
The optional arguments are passed as commands to the new client' %{
try %{
terminal-tab kak -c %val{session} -e "%arg{@}"
} catch %{
fail "The 'terminal-tab' alias must be defined to use this command"
}
}

}

require-module kittyutils

kak.kak → kak/kakrc View File

@@ -7,16 +7,11 @@ eval %sh{

# Initialization

require-module connect-skim

decl -hidden regex curword
decl -hidden regex curword_word_class

set global ui_options ncurses_assistant=none
set global scrolloff 7,7
set global autoreload yes
set global grepcmd 'rg -iHL --column'
set global modelinefmt '%opt{modeline_git_branch} %val{bufname}
set global modelinefmt '%opt{git_branch} %val{bufname}
%val{cursor_line}:%val{cursor_char_column} {{mode_info}}
{{context_info}}◂%val{client}⊙%val{session}▸'

@@ -24,12 +19,8 @@ alias global sw sudo-write
alias global cdb change-directory-current-buffer
alias global f find
alias global g grep
alias global s sort-selections
alias global explore-files skim-files
alias global explore-buffers skim-buffers

face global LineNumbersWrapped black
face global CurWord +b

addhl global/number-lines number-lines -hlcursor -separator ' '
addhl global/ruler column 100 default,rgb:303030
@@ -37,7 +28,6 @@ addhl global/trailing-whitespace regex '\h+$' 0:default,red
addhl global/todo regex \b(TODO|FIXME|XXX|NOTE)\b 0:default+rb
addhl global/matching-brackets show-matching
addhl global/wrap wrap -word -indent -marker ''
addhl global/current-word dynregex '%opt{curword}' 0:CurWord

# Keybinds

@@ -58,7 +48,9 @@ map global normal <a-q> ': word-select-previous-big-word<ret>'
map global normal Q B
map global normal <a-Q> <a-B>

map global user -docstring 'replace mode' r ': replace<ret>'
map global user -docstring 'replace mode' r ': enter-replace-mode<ret>'

map global user -docstring 'change directory' c ': enter-user-mode cd<ret>'

map global user -docstring 'expand selection' e ': expand<ret>'
map global user -docstring 'expand repeat' E ': expand-repeat<ret>'
@@ -163,43 +155,6 @@ hook global BufWritePre .* %{ nop %sh{
mkdir -p "$(dirname "$kak_buffile")"
}}

hook global NormalIdle .* %{
eval -draft %{
try %{
exec <space><a-i>w
set buffer curword "(?<!%opt{curword_word_class})\Q%val{selection}\E(?!%opt{curword_word_class})"
} catch %{
set buffer curword ''
}
}
}

hook global WinSetOption extra_word_chars=.* %{
eval %sh{
eval set -- "$kak_quoted_opt_extra_word_chars"
word_class='['
while [ $# -ne 0 ]; do
case "$1" in
-) word_class="$word_class-";;
esac
shift
done
word_class="$word_class"'\w'
eval set -- "$kak_quoted_opt_extra_word_chars"
while [ $# -ne 0 ]; do
case "$1" in
"-") ;;
"]") word_class="$word_class"'\]';;
"'") word_class="$word_class''";;
*) word_class="$word_class$1";;
esac
shift
done
word_class="$word_class]"
printf "set window curword_word_class '%s'\\n" "$word_class"
}
}

eval %sh{ git rev-parse --is-inside-work-tree 2>/dev/null 1>/dev/null && printf %s "
hook global BufWritePost .* %{ git show-diff }
hook global BufReload .* %{ git show-diff }
@@ -243,20 +198,17 @@ hook global WinSetOption filetype=(c|cpp) %{
}

hook global WinSetOption filetype=rust %{
lsp-engage
hook window -group rust-inlay-hints BufReload .* rust-analyzer-inlay-hints
hook window -group rust-inlay-hints NormalIdle .* rust-analyzer-inlay-hints
hook window -group rust-inlay-hints InsertIdle .* rust-analyzer-inlay-hints
hook -once -always window WinSetOption filetype=.* %{
remove-hooks window rust-inlay-hints
}
lsp-engage
}

hook global WinSetOption filetype=markdown %{
set buffer formatcmd 'prettier --parser markdown'
def render -docstring 'render current buffer' %{
exec ": connect-terminal glow -s dark %val{buffile} | ${PAGER}<ret>"
}
}

hook global WinSetOption filetype=python %{

lc → lc.ini View File


+ 9
- 9
mpd View File

@@ -15,16 +15,16 @@ port "6600"
auto_update "yes"
replaygain "album"
replaygain_preamp "0"
#volume_normalization "no"
#audio_buffer_size "2048"
#buffer_before_play "10%"
#connection_timeout "60"
#max_connections "10"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"
# volume_normalization "no"
# audio_buffer_size "2048"
# buffer_before_play "10%"
# connection_timeout "60"
# max_connections "10"
# max_playlist_length "16384"
# max_command_list_size "2048"
# max_output_buffer_size "8192"
filesystem_charset "UTF-8"
#id3v1_encoding "ISO-8859-1"
# id3v1_encoding "ISO-8859-1"

input {
plugin "tidal"

+ 1
- 1
nim.nim View File

@@ -14,7 +14,6 @@ proc setCompiler(s: string, compiler = gcc, cpp = false) {.used.} =

when defined(musl):
setCompiler "x86_64-linux-musl-gcc"
switch "passL", "-static"

elif defined(x86):
cross = true
@@ -53,6 +52,7 @@ when defined(release) or defined(danger):
switch "passC", "-floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"
switch "passC", "-ftree-vectorize"
switch "passC", "-flto"
switch "passL", "-flto"
switch "passL", "-fuse-linker-plugin"
switch "passL", "-s"


+ 9
- 9
ntr/contexts/iosvkem View File

@@ -1,6 +1,6 @@
meta
name*: iosvkem
author: neutaaaaan
name*: iosvkem modified
author: neutaaaaan + solitudesf
source: https://github.com/neutaaaaan/iosvkem

color
@@ -12,22 +12,22 @@ color0: #1b1d1e
color8: #808080

color1: #d01b61
color9: #d01b61
color9: #a3154c

color2: #60aa00
color10: #60aa00
color10: #437700

color3: #d08928
color11: #d08928
color11: #a56d20

color4: #6c9ef8
color12: #6c9ef8
color12: #3b7ef6

color5: #b77fdb
color13: #b77fdb
color13: #a157d0

color6: #00aa80
color14: #00aa80
color14: #00775a

color7: #dddddd
color15: #ffffff
color15: #aaaaaa

+ 0
- 35
ntr/contexts/kiryuko View File

@@ -1,35 +0,0 @@
meta
name*: kiryoko
author: solitude
source: pywal

color
bg: #2b212e
fg: #fffdf5
cursor: #fffdf5

color0: #2b212e
color8: #403145

color1: #E6AEAC
color9: #ffc5c0

color2: #D4B2B1
color10: #ffcfcc

color3: #E9888C
color11: #ff98a0

color4: #F4D5CE
color12: #ffe1d0

color5: #D795A8
color13: #ffaad0

color6: #D9CCD7
color14: #ffddff

color7: #f4eae3
color15: #fffdf5

wallpaper*: <{$HOME}>/b5da99f2ecfa8605b59525668365e05f.jpg

+ 33
- 0
ntr/contexts/mysticaltutor View File

@@ -0,0 +1,33 @@
meta
name*: mysticaltutor
author: caksoylar
source: https://github.com/caksoylar/vim-mysticaltutor

color
fg: #d9d9d9
bg: #1e2227
cursor: #d9d9d9

color0: #1e2227
color8: #30343c

color1: #e07093
color9: #dfb4c9

color2: #8bbe67
color10: #b1c6ac

color3: #bb8e67
color11: #c3b470

color4: #5c8ec7
color12: #a0b4cf

color5: #8b5fc7
color13: #b1a3df

color6: #5cbe97
color14: #a0c4bd

color7: #d9d9d9
color15: #ffffff

+ 3
- 9
ntr/templates/dunst View File

@@ -67,19 +67,13 @@ force_xinerama = false

### Mouse

mouse_left_click = close_current
mouse_middle_click = do_action
mouse_right_click = close_all
mouse_left_click = do_action
mouse_middle_click = close_all
mouse_right_click = close_current

[experimental]
per_monitor_dpi = false

[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+shift+grave
context = ctrl+shift+period

[urgency_low]
background = "<{color.bg}>"
foreground = "<{color.fg}>"

+ 5
- 2
setup View File

@@ -78,9 +78,12 @@ for arg; do
ncmpcpp)
_install ncmpcpp "$CONF/ncmpcpp/config";;
lc)
_install lc "$CONF/lc/config";;
_install lc.ini "$CONF/lc/config";;
kak)
_install kak.kak "$CONF/kak/kakrc";;
_install kak/kakrc "$CONF/kak/kakrc"
for i in kak/autoload/* ; do
_install "$i" "$CONF/kak/autoload/$(basename "$i")"
done;;
zathura)
_render zathura "$CONF/zathura/zathurarc";;
ranger)

+ 2
- 16
splug.toml View File

@@ -3,11 +3,6 @@
["https://github.com/alexherbo2/auto-pairs.kak"]
files = ["rc/auto-pairs.kak"]

["https://github.com/alexherbo2/connect.kak"]

["https://github.com/alexherbo2/prelude.kak"]
files = ["rc/prelude.kak", "rc/prelude.sh"]

["https://github.com/alexherbo2/search-highlighter.kak"]
files = ["rc/search-highlighter.kak"]

@@ -17,8 +12,8 @@ files = ["rc/replace-mode.kak"]
["https://github.com/alexherbo2/word-select.kak"]
files = ["rc/word-select.kak"]

["https://github.com/alexherbo2/explore.kak"]
files = ["rc/explore/files.kak", "rc/explore/buffers.kak"]
["https://github.com/alexherbo2/prelude.kak"]
files = ["rc/prelude.kak", "rc/prelude.sh" ]

["https://github.com/Delapouite/kakoune-auto-percent"]
files = ["auto-percent.kak"]
@@ -32,9 +27,6 @@ files = ["cd.kak"]
["https://github.com/Delapouite/kakoune-buffers"]
files = ["buffers.kak"]

["https://github.com/occivink/kakoune-expand"]
files = ["expand.kak"]

["https://github.com/occivink/kakoune-sudo-write"]
files = ["sudo-write.kak"]

@@ -59,15 +51,9 @@ files = ["rc/smarttab.kak"]
["https://github.com/chambln/kakoune-readline"]
files = ["readline.kak"]

["https://github.com/lenormf/kakoune-extra"]
files = ["widgets/git-branch.kak", "vcs.kak"]

["https://gitlab.com/Screwtapello/kakoune-state-save"]
files = ["state-save.kak"]

["https://github.com/JJK96/kakoune-repl-send"]
files = ["repl.kak"]

# mpv plugins

["https://github.com/ekisu/mpv-webm"]

+ 4
- 1
sxhkd View File

@@ -13,7 +13,7 @@ super + End ; b
super + shift + {End,Insert,Return}
exec {rofi-powermenu,rofi-bspwm-unhide,rofi -modi emoji -show emoji}

super + Home
super + shift + space
exec rofi -modi calc -show calc

super + space
@@ -42,6 +42,9 @@ super + Insert
super + {_,shift + }Print
exec {peek -t, peek}

{shift,shift + alt,ctrl,ctrl + alt,alt} + Home
dunstctl {close,close-all,history-pop,context,action 0}


#
# bspwm hotkeys

Loading…
Cancel
Save