Browse Source

Hyperlink support kitty/lc. Media keys sxhkd. when -> if. optimized path-abbr. adapt to bedrock upstream.

master
SolitudeSF 3 months ago
parent
commit
85510b4219
No known key found for this signature in database
14 changed files with 58 additions and 23 deletions
  1. 13
    10
      bedrock.conf
  2. 3
    3
      bin/xresources-to-context
  3. 4
    1
      bspwm
  4. 1
    1
      elvish/lib/theme.elv
  5. 8
    0
      elvish/lib/util.elv
  6. 8
    0
      elvish/rc.elv
  7. 1
    0
      kak/kakrc
  8. 1
    0
      kitty/kitty.conf
  9. 2
    0
      lc.ini
  10. 7
    5
      nim.nim
  11. 1
    2
      profile
  12. 1
    1
      rofi.rasi
  13. 3
    0
      splug.toml
  14. 5
    0
      sxhkd

+ 13
- 10
bedrock.conf View File

@@ -7,6 +7,7 @@ LANG = en_US.UTF-8
timeout = 3
default = void:/sbin/init
paths = /sbin/init, /sbin/fallback-init, /sbin/myinit, /sbin/ninit, /sbin/openrc-init, /sbin/runit-init, /sbin/simpleinit, /sbin/upstart, /lib/sysvinit/init, /lib/systemd/systemd, /usr/lib/systemd/systemd
modules = usbhid, hid, hid_generic

[global]
share = /boot, /dev, /home, /lib/modules, /media, /mnt, /proc, /root, /run, /sys, /tmp
@@ -171,7 +172,7 @@ zsh/zshenv = /bedrock/share/zsh/include-bedrock
#

PREFIX:PATH = /bedrock/cross/pin/bin:/bedrock/bin
INFIX:PATH = /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
INFIX:PATH = /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games
SUFFIX:PATH = /bedrock/cross/bin

PREFIX:MANPATH = /bedrock/cross/pin/man:/bedrock/share/man
@@ -194,21 +195,23 @@ PREFIX:fpath = /bedrock/share/zsh/completion
SUFFIX:fpath = /bedrock/cross/zsh-completion

[restriction]
restrict = apt-key, debuild, dpkg-buildpackage, gdb, git, kiss, makepkg, pkgmk, prt-get, rpmbuild
restrict = apt-key, cave, debuild, dpkg-buildpackage, gdb, git, kiss, makepkg, pkgmk, prt-get, rpmbuild

[cross]
priority = void, arch

[cross-pass]
man = $MANPATH
info = $INFOPATH
icons = $XDG_DATA_DIRS/icons
pixmaps = $XDG_DATA_DIRS/pixmaps
zoneinfo = /usr/share/zoneinfo
terminfo = $TERMINFO_DIRS
src = /usr/local/src, /usr/src
man = $MANPATH
info = $INFOPATH
icons = $XDG_DATA_DIRS/icons
pixmaps = $XDG_DATA_DIRS/pixmaps
themes = $XDG_DATA_DIRS/themes
backgrounds = $XDG_DATA_DIRS/backgrounds
zoneinfo = /usr/share/zoneinfo
terminfo = $TERMINFO_DIRS
src = /usr/local/src, /usr/src
bash-completion = /usr/share/bash-completion
zsh-completion = $fpath
zsh-completion = $fpath
firmware = /lib/firmware/updates/UTS_RELEASE, /lib/firmware/updates, /lib/firmware/UTS_RELEASE, /lib/firmware

[cross-bin]

+ 3
- 3
bin/xresources-to-context View File

@@ -1,10 +1,10 @@
#!/usr/bin/env elvish
use re
c = [&]
for l [(all)] {
all | each [l]{
if (re:match '^(\*\.?|URxvt\*)' $l) {
echo $l | eawk [_ k v]{
c[(re:replace '(^\*\.?|^URxvt\*|:$)' '' $k)] = $v
put $l | eawk [_ k @v]{
if (eq (count $v) 1) { c[(re:replace '(^\*\.?|^URxvt\*|:$)' '' $k)] = $v[0] }
}
}
}

+ 4
- 1
bspwm View File

@@ -18,5 +18,8 @@ bspc rule -a Peek state=floating
bspc rule -a kittyfloat state=floating
bspc rule -a TelegramDesktop desktop=^3
bspc rule -a Hexchat desktop=^3
bspc rule -a Ripcord desktop=^3
bspc rule -a discord desktop=^13
bspc rule -a Ripcord desktop=^13
bspc rule -a Element desktop=^13
bspc rule -a mirage desktop=^13
bspc rule -a Steam desktop=^4 state=floating

+ 1
- 1
elvish/lib/theme.elv View File

@@ -25,7 +25,7 @@ fn pwd {
if (or (< (count $tmp) $pwd-limit) (< $max-dir-len 1)) {
put $tmp
} else {
re:replace '(\.?[^/]{'$max-dir-len'})[^/]*/' '$1/' $tmp
util:path-abbr $tmp &len=$max-dir-len
}
}


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

@@ -1,4 +1,5 @@
use str
use math

fn abort [&code=1 a]{
echo (styled $a red) >&2
@@ -9,6 +10,13 @@ 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)
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] }
put $a

+ 8
- 0
elvish/rc.elv View File

@@ -11,14 +11,22 @@ fn r [@a]{
rm -f $f
}

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]
}

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)

edit:insert:binding[Ctrl-X] = { edit:-instant:start }
edit:insert:binding[Alt-E] = { edit-current-command }

edit:abbr = [
&'.etc'='.local/etc/'

+ 1
- 0
kak/kakrc View File

@@ -11,6 +11,7 @@ require-module prelude
require-module search-highlighter
require-module word-select
require-module replace-mode
require-module fandt

set global ui_options ncurses_assistant=none
set global scrolloff 7,7

+ 1
- 0
kitty/kitty.conf View File

@@ -56,6 +56,7 @@ copy_on_select no
allow_remote_control yes
startup_session none
clipboard_control write-clipboard write-primary read-clipboard read-primary
allow_hyperlinks yes
term xterm-kitty

env PAGER=kakpager

+ 2
- 0
lc.ini View File

@@ -182,3 +182,5 @@ Style = r"""q = "-ma,,,*,?[](){} ';!$#^`~"""
glyph = "▶ "
order = 0134EN #Default sort order: kind-order0,1; fmtKindNum0,1; longExt,Nm
format = "%@%f"

hyperlink = true

+ 7
- 5
nim.nim View File

@@ -2,7 +2,9 @@ from macros import error

type Compiler = enum gcc = "gcc", clang = "clang"

var cross {.used.} = false
var cross = block:
const cross {.booldefine.} = false
cross

proc setCompiler(s: string, compiler = gcc, cpp = false) {.used.} =
let c = findExe s
@@ -12,7 +14,7 @@ proc setCompiler(s: string, compiler = gcc, cpp = false) {.used.} =
switch $compiler & cpp & ".exe", c
switch $compiler & cpp & ".linkerexe", c

when defined(musl):
if defined(musl):
setCompiler "x86_64-linux-musl-gcc"

elif defined(x86):
@@ -45,7 +47,7 @@ elif defined(wasm):
switch "clang.options.linker", linkerOptions
switch "clang.cpp.options.linker", linkerOptions

when defined(release) or defined(danger):
if defined(release) or defined(danger):
switch "excessiveStackTrace", "off"
if not cross:
switch "passC", "-march=native"
@@ -56,10 +58,10 @@ when defined(release) or defined(danger):
switch "passL", "-fuse-linker-plugin"
switch "passL", "-s"

when defined(danger):
if defined(danger):
switch "panics", "on"

when defined(hotcodereloading):
if defined(hotcodereloading):
switch "nimcache", "nimcache"
elif defined(danger):
switch "nimcache", "/tmp/nim/" & projectName() & "_d"

+ 1
- 2
profile View File

@@ -38,12 +38,11 @@ if [ "$GPG_TTY" = /dev/tty1 ]; then
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
GTK2_RC_FILES TERMINAL

exec dbus-launch sx
fi

+ 1
- 1
rofi.rasi View File

@@ -12,7 +12,7 @@ configuration {
run-shell-command: "{terminal} {cmd}";
drun-match-fields: "name,generic,exec,categories,comment,keywords";
drun-display-format: "{name} [({comment})]";
drun-use-desktop-cache: true;
drun-use-desktop-cache: false;
matching: "normal";
theme: "theme";
display-window: "▣";

+ 3
- 0
splug.toml View File

@@ -54,6 +54,9 @@ files = ["state-save.kak"]
["https://github.com/kakoune-editor/kakoune-extra-filetypes"]
files = ["rc/glsl.kak"]

["https://github.com/listentolist/kakoune-fandt"]
files = ["fandt.kak"]

# mpv plugins

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

+ 5
- 0
sxhkd View File

@@ -45,6 +45,11 @@ super + {_,shift + }Print
{shift,shift + alt,ctrl,ctrl + alt,alt} + Home
dunstctl {close,close-all,history-pop,context,action 0}

# Media

XF86Audio{Play,Pause,Prev,Next}
mpc {toggle,pause,prev,next}


#
# bspwm hotkeys

Loading…
Cancel
Save