Browse Source

Fix elvish deprecations. Use Iosevka font features. Fix rofi deprecations.

master
SolitudeSF 5 months ago
parent
commit
38f5e03a92
No known key found for this signature in database
GPG Key ID: 789B06817C385387
  1. 4
      bedrock.conf
  2. 2
      bin/mpw-get
  3. 157
      elvish/lib/completers.elv
  4. 14
      elvish/lib/config.elv
  5. 38
      elvish/lib/git.elv
  6. 56
      elvish/lib/theme.elv
  7. 35
      elvish/lib/timer.elv
  8. 34
      elvish/lib/util.elv
  9. 35
      elvish/rc.elv
  10. 4
      firefox/user.js
  11. 2
      firefox/userChrome.css
  12. 18
      fontconfig
  13. 2
      gitconfig.ini
  14. 4
      kak/kakrc
  15. 17
      kitty/kitty.conf
  16. 14
      mpd
  17. 17
      mpv/input.conf
  18. 2
      mpv/mpv.conf
  19. 10
      nim.nim
  20. 17
      ntr/templates/kitty-colors
  21. 26
      ntr/templates/kitty-colors-diff
  22. 4
      ntr/templates/rofi-theme
  23. 5
      profile
  24. 10
      rofi.rasi
  25. 4
      setup
  26. 22
      splug.toml
  27. 15
      sxhkd

4
bedrock.conf

@ -195,7 +195,7 @@ PREFIX:fpath = /bedrock/share/zsh/completion @@ -195,7 +195,7 @@ PREFIX:fpath = /bedrock/share/zsh/completion
SUFFIX:fpath = /bedrock/cross/zsh-completion
[restriction]
restrict = apt-key, cave, debuild, dpkg-buildpackage, gdb, git, kiss, makepkg, pkgmk, prt-get, rpmbuild
restrict = apt-key, cave, debuild, dpkg-buildpackage, firecfg, firejail, firetools, gdb, git, kiss, makepkg, pkgmk, prt-get, rpmbuild
[cross]
priority = void, arch
@ -232,6 +232,8 @@ pin/bin/poweroff = init:$PATH/poweroff @@ -232,6 +232,8 @@ pin/bin/poweroff = init:$PATH/poweroff
pin/bin/reboot = init:$PATH/reboot
pin/bin/shutdown = init:$PATH/shutdown
pin/bin/halt = init:$PATH/halt
pin/bin/cmake = init:$PATH/cmake
pin/bin/dkms = init:$PATH/dkms
# [restriction]/restrict items are only restricted if run through strat or
# cross. List any such items here to ensure they are run through cross to be

2
bin/mpw-get

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/usr/bin/env elvish
name = (cat ~/sns/mpwname)
t = ""
if (eq 0 (count $args)) {
if (== 0 (count $args)) {
@sites = (cat $E:XDG_CONFIG_HOME/mpwc/$name.mpsites)
t = (echo &sep="\n" $@sites | rofi -dmenu -p 'Enter site: ' -width 20 -columns 1)
} else {

157
elvish/lib/completers.elv

@ -3,22 +3,19 @@ use str @@ -3,22 +3,19 @@ use str
use path
use util
use github.com/xiaq/edit.elv/compl/git
git:apply
fn overlap-at [a b]{
fn overlap-at {|a b|
for i [(range 1 (- (count $b) 1))] {
if (has-value $a $b[$i]) { put $i; return }
}
put $false
}
fn at-command [cmd]{
fn at-command {|cmd|
== (count $cmd) 2
}
fn prefix-completer [p a]{
edit:completion:arg-completer[$p] = [@cmd]{
fn prefix-completer {|p a|
set edit:completion:arg-completer[$p] = {|@cmd|
if (eq (count $cmd) 2) {
$a $@cmd
} elif (has-key $edit:completion:arg-completer $cmd[1]) {
@ -29,33 +26,15 @@ fn prefix-completer [p a]{ @@ -29,33 +26,15 @@ fn prefix-completer [p a]{
}
}
fn complete-directory [a]{
dir = (path:dir $a)/
if (str:has-prefix $a $dir) {
a = (str:replace &max=1 $dir '' $a)
} else {
dir = ''
}
for x [$dir*[match-hidden][nomatch-ok]$a*[match-hidden][nomatch-ok]] {
if (path:is-dir $x) { edit:complex-candidate &code-suffix=/ $x }
}
}
edit:completion:arg-completer[cd] = [@cmd]{
if (eq (count $cmd) 2) {
complete-directory $cmd[1]
}
}
edit:completion:arg-completer[kak] = [@cmd]{
set edit:completion:arg-completer[kak] = {|@cmd|
if (eq $cmd[-2] -c) {
kak -l | each [x]{ if (not-eq $x[-1] ')') { put $x } }
kak -l | each {|x| if (not-eq $x[-1] ')') { put $x } }
} else {
edit:complete-filename $cmd[-1]
}
}
edit:completion:arg-completer[waifu2x-converter-cpp] = [@cmd]{
set edit:completion:arg-completer[waifu2x-converter-cpp] = {|@cmd|
if (has-value [-i --input -o --output] $cmd[-2]) {
edit:complete-filename $cmd[-1]
} elif (has-value [-m --mode] $cmd[-2]) {
@ -68,13 +47,13 @@ edit:completion:arg-completer[waifu2x-converter-cpp] = [@cmd]{ @@ -68,13 +47,13 @@ edit:completion:arg-completer[waifu2x-converter-cpp] = [@cmd]{
}
}
kitty-cmds = $nil
kitty-kittens = $nil
var kitty-cmds = $nil
var kitty-kittens = $nil
edit:completion:arg-completer[kitty] = [@cmd]{
set edit:completion:arg-completer[kitty] = {|@cmd|
if (not $kitty-cmds) {
@kitty-cmds = (kitty @ --help | peach [x]{ if (re:match '^ \w' $x) { put $x[2..] } })
@kitty-kittens = (pwd=/usr/lib/kitty/kittens fd main.py | peach [x]{ path:dir $x })
set @kitty-cmds = (kitty @ --help | peach {|x| if (re:match '^ \w' $x) { put $x[2..] } })
set @kitty-kittens = (pwd=/usr/lib/kitty/kittens fd main.py | peach {|x| path:dir $x })
}
if (has-value [kitten '+kitten'] $cmd[-2]) {
all $kitty-kittens
@ -85,7 +64,7 @@ edit:completion:arg-completer[kitty] = [@cmd]{ @@ -85,7 +64,7 @@ edit:completion:arg-completer[kitty] = [@cmd]{
}
}
edit:completion:arg-completer[sv] = [@cmd]{
set edit:completion:arg-completer[sv] = {|@cmd|
if (eq (count $cmd) 2) {
put status up down once pause cont hup alarm interrupt quit kill term 1 2 ^
exit start try-restart check {force-,}{stop,reload,restart,shutdown}
@ -94,38 +73,38 @@ edit:completion:arg-completer[sv] = [@cmd]{ @@ -94,38 +73,38 @@ edit:completion:arg-completer[sv] = [@cmd]{
}
}
edit:completion:arg-completer[man] = [@cmd]{
pwd=/bedrock/cross/man put man*/* | each [a]{
set edit:completion:arg-completer[man] = {|@cmd|
pwd=/bedrock/cross/man put man*/* | each {|a|
re:replace &literal=$true '(\.\dp?)?(\.gz)?$' '' (path:base $a)
}
}
edit:completion:arg-completer[kill] = [@cmd]{
set edit:completion:arg-completer[kill] = {|@cmd|
ps -u (whoami) --no-headers -o pid,command |^
eawk [_ p @c]{ edit:complex-candidate &display=(print ' '$@c) $p }
eawk {|_ p @c| edit:complex-candidate &display=(print ' '$@c) $p }
}
edit:completion:arg-completer[nimble] = [@cmd]{
set edit:completion:arg-completer[nimble] = {|@cmd|
if (eq (count $cmd) 2) {
put {un,}install develop check init publish build c cc js test doc{,2} ^
refresh search list tasks path dump
if ?(isnimbleproject) {
nimble tasks 2>&- | eawk [_ a @_]{ put $a }
nimble tasks 2>&- | eawk {|_ a @_| put $a }
}
} elif (eq $cmd[-2] install) {
for x (from-json <~/.nimble/packages_official.json) { put $x[name] }
} elif (eq $cmd[-2] uninstall) {
idx = (util:index-of $cmd[-1] '@')
var idx = (util:index-of $cmd[-1] '@')
if (== $idx -1) {
nimble list -i | eawk [_ n @_]{ put $n }
nimble list -i | eawk {|_ n @_| put $n }
} else {
pkgs = [&]
nimble list -i | eawk [_ n @v]{
@ver = $@v[..-1]
ver[0] = $ver[0][1..]
pkgs[$n] = $ver
var pkgs = [&]
nimble list -i | eawk {|_ n @v|
var @ver = $@v[..-1]
set ver[0] = $ver[0][1..]
set pkgs[$n] = $ver
}
pkg = $cmd[-1][..$idx]
var pkg = $cmd[-1][..$idx]
if (has-key $pkgs $pkg) {
for v $pkgs[$pkg] { put $pkg@$v }
}
@ -133,31 +112,31 @@ edit:completion:arg-completer[nimble] = [@cmd]{ @@ -133,31 +112,31 @@ edit:completion:arg-completer[nimble] = [@cmd]{
}
}
pijul-cmds = [add apply branches checkout clone credit delete-branch diff dist^
var pijul-cmds = [add apply branches checkout clone credit delete-branch diff dist^
generate-completions help init key log ls mv patch pull push^
record remove revert rollback show-dependencies sign status tag unrecord]
edit:completion:arg-completer[pijul] = [@cmd]{
set edit:completion:arg-completer[pijul] = {|@cmd|
if (eq (count $cmd) 2) {
all $pijul-cmds
}
}
neofetch-img = [ascii caca iterm2 jp2a kitty pixterm sixel termpix tycat w3m off]
neofetch-opts = $nil
var neofetch-img = [ascii caca iterm2 jp2a kitty pixterm sixel termpix tycat w3m off]
var neofetch-opts = $nil
edit:completion:arg-completer[neofetch] = [@cmd]{
set edit:completion:arg-completer[neofetch] = {|@cmd|
if (not $neofetch-opts) {
neofetch-opts = [(_ = ?(neofetch --help | each [x]{
set neofetch-opts = [(set _ = ?(neofetch --help | each {|x|
if (str:has-prefix $x ' --') {
put $x | eawk [_ a @_]{ put $a }
put $x | eawk {|_ a @_| put $a }
}
})) --logo -L -v -vv]
}
all $neofetch-opts
}
edit:completion:arg-completer[bspc] = [@cmd]{
set edit:completion:arg-completer[bspc] = {|@cmd|
if (eq (count $cmd) 2) {
put node desktop monitor query wm rule config subscribe quit
} elif (eq $cmd[1] subscribe) {
@ -171,15 +150,15 @@ edit:completion:arg-completer[bspc] = [@cmd]{ @@ -171,15 +150,15 @@ edit:completion:arg-completer[bspc] = [@cmd]{
}
}
edit:completion:arg-completer[ntr] = [@cmd]{
set edit:completion:arg-completer[ntr] = {|@cmd|
if (not (str:has-prefix $cmd[-1] '-')) {
pwd=$E:XDG_CONFIG_HOME/ntr/contexts put **
}
}
edit:completion:arg-completer[mpv] = [@cmd]{
set edit:completion:arg-completer[mpv] = {|@cmd|
if (and (> (count $cmd[-1]) 0) (eq $cmd[-1][0] '-')) {
mpv --list-options | drop 2 | take 872 | eawk [_ a @b]{
mpv --list-options | drop 2 | take 872 | eawk {|_ a @b|
if (eq (count $b) 0) {
put $a
} else {
@ -191,26 +170,26 @@ edit:completion:arg-completer[mpv] = [@cmd]{ @@ -191,26 +170,26 @@ edit:completion:arg-completer[mpv] = [@cmd]{
}
}
edit:completion:arg-completer[update] = [@cmd]{
update | each [x]{ if (str:has-prefix $x " ") { put $x[4..] } }
set edit:completion:arg-completer[update] = {|@cmd|
update | each {|x| if (str:has-prefix $x " ") { put $x[4..] } }
}
edit:completion:arg-completer[xr] = [@cmd]{
set edit:completion:arg-completer[xr] = {|@cmd|
xpkg -m
xpkg -O | peach [x]{ edit:complex-candidate $x }
xpkg -O | peach {|x| edit:complex-candidate $x }
}
edit:completion:arg-completer[xi] = [@cmd]{
set edit:completion:arg-completer[xi] = {|@cmd|
pwd=$E:XBPS_DISTDIR/srcpkgs put *
}
xbps-src-cmds = $nil
xbps-src-arch = $nil
var xbps-src-cmds = $nil
var xbps-src-arch = $nil
edit:completion:arg-completer[xbps-src] = [@cmd]{
set edit:completion:arg-completer[xbps-src] = {|@cmd|
if (not $xbps-src-cmds) {
@xbps-src-cmds = (xbps-src -h | take 129 | drop 4 | each [x]{ put (re:find &max=1 '^\w+(\-\w+)*' $x)[text] })
@xbps-src-arch = (xbps-src -h | take 162 | drop 136)[1..]
set @xbps-src-cmds = (xbps-src -h | take 129 | drop 4 | each {|x| put (re:find &max=1 '^\w+(\-\w+)*' $x)[text] })
set @xbps-src-arch = (xbps-src -h | take 162 | drop 136)[1..]
}
if (eq $cmd[-2] '-a') {
all $xbps-src-arch
@ -223,9 +202,9 @@ edit:completion:arg-completer[xbps-src] = [@cmd]{ @@ -223,9 +202,9 @@ edit:completion:arg-completer[xbps-src] = [@cmd]{
}
}
edit:completion:arg-completer[strat] = [@cmd]{
@strata = (brl list)
has-strat = (overlap-at $strata $cmd)
set edit:completion:arg-completer[strat] = {|@cmd|
var @strata = (brl list)
var has-strat = (overlap-at $strata $cmd)
if (not $has-strat) {
all $strata
} else {
@ -233,16 +212,16 @@ edit:completion:arg-completer[strat] = [@cmd]{ @@ -233,16 +212,16 @@ edit:completion:arg-completer[strat] = [@cmd]{
}
}
brl-cmds = $nil
var brl-cmds = $nil
edit:completion:arg-completer[brl] = [@cmd]{
set edit:completion:arg-completer[brl] = {|@cmd|
if (not $brl-cmds) {
@brl-cmds = (brl -h | take 36 | drop 5 | each [x]{ put (re:find &max=1 '^ \w+' $x)[text][2..] })
set @brl-cmds = (brl -h | take 36 | drop 5 | each {|x| put (re:find &max=1 '^ \w+' $x)[text][2..] })
}
if (at-command $cmd) {
all $brl-cmds
} else {
c = $cmd[1]
var c = $cmd[1]
if (has-value [status enable disable hide show] $c) {
brl list
} elif (eq $c fetch) {
@ -251,11 +230,11 @@ edit:completion:arg-completer[brl] = [@cmd]{ @@ -251,11 +230,11 @@ edit:completion:arg-completer[brl] = [@cmd]{
}
}
edit:completion:arg-completer[tam] = [@cmd]{
set edit:completion:arg-completer[tam] = {|@cmd|
if (at-command $cmd) {
put install uninstall enable disable update list query search
} else {
c = $cmd[1]
var c = $cmd[1]
if (has-value [uninstall update query] $c) {
tam list -s
} elif (eq $c enable) {
@ -268,14 +247,14 @@ edit:completion:arg-completer[tam] = [@cmd]{ @@ -268,14 +247,14 @@ edit:completion:arg-completer[tam] = [@cmd]{
}
}
edit:completion:arg-completer[handlr] = [@cmd]{
set edit:completion:arg-completer[handlr] = {|@cmd|
if (at-command $cmd) {
put get set add unset launch open list
} elif (and (== (count $cmd) 3) (has-value [get set add unset launch] $cmd[-2])) {
handlr autocomplete -m
} elif (and (== (count $cmd) 4) (has-value [set add] $cmd[-3])) {
handlr autocomplete -d | each [x]{
desktop name = (str:split "\t" $x)
handlr autocomplete -d | each {|x|
var desktop name = (str:split "\t" $x)
edit:complex-candidate $desktop &display=$desktop' '$name
}
} else {
@ -285,19 +264,19 @@ edit:completion:arg-completer[handlr] = [@cmd]{ @@ -285,19 +264,19 @@ edit:completion:arg-completer[handlr] = [@cmd]{
edit:completion:arg-completer[promotescript] = [@cmd]{
set edit:completion:arg-completer[promotescript] = {|@cmd|
pwd=~/.local/bin fd -t f
}
edit:completion:arg-completer[edit-script] = $edit:complete-sudo~
edit:completion:arg-completer[whereis] = $edit:complete-sudo~
edit:completion:arg-completer[which] = $edit:complete-sudo~
set edit:completion:arg-completer[edit-script] = $edit:complete-sudo~
set edit:completion:arg-completer[whereis] = $edit:complete-sudo~
set edit:completion:arg-completer[which] = $edit:complete-sudo~
edit:completion:arg-completer[xq] = $edit:completion:arg-completer[xi]
edit:completion:arg-completer[xqt] = $edit:completion:arg-completer[xi]
edit:completion:arg-completer[xbps-install] = $edit:completion:arg-completer[xi]
set edit:completion:arg-completer[xq] = $edit:completion:arg-completer[xi]
set edit:completion:arg-completer[xqt] = $edit:completion:arg-completer[xi]
set edit:completion:arg-completer[xbps-install] = $edit:completion:arg-completer[xi]
prefixes = [
var prefixes = [
&sudo=$edit:complete-sudo~
&strace=$edit:complete-sudo~
&time=$edit:complete-sudo~

14
elvish/lib/config.elv

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
conf = $E:XDG_CONFIG_HOME
dot = $E:DOTS_DIR
ntrtmp = $conf/ntr/templates
var conf = $E:XDG_CONFIG_HOME
var dot = $E:DOTS_DIR
var ntrtmp = $conf/ntr/templates
fn select [@a]{
fn select {|@a|
fd . -L -t f $@a | sk --height=35% --layout=reverse -m
}
fn edit [&type='' @a]{
settype = []
fn edit {|&type='' @a|
var settype = []
if (not-eq $type '') {
settype = ['-e' 'set buffer filetype '$type]
set settype = ['-e' 'set buffer filetype '$type]
}
kak $@settype $@a
}

38
elvish/lib/git.elv

@ -1,37 +1,37 @@ @@ -1,37 +1,37 @@
use str
branch = ''
dirty = 0
staged = 0
untracked = 0
ahead = 0
behind = 0
var branch = ''
var dirty = 0
var staged = 0
var untracked = 0
var ahead = 0
var behind = 0
fn refresh-status {
branch = ''
dirty = 0
staged = 0
untracked = 0
ahead = 0
behind = 0
set branch = ''
set dirty = 0
set staged = 0
set untracked = 0
set ahead = 0
set behind = 0
_ = ?(
@data = (git --no-optional-locks status --ignore-submodules --porcelain=v2 -b 2>&-)
branch = [(str:split ' ' $data[1])][2]
set _ = ?(
var @data = (git --no-optional-locks status --ignore-submodules --porcelain=v2 -b 2>&-)
set branch = [(str:split ' ' $data[1])][2]
if (and (> (count $data) 3) (str:has-prefix $data[3] '# branch.ab')) {
ahead behind = (all [(str:split ' ' $data[3])][2..])[1..]
set ahead behind = (all [(str:split ' ' $data[3])][2..])[1..]
}
for i $data {
if (or (str:has-prefix $i 1) (str:has-prefix $i 2)) {
if (eq $i[2] '.') {
dirty = (+ $dirty 1)
set dirty = (+ $dirty 1)
} else {
staged = (+ $staged 1)
set staged = (+ $staged 1)
}
} elif (str:has-prefix $i '?') {
untracked = (+ $untracked 1)
set untracked = (+ $untracked 1)
}
}
)

56
elvish/lib/theme.elv

@ -1,27 +1,27 @@ @@ -1,27 +1,27 @@
use re
use git
use math
use util
use timer
edit:rprompt-persistent = $true
edit:prompt-stale-threshold = 0.1
edit:rprompt-stale-transform = [x]{ put ⏳$x }
edit:-prompt-eagerness = 5
pwd-limit = 20
max-dir-len = 1
basesym = ▲
set edit:rprompt-persistent = $true
set edit:prompt-stale-threshold = 0.1
set edit:rprompt-stale-transform = {|x| put ⏳$x }
set edit:-prompt-eagerness = 5
var pwd-limit = 20
var max-dir-len = 1
var basesym = ▲
if (or (has-env SSH_CLIENT) (has-env SSH_TTY)) {
basesym = ◆
set basesym = ◆
}
fn sym {
o = (e = ?(getprojecticon))
var o = (var e = ?(getprojecticon))
if $e { put $o } else { put $basesym }
}
fn pwd {
tmp = (tilde-abbr $pwd)
var tmp = (tilde-abbr $pwd)
if (or (< (count $tmp) $pwd-limit) (< $max-dir-len 1)) {
put $tmp
} else {
@ -29,6 +29,32 @@ fn pwd { @@ -29,6 +29,32 @@ fn pwd {
}
}
fn duration {
var delta = (exact-num (math:round $edit:command-duration))
var s = 0
var m = 0
var h = 0
if (> $delta 3600) {
set s = (% $delta 60)
set m = (/ (- (% $delta 3600) $s) 60)
set h = (/ (- $delta (* $m 60) $s) 3600)
} elif (> $delta 60) {
set s = (% $delta 60)
set m = (/ (- $delta $s) 60)
} else {
set s = $delta
}
if (> $h 0) {
styled ' ⏱'$h':'(util:pad $m 2 &with=0)':'(util:pad $s 2 &with=0) bold
} elif (> $m 0) {
styled ' ⏱'$m':'(util:pad $s 2 &with=0) bold
} elif (> $s 5) {
styled ' ⏱'$s bold
}
}
fn git {
git:refresh-status
if (not-eq $git:branch '') {
@ -51,15 +77,15 @@ fn git { @@ -51,15 +77,15 @@ fn git {
}
}
edit:prompt = {
set edit:prompt = {
put "\n "(sym)' '
styled (pwd)' ' cyan
}
edit:rprompt = {
set edit:rprompt = {
if (not-eq $num-bg-jobs 0) {
put ' '$num-bg-jobs
}
timer:display
duration
git
}

35
elvish/lib/timer.elv

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
use util
start = (date +%s)
delta = 0
s = 0
m = 0
h = 0
util:add-after-readline [_]{ start = (date +%s) }
util:add-before-readline {
delta = (- (date +%s) $start)
if (> $delta 3600) {
s = (% $delta 60)
m = (/ (- (% $delta 3600) $s) 60)
h = (/ (- $delta (* $m 60) $s) 3600)
} elif (> $delta 60) {
s = (% $delta 60)
m = (/ (- $delta $s) 60)
h = 0
} else {
s = $delta
m = 0
h = 0
}
}
fn display {
if (> $h 0) {
styled ' ⏱'$h':'(util:pad $m 2 &with=0)':'(util:pad $s 2 &with=0) bold
} elif (> $m 0) {
styled ' ⏱'$m':'(util:pad $s 2 &with=0) bold
} elif (> $s 5) {
styled ' ⏱'$s bold
}
}

34
elvish/lib/util.elv

@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
use str
use math
fn abort [&code=1 a]{
fn abort {|&code=1 a|
echo (styled $a red) >&2
exit $code
}
fn set-title [a]{
fn set-title {|a|
print "\e]0;"$a"\e\\"
}
fn path-abbr [a &len=1]{
put (str:split / (dirname $a) | each [x]{
l = (count $x)
fn path-abbr {|a &len=1|
put (str:split / (dirname $a) | each {|x|
var l = (count $x)
if (eq 0 $l) { put '' } else { put $x[0..(math:min $len $l)] }
} | str:join /)/(basename $a)
}
fn merge-map [a b]{
keys $b | each [k]{ a[$k] = $b[$k] }
fn merge-map {|a b|
keys $b | each {|k| set a[$k] = $b[$k] }
put $a
}
fn index-of [a b]{
r = 0
fn index-of {|a b|
var r = 0
for val $a {
if (eq $val $b) { put $r; return }
r = (+ $r 1)
set r = (+ $r 1)
}
float64 -1
}
fn pad [a b &with=' ' &left=$true]{
a = (to-string $a)
p = (repeat (- $b (count $a)) $with | str:join '')
fn pad {|a b &with=' ' &left=$true|
set a = (to-string $a)
var p = (repeat (- $b (count $a)) $with | str:join '')
if $left {
put $p$a
} else {
@ -41,18 +41,18 @@ fn pad [a b &with=' ' &left=$true]{ @@ -41,18 +41,18 @@ fn pad [a b &with=' ' &left=$true]{
}
}
fn add-before-readline [@hooks]{
fn add-before-readline {|@hooks|
for hook $hooks {
if (not (has-value $edit:before-readline $hook)) {
edit:before-readline = [ $@edit:before-readline $hook ]
set edit:before-readline = [ $@edit:before-readline $hook ]
}
}
}
fn add-after-readline [@hooks]{
fn add-after-readline {|@hooks|
for hook $hooks {
if (not (has-value $edit:after-readline $hook)) {
edit:after-readline = [ $@edit:after-readline $hook ]
set edit:after-readline = [ $@edit:after-readline $hook ]
}
}
}

35
elvish/rc.elv

@ -1,12 +1,13 @@ @@ -1,12 +1,13 @@
use epm
use str
use util
use path
use config
fn xqt [a]{ e $E:XBPS_DISTDIR/srcpkgs/$a/template }
fn xqt {|a| e $E:XBPS_DISTDIR/srcpkgs/$a/template }
fn r [@a]{
f = (mktemp)
fn r {|@a|
var f = (mktemp)
if ?(ranger --choosedir=$f $@a) { cd (e:cat $f) }
rm -f $f
}
@ -14,37 +15,35 @@ fn r [@a]{ @@ -14,37 +15,35 @@ fn r [@a]{
fn edit-current-command {
print $edit:current-command > /tmp/elvish-edit-command-$pid.elv
e /tmp/elvish-edit-command-$pid.elv </dev/tty >/dev/tty 2>&1
edit:current-command = (slurp </tmp/elvish-edit-command-$pid.elv)[0..-1]
set edit:current-command = (slurp </tmp/elvish-edit-command-$pid.elv)[0..-1]
}
fn alias [cmd @a]{ put [@b]{ (external $cmd) $@a $@b } }
fn alias {|cmd @a| put {|@b| (external $cmd) $@a $@b } }
ls~ = (alias lc)
cat~ = (alias bat --paging=never)
xr~ = (alias sudo xbps-remove -R)
o~ = (alias gio open)
g~ = (alias kitty +kitten hyperlinked_grep)
var ls~ = (alias lc)
var cat~ = (alias bat --paging=never)
var xr~ = (alias sudo xbps-remove -R)
var o~ = (alias gio open)
var g~ = (alias kitty +kitten hyperlinked_grep)
edit:insert:binding[Ctrl-X] = { edit:-instant:start }
edit:insert:binding[Alt-E] = { edit-current-command }
set edit:insert:binding[Ctrl-X] = { edit:-instant:start }
set edit:insert:binding[Alt-E] = { edit-current-command }
edit:abbr = [
&'.etc'='.local/etc/'
set edit:abbr = [
&'.etc'='~/.local/etc/'
]
{
use github.com/xiaq/edit.elv/smart-matcher
use theme
use completers
smart-matcher:apply
util:add-before-readline {
util:set-title (tilde-abbr $pwd)
}
util:add-after-readline [a]{
util:add-after-readline {|a|
if (eq $a '') { ls }
util:set-title (str:split ' ' $a | take 1)' '(tilde-abbr $pwd)
}
}
-override-wcwidth 🦀 2
E:GPG_TTY = (tty)
set-env GPG_TTY (tty)

4
firefox/user.js

@ -18,6 +18,8 @@ user_pref("browser.safebrowsing.phishing.enabled", false); @@ -18,6 +18,8 @@ user_pref("browser.safebrowsing.phishing.enabled", false);
user_pref("browser.search.suggest.enabled", false);
user_pref("browser.compactmode.show", true);
user_pref("extensions.formautofill.addresses.enabled", false);
user_pref("extensions.formautofill.creditCards.enabled", false);
@ -28,6 +30,6 @@ user_pref("extensions.pocket.enabled", false); @@ -28,6 +30,6 @@ user_pref("extensions.pocket.enabled", false);
user_pref("extensions.pocket.api", "");
user_pref("extensions.pocket.site", "");
user_pref("font.name.monospace.x-western", "Iosevka SS04");
user_pref("font.name.monospace.x-western", "Iosevka");
user_pref("font.name.sans-serif.x-western", "Inter UI");
user_pref("font.name.serif.x-western", "Inter UI");

2
firefox/userChrome.css

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/* Hide tabbar */
#TabsToolbar {
visibility: collapse !important;
display: none !important;
}
#sidebar {

18
fontconfig

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
@ -85,11 +85,25 @@ @@ -85,11 +85,25 @@
<string>monospace</string>
</test>
<edit name="family">
<string>Iosevka SS04</string>
<string>Iosevka</string>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<test name="family" compare="eq" ignore-blanks="true">
<string>Iosevka</string>
</test>
<edit name="fontfeatures" mode="append">
<string>cv75 1</string>
<string>cv77 1</string>
<string>cv80 1</string>
<string>cv82 6</string>
<string>cv87 1</string>
<string>cv93 3</string>
</edit>
</match>
</fontconfig>

2
gitconfig.ini

@ -25,8 +25,6 @@ @@ -25,8 +25,6 @@
rebase = true
[commit]
gpgsign = true
[gpg]
program = gpg2
[credential]
helper = store
[diff]

4
kak/kakrc

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
eval %sh{
kak-lsp --kakoune -s $kak_session
colorcol
indentguide
}
# Initialization
@ -148,6 +149,9 @@ hook global WinCreate .* %{ @@ -148,6 +149,9 @@ hook global WinCreate .* %{
readline-enable
colorcol-enable
colorcol-refresh-continuous
indentguide-enable
indentguide-refresh-continuous
mark-show-enable
hook window NormalIdle .* refresh-git-branch
}

17
kitty/kitty.conf

@ -1,10 +1,14 @@ @@ -1,10 +1,14 @@
include colors.conf
font_family Iosevka Fixed SS04 Medium
italic_font Iosevka Fixed SS04 Medium Italic
bold_font Iosevka Fixed SS04 Heavy
bold_italic_font Iosevka Fixed SS04 Heavy Italic
font_family Iosevka Term Medium
italic_font Iosevka Term Medium Italic
bold_font Iosevka Term Heavy
bold_italic_font Iosevka Term Heavy Italic
font_size 12.0
font_features Iosevka-Term-Medium +cv82=6 +cv87=1 +cv93=3 +cv77=1 +cv80=1 +cv75=1
font_features Iosevka-Term-Medium-Italic +cv82=6 +cv87=1 +cv93=3 +cv77=1 +cv80=1 +cv75=1
font_features Iosevka-Term-Heavy +cv82=6 +cv87=1 +cv93=3 +cv77=1 +cv80=1 +cv75=1
font_features Iosevka-Term-Heavy-Italic +cv82=6 +cv87=1 +cv93=3 +cv77=1 +cv80=1 +cv75=1
adjust_line_height -1
adjust_column_width 0
@ -46,11 +50,8 @@ enable_audio_bell yes @@ -46,11 +50,8 @@ enable_audio_bell yes
window_alert_on_bell yes
bell_on_tab yes
open_url_modifiers kitty_mod
open_url_with default
rectangle_select_modifiers ctrl+alt
close_on_child_death no
copy_on_select no
allow_remote_control yes
@ -221,6 +222,8 @@ map ctrl+alt+enter launch --type=os-window --cwd=current @@ -221,6 +222,8 @@ map ctrl+alt+enter launch --type=os-window --cwd=current
map kitty_mod+f1 launch --type=overlay --stdin-source=@alternate_scrollback --stdin-add-formatting kakpager
map kitty_mod+g launch --type=overlay --cwd=current tig
mouse_map kitty_mod+left release grabbed,ungrabbed mouse_click_url
# Sending arbitrary text on shortcut key presses
# You can tell kitty to send arbitrary (UTF-8) encoded text to
# the client program when pressing specified shortcut keys. For example:

14
mpd

@ -6,12 +6,10 @@ state_file "~/.local/share/mpd/state" @@ -6,12 +6,10 @@ state_file "~/.local/share/mpd/state"
sticker_file "~/.local/share/mpd/sticker.sql"
playlist_directory "~/.local/share/mpd/playlists"
log_level "default"
password "password@read,add,control,admin"
default_permissions "read,add,control,admin"
user "solitude"
default_permissions "read,add,control,player,admin"
bind_to_address "127.0.0.1"
bind_to_address "192.168.1.111"
bind_to_address "~/.local/share/mpd/socket"
port "6600"
auto_update "yes"
# replaygain "album"
# replaygain_preamp "0"
@ -32,20 +30,20 @@ input { @@ -32,20 +30,20 @@ input {
}
audio_output {
type "pulse"
name "mpd pulse"
type "pipewire"
name "pipewire"
}
audio_output {
type "fifo"
name "mpd fifo"
name "fifo"
path "/tmp/mpd.fifo"
format "48000:16:2"
}
audio_output {
type "httpd"
name "mpd soryegeton"
name "soryegeton"
encoder "opus"
port "8000"
quality "0"

17
mpv/input.conf

@ -1,11 +1,10 @@ @@ -1,11 +1,10 @@
V vf toggle "vapoursynth=~~/filters/mvtools.vpy"
Ctrl+Alt+0 change-list glsl-shaders toggle "~~/shaders/auto_downscale_pre_x4.glsl"
Ctrl+Alt+1 change-list glsl-shaders toggle "~~/shaders/upscale_cnn_l_x2_denoise.glsl"
Ctrl+Alt+2 change-list glsl-shaders toggle "~~/shaders/upscale_cnn_m_x2_deblur.glsl"
Ctrl+Alt+3 change-list glsl-shaders toggle "~~/shaders/upscale_cnn_l_x2.glsl"
Ctrl+Alt+5 change-list glsl-shaders toggle "~~/shaders/deblur_cnn_m.glsl"
Ctrl+Alt+6 change-list glsl-shaders toggle "~~/shaders/denoise_bilateral_mode.glsl"
Ctrl+Alt+8 change-list glsl-shaders toggle "~~/shaders/darklines_hq.glsl"
Ctrl+Alt+9 change-list glsl-shaders toggle "~~/shaders/thinlines_hq.glsl"
Alt+i cycle interpolation
alt+i cycle interpolation
ctrl+r cycle_values video-rotate "90" "180" "270" "0"
ctrl+alt+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Moderate_VL.glsl"; show-text "Anime4K: Modern 1080p (HQ)"
ctrl+alt+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Light_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_L.glsl"; show-text "Anime4K: Modern 720p->1080p (HQ)"
ctrl+alt+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:~~/shaders/Anime4K_Restore_CNN_Moderate_M.glsl"; show-text "Anime4K: Modern SD->1080p (HQ)"
ctrl+alt+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Light_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_L.glsl:~~/shaders/Anime4K_Restore_CNN_Moderate_M.glsl"; show-text "Anime4K: Old SD->1080p (HQ)"
ctrl+alt+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"

2
mpv/mpv.conf

@ -34,7 +34,7 @@ screenshot-high-bit-depth=no @@ -34,7 +34,7 @@ screenshot-high-bit-depth=no
screenshot-template="~/pic/mpv/%F%#04n%p[%tY%tm%td_%tH]"
# OSD
osd-font="Iosevka SS04"
osd-font="Iosevka"
# Playback Control
[extension.gif]

10
nim.nim

@ -76,3 +76,13 @@ else: @@ -76,3 +76,13 @@ else:
switch "spellsuggest"
switch "styleCheck", "hint"
switch "hint", "Dependency:on"
switch "processing", "filenames"
# Way of Nim
# --gc:orc
# --experimental:strictEffects
--experimental:unicodeOperators
--experimental:overloadableEnums
--define:nimPreviewDotLikeOps
--define:nimPreviewFloatRoundtrip
--define:nimStrictDelete

17
ntr/templates/kitty-colors

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
cursor <{color.cursor}>
foreground <{color.fg}>
background <{color.bg}>
cursor <{color.cursor}>
cursor_text_color <{color.bg}>
color0 <{color0}>
color1 <{color1}>
@ -19,12 +20,12 @@ color13 <{color13}> @@ -19,12 +20,12 @@ color13 <{color13}>
color14 <{color14}>
color15 <{color15}>
mark1_foreground black
mark1_background #98d3cb
mark2_foreground black
mark2_background #f2dcd3
mark3_foreground black
mark3_background #f274bc
mark1_foreground <{color.bg}>
mark1_background <{color1}>
mark2_foreground <{color.bg}>
mark2_background <{color4}>
mark3_foreground <{color.bg}>
mark3_background <{color5}>
selection_foreground <{color.bg}>
selection_background <{color.fg}>
@ -38,4 +39,4 @@ inactive_tab_background #999 @@ -38,4 +39,4 @@ inactive_tab_background #999
url_color #0087BD
active_border_color #30302f
inactive_border_color #30302f
bell_border_color #ff5a00
bell_border_color <{color1}>

26
ntr/templates/kitty-colors-diff

@ -2,18 +2,18 @@ foreground <{color.fg}> @@ -2,18 +2,18 @@ foreground <{color.fg}>
background <{color.bg}>
title_fg <{color.fg}>
title_bg <{color.bg}>
margin_bg #fafbfc
margin_fg #aaaaaa
removed_bg #ffeef0
highlight_removed_bg #fdb8c0
removed_margin_bg #ffdce0
added_bg #e6ffed
highlight_added_bg #acf2bd
added_margin_bg #cdffd8
filler_bg <{color.bg}>
hunk_margin_bg #dbedff
hunk_bg #f1f8ff
search_bg #444
search_fg white
margin_bg <{darken:<{color.bg}>:0.04}>
margin_fg <{color.fg}>
removed_bg <{desaturate:<{color1}>:0.5}>
highlight_removed_bg <{saturate:<{color1}>:0.3}>
removed_margin_bg <{color1}>
added_bg <{desaturate:<{color2}>:0.5}>
highlight_added_bg <{saturate:<{color2}>:0.3}>
added_margin_bg <{color2}>
filler_bg <{desaturate:<{color.bg}>:0.3}>
hunk_margin_bg <{darken:<{color.bg}>:0.04}>
hunk_bg <{lighten:<{color.bg}>:0.2}>
search_bg <{color.bg}>
search_fg <{color.fg}>
select_bg <{color.fg}>
select_fg <{color.bg}>

4
ntr/templates/rofi-theme

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
* {
text-color: <{color.fg}>;
foreground: <{color.fg}>;
background: <{color.bg}>;
lightfg: <{lighten:<{color.fg}>:0.015}>;
@ -30,6 +31,7 @@ @@ -30,6 +31,7 @@
}
window {
background-color: @background;
width: 1024px;
border: 1;
padding: 5;
}
@ -46,6 +48,8 @@ textbox { @@ -46,6 +48,8 @@ textbox {
text-color: @foreground;
}
listview {
columns: 2;
lines: 25;
fixed-height: 0;
border: 1px 0px 0px;
border-color: @separatorcolor;

5
profile

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
# Set common directories
XDG_DATA_HOME=$HOME/.local/share
XDG_STATE_HOME=$HOME/.local/state
XDG_CACHE_HOME=$HOME/.local/cache
XDG_CONFIG_HOME=$HOME/.local/etc
XDG_RUNTIME_DIR=/tmp/runtime-$USER
@ -24,9 +25,9 @@ GPG_AGENT_INFO=$GNUPGHOME/S.gpg-agent:0:1 @@ -24,9 +25,9 @@ GPG_AGENT_INFO=$GNUPGHOME/S.gpg-agent:0:1
unset LS_COLORS
export \
XDG_DATA_HOME XDG_RUNTIME_DIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_RUNTIME_DIR \
XDG_DATA_HOME XDG_RUNTIME_DIR XDG_CACHE_HOME XDG_CONFIG_HOME XDG_STATE_HOME \
XBPS_DISTDIR DOTS_DIR GTK2_RC_FILES TERMINAL EDITOR VISUAL GOPATH CARGO_HOME \
GPG_TTY GPG_AGENT_INFO GNUPGHOME NO_AT_BRIDGE
GPG_TTY GPG_AGENT_INFO GNUPGHOME NO_AT_BRIDGE GUIX_LOCPATH
# Init sharable {ssh,gpg}-agent
pgrep -xu "$(id -u)" gpg-agent || gpg-agent -q --daemon

10
rofi.rasi

@ -1,9 +1,6 @@ @@ -1,9 +1,6 @@
configuration {
modi: "run,drun";
width: 55;
lines: 25;
columns: 2;
font: "Iosevka SS04 12";
font: "Iosevka 12";
show-icons: true;
terminal: "kitty -1";
ssh-client: "ssh";
@ -12,11 +9,12 @@ configuration { @@ -12,11 +9,12 @@ configuration {
run-shell-command: "{terminal} {cmd}";
drun-match-fields: "name,generic,exec,categories,comment,keywords";
drun-display-format: "{name} [({comment})]";
drun-use-desktop-cache: false;
drun-use-desktop-cache: true;
matching: "normal";
theme: "theme";
display-window: "▣";
display-run: "▲";
display-ssh: "◆";
display-drun: "▶";
}
@theme "theme"

4
setup

@ -102,9 +102,9 @@ for arg; do @@ -102,9 +102,9 @@ for arg; do
nim e -p:$HOME/sns/ firefox/homepage.nims >"$HOME/.mozilla/firefox/homepage.html"
_render homepage.css "$HOME/.mozilla/firefox/homepage.css";;
elvish)
_install elvish/rc.elv "$HOME/.elvish/rc.elv"
_install elvish/rc.elv "$CONF/elvish/rc.elv"
for i in elvish/lib/* ; do
_install "$i" "$HOME/.elvish/lib/$(basename "$i")"
_install "$i" "$CONF/elvish/lib/$(basename "$i")"
done;;
neofetch)
_install neofetch.sh "$CONF/neofetch/config.conf";;

22
splug.toml

@ -1,14 +1,5 @@ @@ -1,14 +1,5 @@
# Kakoune plugins
["https://github.com/alexherbo2/search-highlighter.kak"]
files = ["rc/search-highlighter.kak"]
["https://github.com/alexherbo2/replace.kak"]
files = ["rc/replace-mode.kak"]
["https://github.com/alexherbo2/word-select.kak"]
files = ["rc/word-select.kak"]
["https://github.com/Delapouite/kakoune-auto-percent"]
files = ["auto-percent.kak"]
@ -51,6 +42,10 @@ files = ["readline.kak"] @@ -51,6 +42,10 @@ files = ["readline.kak"]
["https://gitlab.com/Screwtapello/kakoune-state-save"]
files = ["state-save.kak"]
["https://gitlab.com/Screwtapello/kakoune-mark-show"]
branch = "main"
files = ["mark-show.kak"]
["https://gitlab.com/Screwtapello/kakoune-repl-buffer"]
files = ["repl-buffer.kak", "repl-buffer-input"]
@ -62,14 +57,11 @@ files = ["fandt.kak"] @@ -62,14 +57,11 @@ files = ["fandt.kak"]
# mpv plugins
["https://github.com/ekisu/mpv-webm"]
files = ["build/webm.lua"]
["https://github.com/mpv-player/mpv"]
files = ["TOOLS/lua/autoload.lua"]
["https://github.com/rossy/mpv-repl"]
files = ["repl.lua"]
["https://github.com/davidde/mpv-autosub"]
files = ["autosub.lua"]
["https://github.com/mfcc64/mpv-scripts"]
files = ["visualizer.lua"]

15
sxhkd

@ -26,12 +26,12 @@ alt + Tab @@ -26,12 +26,12 @@ alt + Tab
super + Return
exec kitty -1
super + shift + {m,v}
exec {mpv "$(xclip -sel c -o)",pavucontrol}
super + shift + {m,v,p,e}
exec {mpv "$(xclip -sel c -o)",pavucontrol,gnome-system-monitor,pcmanfm}
super + shift + {n,p}
super + shift + n
exec kitty -1 --class=kittyfloat -o initial_window_width=900 -o initial_window_height=900 \
{ncmpcpp,htop}
ncmpcpp
super + Insert
carpalx-helper
@ -47,8 +47,11 @@ super + {_,shift + }Print @@ -47,8 +47,11 @@ super + {_,shift + }Print
# Media
XF86Audio{Play,Pause,Prev,Next}
mpc {toggle,pause,prev,next}
XF86Tools
mpc toggle
XF86Audio{LowerVolume,RaiseVolume,Mute}
mpc {prev,next,stop}
#

Loading…
Cancel
Save