@@ -1,9 +0,0 @@ | |||
#!/bin/sh | |||
exec mpv \ | |||
--wid="${XSCREENSAVER_WINDOW}" \ | |||
--no-input-terminal \ | |||
--really-quiet \ | |||
--no-stop-screensaver \ | |||
--no-audio \ | |||
--pause \ | |||
"$(cat ~/.wallpaper)" |
@@ -1,4 +1,5 @@ | |||
use re | |||
use str | |||
use util | |||
use github.com/xiaq/edit.elv/compl/git | |||
@@ -26,7 +27,7 @@ fn prefix-completer [p a]{ | |||
fn complete-directory [a]{ | |||
dir = (path-dir $a)/ | |||
if (has-prefix $a $dir) { | |||
a = (replaces &max=1 $dir '' $a) | |||
a = (str:replace &max=1 $dir '' $a) | |||
} else { | |||
dir = '' | |||
} | |||
@@ -96,7 +97,7 @@ edit:completion:arg-completer[man] = [@cmd]{ | |||
edit:completion:arg-completer[kill] = [@cmd]{ | |||
ps -u (whoami) --no-headers -o pid,command |\ | |||
eawk [_ p @c]{ edit:complex-candidate &display-suffix=(print ' '$@c) $p } | |||
eawk [_ p @c]{ edit:complex-candidate &display=(print ' '$@c) $p } | |||
} | |||
edit:completion:arg-completer[nimble] = [@cmd]{ | |||
@@ -177,7 +178,7 @@ edit:completion:arg-completer[mpv] = [@cmd]{ | |||
if (eq (count $b) 0) { | |||
put $a | |||
} else { | |||
edit:complex-candidate $a &display-suffix=' '(joins ' ' $b) | |||
edit:complex-candidate $a &display=' '(str:join ' ' $b) | |||
} | |||
} | |||
} else { |
@@ -1,3 +1,5 @@ | |||
use str | |||
branch = '' | |||
dirty = 0 | |||
staged = 0 | |||
@@ -15,10 +17,10 @@ fn refresh-status { | |||
_ = ?( | |||
@data = (git --no-optional-locks status --ignore-submodules --porcelain=v2 -b 2>&-) | |||
branch = [(splits ' ' $data[1])][2] | |||
branch = [(str:split ' ' $data[1])][2] | |||
if (and (> (count $data) 3) (has-prefix $data[3] '# branch.ab')) { | |||
ahead behind = (all [(splits ' ' $data[3])][2:])[1:] | |||
ahead behind = (all [(str:split ' ' $data[3])][2:])[1:] | |||
} | |||
for i $data { |
@@ -1,3 +1,5 @@ | |||
use str | |||
fn abort [&code=1 a]{ | |||
echo (styled $a red) >&2 | |||
exit $code | |||
@@ -23,7 +25,7 @@ fn index-of [a b]{ | |||
fn pad [a b &with=' ' &left=$true]{ | |||
a = (to-string $a) | |||
p = (repeat (- $b (count $a)) $with | joins '') | |||
p = (repeat (- $b (count $a)) $with | str:join '') | |||
if $left { | |||
put $p$a | |||
} else { |
@@ -1,4 +1,5 @@ | |||
use epm | |||
use str | |||
use util | |||
use config | |||
@@ -35,7 +36,7 @@ edit:abbr = [ | |||
} | |||
util:add-after-readline [a]{ | |||
if (eq $a '') { ls } | |||
util:set-title (splits ' ' $a | take 1)' '(tilde-abbr $pwd) | |||
util:set-title (str:split ' ' $a | take 1)' '(tilde-abbr $pwd) | |||
} | |||
} | |||
@@ -103,6 +103,15 @@ def lsp-engage -docstring 'Enable language server' %{ | |||
map global user -docstring 'Enter lsp user mode' <a-l> ': enter-user-mode lsp<ret>' | |||
} | |||
def lsp-semantic-highlighting -docstring 'Enable semantic highlighting' %{ | |||
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens | |||
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens | |||
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens | |||
hook -once -always window WinSetOption filetype=.* %{ | |||
remove-hooks window semantic-tokens | |||
} | |||
} | |||
def lint-on-write -docstring 'Activate linting on buffer write' %{ | |||
lint-engage | |||
hook buffer BufWritePost .* lint | |||
@@ -225,10 +234,20 @@ hook global WinSetOption filetype=elvish %{ | |||
no-tabs 2 | |||
} | |||
hook global WinSetOption filetype=(go|rust|c|cpp) %{ | |||
hook global WinSetOption filetype=(go|c|cpp) %{ | |||
lsp-engage | |||
} | |||
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 | |||
} | |||
} | |||
hook global WinSetOption filetype=markdown %{ | |||
set buffer formatcmd 'prettier --parser markdown' | |||
def -docstring 'render current buffer' render %{ |
@@ -1,9 +1,9 @@ | |||
include colors.conf | |||
font_family Iosevka Term SS04 | |||
italic_font Iosevka Term SS04 Italic | |||
bold_font Iosevka Term SS04 Bold | |||
bold_italic_font Iosevka Term SS04 Bold Italic | |||
font_family Iosevka Fixed SS04 | |||
italic_font Iosevka Fixed SS04 Italic | |||
bold_font Iosevka Fixed SS04 Bold | |||
bold_italic_font Iosevka Fixed SS04 Bold Italic | |||
font_size 12.0 | |||
adjust_line_height 1 |
@@ -33,7 +33,7 @@ elif defined(wasm): | |||
switch "o", projectName() & ".wasm" | |||
switch "cpu", "i386" | |||
switch "cc", "clang" | |||
switch "d", "release" | |||
switch "d", "danger" | |||
switch "opt", "size" | |||
switch "stackTrace", "off" | |||
switch "nomain" | |||
@@ -51,8 +51,8 @@ when defined(release) or defined(danger): | |||
if not cross: | |||
switch "passC", "-march=native" | |||
switch "passC", "-floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block" | |||
switch "passC", "-flto=8" | |||
switch "passC", "-ftree-vectorize" | |||
switch "passC", "-flto" | |||
switch "passL", "-fuse-linker-plugin" | |||
switch "passL", "-s" | |||
@@ -14,27 +14,19 @@ mkdir -p "$XDG_RUNTIME_DIR" | |||
PATH=$HOME/.local/bin:$DOTS_DIR/bin:$HOME/.nimble/bin:$CARGO_HOME/bin:$GOPATH/bin:$PATH | |||
GPG_TTY=$(tty) | |||
TERMINAL='kitty -1' | |||
EDITOR=kak | |||
VISUAL=kak | |||
QT_QPA_PLATFORMTHEME=gtk2 | |||
NO_AT_BRIDGE=1 | |||
GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc | |||
GNUPGHOME=$XDG_DATA_HOME/gnupg | |||
GPG_AGENT_INFO=$GNUPGHOME/S.gpg-agent:0:1 | |||
_JAVA_AWT_WM_NONREPARENTING=1 | |||
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' | |||
unset LS_COLORS | |||
# Mass export | |||
export \ | |||
XDG_DATA_HOME XDG_RUNTIME_DIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR \ | |||
XBPS_DISTDIR DOTS_DIR GTK2_RC_FILES TERMINAL EDITOR VISUAL \ | |||
GOPATH CARGO_HOME GPG_TTY GPG_AGENT_INFO GNUPGHOME QT_QPA_PLATFORMTHEME \ | |||
_JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS NO_AT_BRIDGE | |||
XBPS_DISTDIR DOTS_DIR GTK2_RC_FILES TERMINAL EDITOR VISUAL GOPATH CARGO_HOME \ | |||
GPG_TTY GPG_AGENT_INFO GNUPGHOME NO_AT_BRIDGE | |||
# Init sharable {ssh,gpg}-agent | |||
pgrep -xu "$(id -u)" gpg-agent || gpg-agent -q --daemon | |||
@@ -43,6 +35,16 @@ pgrep -xu "$(id -u)" ssh-agent || ssh-agent >"$XDG_CACHE_HOME/ssh-env" | |||
# Start X or shell | |||
if [ "$GPG_TTY" = /dev/tty1 ]; then | |||
exec sx | |||
GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc | |||
QT_QPA_PLATFORMTHEME=gtk2 | |||
TERMINAL='kitty -1' | |||
MANGOHUD=1 | |||
_JAVA_AWT_WM_NONREPARENTING=1 | |||
_JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true' | |||
export \ | |||
_JAVA_AWT_WM_NONREPARENTING _JAVA_OPTIONS QT_QPA_PLATFORMTHEME \ | |||
GTK2_RC_FILES TERMINAL MANGOHUD | |||
exec dbus-launch sx | |||
fi | |||
exec elvish |
@@ -119,9 +119,9 @@ ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@" | |||
mime ^image/svg, has display, X, flag f = display -- "$@" | |||
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@" | |||
mime ^image, has pqiv, X, flag f = pqiv -- "$@" | |||
mime ^image, has vimiv, X, flag f = vimiv -- "$@" | |||
mime ^image, has qimgv, X, flag f = qimgv "$@" | |||
mime ^image, has pqiv, X, flag f = pqiv -- "$@" | |||
mime ^image, has sxiv, X, flag f = sxiv -- "$@" | |||
mime ^image, has gimp, X, flag f = gimp -- "$@" | |||
ext xcf, X, flag f = gimp -- "$@" |
@@ -5,6 +5,9 @@ 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"] | |||
@@ -15,5 +15,4 @@ disown devmon -s \ | |||
--exec-on-drive 'notify-send -a udevil -i media-removable "$l" "$f mounted at $d"' \ | |||
--exec-on-unmount 'notify-send -a udevil -i media-removable "$l" "$f unmounted from $d"' \ | |||
--exec-on-remove 'notify-send -a udevil -i media-removable "$l" "$f removed from $d"' & | |||
export MANGOHUD=1 | |||
exec dbus-launch bspwm | |||
exec bspwm |
@@ -26,8 +26,8 @@ alt + Tab | |||
super + Return | |||
exec kitty -1 | |||
super + shift + m | |||
exec mpv "$(xclip -sel c -o)" | |||
super + shift + {m,v} | |||
exec {mpv "$(xclip -sel c -o)",pavucontrol-qt} | |||
super + shift + {n,p} | |||
exec kitty -1 --class=kittyfloat -o initial_window_width=900 -o initial_window_height=900 \ | |||
@@ -36,12 +36,6 @@ super + shift + {n,p} | |||
super + Insert | |||
carpalx-helper | |||
super + Escape | |||
pkill -USR1 -x sxhkd | |||
XF86MonBrightness{Up,Down} | |||
xbacklight {+,-}5 | |||
{_,ctrl} + Print | |||
screenshot {-s -u,-u} | |||
@@ -57,7 +51,7 @@ super + {_,shift + }Print | |||
super + {_,shift + }w | |||
bspc node -{c,k} | |||
#alternate between the tiled and monocle layout | |||
# alternate between the tiled and monocle layout | |||
super + m | |||
bspc desktop -l next | |||
@@ -95,7 +89,7 @@ super + ctrl + shift + w | |||
super {_,+ shift} + r | |||
bspc node @/ -R {90,270} | |||
# Rotate leaves of tree | |||
# rotate leaves of tree | |||
super + shift + {comma,period} | |||
bspc desktop -R {90,270} | |||
@@ -18,3 +18,4 @@ XBPS_PKG_OPTIONS_mediainfo=~GUI | |||
XBPS_PKG_OPTIONS_polybar=~i3,~alsa | |||
XBPS_PKG_OPTIONS_retroarch=~jack | |||
XBPS_PKG_OPTIONS_zenity=~webkit | |||
XBPS_PKG_OPTIONS_emacs=dbus,imagemagick |