Compare commits

..

33 Commits

Author SHA1 Message Date
73d76e8cee vis: fix search, add keys for rg/fd, change global marks keys, add notes keys 2025-09-29 23:46:53 +02:00
e0f22f25cf alias: tni and tai as interactive versions of tn i ta, .profile: add startx as alternative to sx 2025-09-29 23:42:03 +02:00
f76cac70eb lupan-set-theme follow links, awesome lighter fg_normal
- awesome: fg_normal is common between themes so make it somewhat
lighter then it was on dark theme
2025-09-29 23:42:03 +02:00
270338f6d3 vis: use <vis-prompt-show> instead of colon in key binding 2025-09-29 23:42:03 +02:00
9edf260607 vis: use lf instead of yazi, shorter keys for lf and lsp commands 2025-09-29 23:42:03 +02:00
512599d8d7 vis: add command fzf-files, use it in shell alias vf 2025-09-29 23:42:03 +02:00
7f28c1c13f awesome: no gap and border on maximized windows 2025-09-29 23:42:03 +02:00
e1869dcbc3 vis: update theme on C-l but only if file changed and theme changed dark<->light 2025-09-29 23:42:03 +02:00
f5ea4d4c13 vis: change light background (also for st) and embedded background 2025-09-29 23:42:03 +02:00
c3580ea62a vis: fzf.sh allow multi select (puts to messages), skip register value if default register 2025-09-29 23:42:03 +02:00
edb02ef94b vis: format go files on write 2025-09-29 23:42:03 +02:00
53b29759e8 vis: improve opening make-like file with pos, improve close prev/next window 2025-09-29 23:42:03 +02:00
a95d62b7e8 vis: add go_ext grammar with embedded sql with go templating 2025-09-29 23:42:03 +02:00
bf90b5fbe9 vis: fix shell escape and update lazyjj key 2025-09-29 23:42:03 +02:00
9edbed2349 tmux/nvim: remove switch pane/window integration 2025-09-29 23:42:03 +02:00
95fc836b55 vis: templ: add (implement) templ lexer 2025-09-29 23:42:03 +02:00
51457299a9 vis: implement fast jump 2025-09-29 23:42:03 +02:00
ad532f260f lupan-set-theme: toggle st theme (note: needs st patched to handle USR1) 2025-09-29 23:42:03 +02:00
5ffcbbffcc shell: improve tmux and edit aliases 2025-09-29 23:42:03 +02:00
0794c045fb lazygit: new, vis as editor and use nerd fonts 2025-09-29 23:42:03 +02:00
7fcc30a7c7 xsession: move awesome to top 2025-09-29 23:42:03 +02:00
8a4b46d38d vis: change status bar in dark theme and background in light one 2025-09-29 23:42:03 +02:00
1c36fc4f5d tmux: change terminal for vis compat, pane name on title, more vi like keys in copy mode 2025-09-29 23:42:03 +02:00
ff8b03f04d awesome: better toggle maximize, add keys to focus nth window on active tag 2025-09-29 23:42:03 +02:00
ec87546913 awesome: new themes, use st and clock without date 2025-09-29 23:42:03 +02:00
a1f90c79d6 vis: fzf.sh: add key to select alternative directory, fix switching between search and find 2025-09-29 23:42:03 +02:00
399fae9c2b vis: add script fzf.sh and use it with just two keys
fzf.sh is a wrapper around fzf with mode for fd, rg, git and jj which
allow to switch between them with keys
2025-09-29 23:42:03 +02:00
9538406245 vis: set dark or light theme and start and also add key for this action 2025-09-29 23:42:03 +02:00
90e7cbe7c6 vis: add keys for shell and themes, change current dir keys 2025-09-29 23:42:03 +02:00
fd727586f9 vis: add lupan-dark and lupan-light themes, based on default with my selection of colors 2025-09-29 23:42:03 +02:00
1c42f46fbc xsession: add st-abduco-tabbed; dk: change term to st and add key for st-abduco-tabbed 2025-09-29 23:42:03 +02:00
86027c1564 dk: add key for theme toggle 2025-09-29 23:42:03 +02:00
78d758b8fb vis: global marks, do not reopen already opened file, fzf search current file 2025-09-29 23:42:03 +02:00
7 changed files with 53 additions and 22 deletions

View File

@@ -16,7 +16,7 @@ theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
theme.fg_normal = "#73848c" -- hsl(200 10% 50%)
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
theme.fg_urgent = theme.bg_focus
theme.fg_minimize = theme.fg_normal

View File

@@ -16,7 +16,7 @@ theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
theme.fg_normal = "#a9bcd6" -- hsl(214 35% 75%)
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)

View File

@@ -16,7 +16,17 @@ tn() {
if [ $# -eq 0 ]; then
tmux new
else
tmux new -s "$@"
tmux new -A -s "$@"
fi
}
tni() {
DIR=$(zoxide query -l | vis-menu -p 'Dir:' -l 10)
if [ -n "$DIR" ]; then
NAME=$(echo | vis-menu -p 'Session name:' $(basename $DIR))
if [ -n "$DIR" ]; then
tmux new -A -s "$NAME" -c "$DIR"
fi
fi
}
@@ -28,6 +38,13 @@ ta() {
fi
}
tai() {
NAME=$(tmux ls | vis-menu -p 'Session:' -l 10 | cut -d: -f1)
if [ -n "$NAME" ]; then
tmux attach -t "$NAME"
fi
}
vf() {
vis "+fzf-files auto-files '$1'"
}

View File

@@ -35,5 +35,7 @@ if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
exec river
elif which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xsession
elif which /usr/bin/startx > /dev/null; then
exec /usr/bin/startx
fi
fi

View File

@@ -1,2 +0,0 @@
/home/lupan/dotfiles/Makefile:23:22: (PREFIX): make -C dwm install PREFIX="${HOME}/.local"
/home/lupan/dotfiles/Makefile:41:15: (clock): install-lupan-clock:

View File

@@ -118,7 +118,7 @@ end)
local function search(cmd, action)
if action == nil then
action = function(out)
if (out:find('\n') or #s) == #s then
if (out:find('\n') or #out) == #out then
open_file_pos(out, 'e')
else
vis:message(out)
@@ -274,6 +274,8 @@ vis.events.subscribe(vis.events.INIT, function()
vis:map(vis.modes.NORMAL, ' s', '<vis-prompt-show>fzf-files auto-search<Enter>', 'fzf: search')
vis:map(vis.modes.NORMAL, ' f', '<vis-prompt-show>fzf-files auto-files<Enter>', 'fzf: files')
vis:map(vis.modes.NORMAL, ' S', '<vis-prompt-show>fzf-files search<Enter>', 'fzf: search with rg')
vis:map(vis.modes.NORMAL, ' F', '<vis-prompt-show>fzf-files files<Enter>', 'fzf: files with fd')
vis:map(vis.modes.NORMAL, ' /', function()
search(fzf_reload(ripgrep .. ' --with-filename {q} ' .. escape_and_quoted(vis.win.file.path)))
@@ -341,16 +343,23 @@ vis.events.subscribe(vis.events.INIT, function()
end
end, 'lf file manager in current file directory')
vis:map(vis.modes.NORMAL, ' ma', add_global_mark, 'global marks: add')
vis:map(vis.modes.NORMAL, ' m', add_global_mark, 'global marks: add')
vis:map(vis.modes.NORMAL, ' mj', function()
vis:map(vis.modes.NORMAL, ' M', function()
search('cat ~/.config/vis/global-marks.txt | fzf --tac')
end, 'global marks: jump')
vis:map(vis.modes.NORMAL, ' me', function()
vis:map(vis.modes.NORMAL, ' em', function()
vis:command('o ~/.config/vis/global-marks.txt')
end, 'global marks: edit')
vis:map(vis.modes.NORMAL, ' n', function()
vis:command('o ~/notes/notes.md')
end, 'add note')
vis:map(vis.modes.NORMAL, ' N', function()
search(fzf_reload(ripgrep .. ' --with-filename {q} ~/notes'))
end, 'search notes')
vis:map(vis.modes.NORMAL, ' td', function()
vis:command('set theme lupan-dark')

View File

@@ -2,8 +2,9 @@
THEME="$1"
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ "$THEME" = "toggle" ]; then
if grep Materia-dark ~/.config/xsettingsd/xsettingsd.conf > /dev/null; then
if grep Materia-dark "$XSET" > /dev/null; then
THEME=light
else
THEME=dark
@@ -19,22 +20,25 @@ else
exit 1
fi
if [ -f ~/.Xresources ]; then
XRES=$(readlink -e ~/.Xresources)
if [ -n "$XRES" ]; then
if [ "$THEME" = dark ]; then
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' ~/.Xresources
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' "$XRES"
elif [ "$THEME" = light ]; then
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' ~/.Xresources
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES"
fi
xrdb -merge ~/.Xresources
xrdb -merge "$XRES"
killall -USR1 st
fi
# Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
AYML=$(readlink -e ~/.config/alacritty/alacritty.yml)
if [ -n "$AYML" ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" "$AYML"
fi
if [ -f ~/.config/alacritty/alacritty.toml ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml
ATOML=$(readlink -e ~/.config/alacritty/alacritty.toml)
if [ -f "$ATOML" ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" "$ATOML"
fi
if [ "$THEME" = dark ]; then
@@ -44,13 +48,14 @@ elif [ "$THEME" = light ]; then
fi
# GTK
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
if [ -n "$XSET" ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" "$XSET"
pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi
# waybar
if [ -f ~/.config/waybar/style.css ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" ~/.config/waybar/style.css
WCSS=$(readlink -e ~/.config/waybar/style.css)
if [ -f "$WCSS" ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" "$WCSS"
fi