Compare commits
40 Commits
master
...
343b2ce321
| Author | SHA1 | Date | |
|---|---|---|---|
| 343b2ce321 | |||
| 8fded47ae8 | |||
| b11ccf5b82 | |||
| b72f3935d5 | |||
| d0bc15f7a7 | |||
| e213b465b3 | |||
| c613624f39 | |||
| d4f4c1ad1a | |||
| 94fc8c036c | |||
| 84d26c68a5 | |||
| d03dda4979 | |||
| 5464d111d0 | |||
| bd15a7b443 | |||
| 2024651e33 | |||
| ff66a92104 | |||
| 7fef9a8760 | |||
| 6757fc6aec | |||
| 28fbb75b47 | |||
| 829804f2ed | |||
| ebec63e48c | |||
| b600226065 | |||
| 4398125c7b | |||
| 9064a389e9 | |||
| e507e258e3 | |||
| d138f4c1da | |||
| fa085ae00c | |||
| d8a21e78c4 | |||
| 213a93acd9 | |||
| bdde8238c9 | |||
| d21fdc925c | |||
| dba234077e | |||
| 867e3d6991 | |||
| ecb466f230 | |||
| f5302fc646 | |||
| 3eaba86825 | |||
| 1b0d0597b0 | |||
| 63860cd661 | |||
| d122f56ab6 | |||
| a5c491d1ce | |||
| d6ba2a78b9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,3 +9,4 @@ lupan-wm/target
|
||||
__pycache__
|
||||
/dwm
|
||||
/st
|
||||
/vis/.config/vis/plugins/
|
||||
|
||||
@@ -1,71 +1,31 @@
|
||||
# Nightfox Alacritty Colors
|
||||
## name: nightfox
|
||||
## upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/nightfox/alacritty.toml
|
||||
# https://github.com/alacritty/alacritty-theme/blob/master/themes/nordic.toml
|
||||
|
||||
# Colors (Nordic)
|
||||
|
||||
[colors.primary]
|
||||
background = "#2e3440" # changed
|
||||
foreground = "#eceff4" # changed
|
||||
dim_foreground = "#aeafb0"
|
||||
bright_foreground = "#d6d6d7"
|
||||
|
||||
[colors.cursor]
|
||||
text = "#cdcecf"
|
||||
cursor = "#aeafb0"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = "#cdcecf"
|
||||
cursor = "#63cdcf"
|
||||
|
||||
[colors.search.matches]
|
||||
foreground = "#cdcecf"
|
||||
background = "#3c5372"
|
||||
|
||||
[colors.search.focused_match]
|
||||
foreground = "#cdcecf"
|
||||
background = "#81b29a"
|
||||
|
||||
[colors.footer_bar]
|
||||
foreground = "#cdcecf"
|
||||
background = "#29394f"
|
||||
|
||||
[colors.hints.start]
|
||||
foreground = "#cdcecf"
|
||||
background = "#f4a261"
|
||||
|
||||
[colors.hints.end]
|
||||
foreground = "#cdcecf"
|
||||
background = "#29394f"
|
||||
|
||||
[colors.selection]
|
||||
text = "#cdcecf"
|
||||
background = "#2b3b51"
|
||||
background = '#242933'
|
||||
foreground = '#BBBDAF'
|
||||
|
||||
[colors.normal]
|
||||
black = "#393b44"
|
||||
red = "#c94f6d"
|
||||
green = "#81b29a"
|
||||
yellow = "#dbc074"
|
||||
blue = "#719cd6"
|
||||
magenta = "#9d79d6"
|
||||
cyan = "#63cdcf"
|
||||
white = "#dfdfe0"
|
||||
black = '#191C1D'
|
||||
red = '#BD6062'
|
||||
green = '#A3D6A9'
|
||||
yellow = '#F0DFAF'
|
||||
blue = '#8FB4D8'
|
||||
magenta = '#C7A9D9'
|
||||
cyan = '#B6D7A8'
|
||||
white = '#BDC5BD'
|
||||
|
||||
[colors.bright]
|
||||
black = "#575860"
|
||||
red = "#d16983"
|
||||
green = "#8ebaa4"
|
||||
yellow = "#e0c989"
|
||||
blue = "#86abdc"
|
||||
magenta = "#baa1e2"
|
||||
cyan = "#7ad5d6"
|
||||
white = "#e4e4e5"
|
||||
black = '#727C7C'
|
||||
red = '#D18FAF'
|
||||
green = '#B7CEB0'
|
||||
yellow = '#BCBCBC'
|
||||
blue = '#E0CF9F'
|
||||
magenta = '#C7A9D9'
|
||||
cyan = '#BBDA97'
|
||||
white = '#BDC5BD'
|
||||
|
||||
[colors.dim]
|
||||
black = "#30323a"
|
||||
red = "#ab435d"
|
||||
green = "#6e9783"
|
||||
yellow = "#baa363"
|
||||
blue = "#6085b6"
|
||||
magenta = "#8567b6"
|
||||
cyan = "#54aeb0"
|
||||
white = "#bebebe"
|
||||
[colors.selection]
|
||||
text = '#000000'
|
||||
background = '#F0DFAF'
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
# Colors (Alabaster)
|
||||
# author tonsky
|
||||
# https://github.com/alacritty/alacritty-theme/blob/master/themes/night_owlish_light.toml
|
||||
|
||||
# Colors (Night Owlish Light)
|
||||
|
||||
[colors.primary]
|
||||
background = '#FFFFFF' # changed
|
||||
foreground = '#434343'
|
||||
|
||||
[colors.cursor]
|
||||
text = '#F7F7F7'
|
||||
cursor = '#434343'
|
||||
background = '#ffffff'
|
||||
foreground = '#403f53'
|
||||
|
||||
[colors.normal]
|
||||
black = '#000000'
|
||||
red = '#AA3731'
|
||||
green = '#448C27'
|
||||
yellow = '#CB9000'
|
||||
blue = '#325CC0'
|
||||
magenta = '#7A3E9D'
|
||||
cyan = '#0083B2'
|
||||
white = '#BBBBBB'
|
||||
black = '#011627'
|
||||
red = '#d3423e'
|
||||
green = '#2aa298'
|
||||
yellow = '#daaa01'
|
||||
blue = '#4876d6'
|
||||
magenta = '#403f53'
|
||||
cyan = '#08916a'
|
||||
white = '#7a8181'
|
||||
|
||||
[colors.bright]
|
||||
black = '#777777'
|
||||
red = '#F05050'
|
||||
green = '#60CB00'
|
||||
yellow = '#FFBC5D'
|
||||
blue = '#007ACC'
|
||||
magenta = '#E64CE6'
|
||||
cyan = '#00AACB'
|
||||
white = '#FFFFFF'
|
||||
black = '#7a8181'
|
||||
red = '#f76e6e'
|
||||
green = '#49d0c5'
|
||||
yellow = '#dac26b'
|
||||
blue = '#5ca7e4'
|
||||
magenta = '#697098'
|
||||
cyan = '#00c990'
|
||||
white = '#989fb1'
|
||||
|
||||
[colors.cursor]
|
||||
cursor = '#403f53'
|
||||
text = '#fbfbfb'
|
||||
|
||||
[colors.selection]
|
||||
background = '#f2f2f2'
|
||||
text = '#403f53'
|
||||
|
||||
@@ -88,7 +88,7 @@ local function switch_theme()
|
||||
end
|
||||
|
||||
-- This is used later as the default terminal and editor to run.
|
||||
local terminal = "alacritty"
|
||||
local terminal = "st"
|
||||
|
||||
-- Default modkey.
|
||||
local modkey = "Mod4"
|
||||
@@ -123,7 +123,7 @@ local mykeyboardlayout = awful.widget.keyboardlayout()
|
||||
|
||||
-- {{{ Wibar
|
||||
-- Create a textclock widget
|
||||
local mytextclock = wibox.widget.textclock()
|
||||
local mytextclock = wibox.widget.textclock('%H:%M ')
|
||||
|
||||
-- Create a wibox for each screen and add it
|
||||
local taglist_buttons = gears.table.join(
|
||||
@@ -236,6 +236,15 @@ local function layout_menu()
|
||||
awful.menu(layouts):show()
|
||||
end
|
||||
|
||||
local function focus_nth_window (n)
|
||||
local cc = {}
|
||||
for _, c in ipairs(client.get()) do
|
||||
if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end
|
||||
end
|
||||
local new_focused = cc[n]
|
||||
if new_focused then client.focus = new_focused; new_focused:raise() end
|
||||
end
|
||||
|
||||
-- {{{ Key bindings
|
||||
local globalkeys = gears.table.join(
|
||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||
@@ -338,8 +347,8 @@ local globalkeys = gears.table.join(
|
||||
end,
|
||||
{ description = "lua execute prompt", group = "awesome" }),
|
||||
-- Menubar
|
||||
awful.key({ modkey, }, "p", function() menubar.show() end,
|
||||
{ description = "show the menubar", group = "launcher" })
|
||||
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end,
|
||||
{ description = "run command", group = "launcher" })
|
||||
)
|
||||
|
||||
local clientkeys = gears.table.join(
|
||||
@@ -368,8 +377,11 @@ local clientkeys = gears.table.join(
|
||||
{ description = "minimize", group = "client" }),
|
||||
awful.key({ modkey, }, "m",
|
||||
function(c)
|
||||
c.maximized = not c.maximized
|
||||
c:raise()
|
||||
if awful.layout.getname() == "max" then
|
||||
awful.layout.set(awful.layout.suit.tile)
|
||||
else
|
||||
awful.layout.set(awful.layout.suit.max)
|
||||
end
|
||||
end,
|
||||
{ description = "(un)maximize", group = "client" }),
|
||||
awful.key({ modkey, }, "v",
|
||||
@@ -432,7 +444,11 @@ for i = 1, 9 do
|
||||
end
|
||||
end
|
||||
end,
|
||||
{ description = "toggle focused client on tag #" .. i, group = "tag" })
|
||||
{ description = "toggle focused client on tag #" .. i, group = "tag" }),
|
||||
--- Focus nth window
|
||||
awful.key({ "Control" }, "#" .. i + 9,
|
||||
function() focus_nth_window(i) end,
|
||||
{ description = "focus window index #" .. i, group = "client" })
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -7,28 +7,28 @@ local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.wibar_height = 30
|
||||
|
||||
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||
theme.bg_focus = "#478575" -- hsl(165deg 30% 40%)
|
||||
theme.bg_urgent = "#5c3d45" -- hsl(345deg 20% 30%)
|
||||
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
|
||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
||||
theme.bg_focus = "#316781" -- hsl(200 45% 35%)
|
||||
theme.bg_urgent = "#814c31" -- hsl(20 45% 35%)
|
||||
theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#3d5c54" -- hsl(165deg 20% 30%)
|
||||
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
|
||||
|
||||
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||
theme.fg_focus = "#b1babd"
|
||||
theme.fg_normal = "#73848c" -- hsl(200 10% 50%)
|
||||
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
|
||||
theme.fg_urgent = theme.bg_focus
|
||||
theme.fg_minimize = "#8a9294"
|
||||
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||
theme.fg_minimize = theme.fg_normal
|
||||
theme.taglist_fg_empty = "#454f54" -- hsl(200 10% 30%)
|
||||
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#708090"
|
||||
theme.border_focus = "#a0522d"
|
||||
theme.border_marked = "#91231c"
|
||||
theme.border_normal = "#73848c" -- hsl(200 10% 50%)
|
||||
theme.border_focus = "#b25e34" -- hsl(20 55% 45%)
|
||||
theme.border_marked = "#3488b2" -- hsl(200 55% 45%)
|
||||
|
||||
theme.bg_wallpaper = "#424a4c"
|
||||
theme.bg_wallpaper = "#454f54" -- hsl(200 10% 30%)
|
||||
|
||||
theme.hotkeys_font = theme.font
|
||||
theme.hotkeys_description_font = theme.font
|
||||
|
||||
@@ -7,28 +7,28 @@ local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.wibar_height = 30
|
||||
|
||||
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||
theme.bg_focus = "#a9d6ca" -- hsl(165deg 35% 75%)
|
||||
theme.bg_urgent = "#bc8f9b" -- hsl(345deg 25% 65%)
|
||||
theme.bg_minimize = "#62847b" -- hsl(165deg 15% 45%)
|
||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
||||
theme.bg_focus = "#d0e3fb" -- hsl(214 85% 90%)
|
||||
theme.bg_urgent = "#f2d1a6" -- hsl(34 75% 80%)
|
||||
theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#8fbcb1" -- hsl(165deg 25% 65%)
|
||||
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
|
||||
|
||||
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||
theme.fg_focus = "#363d3e"
|
||||
theme.fg_urgent = "#e9f2f5"
|
||||
theme.fg_minimize = "#4b5456"
|
||||
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||
theme.fg_normal = "#a9bcd6" -- hsl(214 35% 75%)
|
||||
theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
|
||||
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
|
||||
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)
|
||||
theme.taglist_fg_empty = theme.fg_minimize
|
||||
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#bebebe"
|
||||
theme.border_focus = "#ff7f50"
|
||||
theme.border_marked = "#91231c"
|
||||
theme.border_normal = theme.bg_minimize
|
||||
theme.border_focus = "#df8c20" -- hsl(34 75% 50%)
|
||||
theme.border_marked = "#2073df" -- hsl(214 75% 50%)
|
||||
|
||||
theme.bg_wallpaper = "#b0bec2"
|
||||
theme.bg_wallpaper = theme.fg_normal
|
||||
|
||||
theme.hotkeys_font = theme.font
|
||||
theme.hotkeys_description_font = theme.font
|
||||
|
||||
175
dk/.config/dk/dkrc
Executable file
175
dk/.config/dk/dkrc
Executable file
@@ -0,0 +1,175 @@
|
||||
#!/bin/sh
|
||||
|
||||
# determine where to place the log file
|
||||
logfile="$HOME/.dkrc.log"
|
||||
[ -d "$HOME/.local/share/xorg" ] && logfile="$HOME/.local/share/xorg/dkrc.log"
|
||||
: > "$logfile"
|
||||
|
||||
# load sxhkd for keybinds
|
||||
pgrep sxhkd || sxhkd -c "$HOME/.config/dk/sxhkdrc" &
|
||||
|
||||
# spawn a scratchpad terminal if not already (see sxhkdrc and rules for binds/setup)
|
||||
# pgrep -f "st -c scratchpad" || st -c scratchpad &
|
||||
|
||||
# adjust border widths based on the DPI of the monitor
|
||||
px=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+x[0-9]\+' | cut -d'x' -f2)
|
||||
mm=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+mm' | tail -n1 | sed 's/mm//')
|
||||
dpi=$(( (px / mm) * 25 ))
|
||||
|
||||
if [ $dpi -ge 140 ]; then
|
||||
border_width=5
|
||||
border_outer_width=3
|
||||
elif [ $dpi -ge 120 ]; then
|
||||
border_width=4
|
||||
border_outer_width=2
|
||||
else
|
||||
border_width=2
|
||||
border_outer_width=1
|
||||
fi
|
||||
|
||||
{ # compound command to redirect all output
|
||||
|
||||
# workspace settings
|
||||
# ------------------------
|
||||
|
||||
# initialize 6 workspaces (1-6) (default: 1/monitor)
|
||||
dkcmd set numws=10
|
||||
|
||||
# default workspace '_' values used when allocating new workspaces
|
||||
# can be applied to all existing workspaces when passed 'apply' after ws=_
|
||||
dkcmd set ws=_ apply layout=tile master=1 stack=3 gap=0 msplit=0.5 ssplit=0.5
|
||||
|
||||
# use grid layout, padding, and gaps on last workspace
|
||||
#dkcmd set ws=6 layout=grid pad left=200 right=200 top=100 bottom=100 gap=50
|
||||
|
||||
# change workspace names (default: number == name -> 1:1, 2:2, 3:3....)
|
||||
# dkcmd set \
|
||||
# ws=1 name="edit" \
|
||||
# ws=2 name="web" \
|
||||
# ws=3 name="😀" \
|
||||
# ws=4 name="😠" \
|
||||
# ws=5 name="5" \
|
||||
# ws=6 name="6" \
|
||||
|
||||
# enable static workspaces assigned to monitors (relevant for multiple monitors)
|
||||
monitors=$(polybar -m | sed 's/+/:/g' | awk -F: '{print $3, $1}' | sort -n | cut -d' ' -f2 | xargs)
|
||||
mon1=$(echo $monitors | cut -d' ' -f1)
|
||||
mon2=$(echo $monitors | cut -d' ' -f2)
|
||||
mon3=$(echo $monitors | cut -d' ' -f3)
|
||||
if [ -z "$mon2" ]; then
|
||||
mon2="$mon1"
|
||||
mon3="$mon1"
|
||||
elif [ -z "$mon3" ]; then
|
||||
mon3="$mon1"
|
||||
fi
|
||||
dkcmd set static_ws=true \
|
||||
ws=1 mon=$mon2 \
|
||||
ws=2 mon=$mon2 \
|
||||
ws=3 mon=$mon2 \
|
||||
ws=4 mon=$mon2 \
|
||||
ws=5 mon=$mon2 \
|
||||
ws=6 mon=$mon2 \
|
||||
ws=7 mon=$mon2 \
|
||||
ws=8 mon=$mon2 \
|
||||
ws=9 mon=$mon1 \
|
||||
ws=10 mon=$mon3
|
||||
|
||||
# global settings
|
||||
# ---------------------
|
||||
|
||||
# focus windows when receiving activation and enable focus-follows-mouse
|
||||
dkcmd set focus_open=true focus_urgent=true focus_mouse=true
|
||||
|
||||
# place clients at the tail and ignore size hints on tiled windows
|
||||
dkcmd set tile_tohead=0 tile_hints=false
|
||||
|
||||
# minimum width/height for resizing, and minimum allowed on-screen when moving
|
||||
dkcmd set win_minwh=50 win_minxy=10
|
||||
|
||||
# disable gaps and borders in single window layouts
|
||||
dkcmd set smart_gap=true smart_border=true
|
||||
|
||||
# define mouse mod and move/resize buttons
|
||||
dkcmd set mouse mod=mod4 move=button1 resize=button3
|
||||
|
||||
# obey motif border hints on windows that draw their own (steam, easyeffects, etc.)
|
||||
dkcmd set obey_motif=true
|
||||
|
||||
|
||||
# borders
|
||||
# ---------
|
||||
|
||||
# traditional
|
||||
# set border width and colour for each window state
|
||||
# dkcmd set border width=$border_width colour focus='#6699cc' unfocus='#000000' urgent='#ee5555'
|
||||
|
||||
# alternative
|
||||
# enable split borders and colours, width is overall width, outer_width consumes some of width.
|
||||
# outer_width must be less than width, outer_width of 0 will be single borders
|
||||
dkcmd set border width=$border_width outer_width=$border_outer_width \
|
||||
colour \
|
||||
focus='#6699cc' \
|
||||
unfocus='#444444' \
|
||||
urgent='#ee5555' \
|
||||
outer_focus='#222222' \
|
||||
outer_unfocus='#222222' \
|
||||
outer_urgent='#222222'
|
||||
|
||||
|
||||
# window rules
|
||||
# --------------
|
||||
|
||||
# rule class, instance, and title regex are *always* case INSENSITIVE
|
||||
|
||||
# open window(s) on a specific workspace (assigned monitor)
|
||||
# dkcmd rule class="^gimp$" ws=2
|
||||
|
||||
# open window(s) on a monitor by number or name (active workspace on monitor)
|
||||
# dkcmd rule class="^chromium$" mon="HDMI-A-0"
|
||||
|
||||
# open window(s) and use a callback function (user defined in config.h)
|
||||
# we also ignore_cfg=true to stop the window from being resized on it's own from events
|
||||
# eg. mpv --x11-name=albumart /path/to/media
|
||||
# dkcmd rule class="^mpv$" instance="^albumart$" float=true ignore_cfg=true callback=albumart bw=0
|
||||
|
||||
# open window(s) in a floating state
|
||||
dkcmd rule class="^(pavucontrol|transmission-gtk|steam|lxappearance)$" float=true
|
||||
|
||||
# open window(s) with a specific geometry and coordinates (floating only!)
|
||||
# dkcmd rule class="^google-chrome$" title="^open files$" float=true w=1280 h=720
|
||||
|
||||
# open window(s) with ignore_msg=true to avoid focus being grabbed and changing workspace
|
||||
# dkcmd rule class="^TelegramDesktop$" ignore_msg=true
|
||||
|
||||
# define some terminals and allow them to be absorbed by spawned windows
|
||||
dkcmd rule class="^(st|st-256color|urxvt|kitty|alacritty|xterm|xterm-256color)$" terminal=true
|
||||
|
||||
# set a window to never absorb other windows, like the xev event tester
|
||||
dkcmd rule title="^Event Tester$" no_absorb=true
|
||||
|
||||
# send a window to the scratchpad
|
||||
dkcmd rule class="^scratchpad$" scratch=true
|
||||
|
||||
# focus window and workspace on opening
|
||||
# dkcmd rule class="^firefox$" ws=1 focus=true
|
||||
|
||||
# update or remove an existing rule with the same match patterns
|
||||
# dkcmd rule class="^firefox$" mon="HDMI-A-0"
|
||||
# dkcmd rule remove class="^firefox$"
|
||||
|
||||
# apply current rule set to all existing windows (used mainly for WM restart)
|
||||
dkcmd rule apply '*'
|
||||
|
||||
# delete all rules
|
||||
# dkcmd rule remove '*'
|
||||
|
||||
} >> "$logfile" 2>&1 # append responses
|
||||
|
||||
# inform of any errors in a notification
|
||||
if grep -q 'error:' "$logfile"; then
|
||||
hash notify-send && notify-send -t 0 -u critical "dkrc has errors" \
|
||||
"$(awk '/error:/ {sub(/^error: /, ""); gsub(/</, "\<"); print}' "$logfile")"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
117
dk/.config/dk/sxhkdrc
Normal file
117
dk/.config/dk/sxhkdrc
Normal file
@@ -0,0 +1,117 @@
|
||||
# sxhkdrc for use with dk
|
||||
#########################################################
|
||||
|
||||
# launcher
|
||||
mod4 + p
|
||||
dmenu_run -fn 'Fira Code Nerd Font Ret:size=13'
|
||||
|
||||
# terminal
|
||||
mod4 + shift + Return
|
||||
st
|
||||
|
||||
mod4 + ctrl + shift + Return
|
||||
st-abduco-tabbed
|
||||
|
||||
# screenshot and selection capture
|
||||
{_,mod4 + }@Print
|
||||
scrot {_,-s}
|
||||
|
||||
# dedicated volume keys
|
||||
{XF86AudioRaiseVolume,XF86AudioLowerVolume}
|
||||
pamixer {-i,-d} 2
|
||||
|
||||
# dedicated backlight keys
|
||||
{XF86MonBrightnessUp,XF86MonBrightnessDown}
|
||||
xbacklight {+10,-10}
|
||||
|
||||
# alt volume keys
|
||||
mod4 + {Insert,Delete}
|
||||
pamixer {-i,-d} 2
|
||||
|
||||
# reload sxhkd
|
||||
mod4 + shift + x
|
||||
pkill -USR1 -x sxhkd
|
||||
|
||||
|
||||
|
||||
# quit dk
|
||||
mod4 + shift + q
|
||||
dkcmd exit
|
||||
|
||||
# reload dkrc
|
||||
mod4 + shift + r
|
||||
$HOME/.config/dk/dkrc
|
||||
|
||||
# restart dk
|
||||
mod4 + ctrl + shift + r
|
||||
dkcmd restart
|
||||
|
||||
# focus next or previous window
|
||||
mod4 + {j,k}
|
||||
dkcmd win focus {next,prev}
|
||||
|
||||
# close window, swap tiled window in/out of master, cycle tiled windows in place
|
||||
mod4 + {q,space,Tab}
|
||||
dkcmd win {kill,swap,cycle}
|
||||
|
||||
# toggle fullscreen and fake fullscreen (enable manipulating fullscreen window)
|
||||
{_,mod4 + }F11
|
||||
dkcmd win {full,fakefull}
|
||||
|
||||
# toggle floating, sticky, or scratchpad
|
||||
mod4 + shift + {space,s,u}
|
||||
dkcmd win {float,stick,scratch}
|
||||
# alternatively to scratch a window by class "scratchpad"
|
||||
#dkcmd win {float,stick,scratchpad scratch}
|
||||
|
||||
# move window, signed (+/-) for relative changes, for tiled windows
|
||||
# y coord changes will move the window up/down the stack
|
||||
mod4 + shift + {h,j,k,l}
|
||||
dkcmd win resize {x=-20,y=+20,y=-20,x=+20}
|
||||
|
||||
# resize window, signed (+/-) for relative changes
|
||||
mod4 + ctrl + {h,j,k,l}
|
||||
dkcmd win resize {w=-20,h=+20,h=-20,w=+20}
|
||||
|
||||
# view, send, or follow to a workspace (by number)
|
||||
mod4 + {_,shift + ,ctrl + }{1-9,0}
|
||||
dkcmd ws {view,send,follow} {1-9,10}
|
||||
|
||||
# view, send, or follow to the next, previous, last active,
|
||||
# next non-empty, or prev non-empty workspace
|
||||
mod4 + {_,shift + ,ctrl + }{bracketleft,bracketright,BackSpace,Left,Right}
|
||||
dkcmd ws {view,send,follow} {prev,next,last,prevne,nextne}
|
||||
|
||||
# view, send, or follow to the next, previous, or last active monitor
|
||||
mod4 + {_,shift + ,ctrl + }{comma,period,backslash}
|
||||
dkcmd mon {view,send,follow} {prev,next,last}
|
||||
|
||||
# change active workspace layout or cycle between them
|
||||
mod4 + {t,r,m,g,s,w,f,u,c}
|
||||
dkcmd set layout {tile,rtile,mono,grid,spiral,dwindle,none,tstack,cycle}
|
||||
|
||||
# change number of windows in master or first stack
|
||||
mod4 + {_,shift + }{i,d}
|
||||
dkcmd set {master,stack} {+1,-1}
|
||||
|
||||
# change gap width
|
||||
mod4 + {equal,minus}
|
||||
dkcmd set gap {+5,-5}
|
||||
|
||||
# change border widths
|
||||
mod4 + ctrl + {_,shift + }{equal,minus}
|
||||
dkcmd set border {width,outer_width} {+1,-1}
|
||||
|
||||
# lock screen
|
||||
mod4 + ctrl + shift + l
|
||||
slock
|
||||
|
||||
# suspend
|
||||
mod4 + ctrl + shift + s
|
||||
systemctl suspend
|
||||
|
||||
# toggle light/dark theme
|
||||
mod4 + F6
|
||||
lupan-set-theme toggle
|
||||
|
||||
# vim:ft=sxhkdrc
|
||||
9
lazygit/.config/lazygit/config.yml
Normal file
9
lazygit/.config/lazygit/config.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
os:
|
||||
edit: 'vis {{filename}}'
|
||||
editAtLine: 'vis +:{{line}} {{filename}}'
|
||||
editAtLineAndWait: 'vis +:{{line}} {{filename}}'
|
||||
editInTerminal: true
|
||||
openDirInEditor: 'vis {{dir}}'
|
||||
|
||||
gui:
|
||||
nerdFontsVersion: "3"
|
||||
@@ -1,80 +1,75 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
|
||||
"blame.nvim": { "branch": "main", "commit": "39bb4cda9e658d053a43919b10ca52c0a4d738e1" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "b57cbaf8db3ac43c56c9e2c7f3812944638260ed" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
|
||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
||||
"blame.nvim": { "branch": "main", "commit": "b87b8c820e4cec06fbbd2f946b7b35c45906ee0c" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "f643d1b51d1d3d14c8641a46ce44f6bce73c2697" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
|
||||
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
|
||||
"go.nvim": { "branch": "master", "commit": "0d426e87227dd14584881ecc595c173121456111" },
|
||||
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
|
||||
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
|
||||
"guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" },
|
||||
"hardtime.nvim": { "branch": "main", "commit": "f87c86d1aa1e05dcf3c6ecd97fbfd237e2de0bf5" },
|
||||
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
|
||||
"guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
|
||||
"hererocks": { "branch": "master", "commit": "344c46ed54df9a4dbc2d2bf510dcd9a9d90497bf" },
|
||||
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
|
||||
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
|
||||
"kanagawa-paper.nvim": { "branch": "master", "commit": "b0df20cca3b7087c06f241983b488190cc8e23af" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"leap.nvim": { "branch": "main", "commit": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "b58cca003d1d3311213d6db0352f58d8e57bfff0" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" },
|
||||
"marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"melange-nvim": { "branch": "master", "commit": "2db5407f2f6d6d6286f50f2f7365728d66f6f3ae" },
|
||||
"mellifluous.nvim": { "branch": "v1", "commit": "1637e46585435ebda7963248e0e65422effad8d9" },
|
||||
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
|
||||
"nano-theme.nvim": { "branch": "main", "commit": "0b1158c4911f4bd9d5a1e2e7669ebff893435b64" },
|
||||
"lazyjj.nvim": { "branch": "main", "commit": "bba66a1351ff1f1bd078c8a1b00b8d12b3ed0017" },
|
||||
"leap.nvim": { "branch": "main", "commit": "08ca7ec9e859856251d56c22ea107f82f563ff3c" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
|
||||
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2682b0d9732bf52cbc34862056f143e71dc4a6d" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"namu.nvim": { "branch": "main", "commit": "a3a3d81d12b61a38f131253bcd3ce5e2c6599850" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "6d1bd94f7fca92a50a892f494920696b5defa8c8" },
|
||||
"nordic.nvim": { "branch": "main", "commit": "8627750ece357e9670f9e69853091f7fbb8d6523" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0a1ac55d7d4ec2b2ed9616dfc5406791234d1d2b" },
|
||||
"nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "aece1062335a9e856636f5da12d8a06c7615ce8a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "ab887d926c2665a708fbe9e6c4654042cc5f4c60" },
|
||||
"onenord.nvim": { "branch": "main", "commit": "babdcc3da92f0c90703bb612a13a58e5f7669287" },
|
||||
"orgmode": { "branch": "master", "commit": "145dce4d2f1bbaed5ff9e353822981b783627b32" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "b4b7a281307f8b52d47b0fd5b6798a453681d44e" },
|
||||
"neogit": { "branch": "master", "commit": "7fe60f9aa6eacf2eb730c4e9b83d06a36d028161" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"oil.nvim": { "branch": "master", "commit": "5b6068aad7d2057dd399fac73b7fb2cdf23ccd6e" },
|
||||
"orgmode": { "branch": "master", "commit": "32ef9e95f43a6e951fb931b438372546a4f0c524" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "1798be71cdcb15fb84fa8054148a56e17fd391dc" },
|
||||
"rabbit.nvim": { "branch": "master", "commit": "3a4ce048b8ecc48811d061220d0e86111adda20d" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "51d3926f183c2d98fbc237cc237ae0926839af3a" },
|
||||
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
|
||||
"slimline.nvim": { "branch": "main", "commit": "326514876f6e5c051a7a2bf1e926659a74500016" },
|
||||
"slimline.nvim": { "branch": "main", "commit": "10dd807685997d1b72b950dfb4ec1a01cb259101" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"snipe.nvim": { "branch": "main", "commit": "2a1b738dfae8502e6162eddfc774da65ed404142" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-git-grep.nvim": { "branch": "main", "commit": "cdd8215f15843a420b5c8e792395c403136626b6" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
|
||||
"telescope-git-grep.nvim": { "branch": "main", "commit": "d2e1322934e334ee9eb8e838c30f3afb3e7a730e" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "9ca0800d4e9c2610d5cac4d121cde0d9fbd89a64" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"tree-sitter-nu": { "branch": "main", "commit": "d5c71a10b4d1b02e38967b05f8de70e847448dd1" },
|
||||
"tree-sitter-templ": { "branch": "master", "commit": "7f7f06b3931ca00e8ddfbeab3fc08ad00d297fad" },
|
||||
"treesj": { "branch": "main", "commit": "6c616638e3aa0087f2c267bb5990115b67105976" },
|
||||
"treewalker.nvim": { "branch": "main", "commit": "43d3250007d2c5a2ed693c1edebf66d66af33407" },
|
||||
"tree-sitter-nu": { "branch": "main", "commit": "100d06e29d13a8ebfc3f29173c07a5c4f2050586" },
|
||||
"tree-sitter-templ": { "branch": "master", "commit": "de35706f89beed5087670a9c4421b7794ef02411" },
|
||||
"treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
|
||||
"treewalker.nvim": { "branch": "main", "commit": "86ae3cf9896b43f3cfa35b962428f32fed8b5ee8" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-ReplaceWithRegister": { "branch": "master", "commit": "b82bf59e5387b57d0125afb94fd7984061031136" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
|
||||
"vim-ReplaceWithRegister": { "branch": "master", "commit": "a487af6efd1be3fc6fac8da47d00efc9d1f6f724" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" },
|
||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
|
||||
"whaler": { "branch": "main", "commit": "b3a4257f6225a9a6c42f33b56ca316325e395f22" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
||||
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.g.maplocalleader = ' \\'
|
||||
|
||||
local key = vim.keymap.set
|
||||
local opts = { silent = true, noremap = true }
|
||||
@@ -51,7 +51,7 @@ key('n', '<leader>P', '<cmd>bp<CR>', { desc = '[P]revious buffer' })
|
||||
|
||||
key('n', '<leader>tc', '<cmd>tabnew<CR>', { desc = '[T]ab [c]reate' })
|
||||
key('n', '<leader>tx', '<cmd>tabclose<CR>', { desc = '[T]ab close' })
|
||||
key('n', '<leader>ts', '<cmd>tab split<CR>', { desc = '[T]ab [s]plit' })
|
||||
key('n', '<leader>tS', '<cmd>tab split<CR>', { desc = '[T]ab [s]plit' })
|
||||
key('n', '<leader>tn', '<cmd>tabnext<CR>', { desc = '[T]ab [n]ext' })
|
||||
key('n', '<leader>tp', '<cmd>tabprevious<CR>', { desc = '[T]ab [p]revious' })
|
||||
key('n', '<leader>tf', '<cmd>tabfirst<CR>', { desc = '[T]ab [f]irst' })
|
||||
@@ -83,7 +83,8 @@ key('n', '<leader>j', '<cmd>cn<CR>', { desc = "Quickfix next" })
|
||||
key('n', '<leader>k', '<cmd>cp<CR>', { desc = "Quickfix previous" })
|
||||
key('n', '<leader>co', '<cmd>copen<CR>', { desc = "Quickfix [O]pen" })
|
||||
key('n', '<leader>cc', '<cmd>cclose<CR>', { desc = "Quickfix [C]lose" })
|
||||
key('n', '<leader>ct', '<cmd>TroubleToggle<CR>', { desc = "Toggle [T]rouble" })
|
||||
|
||||
key('n', '<leader>s;', '<cmd>SessionSelect<CR>', { desc = '[S]ession Select' })
|
||||
|
||||
-- luasnip
|
||||
|
||||
|
||||
@@ -1,42 +1,10 @@
|
||||
return {
|
||||
{
|
||||
"ramojus/mellifluous.nvim",
|
||||
branch = "v1",
|
||||
},
|
||||
{
|
||||
'rmehri01/onenord.nvim',
|
||||
},
|
||||
{
|
||||
'AlexvZyl/nordic.nvim',
|
||||
},
|
||||
{
|
||||
"savq/melange-nvim",
|
||||
},
|
||||
{
|
||||
'ronisbr/nano-theme.nvim',
|
||||
'thesimonho/kanagawa-paper.nvim',
|
||||
config = function()
|
||||
local nano = require('nano-theme.colors')
|
||||
local nano_get = nano.get
|
||||
function nano.get()
|
||||
local t = nano_get()
|
||||
local light = vim.o.background == 'light'
|
||||
if not light then
|
||||
t.nano_strong.fg = '#ECEFF4'
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
require('lupan.utils').set_color_schemes('nano-theme', 'nano-theme')
|
||||
require('lupan.utils').update_color_scheme()
|
||||
vim.cmd.colorscheme('kanagawa-paper')
|
||||
end
|
||||
},
|
||||
{
|
||||
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = "ibl",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
--- Create Color Code
|
||||
'uga-rosa/ccc.nvim',
|
||||
|
||||
@@ -74,5 +74,8 @@ return {
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
cmp.setup.filetype('lisp', {
|
||||
sources = cmp.config.sources({ { name = 'nvlime' } })
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,35 @@
|
||||
return {
|
||||
{
|
||||
"otavioschwanck/arrow.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
opts = {
|
||||
show_icons = true,
|
||||
leader_key = '-', -- Recommended to be a single key
|
||||
buffer_leader_key = '+', -- Per Buffer Mappings
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>1", function() require("arrow.persist").go_to(1) end, desc = "Arrow go to 1" },
|
||||
{ "<leader>2", function() require("arrow.persist").go_to(2) end, desc = "Arrow go to 2" },
|
||||
{ "<leader>3", function() require("arrow.persist").go_to(3) end, desc = "Arrow go to 3" },
|
||||
{ "<leader>4", function() require("arrow.persist").go_to(4) end, desc = "Arrow go to 4" },
|
||||
{ "<leader>5", function() require("arrow.persist").go_to(5) end, desc = "Arrow go to 5" },
|
||||
{ "<leader>6", function() require("arrow.persist").go_to(6) end, desc = "Arrow go to 6" },
|
||||
{ "<leader>7", function() require("arrow.persist").go_to(7) end, desc = "Arrow go to 7" },
|
||||
{ "<leader>8", function() require("arrow.persist").go_to(8) end, desc = "Arrow go to 8" },
|
||||
{ "<leader>9", function() require("arrow.persist").go_to(9) end, desc = "Arrow go to 9" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"leath-dub/snipe.nvim",
|
||||
keys = {
|
||||
{ "_", function() require("snipe").open_buffer_menu() end, desc = "Open Snipe buffer menu" }
|
||||
},
|
||||
opts = {}
|
||||
},
|
||||
|
||||
{
|
||||
"chentoast/marks.nvim",
|
||||
event = "VeryLazy",
|
||||
@@ -9,4 +40,28 @@ return {
|
||||
{ '<leader>mg', '<cmd>MarksListGlobal<CR>' },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"bassamsdata/namu.nvim",
|
||||
config = function()
|
||||
require("namu").setup({
|
||||
-- Enable the modules you want
|
||||
namu_symbols = {
|
||||
enable = true,
|
||||
options = {}, -- here you can configure namu
|
||||
},
|
||||
-- Optional: Enable other modules if needed
|
||||
ui_select = { enable = false }, -- vim.ui.select() wrapper
|
||||
})
|
||||
-- === Suggested Keymaps: ===
|
||||
vim.keymap.set("n", "<leader>;", ":Namu symbols<cr>", {
|
||||
desc = "Jump to LSP symbol",
|
||||
silent = true,
|
||||
})
|
||||
vim.keymap.set("n", "<leader>.", ":Namu workspace<cr>", {
|
||||
desc = "LSP Symbols - Workspace",
|
||||
silent = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,32 +20,4 @@ return {
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"max397574/better-escape.nvim",
|
||||
config = function(_, opts)
|
||||
require("better_escape").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {
|
||||
window = { width = 180 },
|
||||
plugins = {
|
||||
tmux = { enabled = true },
|
||||
},
|
||||
on_open = function()
|
||||
vim.opt.laststatus = 1
|
||||
require('incline').disable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
|
||||
end,
|
||||
on_close = function()
|
||||
vim.opt.laststatus = 3
|
||||
require('incline').enable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
|
||||
end
|
||||
},
|
||||
keys = { { "<leader>z", "<cmd>ZenMode<CR>" } },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ return {
|
||||
{
|
||||
'inkarkat/vim-ReplaceWithRegister',
|
||||
keys = {
|
||||
{ 'gp', '<Plug>ReplaceWithRegisterOperator' },
|
||||
{ 'gpp', '<Plug>ReplaceWithRegisterLine' },
|
||||
{ 'gp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
|
||||
{ '<leader>rp', '<Plug>ReplaceWithRegisterOperator' },
|
||||
{ '<leader>rpp', '<Plug>ReplaceWithRegisterLine' },
|
||||
{ '<leader>rp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -84,11 +84,4 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
version = '*',
|
||||
config = function()
|
||||
require('mini.ai').setup()
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ return {
|
||||
config = true,
|
||||
cmd = 'BlameToggle',
|
||||
keys = {
|
||||
{ '<leader>gb', '<cmd>BlameToggle<cr>', desc = '[G]it [B]lame toggle' },
|
||||
{ '<leader>bt', '<cmd>BlameToggle<cr>', desc = 'Git [B]lame [T]oggle' },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -64,8 +64,8 @@ return {
|
||||
{ buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||
vim.keymap.set('n', '<leader>ph', gs.preview_hunk,
|
||||
{ buffer = bufnr, desc = '[P]review [H]unk' })
|
||||
vim.keymap.set('n', '<leader>sh', gs.stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage [H]unk' })
|
||||
vim.keymap.set('n', '<leader>sA', gs.stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage Hunk' })
|
||||
vim.keymap.set('n', '<leader>HD', function() gs.diffthis('~') end,
|
||||
{ buffer = bufnr, desc = '[H]unk [D]iff' })
|
||||
end,
|
||||
|
||||
@@ -2,11 +2,11 @@ return {
|
||||
'backdround/global-note.nvim',
|
||||
keys = {
|
||||
{
|
||||
"<leader>n",
|
||||
"<leader>tn",
|
||||
function()
|
||||
require('global-note').toggle_note()
|
||||
end,
|
||||
desc = 'Toggle global [N]ote',
|
||||
desc = '[T]oggle global [N]ote',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"m4xshen/hardtime.nvim",
|
||||
dependencies = { "MunifTanjim/nui.nvim" },
|
||||
opts = {}
|
||||
},
|
||||
}
|
||||
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{
|
||||
'swaits/lazyjj.nvim',
|
||||
dependencies = 'nvim-lua/plenary.nvim',
|
||||
opts = {
|
||||
mapping = '<leader>gj'
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
@@ -19,17 +20,10 @@ return {
|
||||
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
map('<leader>rn', '<cmd>Lspsaga rename<CR>', '[R]e[n]ame')
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
map('K', '<cmd>Lspsaga hover_doc<CR>', 'Hover Documentation')
|
||||
map('<leader>K', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
|
||||
-- Highlight references under cursor (clear highlight when cursor moves).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
|
||||
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
@@ -0,0 +1,49 @@
|
||||
require 'lspconfig'.ols.setup {}
|
||||
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
-- notify_on_error = false,
|
||||
-- Odinfmt gets its configuration from odinfmt.json. It defaults
|
||||
-- writing to stdout but needs to be told to read from stdin.
|
||||
formatters = {
|
||||
odinfmt = {
|
||||
-- Change where to find the command if it isn't in your path.
|
||||
command = "odinfmt",
|
||||
args = { "-stdin" },
|
||||
stdin = true,
|
||||
},
|
||||
},
|
||||
-- and instruct conform to use odinfmt.
|
||||
formatters_by_ft = {
|
||||
odin = { "odinfmt" },
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_format = "fallback" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,4 @@ return {
|
||||
{ "/", exact = true },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sp", "<cmd>:Telescope persisted<cr>", desc = "Search [P]ersisted" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
local function rabbit_select(n)
|
||||
require('rabbit').Switch('harpoon').func.select(n)
|
||||
end
|
||||
|
||||
return {
|
||||
'VoxelPrismatic/rabbit.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
window = {
|
||||
float = 'center',
|
||||
plugin_name_position = 'title',
|
||||
},
|
||||
default_keys = {
|
||||
open = { '-', '<leader>;' },
|
||||
},
|
||||
plugin_opts = {
|
||||
history = { switch = ';' },
|
||||
harpoon = { switch = 'f' },
|
||||
},
|
||||
colors = {
|
||||
file = '#EBCB8B',
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>1', function() rabbit_select(1) end },
|
||||
{ '<leader>2', function() rabbit_select(2) end },
|
||||
{ '<leader>3', function() rabbit_select(3) end },
|
||||
{ '<leader>4', function() rabbit_select(4) end },
|
||||
{ '<leader>5', function() rabbit_select(5) end },
|
||||
{ '<leader>6', function() rabbit_select(6) end },
|
||||
{ '<leader>7', function() rabbit_select(7) end },
|
||||
{ '<leader>8', function() rabbit_select(8) end },
|
||||
{ '<leader>9', function() rabbit_select(9) end },
|
||||
{ '<leader>0', function() rabbit_select(10) end },
|
||||
},
|
||||
}
|
||||
171
nvim/.config/nvim/lua/plugins/snacks.lua
Normal file
171
nvim/.config/nvim/lua/plugins/snacks.lua
Normal file
@@ -0,0 +1,171 @@
|
||||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
dashboard = { enabled = false },
|
||||
explorer = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
input = { enabled = true },
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
picker = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
scroll = { enabled = false },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
styles = {
|
||||
notification = {
|
||||
-- wo = { wrap = true } -- Wrap notifications
|
||||
}
|
||||
},
|
||||
zen = {
|
||||
win = { width = 180, backdrop = { transparent = false } },
|
||||
on_open = function()
|
||||
vim.opt.laststatus = 1
|
||||
require('incline').disable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
|
||||
end,
|
||||
on_close = function()
|
||||
vim.opt.laststatus = 3
|
||||
require('incline').enable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
|
||||
end
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
-- Top Pickr & Explorer
|
||||
{ "<leader><space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
|
||||
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
|
||||
-- find
|
||||
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
|
||||
{ "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
||||
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||
{ "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
|
||||
-- git
|
||||
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
|
||||
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||
{ "<leader>gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" },
|
||||
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
|
||||
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
|
||||
{ "<leader>gg", function() Snacks.picker.git_grep() end, desc = "Git Grep" },
|
||||
-- Grep
|
||||
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
|
||||
{ "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
|
||||
{ "<leader>so", function() Snacks.picker.grep({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||
{ "<leader>sO", function() Snacks.picker.files({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||
{ "<leader>sX", function() Snacks.picker.grep({ cwd = "/usr/include/xcb" }) end, desc = "Grep" },
|
||||
-- search
|
||||
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
|
||||
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
|
||||
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
|
||||
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
|
||||
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
|
||||
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
|
||||
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
|
||||
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
|
||||
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
|
||||
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
|
||||
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
|
||||
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
|
||||
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
|
||||
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
|
||||
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
|
||||
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
|
||||
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||
-- LSP
|
||||
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
|
||||
{ "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
|
||||
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
|
||||
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
|
||||
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
|
||||
{ "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
||||
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
|
||||
-- Other
|
||||
{ "<leader>z", function() Snacks.zen() end, desc = "Toggle Zen Mode" },
|
||||
{ "<leader>Z", function() Snacks.zen.zoom() end, desc = "Toggle Zoom" },
|
||||
{ "<leader>'", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
|
||||
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
|
||||
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||
{ "<leader>bd", function() Snacks.bufdelete() end, desc = "Delete Buffer" },
|
||||
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File" },
|
||||
{ "<leader>gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } },
|
||||
{ "<leader>gG", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
|
||||
{ "<leader>bl", function() Snacks.git.blame_line() end, desc = "Git Blame Line" },
|
||||
{ "<c-/>", function() Snacks.terminal() end, desc = "Toggle Terminal" },
|
||||
{ "<c-_>", function() Snacks.terminal() end, desc = "which_key_ignore" },
|
||||
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
|
||||
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
|
||||
{
|
||||
"<leader>N",
|
||||
desc = "Neovim News",
|
||||
function()
|
||||
Snacks.win({
|
||||
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
wo = {
|
||||
spell = false,
|
||||
wrap = false,
|
||||
signcolumn = "yes",
|
||||
statuscolumn = " ",
|
||||
conceallevel = 3,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map(
|
||||
"<leader>uc")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
|
||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||
Snacks.toggle.indent():map("<leader>ug")
|
||||
Snacks.toggle.dim():map("<leader>uD")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
@@ -54,48 +54,17 @@ return {
|
||||
pcall(telescope.load_extension, 'ui-select')
|
||||
pcall(telescope.load_extension, 'whaler')
|
||||
pcall(telescope.load_extension, 'git_grep')
|
||||
pcall(telescope.load_extension, 'persisted')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>sT', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>sF', function() builtin.find_files { hidden = true } end,
|
||||
{ desc = '[S]earch [F]iles (with hidden)' })
|
||||
vim.keymap.set('n', '<leader>sl', function() telescope.extensions.whaler.whaler() end,
|
||||
vim.keymap.set('n', '<leader>sL', function() telescope.extensions.whaler.whaler() end,
|
||||
{ desc = '[S]earch with wha[L]er' })
|
||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = '[G]it [F]iles' })
|
||||
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = '[G]it [S]tatus' })
|
||||
vim.keymap.set('n', '<leader>gg', function() telescope.extensions.git_grep.live_grep() end,
|
||||
{ desc = '[G]it [g]rep' })
|
||||
vim.keymap.set('n', '<leader>gw', function() telescope.extensions.git_grep.grep() end,
|
||||
{ desc = '[G]it grep current [W]ord' })
|
||||
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s/', function()
|
||||
builtin.live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files',
|
||||
}
|
||||
end, { desc = '[S]earch [/] in Open Files' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ return {
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'haskell', 'lua', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
|
||||
ensure_installed = { 'c', 'commonlisp', 'cpp', 'go', 'haskell', 'lua', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
@@ -7,6 +7,6 @@ return {
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>b", "<cmd>YankBank<CR>", desc = "Yank[B]ank" },
|
||||
{ "<leader>yb", "<cmd>YankBank<CR>", desc = "Yank[B]ank" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ static const char col_cyan[] = "#7dcfff";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_blue, col_cyan },
|
||||
[SchemeSel] = { col_gray4, col_blue, col_cyan },
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
@@ -46,7 +46,7 @@ static const Layout layouts[] = {
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod1Mask
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
@@ -58,32 +58,32 @@ static const Layout layouts[] = {
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *lockcmd[] = { "slock", NULL };
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *lockcmd[] = { "slock", NULL };
|
||||
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
|
||||
static const char *toggletheme[] = { "lupan-set-theme", "toggle", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY|ControlMask, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||
{ MODKEY|ShiftMask, XK_F6, spawn, {.v = toggletheme } },
|
||||
{ MODKEY|ControlMask, XK_b, togglebar, {0} },
|
||||
{ MODKEY|ControlMask, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY|ControlMask, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY|ControlMask, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY|ControlMask, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY|ControlMask, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
@@ -101,7 +101,7 @@ static const Key keys[] = {
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
|
||||
197
polybar/.config/polybar/config.ini
Normal file
197
polybar/.config/polybar/config.ini
Normal file
@@ -0,0 +1,197 @@
|
||||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/polybar/polybar
|
||||
;
|
||||
; The README contains a lot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[common]
|
||||
priv = false
|
||||
|
||||
[colors]
|
||||
background = #282A2E
|
||||
background-alt = #373B41
|
||||
foreground = #C5C8C6
|
||||
primary = #F0C674
|
||||
secondary = #8ABEB7
|
||||
alert = #A54242
|
||||
disabled = #707880
|
||||
|
||||
[bar/bar]
|
||||
monitor = ${env:MONITOR:}
|
||||
width = 100%
|
||||
height = 24pt
|
||||
radius = 6
|
||||
|
||||
; dpi = 96
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 3pt
|
||||
|
||||
border-size = 4pt
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 1
|
||||
|
||||
module-margin = 1
|
||||
|
||||
separator = |
|
||||
separator-foreground = ${colors.disabled}
|
||||
|
||||
font-0 = Fira Code Nerd Font:size=18;4
|
||||
|
||||
modules-left = xworkspaces xwindow
|
||||
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
enable-ipc = true
|
||||
|
||||
; wm-restack = generic
|
||||
; wm-restack = bspwm
|
||||
; wm-restack = i3
|
||||
|
||||
; override-redirect = true
|
||||
|
||||
; This module is not active by default (to enable it, add it to one of the
|
||||
; modules-* list above).
|
||||
; Please note that only a single tray can exist at any time. If you launch
|
||||
; multiple bars with this module, only a single one will show it, the others
|
||||
; will produce a warning. Which bar gets the module is timing dependent and can
|
||||
; be quite random.
|
||||
; For more information, see the documentation page for this module:
|
||||
; https://polybar.readthedocs.io/en/stable/user/modules/tray.html
|
||||
[module/systray]
|
||||
type = internal/tray
|
||||
|
||||
format-margin = 8pt
|
||||
tray-spacing = 16pt
|
||||
|
||||
[module/xworkspaces]
|
||||
type = internal/xworkspaces
|
||||
|
||||
group-by-monitor = false
|
||||
|
||||
label-active = %name%
|
||||
label-active-background = ${colors.background-alt}
|
||||
label-active-underline= ${colors.primary}
|
||||
label-active-padding = 1
|
||||
|
||||
label-occupied = %name%
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-urgent = %name%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = %name%
|
||||
label-empty-foreground = ${colors.disabled}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:60:...%
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
|
||||
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.disabled}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume-prefix = "VOL "
|
||||
format-volume-prefix-foreground = ${colors.primary}
|
||||
format-volume = <label-volume>
|
||||
|
||||
label-volume = %percentage%%
|
||||
|
||||
label-muted = muted
|
||||
label-muted-foreground = ${colors.disabled}
|
||||
|
||||
click-middle = "polybar-msg action eth module_toggle; polybar-msg action wlan module_toggle"
|
||||
click-right = pavucontrol
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-foreground = ${colors.primary}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-foreground = ${colors.background}
|
||||
label-indicator-background = ${colors.secondary}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "RAM "
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
label = %percentage_used:2%%
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = "CPU "
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
|
||||
[network-base]
|
||||
type = internal/network
|
||||
interval = 5
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
|
||||
hidden = ${common.priv}
|
||||
|
||||
[module/wlan]
|
||||
inherit = network-base
|
||||
interface-type = wireless
|
||||
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
|
||||
|
||||
[module/eth]
|
||||
inherit = network-base
|
||||
interface-type = wired
|
||||
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = %H:%M
|
||||
date-alt = %Y-%m-%d %H:%M:%S
|
||||
|
||||
label = %date%
|
||||
label-foreground = ${colors.primary}
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
pseudo-transparency = true
|
||||
|
||||
; vim:ft=dosini
|
||||
@@ -1,9 +1,8 @@
|
||||
alias v=nvim
|
||||
alias v=vis
|
||||
alias ll='ls -l'
|
||||
alias ta='tmux attach -t'
|
||||
alias tl='tmux list-sessions'
|
||||
alias tn='tmux new -s'
|
||||
alias fv='fzf --preview="bat --color=always --theme=Nord {}" --bind="enter:become(nvim {})"'
|
||||
alias rgh='rg -.'
|
||||
alias fdh='fd -H'
|
||||
|
||||
if which exa > /dev/null; then
|
||||
alias ls='exa --icons'
|
||||
@@ -12,3 +11,23 @@ fi
|
||||
|
||||
alias nocaps='setxkbmap pl -option ctrl:nocaps'
|
||||
alias fixdp='xrandr --output DP-0 --right-of DP-2'
|
||||
|
||||
tn() {
|
||||
if [ $# -eq 0 ]; then
|
||||
tmux new
|
||||
else
|
||||
tmux new -s "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
ta() {
|
||||
if [ $# -eq 0 ]; then
|
||||
tmux attach
|
||||
else
|
||||
tmux attach -t "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
vf() {
|
||||
fzf --bind 'enter:become:vis {}' -q "$1"
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
export EDITOR=nvim
|
||||
export VISUAL=nvim
|
||||
export EDITOR=vis
|
||||
export VISUAL=vis
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
|
||||
@@ -28,7 +28,6 @@ else
|
||||
setopt autocd
|
||||
fi
|
||||
|
||||
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
|
||||
ZSH_HIGHLIGHT_STYLES[comment]=fg=blue
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=magenta,fg=black,bold
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=bg=red,fg=black,bold
|
||||
|
||||
@@ -12,7 +12,7 @@ bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
#bind-key -n M-0 select-window -t 10
|
||||
|
||||
bind-key -n M-! swap-window -t 1
|
||||
bind-key -n M-@ swap-window -t 2
|
||||
@@ -33,20 +33,20 @@ bind-key Left resize-pane -L 8
|
||||
bind-key Up resize-pane -U 4
|
||||
bind-key Down resize-pane -D 4
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -as terminal-features ",*:RGB"
|
||||
|
||||
set -g base-index 1
|
||||
setw -g base-index 1
|
||||
|
||||
set -g set-titles on
|
||||
set -g set-titles-string "#H [#S]"
|
||||
set -g set-titles-string "#H [#S] #W"
|
||||
|
||||
set -g status-justify centre
|
||||
set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S"
|
||||
set -g status-left " #[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #H #[bg=default]#[fg=#316781]#[fg=default] #S"
|
||||
set -g status-left-length 50
|
||||
set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] "
|
||||
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W#F #[fg=green]#[bg=black]'
|
||||
set -g status-right "#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] %H:%M #[bg=default]#[fg=#316781] "
|
||||
set-window-option -g window-status-current-format '#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #I:#W#F #[fg=#316781]#[bg=black]'
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
||||
|
||||
@@ -83,3 +83,9 @@ bind-key -T copy-mode-vi C-M-h swap-pane -s "{left-of}"
|
||||
bind-key -T copy-mode-vi C-M-j swap-pane -s "{down-of}"
|
||||
bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
|
||||
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
|
||||
|
||||
bind-key -n M-0 run-shell tmux-session-menu
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
|
||||
bind P paste-buffer
|
||||
|
||||
5
tmux/bin/tmux-session-menu
Executable file
5
tmux/bin/tmux-session-menu
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmux list-sessions -F '#S' \
|
||||
| awk 'BEGIN {ORS=" "; print "toggle t \"switch-client -l\""} {print $1, NR, "\"switch-client -t", $1 "\""}' \
|
||||
| xargs tmux display-menu -T "Switch session"
|
||||
281
vis/.config/vis/fzf.sh
Executable file
281
vis/.config/vis/fzf.sh
Executable file
@@ -0,0 +1,281 @@
|
||||
#!/bin/sh
|
||||
|
||||
prompt=${FZF_PROMPT%> }
|
||||
cmd=${prompt%+*}
|
||||
hidden=${prompt#$cmd}
|
||||
|
||||
ripgrep='rg --column --line-number --color=always --smart-case'
|
||||
|
||||
if [ "$1" = list ]; then
|
||||
case "$FZF_HEADER_LABEL" in
|
||||
:?*)
|
||||
dir=${FZF_HEADER_LABEL#?}
|
||||
;;
|
||||
*)
|
||||
dir=
|
||||
;;
|
||||
esac
|
||||
case "$prompt" in
|
||||
dir:*)
|
||||
dir=${FZF_HEADER_LABEL#?}
|
||||
zoxide query -l
|
||||
echo $dir
|
||||
exit
|
||||
;;
|
||||
files)
|
||||
exec fd --type f '' $dir
|
||||
;;
|
||||
files+hidden)
|
||||
exec fd --type f -H '' $dir
|
||||
;;
|
||||
search)
|
||||
exec $ripgrep "$FZF_QUERY" $dir
|
||||
;;
|
||||
search+hidden)
|
||||
exec $ripgrep -. "$FZF_QUERY" $dir
|
||||
;;
|
||||
git-files*)
|
||||
if [ -z "$dir" ]; then
|
||||
exec git ls-files
|
||||
else
|
||||
exec git -C $dir ls-files --format "$dir/%(path)"
|
||||
fi
|
||||
;;
|
||||
git-search*)
|
||||
if [ -z "$dir" ]; then
|
||||
exec git grep --column --line-number --color=always "$FZF_QUERY"
|
||||
else
|
||||
exec git -C $dir grep --column --line-number --color=always "$FZF_QUERY" | sed "s:^:$dir/:"
|
||||
fi
|
||||
;;
|
||||
jj-files*)
|
||||
if [ -z "$dir" ]; then
|
||||
exec jj file list --ignore-working-copy
|
||||
else
|
||||
jj=$(cd $dir && jj root --ignore-working-copy 2> /dev/null)
|
||||
exec jj -R $jj file list --ignore-working-copy $dir
|
||||
fi
|
||||
;;
|
||||
jj-search*)
|
||||
if [ -z "$dir" ]; then
|
||||
exec $ripgrep "$FZF_QUERY" $(jj file list --ignore-working-copy)
|
||||
else
|
||||
jj=$(cd $dir && jj root --ignore-working-copy 2> /dev/null)
|
||||
exec $ripgrep "$FZF_QUERY" $(jj -R $jj file list --ignore-working-copy $dir)
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = preview ]; then
|
||||
if [ -n "$3" ]; then
|
||||
start=$(( $3 - $FZF_PREVIEW_LINES / 2 ))
|
||||
if [ $start -lt 1 ]; then
|
||||
start=1
|
||||
fi
|
||||
end=$(( $start + $FZF_PREVIEW_LINES ))
|
||||
exec bat --style=numbers --color=always --highlight-line $3 --line-range $start:$end $2
|
||||
else
|
||||
exec bat --style=numbers --color=always $2
|
||||
fi
|
||||
fi
|
||||
|
||||
reload="reload(sh $0 list || true)"
|
||||
no_search="rebind(change)+disable-search"
|
||||
search="unbind(change)+enable-search"
|
||||
|
||||
if [ "$1" = key ]; then
|
||||
case "$FZF_KEY" in
|
||||
alt-a)
|
||||
prompt=${FZF_PROMPT#dir:}
|
||||
if [ $prompt = $FZF_PROMPT ]; then
|
||||
echo "change-prompt(dir:$FZF_PROMPT)+$search+$reload"
|
||||
else
|
||||
case "$cmd" in
|
||||
*files)
|
||||
infix="$search"
|
||||
;;
|
||||
*)
|
||||
infix="$no_search"
|
||||
;;
|
||||
esac
|
||||
echo "change-prompt($prompt)+$infix+$reload"
|
||||
fi
|
||||
;;
|
||||
alt-d)
|
||||
dir=${FZF_HEADER_LABEL#?}
|
||||
case "$FZF_HEADER_LABEL" in
|
||||
.?*)
|
||||
echo "change-header(path: $dir)+change-header-label(:$dir)+$reload"
|
||||
;;
|
||||
*)
|
||||
echo "change-header()+change-header-label(.$dir)+$reload"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alt-f)
|
||||
case "$cmd" in
|
||||
*files|search)
|
||||
prompt="files$hidden"
|
||||
;;
|
||||
*search)
|
||||
prompt="${cmd%-*}-files$hidden"
|
||||
;;
|
||||
esac
|
||||
echo "change-prompt($prompt> )+$search+$reload"
|
||||
;;
|
||||
alt-g)
|
||||
case "$cmd" in
|
||||
*files)
|
||||
prompt="git-files$hidden"
|
||||
echo "change-prompt($prompt> )+$search+$reload"
|
||||
;;
|
||||
*search)
|
||||
prompt="git-search$hidden"
|
||||
echo "change-prompt($prompt> )+$no_search+$reload"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alt-h)
|
||||
if [ -z "$hidden" ]; then
|
||||
prompt="$cmd+hidden"
|
||||
else
|
||||
prompt="$cmd"
|
||||
fi
|
||||
echo "change-prompt($prompt> )+$reload"
|
||||
;;
|
||||
alt-j)
|
||||
case "$cmd" in
|
||||
*files)
|
||||
prompt="jj-files$hidden"
|
||||
echo "change-prompt($prompt> )+$search+$reload"
|
||||
;;
|
||||
*search)
|
||||
prompt="jj-search$hidden"
|
||||
echo "change-prompt($prompt> )+$no_search+$reload"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
alt-s)
|
||||
case "$cmd" in
|
||||
*search|files)
|
||||
prompt="search$hidden"
|
||||
;;
|
||||
*files)
|
||||
prompt="${cmd%-*}-search$hidden"
|
||||
;;
|
||||
esac
|
||||
echo "change-prompt($prompt> )+$no_search+$reload"
|
||||
;;
|
||||
esac
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = chdir ]; then
|
||||
dir="$2"
|
||||
prompt=${FZF_PROMPT#dir:}
|
||||
case "$cmd" in
|
||||
*files)
|
||||
infix="$search"
|
||||
;;
|
||||
*)
|
||||
infix="$no_search"
|
||||
;;
|
||||
esac
|
||||
echo "change-header(path: $dir)+change-header-label(:$dir)+change-prompt($prompt)+$infix+$reload"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
label=".$2"
|
||||
else
|
||||
label=".."
|
||||
fi
|
||||
|
||||
case ${1%+hidden} in
|
||||
auto-files)
|
||||
git=$(git rev-parse --show-toplevel 2> /dev/null)
|
||||
jj=$(jj root --ignore-working-copy 2> /dev/null)
|
||||
if [ -n "$jj" ] && [ "${git#$jj}" = "$git" -o "$git" = "$jj" ]; then
|
||||
cmd="jj-files$hidden"
|
||||
elif [ -n "$git" ] && [ "${jj#$git}" = "$jj" ]; then
|
||||
cmd="git-files$hidden"
|
||||
else
|
||||
cmd="files"
|
||||
fi
|
||||
action="$search"
|
||||
prompt="$cmd> "
|
||||
;;
|
||||
auto-search)
|
||||
git=$(git rev-parse --show-toplevel 2> /dev/null)
|
||||
jj=$(jj root --ignore-working-copy 2> /dev/null)
|
||||
if [ -n "$jj" ] && [ "${git#$jj}" = "$git" -o "$git" = "$jj" ]; then
|
||||
cmd="jj-search$hidden"
|
||||
elif [ -n "$git" ] && [ "${jj#$git}" = "$jj" ]; then
|
||||
cmd="git-search$hidden"
|
||||
else
|
||||
cmd="search"
|
||||
fi
|
||||
action="$no_search"
|
||||
prompt="$cmd> "
|
||||
;;
|
||||
files|git-files|jj-files)
|
||||
cmd="$1"
|
||||
action="$search"
|
||||
prompt="$1> "
|
||||
;;
|
||||
search|git-search|jj-search)
|
||||
cmd="$1"
|
||||
action="$no_search"
|
||||
prompt="$1> "
|
||||
;;
|
||||
*)
|
||||
cmd="files"
|
||||
action="$search"
|
||||
prompt="files> "
|
||||
;;
|
||||
esac
|
||||
key="transform(sh $0 key)"
|
||||
|
||||
HELP='Keys:
|
||||
|
||||
alt-? help
|
||||
alt-a select alternative directory
|
||||
alt-d toggle alternative directory
|
||||
alt-f switch to files (twice for plain files)
|
||||
alt-g switch to git
|
||||
alt-j switch to jj
|
||||
alt-h toggle hidden
|
||||
alt-p toggle preview (also to turn off help)
|
||||
alt-s switch to search (twice for plain search)
|
||||
alt-u toggle preview window position (right or up)
|
||||
'
|
||||
|
||||
accept="
|
||||
if [ \${FZF_PROMPT#dir:} = \$FZF_PROMPT ]; then
|
||||
echo accept
|
||||
else
|
||||
sh $0 chdir {1}
|
||||
fi
|
||||
"
|
||||
|
||||
exec fzf --query "$3" \
|
||||
--prompt "$prompt" \
|
||||
--header-label "$label" \
|
||||
--ansi \
|
||||
--delimiter : \
|
||||
--ghost ' (Use alt-? for help)' \
|
||||
--bind "enter:transform($accept)" \
|
||||
--bind "change:$reload" \
|
||||
--bind "start:$reload+$action" \
|
||||
--bind "alt-a:$key" \
|
||||
--bind "alt-d:$key" \
|
||||
--bind "alt-f:$key" \
|
||||
--bind "alt-g:$key" \
|
||||
--bind "alt-j:$key" \
|
||||
--bind "alt-h:$key" \
|
||||
--bind "alt-s:$key" \
|
||||
--bind "alt-p:change-preview(sh $0 preview {1} {2})+toggle-preview" \
|
||||
--bind "alt-u:change-preview-window(up|right)" \
|
||||
--bind "alt-?:change-preview(echo '$HELP')+show-preview"
|
||||
2
vis/.config/vis/global-marks.txt
Normal file
2
vis/.config/vis/global-marks.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
/home/lupan/dotfiles/Makefile:23:22: (PREFIX): make -C dwm install PREFIX="${HOME}/.local"
|
||||
/home/lupan/dotfiles/Makefile:41:15: (clock): install-lupan-clock:
|
||||
71
vis/.config/vis/lexers/templ.lua
Normal file
71
vis/.config/vis/lexers/templ.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
-- Copyright 2006-2025 Mitchell. See LICENSE.
|
||||
-- Go LPeg lexer.
|
||||
|
||||
local lexer = lexer
|
||||
local P, S = lpeg.P, lpeg.S
|
||||
|
||||
local lex = lexer.new(...)
|
||||
|
||||
-- Keywords.
|
||||
lex:add_rule('keyword', lex:tag(lexer.KEYWORD, lex:word_match(lexer.KEYWORD)))
|
||||
|
||||
-- Constants.
|
||||
lex:add_rule('constant', lex:tag(lexer.CONSTANT_BUILTIN, lex:word_match(lexer.CONSTANT_BUILTIN)))
|
||||
|
||||
-- Types.
|
||||
lex:add_rule('type', lex:tag(lexer.TYPE, lex:word_match(lexer.TYPE)))
|
||||
|
||||
-- Functions.
|
||||
local builtin_func = -lpeg.B('.') *
|
||||
lex:tag(lexer.FUNCTION_BUILTIN, lex:word_match(lexer.FUNCTION_BUILTIN))
|
||||
local func = lex:tag(lexer.FUNCTION, lexer.word)
|
||||
local method = lpeg.B('.') * lex:tag(lexer.FUNCTION_METHOD, lexer.word)
|
||||
lex:add_rule('function', (builtin_func + method + func) * #(lexer.space^0 * '('))
|
||||
|
||||
-- Identifiers.
|
||||
lex:add_rule('identifier', lex:tag(lexer.IDENTIFIER, lexer.word))
|
||||
|
||||
-- Strings.
|
||||
local sq_str = lexer.range("'", true)
|
||||
local dq_str = lexer.range('"', true)
|
||||
local raw_str = lexer.range('`', false, false)
|
||||
lex:add_rule('string', lex:tag(lexer.STRING, sq_str + dq_str + raw_str))
|
||||
|
||||
-- Comments.
|
||||
local line_comment = lexer.to_eol('//')
|
||||
local block_comment = lexer.range('/*', '*/')
|
||||
lex:add_rule('comment', lex:tag(lexer.COMMENT, line_comment + block_comment))
|
||||
|
||||
-- Numbers.
|
||||
lex:add_rule('number', lex:tag(lexer.NUMBER, lexer.number * P('i')^-1))
|
||||
|
||||
-- Operators.
|
||||
lex:add_rule('operator', lex:tag(lexer.OPERATOR, S('+-*/%&|^<>=!~:;.,()[]{}@')))
|
||||
|
||||
-- Fold points.
|
||||
lex:add_fold_point(lexer.OPERATOR, '{', '}')
|
||||
lex:add_fold_point(lexer.COMMENT, '/*', '*/')
|
||||
|
||||
-- Word lists.
|
||||
lex:set_word_list(lexer.KEYWORD, {
|
||||
'break', 'case', 'chan', 'const', 'continue', 'default', 'defer', 'else', 'fallthrough', 'for',
|
||||
'func', 'go', 'goto', 'if', 'import', 'interface', 'map', 'package', 'range', 'return', 'select',
|
||||
'struct', 'switch', 'type', 'var', 'templ'
|
||||
})
|
||||
|
||||
lex:set_word_list(lexer.CONSTANT_BUILTIN, 'true false iota nil')
|
||||
|
||||
lex:set_word_list(lexer.TYPE, {
|
||||
'any', 'bool', 'byte', 'comparable', 'complex64', 'complex128', 'error', 'float32', 'float64',
|
||||
'int', 'int8', 'int16', 'int32', 'int64', 'rune', 'string', 'uint', 'uint8', 'uint16', 'uint32',
|
||||
'uint64', 'uintptr'
|
||||
})
|
||||
|
||||
lex:set_word_list(lexer.FUNCTION_BUILTIN, {
|
||||
'append', 'cap', 'close', 'complex', 'copy', 'delete', 'imag', 'len', 'make', 'new', 'panic',
|
||||
'print', 'println', 'real', 'recover'
|
||||
})
|
||||
|
||||
lexer.property['scintillua.comment'] = '//'
|
||||
|
||||
return lex
|
||||
158
vis/.config/vis/themes/lupan-dark.lua
Normal file
158
vis/.config/vis/themes/lupan-dark.lua
Normal file
@@ -0,0 +1,158 @@
|
||||
-- Eight-color scheme
|
||||
local lexers = vis.lexers
|
||||
lexers.STYLE_DEFAULT ='back:#1f212e,fore:#9da0af'
|
||||
lexers.STYLE_NOTHING = ''
|
||||
lexers.STYLE_ATTRIBUTE = 'fore:#a1a3aa,bold'
|
||||
lexers.STYLE_CLASS = 'fore:yellow,bold'
|
||||
lexers.STYLE_COMMENT = 'fore:#334d40,bold'
|
||||
lexers.STYLE_CONSTANT = 'fore:cyan,bold'
|
||||
lexers.STYLE_DEFINITION = 'fore:blue,bold'
|
||||
lexers.STYLE_ERROR = 'fore:red,italics'
|
||||
lexers.STYLE_FUNCTION = 'fore:#6b8ac7,bold'
|
||||
lexers.STYLE_HEADING = 'fore:#d1d147'
|
||||
lexers.STYLE_KEYWORD = 'fore:#bf8040,bold'
|
||||
lexers.STYLE_LABEL = 'fore:green,bold'
|
||||
lexers.STYLE_NUMBER = 'fore:#acac53,bold'
|
||||
lexers.STYLE_OPERATOR = 'fore:#93806c,bold'
|
||||
lexers.STYLE_REGEX = 'fore:#59862d,bold'
|
||||
lexers.STYLE_STRING = 'fore:#3d8f66,bold'
|
||||
lexers.STYLE_PREPROCESSOR = 'fore:#cc66cc,bold'
|
||||
lexers.STYLE_TAG = 'fore:#705943,bold'
|
||||
lexers.STYLE_TYPE = 'fore:#7461d1,bold'
|
||||
lexers.STYLE_VARIABLE = 'fore:#8c5eba,bold'
|
||||
lexers.STYLE_WHITESPACE = ''
|
||||
lexers.STYLE_EMBEDDED = 'back:#2d3353,bold'
|
||||
lexers.STYLE_IDENTIFIER = ''
|
||||
|
||||
lexers.STYLE_LINENUMBER = ''
|
||||
lexers.STYLE_LINENUMBER_CURSOR = 'fore:#bf8040'
|
||||
lexers.STYLE_CURSOR = 'back:#bf8040,fore:#1f212e'
|
||||
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:#e6fefe'
|
||||
lexers.STYLE_CURSOR_LINE = 'underlined'
|
||||
lexers.STYLE_COLOR_COLUMN = 'back:red'
|
||||
lexers.STYLE_SELECTION = 'back:#4d5580,bold'
|
||||
lexers.STYLE_STATUS = 'back:#1c3b4a,fore:#73848c'
|
||||
lexers.STYLE_STATUS_FOCUSED = 'back:#1c3b4a,fore:#abb5ba,bold'
|
||||
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
|
||||
lexers.STYLE_INFO = 'bold'
|
||||
lexers.STYLE_EOF = ''
|
||||
|
||||
-- lexer specific styles
|
||||
|
||||
-- Diff
|
||||
lexers.STYLE_ADDITION = 'fore:#3a783a'
|
||||
lexers.STYLE_DELETION = 'fore:#862d2d'
|
||||
lexers.STYLE_CHANGE = 'fore:#2d3353'
|
||||
|
||||
-- CSS
|
||||
lexers.STYLE_PROPERTY = lexers.STYLE_ATTRIBUTE
|
||||
lexers.STYLE_PSEUDOCLASS = ''
|
||||
lexers.STYLE_PSEUDOELEMENT = ''
|
||||
|
||||
-- HTML
|
||||
lexers.STYLE_TAG_UNKNOWN = lexers.STYLE_TAG .. ',italics'
|
||||
lexers.STYLE_TAG_SINGLE = lexers.STYLE_TAG
|
||||
lexers.STYLE_TAG_DOCTYPE = lexers.STYLE_TAG .. ',bold'
|
||||
lexers.STYLE_ATTRIBUTE_UNKNOWN = lexers.STYLE_ATTRIBUTE .. ',italics'
|
||||
|
||||
-- Latex, TeX, and Texinfo
|
||||
lexers.STYLE_COMMAND = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_COMMAND_SECTION = lexers.STYLE_CLASS
|
||||
lexers.STYLE_ENVIRONMENT = lexers.STYLE_TYPE
|
||||
lexers.STYLE_ENVIRONMENT_MATH = lexers.STYLE_NUMBER
|
||||
|
||||
-- Makefile
|
||||
lexers.STYLE_TARGET = ''
|
||||
|
||||
-- Markdown
|
||||
lexers.STYLE_HR = ''
|
||||
for i = 1,6 do lexers['STYLE_HEADING_H'..i] = lexers.STYLE_HEADING end
|
||||
lexers.STYLE_BOLD = 'bold'
|
||||
lexers.STYLE_ITALIC = 'italics'
|
||||
lexers.STYLE_LIST = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_LINK = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_REFERENCE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_CODE = lexers.STYLE_EMBEDDED
|
||||
|
||||
-- Output
|
||||
lexers.STYE_FILENAME = ''
|
||||
lexers.STYLE_LINE = ''
|
||||
lexers.STYLE_COLUMN = ''
|
||||
lexers.STYLE_MESSAGE = ''
|
||||
|
||||
-- Python
|
||||
lexers.STYLE_KEYWORD_SOFT = ''
|
||||
|
||||
-- Taskpaper
|
||||
lexers.STYLE_NOTE = ''
|
||||
lexers.STYLE_TAG_EXTENDED = ''
|
||||
lexers.STYLE_TAG_DAY = 'fore:yellow'
|
||||
lexers.STYLE_TAG_OVERDUE = 'fore:red'
|
||||
lexers.STYLE_TAG_PLAIN = ''
|
||||
|
||||
-- XML
|
||||
lexers.STYLE_CDATA = ''
|
||||
|
||||
-- YAML
|
||||
lexers.STYLE_ERROR_INDENT = 'back:red'
|
||||
|
||||
-- The following are temporary styles until their legacy lexers are migrated.
|
||||
|
||||
-- Antlr
|
||||
lexers.STYLE_ACTION = ''
|
||||
|
||||
-- Clojure
|
||||
lexers.STYLE_CLOJURE_KEYWORD = lexers.STYLE_TYPE
|
||||
lexers.STYLE_CLOJURE_SYMBOL = lexers.STYLE_TYPE .. ',bold'
|
||||
|
||||
-- Crystal
|
||||
--lexers.STYLE_SYMBOL = lexers.STYLE_STRING
|
||||
|
||||
-- Gleam
|
||||
lexers.STYLE_MODULE = lexers.STYLE_CONSTANT
|
||||
lexers.STYLE_DISCARD = lexers.STYLE_COMMENT
|
||||
|
||||
-- Icon
|
||||
lexers.STYLE_SPECIAL_KEYWORD = lexers.STYLE_TYPE
|
||||
|
||||
-- jq
|
||||
lexers.STYLE_FORMAT = lexers.STYLE_CONSTANT
|
||||
lexers.STYLE_SYSVAR = lexers.STYLE_CONSTANT .. ',bold'
|
||||
|
||||
-- Julia
|
||||
-- lexers.STYLE_SYMBOL = lexers.STYLE_STRING
|
||||
lexers.STYLE_CHARACTER = lexers.STYLE_CONSTANT
|
||||
|
||||
-- Mediawiki
|
||||
lexers.STYLE_BEHAVIOR_SWITCH = lexers.STYLE_KEYWORD
|
||||
|
||||
-- Moonscript
|
||||
lexers.STYLE_TBL_KEY = lexers.STYLE_REGEX
|
||||
lexers.STYLE_SELF_REF = lexers.STYLE_LABEL
|
||||
lexers.STYLE_PROPER_IDENT = lexers.STYLE_CLASS
|
||||
lexers.STYLE_FNDEF = lexers.STYLE_PREPROCESSOR
|
||||
-- lexers.STYLE_SYMBOL = lexers.STYLE_EMBEDDED
|
||||
|
||||
-- reST
|
||||
lexers.STYLE_LITERAL_BLOCK = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_FOOTNOTE_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_CITATION_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_LINK_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_CODE_BLOCK = lexers.STYLE_CODE
|
||||
lexers.STYLE_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_SPHINX_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_UNKNOWN_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_SUBSTITUTION = lexers.STYLE_VARIABLE
|
||||
lexers.STYLE_INLINE_LITERAL = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_ROLE = lexers.STYLE_CLASS
|
||||
lexers.STYLE_INTERPRETED = lexers.STYLE_STRING
|
||||
|
||||
-- txt2tags
|
||||
lexers.STYLE_LINE = 'bold'
|
||||
for i = 1,5 do lexers['STYLE_H'..i] = lexers.STYLE_HEADING end
|
||||
lexers.STYLE_IMAGE = 'fore:green'
|
||||
lexers.STYLE_STRIKE = 'italics'
|
||||
lexers.STYLE_TAGGED = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_TAGGED_AREA = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_TABLE_SEP = 'fore:green'
|
||||
lexers.STYLE_HEADER_CELL_CONTENT = 'fore:green'
|
||||
158
vis/.config/vis/themes/lupan-light.lua
Normal file
158
vis/.config/vis/themes/lupan-light.lua
Normal file
@@ -0,0 +1,158 @@
|
||||
-- Eight-color scheme
|
||||
local lexers = vis.lexers
|
||||
lexers.STYLE_DEFAULT ='back:#dae4f1,fore:#1f212e'
|
||||
lexers.STYLE_NOTHING = ''
|
||||
lexers.STYLE_ATTRIBUTE = 'fore:#a1a3aa,bold'
|
||||
lexers.STYLE_CLASS = 'fore:yellow,bold'
|
||||
lexers.STYLE_COMMENT = 'fore:#334d40,bold'
|
||||
lexers.STYLE_CONSTANT = 'fore:cyan,bold'
|
||||
lexers.STYLE_DEFINITION = 'fore:blue,bold'
|
||||
lexers.STYLE_ERROR = 'fore:red,italics'
|
||||
lexers.STYLE_FUNCTION = 'fore:#6b8ac7,bold'
|
||||
lexers.STYLE_HEADING = 'fore:#d1d147'
|
||||
lexers.STYLE_KEYWORD = 'fore:#bf8040,bold'
|
||||
lexers.STYLE_LABEL = 'fore:green,bold'
|
||||
lexers.STYLE_NUMBER = 'fore:#acac53,bold'
|
||||
lexers.STYLE_OPERATOR = 'fore:#93806c,bold'
|
||||
lexers.STYLE_REGEX = 'fore:#59862d,bold'
|
||||
lexers.STYLE_STRING = 'fore:#3d8f66,bold'
|
||||
lexers.STYLE_PREPROCESSOR = 'fore:#cc66cc,bold'
|
||||
lexers.STYLE_TAG = 'fore:#705943,bold'
|
||||
lexers.STYLE_TYPE = 'fore:#7461d1,bold'
|
||||
lexers.STYLE_VARIABLE = 'fore:#8c5eba,bold'
|
||||
lexers.STYLE_WHITESPACE = ''
|
||||
lexers.STYLE_EMBEDDED = 'back:#2d3353,bold'
|
||||
lexers.STYLE_IDENTIFIER = ''
|
||||
|
||||
lexers.STYLE_LINENUMBER = ''
|
||||
lexers.STYLE_LINENUMBER_CURSOR = 'fore:#bf8040'
|
||||
lexers.STYLE_CURSOR = 'back:#bf8040,fore:#1f212e'
|
||||
lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:#e6fefe'
|
||||
lexers.STYLE_CURSOR_LINE = 'underlined'
|
||||
lexers.STYLE_COLOR_COLUMN = 'back:red'
|
||||
lexers.STYLE_SELECTION = 'back:#a6c7f2,bold'
|
||||
lexers.STYLE_STATUS = 'reverse'
|
||||
lexers.STYLE_STATUS_FOCUSED = 'reverse,bold'
|
||||
lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
|
||||
lexers.STYLE_INFO = 'bold'
|
||||
lexers.STYLE_EOF = ''
|
||||
|
||||
-- lexer specific styles
|
||||
|
||||
-- Diff
|
||||
lexers.STYLE_ADDITION = 'fore:#3a783a'
|
||||
lexers.STYLE_DELETION = 'fore:#862d2d'
|
||||
lexers.STYLE_CHANGE = 'fore:#2d3353'
|
||||
|
||||
-- CSS
|
||||
lexers.STYLE_PROPERTY = lexers.STYLE_ATTRIBUTE
|
||||
lexers.STYLE_PSEUDOCLASS = ''
|
||||
lexers.STYLE_PSEUDOELEMENT = ''
|
||||
|
||||
-- HTML
|
||||
lexers.STYLE_TAG_UNKNOWN = lexers.STYLE_TAG .. ',italics'
|
||||
lexers.STYLE_TAG_SINGLE = lexers.STYLE_TAG
|
||||
lexers.STYLE_TAG_DOCTYPE = lexers.STYLE_TAG .. ',bold'
|
||||
lexers.STYLE_ATTRIBUTE_UNKNOWN = lexers.STYLE_ATTRIBUTE .. ',italics'
|
||||
|
||||
-- Latex, TeX, and Texinfo
|
||||
lexers.STYLE_COMMAND = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_COMMAND_SECTION = lexers.STYLE_CLASS
|
||||
lexers.STYLE_ENVIRONMENT = lexers.STYLE_TYPE
|
||||
lexers.STYLE_ENVIRONMENT_MATH = lexers.STYLE_NUMBER
|
||||
|
||||
-- Makefile
|
||||
lexers.STYLE_TARGET = ''
|
||||
|
||||
-- Markdown
|
||||
lexers.STYLE_HR = ''
|
||||
for i = 1,6 do lexers['STYLE_HEADING_H'..i] = lexers.STYLE_HEADING end
|
||||
lexers.STYLE_BOLD = 'bold'
|
||||
lexers.STYLE_ITALIC = 'italics'
|
||||
lexers.STYLE_LIST = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_LINK = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_REFERENCE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_CODE = lexers.STYLE_EMBEDDED
|
||||
|
||||
-- Output
|
||||
lexers.STYE_FILENAME = ''
|
||||
lexers.STYLE_LINE = ''
|
||||
lexers.STYLE_COLUMN = ''
|
||||
lexers.STYLE_MESSAGE = ''
|
||||
|
||||
-- Python
|
||||
lexers.STYLE_KEYWORD_SOFT = ''
|
||||
|
||||
-- Taskpaper
|
||||
lexers.STYLE_NOTE = ''
|
||||
lexers.STYLE_TAG_EXTENDED = ''
|
||||
lexers.STYLE_TAG_DAY = 'fore:yellow'
|
||||
lexers.STYLE_TAG_OVERDUE = 'fore:red'
|
||||
lexers.STYLE_TAG_PLAIN = ''
|
||||
|
||||
-- XML
|
||||
lexers.STYLE_CDATA = ''
|
||||
|
||||
-- YAML
|
||||
lexers.STYLE_ERROR_INDENT = 'back:red'
|
||||
|
||||
-- The following are temporary styles until their legacy lexers are migrated.
|
||||
|
||||
-- Antlr
|
||||
lexers.STYLE_ACTION = ''
|
||||
|
||||
-- Clojure
|
||||
lexers.STYLE_CLOJURE_KEYWORD = lexers.STYLE_TYPE
|
||||
lexers.STYLE_CLOJURE_SYMBOL = lexers.STYLE_TYPE .. ',bold'
|
||||
|
||||
-- Crystal
|
||||
--lexers.STYLE_SYMBOL = lexers.STYLE_STRING
|
||||
|
||||
-- Gleam
|
||||
lexers.STYLE_MODULE = lexers.STYLE_CONSTANT
|
||||
lexers.STYLE_DISCARD = lexers.STYLE_COMMENT
|
||||
|
||||
-- Icon
|
||||
lexers.STYLE_SPECIAL_KEYWORD = lexers.STYLE_TYPE
|
||||
|
||||
-- jq
|
||||
lexers.STYLE_FORMAT = lexers.STYLE_CONSTANT
|
||||
lexers.STYLE_SYSVAR = lexers.STYLE_CONSTANT .. ',bold'
|
||||
|
||||
-- Julia
|
||||
-- lexers.STYLE_SYMBOL = lexers.STYLE_STRING
|
||||
lexers.STYLE_CHARACTER = lexers.STYLE_CONSTANT
|
||||
|
||||
-- Mediawiki
|
||||
lexers.STYLE_BEHAVIOR_SWITCH = lexers.STYLE_KEYWORD
|
||||
|
||||
-- Moonscript
|
||||
lexers.STYLE_TBL_KEY = lexers.STYLE_REGEX
|
||||
lexers.STYLE_SELF_REF = lexers.STYLE_LABEL
|
||||
lexers.STYLE_PROPER_IDENT = lexers.STYLE_CLASS
|
||||
lexers.STYLE_FNDEF = lexers.STYLE_PREPROCESSOR
|
||||
-- lexers.STYLE_SYMBOL = lexers.STYLE_EMBEDDED
|
||||
|
||||
-- reST
|
||||
lexers.STYLE_LITERAL_BLOCK = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_FOOTNOTE_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_CITATION_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_LINK_BLOCK = lexers.STYLE_LABEL
|
||||
lexers.STYLE_CODE_BLOCK = lexers.STYLE_CODE
|
||||
lexers.STYLE_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_SPHINX_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_UNKNOWN_DIRECTIVE = lexers.STYLE_KEYWORD
|
||||
lexers.STYLE_SUBSTITUTION = lexers.STYLE_VARIABLE
|
||||
lexers.STYLE_INLINE_LITERAL = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_ROLE = lexers.STYLE_CLASS
|
||||
lexers.STYLE_INTERPRETED = lexers.STYLE_STRING
|
||||
|
||||
-- txt2tags
|
||||
lexers.STYLE_LINE = 'bold'
|
||||
for i = 1,5 do lexers['STYLE_H'..i] = lexers.STYLE_HEADING end
|
||||
lexers.STYLE_IMAGE = 'fore:green'
|
||||
lexers.STYLE_STRIKE = 'italics'
|
||||
lexers.STYLE_TAGGED = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_TAGGED_AREA = lexers.STYLE_EMBEDDED
|
||||
lexers.STYLE_TABLE_SEP = 'fore:green'
|
||||
lexers.STYLE_HEADER_CELL_CONTENT = 'fore:green'
|
||||
297
vis/.config/vis/visrc.lua
Normal file
297
vis/.config/vis/visrc.lua
Normal file
@@ -0,0 +1,297 @@
|
||||
require('vis')
|
||||
|
||||
local plug = (function()
|
||||
if not pcall(require, 'plugins/vis-plug') then
|
||||
os.execute('git clone --quiet https://github.com/erf/vis-plug ' ..
|
||||
(os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config')
|
||||
.. '/vis/plugins/vis-plug')
|
||||
end
|
||||
return require('plugins/vis-plug')
|
||||
end)()
|
||||
|
||||
plug = require('plugins/vis-plug')
|
||||
|
||||
local plugins = {
|
||||
{ 'https://gitlab.com/muhq/vis-lspc', alias = 'lspc' },
|
||||
{ 'lutobler/vis-commentary' },
|
||||
{ 'https://repo.or.cz/vis-surround.git' },
|
||||
{ 'peaceant/vis-fzf-mru', file = 'fzf-mru', alias = 'fzfmru' },
|
||||
{ 'https://gitlab.com/muhq/vis-build' },
|
||||
{ 'erf/vis-cursors' },
|
||||
}
|
||||
|
||||
plug.init(plugins, true)
|
||||
|
||||
vis.ftdetect.filetypes.templ = {
|
||||
ext = { "%.templ$" },
|
||||
}
|
||||
|
||||
plug.plugins.lspc.message_level = 2
|
||||
|
||||
plug.plugins.lspc.ls_map.templ = {
|
||||
name = 'templ-lsp',
|
||||
cmd = 'templ lsp',
|
||||
}
|
||||
|
||||
plug.plugins.fzfmru.fzfmru_history = 60
|
||||
|
||||
local function open_file(file, cmd)
|
||||
vis:command((cmd or 'o') .. ' ' .. file)
|
||||
end
|
||||
|
||||
local function nil_or_tonumber(s)
|
||||
return s and tonumber(s)
|
||||
end
|
||||
|
||||
local function open_file_pos(line, open_cmd)
|
||||
local iter = string.gmatch(line, '[^:]+')
|
||||
local file = iter()
|
||||
local line_num = nil_or_tonumber(iter())
|
||||
local col = nil_or_tonumber(iter()) or 1
|
||||
if open_cmd ~= 'e' or vis.win.file ~= file then
|
||||
open_file(file, open_cmd)
|
||||
end
|
||||
if line_num ~= nil then
|
||||
vis.win.selection:to(line_num, col)
|
||||
end
|
||||
end
|
||||
|
||||
local function open_file_current_line(open_cmd)
|
||||
local line = vis.win.file.lines[vis.win.selection.line]
|
||||
vis:info(line)
|
||||
open_file_pos(line)
|
||||
end
|
||||
|
||||
local function escape_and_quoted(s)
|
||||
return "'" .. s:gsub("'", "\\'") .. "'"
|
||||
end
|
||||
|
||||
local function cmd_action(cmd, action)
|
||||
local code, out, err = vis:pipe(cmd, true)
|
||||
if code == 0 then
|
||||
action(out)
|
||||
elseif err ~= nil then
|
||||
vis:info(err)
|
||||
elseif code ~= 0 then
|
||||
vis:info('Program exit code ' .. code)
|
||||
end
|
||||
end
|
||||
|
||||
local function fzf_sh(arg)
|
||||
action = function(out)
|
||||
open_file_pos(out, vis.win.file.modified and 'o' or 'e')
|
||||
end
|
||||
local home = os.getenv('HOME')
|
||||
local path = vis.win.file.path or ''
|
||||
local dir = path:match('^.*/') or ''
|
||||
local reg = ''
|
||||
if reg ~= '"' then
|
||||
reg = string.gsub(vis.registers[vis.register][1], '%z', '')
|
||||
end
|
||||
local cmd = home .. '/.config/vis/fzf.sh ' .. escape_and_quoted(arg) .. ' ' .. escape_and_quoted(dir) .. ' ' .. escape_and_quoted(reg)
|
||||
cmd_action(cmd, action)
|
||||
end
|
||||
|
||||
local function search(cmd, action)
|
||||
if action == nil then
|
||||
action = function(out)
|
||||
open_file_pos(out, 'e')
|
||||
end
|
||||
end
|
||||
if cmd:match('^fzf ') and vis.register ~= '"' then
|
||||
local reg = string.gsub(vis.registers[vis.register][1], '%z', '')
|
||||
if reg ~= '' then
|
||||
cmd = cmd .. ' --query=' .. escape_and_quoted(reg)
|
||||
end
|
||||
end
|
||||
cmd_action(cmd, action)
|
||||
end
|
||||
|
||||
local file_slots = {}
|
||||
|
||||
local function set_file_slot(num)
|
||||
local file = vis.win.file.path
|
||||
if file ~= nil then
|
||||
file_slots[num] = file
|
||||
vis:info('File slot [' .. num .. '] updated')
|
||||
else
|
||||
vis:info('Window has no file')
|
||||
end
|
||||
end
|
||||
|
||||
local function open_file_slot(num, open_cmd)
|
||||
local file = file_slots[num]
|
||||
if file == nil then
|
||||
vis:info('File slot [' .. num .. '] empty')
|
||||
elseif file == vis.win.file.path then
|
||||
vis:info('File slot [' .. num .. '] is the same file, no file change')
|
||||
else
|
||||
vis:info('File slot [' .. num .. '] open')
|
||||
open_file(file, open_cmd)
|
||||
end
|
||||
end
|
||||
|
||||
local function fzf_reload(cmd)
|
||||
local prompt = escape_and_quoted('1. ' .. cmd:match('^%w*') .. '> ')
|
||||
if not cmd:match('{q}') then
|
||||
cmd = cmd .. ' {q}'
|
||||
end
|
||||
return 'fzf --ansi --bind "start:reload:' .. cmd .. '" --bind "change:reload:' .. cmd .. ' || true"' ..
|
||||
' --prompt ' .. prompt ..
|
||||
' --bind "alt-enter:unbind(change,alt-enter)+change-prompt(2. fzf> )+enable-search+clear-query"'
|
||||
end
|
||||
|
||||
local function add_global_mark()
|
||||
local file = vis.win.file.path
|
||||
if file ~= nil then
|
||||
local code, out, err = vis:pipe('vis-menu -p "global mark comment:"', true)
|
||||
if code == 0 then
|
||||
local prefix = file .. ':' .. vis.win.selection.line .. ':' .. vis.win.selection.col .. ': '
|
||||
local line = vis.win.file.lines[vis.win.selection.line]
|
||||
out = out:gsub('\n$', '')
|
||||
if out ~= '' then
|
||||
prefix = prefix .. '(' .. out .. '): '
|
||||
end
|
||||
out = io.open(os.getenv('HOME') .. '/.config/vis/global-marks.txt', 'a')
|
||||
out:write(prefix .. line .. '\n')
|
||||
out:close()
|
||||
elseif err ~= nil then
|
||||
vis:info(err)
|
||||
elseif code ~= 0 then
|
||||
vis:info('Program exit code ' .. code)
|
||||
end
|
||||
else
|
||||
vis:info('Save file first')
|
||||
end
|
||||
end
|
||||
|
||||
function set_current_theme()
|
||||
local f = io.open(os.getenv('HOME') .. '/.config/xsettingsd/xsettingsd.conf')
|
||||
if f then
|
||||
local s = f:read('*all')
|
||||
f:close()
|
||||
if s:match('light') then
|
||||
vis:command('set theme lupan-light')
|
||||
else
|
||||
vis:command('set theme lupan-dark')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local ripgrep = 'rg --column --line-number --color=always --smart-case'
|
||||
|
||||
vis.events.subscribe(vis.events.INIT, function()
|
||||
vis:command('set autoindent')
|
||||
|
||||
vis:command_register('search', function(argv, force, win, selection, range)
|
||||
search(argv[1])
|
||||
end)
|
||||
|
||||
vis:map(vis.modes.NORMAL, '<M-k>', '<vis-window-prev>')
|
||||
vis:map(vis.modes.NORMAL, '<M-j>', '<vis-window-next>')
|
||||
vis:map(vis.modes.NORMAL, ' K', '<vis-window-prev>:q<Enter>', 'close previous window')
|
||||
vis:map(vis.modes.NORMAL, ' J', '<vis-window-next>:q<Enter><vis-window-prev>', 'close next window')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' l[', ':lspc-prev-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' l]', ':lspc-next-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' l=', ':lspc-format<Enter>')
|
||||
|
||||
for num = 1, 9 do
|
||||
vis:map(vis.modes.NORMAL, ' r' .. num, function() set_file_slot(num) end, 'set file slot ' .. num)
|
||||
vis:map(vis.modes.NORMAL, ' ' .. num, function() open_file_slot(num, 'e') end, 'open file slot ' .. num)
|
||||
vis:map(vis.modes.NORMAL, ' h' .. num, function() open_file_slot(num, 'o') end, 'open file slot ' .. num)
|
||||
vis:map(vis.modes.NORMAL, ' v' .. num, function() open_file_slot(num, 'vsplit') end,
|
||||
'open file slot ' .. num)
|
||||
end
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' s', function()
|
||||
fzf_sh('auto-search')
|
||||
end, 'fzf: search')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' f', function()
|
||||
fzf_sh('auto-files')
|
||||
end, 'fzf: files')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' /', function()
|
||||
search(fzf_reload(ripgrep .. ' --with-filename {q} ' .. escape_and_quoted(vis.win.file.path)))
|
||||
end, 'fzf: rg current file')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' .', function()
|
||||
local shell = os.getenv('SHELL')
|
||||
vis:command('!' .. shell)
|
||||
end, 'run shell')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' ds', function()
|
||||
local shell = os.getenv('SHELL')
|
||||
local path = vis.win.file.path
|
||||
if path then
|
||||
local dir = path:match('^.*/')
|
||||
local arg = escape_and_quoted(dir)
|
||||
vis:command('!cd ' .. arg .. ' && ' .. shell)
|
||||
else
|
||||
vis:command('!' .. shell)
|
||||
end
|
||||
end, 'run shell in file directory')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' gl', function()
|
||||
vis:command('!lazygit')
|
||||
end, 'lazygit')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' jl', function()
|
||||
vis:command('!lazyjj')
|
||||
end, 'lazyjj')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' ', function()
|
||||
vis:command('fzfmru')
|
||||
end, 'fzf recent')
|
||||
|
||||
vis:map(vis.modes.NORMAL, 'gf', function()
|
||||
open_file_current_line('o')
|
||||
end, 'open file from current line (with line and col')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' cd', function()
|
||||
search('zoxide query -l | fzf', function(path)
|
||||
vis:command('cd ' .. path)
|
||||
end)
|
||||
end, 'fzf change directory')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' yy', function()
|
||||
vis:command('!yazi')
|
||||
end, 'yazi')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' y.', function()
|
||||
local path = vis.win.file.path
|
||||
if path then
|
||||
local dir = path:match('^.*/')
|
||||
local arg = escape_and_quoted(dir)
|
||||
vis:command('!cd ' .. arg .. ' && yazi')
|
||||
else
|
||||
vis:command('!yazi')
|
||||
end
|
||||
end, 'yazi in file directory')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' ma', add_global_mark, 'global marks: add')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' mj', function()
|
||||
search('cat ~/.config/vis/global-marks.txt | fzf --tac')
|
||||
end, 'global marks: jump')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' me', function()
|
||||
vis:command('o ~/.config/vis/global-marks.txt')
|
||||
end, 'global marks: edit')
|
||||
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' td', function()
|
||||
vis:command('set theme lupan-dark')
|
||||
end, 'change to dark theme')
|
||||
vis:map(vis.modes.NORMAL, ' tl', function()
|
||||
vis:command('set theme lupan-light')
|
||||
end, 'change to light theme')
|
||||
vis:map(vis.modes.NORMAL, ' tt', set_current_theme)
|
||||
|
||||
set_current_theme()
|
||||
end)
|
||||
|
||||
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
|
||||
vis:command('set relativenumber')
|
||||
end)
|
||||
@@ -1,3 +1,5 @@
|
||||
#define THEME_DARK
|
||||
|
||||
#if HEIGHT >= 2160
|
||||
Xft.dpi: 160
|
||||
Xcursor.size: 48
|
||||
@@ -53,3 +55,49 @@ XTerm.vt100.color14: #8FBCBB
|
||||
! white
|
||||
XTerm.vt100.color7: #E5E9F0
|
||||
XTerm.vt100.color15: #ECEFF4
|
||||
|
||||
st.font: FiraCode Nerd Font:size=10
|
||||
|
||||
#ifdef THEME_DARK
|
||||
st.background: #1f212e
|
||||
st.foreground: #9da0af
|
||||
st.cursorColor: #bf8040
|
||||
st.reverse-cursor: #1f212e
|
||||
st.color0: #1f212e
|
||||
st.color1: #862d2d
|
||||
st.color2: #3a783a
|
||||
st.color3: #707010
|
||||
st.color4: #345eb2
|
||||
st.color5: #cc66cc
|
||||
st.color6: #3a7878
|
||||
st.color7: #a1a3aa
|
||||
st.color8: #4d4d4d
|
||||
st.color9: #c27070
|
||||
st.color10: #40bf40
|
||||
st.color11: #acac53
|
||||
st.color12: #6b8ac7
|
||||
st.color13: #8f248f
|
||||
st.color14: #509595
|
||||
st.color15: #dbdff0
|
||||
#else
|
||||
st.background: #dae4f1
|
||||
st.foreground: #1f212e
|
||||
st.cursorColor: #bf8040
|
||||
st.reverse-cursor: #1f212e
|
||||
st.color0: #1f212e
|
||||
st.color1: #862d2d
|
||||
st.color2: #3a783a
|
||||
st.color3: #707010
|
||||
st.color4: #345eb2
|
||||
st.color5: #cc66cc
|
||||
st.color6: #3a7878
|
||||
st.color7: #a1a3aa
|
||||
st.color8: #73778c
|
||||
st.color9: #c27070
|
||||
st.color10: #40bf40
|
||||
st.color11: #acac53
|
||||
st.color12: #6b8ac7
|
||||
st.color13: #8f248f
|
||||
st.color14: #509595
|
||||
st.color15: #dae4f1
|
||||
#endif
|
||||
|
||||
@@ -6,8 +6,8 @@ fi
|
||||
|
||||
xset b off
|
||||
xrandr --auto
|
||||
xrandr --output HDMI1 --right-of DP1
|
||||
xrandr --output DP-0 --left-of DP-2
|
||||
xrandr --output DP-0 --left-of DP-2 --primary
|
||||
xrandr --output HDMI-0 --left-of DP-0
|
||||
xrdb -merge ~/.Xresources
|
||||
setxkbmap pl -option ctrl:nocaps
|
||||
|
||||
@@ -34,6 +34,14 @@ if which awesome > /dev/null; then
|
||||
exec awesome
|
||||
fi
|
||||
|
||||
if which dk > /dev/null; then
|
||||
for m in $(polybar --list-monitors | cut -d: -f1); do
|
||||
MONITOR=$m polybar --reload bar &
|
||||
done
|
||||
fi
|
||||
exec dk
|
||||
fi
|
||||
|
||||
if which dwm > /dev/null; then
|
||||
lupan-clock &
|
||||
exec dwm
|
||||
|
||||
@@ -19,6 +19,16 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ~/.Xresources ]; then
|
||||
if [ "$THEME" = dark ]; then
|
||||
sed -i 's/^#undef THEME_DARK/#define THEME_DARK/' ~/.Xresources
|
||||
elif [ "$THEME" = light ]; then
|
||||
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' ~/.Xresources
|
||||
fi
|
||||
xrdb -merge ~/.Xresources
|
||||
killall -USR1 st
|
||||
fi
|
||||
|
||||
# Alacritty
|
||||
if [ -f ~/.config/alacritty/alacritty.yml ]; then
|
||||
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
|
||||
|
||||
15
xsession/bin/st-abduco-tabbed
Executable file
15
xsession/bin/st-abduco-tabbed
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
exec tabbed "$0" -w
|
||||
fi
|
||||
|
||||
if [ "$1" = "-w" ] && [ -n "$2" ]; then
|
||||
name=$(abduco | tail +2 | awk -F'\t' '{ print $NF }' | dmenu -p session: -l 10)
|
||||
if [ -n "$name" ]; then
|
||||
exec st -w "$2" -t "$name" -e abduco -A "$name" "$SHELL"
|
||||
fi
|
||||
else
|
||||
echo error: requires either no arguments or single option -w with and argument >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -5,13 +5,13 @@ imv = [
|
||||
zathura = [
|
||||
{ run = 'zathura "$@"', orphan = true },
|
||||
]
|
||||
nvim_cd = [
|
||||
{ run = 'nvim -c "cd $@"', block = true }
|
||||
fzf_vis = [
|
||||
{ run = 'cd "$@" && fd --type f | fzf --bind "enter:become(vis {})"', block = true }
|
||||
]
|
||||
|
||||
[open]
|
||||
prepend_rules = [
|
||||
{ mime = "image/*", use = "imv" },
|
||||
{ mime = "application/pdf", use = "zathura" },
|
||||
{ mime = "inode/directory", use = "nvim_cd" }
|
||||
{ mime = "inode/directory", use = "fzf_vis" }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user