Compare commits
1 Commits
wip
...
dc167b5e3f
| Author | SHA1 | Date | |
|---|---|---|---|
| dc167b5e3f |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,5 +9,3 @@ lupan-wm/target
|
|||||||
__pycache__
|
__pycache__
|
||||||
/dwm
|
/dwm
|
||||||
/st
|
/st
|
||||||
/vis/.config/vis/plugins/
|
|
||||||
/tools/.local/bin/
|
|
||||||
|
|||||||
20
Makefile
20
Makefile
@@ -1,7 +1,7 @@
|
|||||||
all:
|
all:
|
||||||
@echo "run: make clone build install"
|
@echo "run: make clone build install"
|
||||||
|
|
||||||
clone: dwm st
|
clone: ~/.local/share/zap dwm st
|
||||||
|
|
||||||
build: build-dwm build-st build-lupan-clock
|
build: build-dwm build-st build-lupan-clock
|
||||||
|
|
||||||
@@ -14,38 +14,32 @@ install: install-dwm install-st install-lupan-clock install-other
|
|||||||
|
|
||||||
dwm:
|
dwm:
|
||||||
git clone https://git.suckless.org/dwm
|
git clone https://git.suckless.org/dwm
|
||||||
cd dwm && \
|
cp -i patches/dwm/config.h dwm/
|
||||||
git remote add lupan.pl https://gitea.lupan.pl/lupan/dwm.git && \
|
|
||||||
git fetch lupan.pl && \
|
|
||||||
git checkout -b wip --track lupan.pl/wip
|
|
||||||
|
|
||||||
build-dwm:
|
build-dwm:
|
||||||
make -C dwm
|
make -C dwm
|
||||||
|
|
||||||
install-dwm:
|
install-dwm:
|
||||||
make -C dwm install PREFIX="${HOME}/.local/stow/dwm"
|
make -C dwm install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow dwm
|
|
||||||
|
|
||||||
st:
|
st:
|
||||||
git clone https://git.suckless.org/st
|
git clone https://git.suckless.org/st
|
||||||
cd st && \
|
cd st && \
|
||||||
git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
|
git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
|
||||||
git fetch lupan.pl && \
|
git fetch lupan.pl && \
|
||||||
git checkout -b patched-5 --track lupan.pl/patched-5
|
git checkout -b patched --track lupan.pl/patched
|
||||||
|
|
||||||
build-st:
|
build-st:
|
||||||
make -C st
|
make -C st
|
||||||
|
|
||||||
install-st:
|
install-st:
|
||||||
make -C st install PREFIX="${HOME}/.local/stow/st"
|
make -C st install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow st
|
|
||||||
|
|
||||||
build-lupan-clock:
|
build-lupan-clock:
|
||||||
make -C lupan-clock
|
make -C lupan-clock
|
||||||
|
|
||||||
install-lupan-clock:
|
install-lupan-clock:
|
||||||
make -C lupan-clock install PREFIX="${HOME}/.local/stow/lupan-clock"
|
make -C lupan-clock install PREFIX="${HOME}/.local"
|
||||||
stow -d ~/.local/stow lupan-clock
|
|
||||||
|
|
||||||
install-other:
|
install-other:
|
||||||
stow -Rv lazygit shell tmux nvim vis xsession
|
stow -Rv shell tmux xsession nvim
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -4,40 +4,11 @@ Lupan's config files
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Install Hyprland
|
|
||||||
----------------
|
|
||||||
|
|
||||||
To reproduce my environment clone this repo into `~/dotfiles` and check
|
To reproduce my environment clone this repo into `~/dotfiles` and check
|
||||||
that you have required programs in your `PATH` with
|
that you have required programs in your `PATH` with
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sh check_dependencies.sh hypr
|
$ sh check_dependencies.sh
|
||||||
```
|
|
||||||
|
|
||||||
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
|
||||||
|
|
||||||
Install proper configurations with
|
|
||||||
|
|
||||||
```
|
|
||||||
$ stow shell hyprland alacritty xsession nvim yazi
|
|
||||||
```
|
|
||||||
|
|
||||||
Where `xsession` is just to install `lupan-set-theme` script, `nvim` and `yazi` may be skipped if you do not use them.
|
|
||||||
|
|
||||||
Change to `zsh` as your login shell with
|
|
||||||
|
|
||||||
```
|
|
||||||
$ chsh -s /usr/bin/zsh
|
|
||||||
```
|
|
||||||
|
|
||||||
Install DWM (old)
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
To reproduce my environment clone this repo into `~/dotfiles` and check
|
|
||||||
that you have required programs in your `PATH` with
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sh check_dependencies.sh dwm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
||||||
|
|||||||
@@ -1,266 +0,0 @@
|
|||||||
# Session settings
|
|
||||||
# Name used for the default session
|
|
||||||
session = default
|
|
||||||
# Key press used to detatch from a session. Typically a Control key specified
|
|
||||||
# with prefix C-, for example C-\ for Control-backslash. Single keys are also
|
|
||||||
# allowed but not Meta (M-) keys.
|
|
||||||
detach_key = C-\
|
|
||||||
|
|
||||||
# Application Theming
|
|
||||||
# Colors are specified as -1 for default, 0-7 for standard, 8-15 for bright,
|
|
||||||
# 16-231 for extended, 232-255 for gray scale, 0xRRGGBB for 24-bit RGB colors,
|
|
||||||
# or you can use any of the X11 or Web Color Names. One or more comma separated
|
|
||||||
# font attributes may optionally be specified: bold, italic, reverse, strike,
|
|
||||||
# and blink. The attributes may also optionally include one of three underline
|
|
||||||
# types single, double, or curly.
|
|
||||||
include = theme_blue.ini
|
|
||||||
#statusbar_attr = white 0x5F636A
|
|
||||||
#tag_unoccupied = white 0x5F636A
|
|
||||||
#titlebar_unselected = white 0x004C6C
|
|
||||||
titlebar_unselected = 0x808080 0x000000
|
|
||||||
#tag_occupied = white 0x004C6C
|
|
||||||
#tag_urgent = white 0x004C6C bold,blink
|
|
||||||
#titlebar_selected = white 0x00AEEF
|
|
||||||
titlebar_selected = white 0x004C6C
|
|
||||||
#tag_selected = white 0x00AEEF bold
|
|
||||||
# Read only settings are overlayed onto the three titlebar settings above. Set
|
|
||||||
# either fg or bg to -1 to retain that titlebar setting. Any specified
|
|
||||||
# attributes are combined with those from above. These must be in this order
|
|
||||||
# and must be after all other titlebar definitions!
|
|
||||||
#titlebar_urgent = 0xE7DDB4 -1 blink
|
|
||||||
#titlebar_readonly = 0xA56815 -1 bold,italic
|
|
||||||
|
|
||||||
# Define up to 9 alphanumeric tag names, how they will be displayed on the
|
|
||||||
# status bar, and the types of colors and font attributes.
|
|
||||||
tagnames = 1 2 3 4 5 6 7 8 9
|
|
||||||
#tagnames = play dev test stage prod
|
|
||||||
tag_printf = " %s "
|
|
||||||
# Number of lines saved for each terminal's scroll back history
|
|
||||||
scroll_history = 5000
|
|
||||||
# The size of the layout zoom area is a number from .1 to .9, and the number of
|
|
||||||
# terminals in the zoom area is a number 1 or more.
|
|
||||||
zoomsize = .5
|
|
||||||
zoomnum = 1
|
|
||||||
|
|
||||||
# Specify one or more status bar commands to cycle through at the given number
|
|
||||||
# of interval seconds. Set interval to 0 to have the command run once and not
|
|
||||||
# refresh. Set interval to -1 to not have any status bar text.
|
|
||||||
statusbar_cmd = date; echo " | a4/$A4_SESSION" $A4
|
|
||||||
statusbar_cmd = uptime; echo " | a4/$A4_SESSION" $A4
|
|
||||||
#statusbar_cmd = cat ~/.cache/status/statusbar.txt; echo ' | a4' $A4
|
|
||||||
statusbar_interval = 10
|
|
||||||
statusbar_display = true
|
|
||||||
statusbar_top = true
|
|
||||||
#statusbar_begin = [
|
|
||||||
#statusbar_end = ]
|
|
||||||
|
|
||||||
# The terminal cursor can be set to visible or hidden, blinking or solid, and
|
|
||||||
# the shape can be 1-block, 2-underline, or 3-bar.
|
|
||||||
cursorvis = true
|
|
||||||
cursorblink = true
|
|
||||||
cursorshape = 1
|
|
||||||
|
|
||||||
# Any number of actions assigned to the optional special keyword "startup" are
|
|
||||||
# run when a4 is started, in the order specified.
|
|
||||||
#include = startup.ini
|
|
||||||
startup = create
|
|
||||||
#startup = view 2
|
|
||||||
#startup = create
|
|
||||||
#startup = keysequence ssh example.com\n
|
|
||||||
|
|
||||||
[Layouts]
|
|
||||||
# Layout symbol string in the status bar. First layout is the default. Order
|
|
||||||
# determines layout toggle cycle.
|
|
||||||
zoom_left = " │├┤ "
|
|
||||||
zoom_right = " ├┤│ "
|
|
||||||
fullscreen = " │ │ "
|
|
||||||
grid = " ├┼┤ "
|
|
||||||
columns = " │││ "
|
|
||||||
rows = " ─── "
|
|
||||||
zoom_top = " ├┬┤ "
|
|
||||||
zoom_bottom = " ├┴┤ "
|
|
||||||
|
|
||||||
[KeyboardActions]
|
|
||||||
# Keyboard actions have a key combination of no more than three keys assigned
|
|
||||||
# to them. A key can be raw or can include modifiers Meta or Alt, M-, Control,
|
|
||||||
# C-, Shift, S-, or with combinations of those. Any modifier keys must be put
|
|
||||||
# in the order of M-C-S-. Two special keys that must be fully spelled out are
|
|
||||||
# "Space" and "Hyphen".
|
|
||||||
C-g c = create
|
|
||||||
C-g x x = destroy
|
|
||||||
C-g Enter = zoom
|
|
||||||
C-g . = minimize
|
|
||||||
C-g q q = quit
|
|
||||||
C-g C-l = redraw
|
|
||||||
C-g s = statusbar vis
|
|
||||||
C-g S = statusbar pos
|
|
||||||
|
|
||||||
# The four actions view, tag, viewtoggle, and tagtoggle each take tag name as a
|
|
||||||
# parameter. You can use the special '#' character as a shortcut to assign
|
|
||||||
# mappings for up to 9 digits to the list of tag names. For the key
|
|
||||||
# combination, the last occurrence of '#' is replaced with the digit 'n' and
|
|
||||||
# then the 'nth' tag name is passed as the action parameter. For example,
|
|
||||||
# "C-g # F# = view #" expands to "C-g F1 = view 1", "C-g F2 = view 2", ....
|
|
||||||
C-g v # = view #
|
|
||||||
C-g F# = view #
|
|
||||||
C-g t # = tag #
|
|
||||||
C-g V # = viewtoggle #
|
|
||||||
C-g T # = tagtoggle #
|
|
||||||
|
|
||||||
C-g v 0 = view _all
|
|
||||||
C-g v Tab = view _swap
|
|
||||||
C-g t 0 = tag _all
|
|
||||||
|
|
||||||
# The focus action takes several possible parameters, including window number.
|
|
||||||
# You can use the special '#' character as a shortcut to assign mappings for
|
|
||||||
# all digits 1-9. in the key combination and the action parameter to assign
|
|
||||||
# that combo/action pairing to digits 1-9. For the key combination, the last
|
|
||||||
# occurrence of '#' is replaced with the digit 'n' and the same digit 'n' is
|
|
||||||
# passed as the action parameter. For example, "C-g # = focus #" is expanded
|
|
||||||
# out to "C-g 1 = focus 1", "C-g 2 = focus 2", ....
|
|
||||||
C-g # = focus #
|
|
||||||
|
|
||||||
C-g j = focus next
|
|
||||||
C-g C-j = focus NEXT
|
|
||||||
C-g k = focus prev
|
|
||||||
C-g C-k = focus PREV
|
|
||||||
C-g Tab = focus swap
|
|
||||||
C-g H = focus left
|
|
||||||
C-g J = focus down
|
|
||||||
C-g K = focus up
|
|
||||||
C-g L = focus right
|
|
||||||
C-g ) = focus group
|
|
||||||
C-g 0 = focus groupall
|
|
||||||
C-g * = readonly
|
|
||||||
|
|
||||||
C-a # = view #
|
|
||||||
|
|
||||||
C-a f = layout fullscreen
|
|
||||||
C-a g = layout grid
|
|
||||||
C-a h = layout zoom_left
|
|
||||||
C-a j = layout zoom_bottom
|
|
||||||
C-a k = layout zoom_top
|
|
||||||
C-a l = layout zoom_right
|
|
||||||
C-a c = layout columns
|
|
||||||
C-a r = layout rows
|
|
||||||
# Cycle through all layouts in order listed in the [Layouts] section
|
|
||||||
C-a Space = layout +1
|
|
||||||
C-a C-Space = layout -1
|
|
||||||
C-a Tab = layout swap
|
|
||||||
|
|
||||||
C-a i = zoomnum +1
|
|
||||||
C-a d = zoomnum -1
|
|
||||||
C-a I = zoomsize +.05
|
|
||||||
C-a D = zoomsize -.05
|
|
||||||
|
|
||||||
S-PageUp = scrollback .5
|
|
||||||
S-PageDown = scrollback -.5
|
|
||||||
C-g PageUp = scrollback 1.0
|
|
||||||
C-g PageDown = scrollback -1.0
|
|
||||||
|
|
||||||
# Specify ANSI escape or other key sequence overrides
|
|
||||||
#include = vt220.ini
|
|
||||||
#Home = keysequence \e[1~
|
|
||||||
#End = keysequence \e[4~
|
|
||||||
#C-g Space = keysequence Hello world!
|
|
||||||
|
|
||||||
[MouseTermwinActions]
|
|
||||||
click-1 = focus
|
|
||||||
C-click-1 = zoom
|
|
||||||
click-3 = focus group
|
|
||||||
C-click-3 = focus 0
|
|
||||||
wheel-up = scrollback 3
|
|
||||||
wheel-dn = scrollback -3
|
|
||||||
S-wheel-up = scrollback 0.5
|
|
||||||
S-wheel-dn = scrollback -0.5
|
|
||||||
C-wheel-up = scrollback 1.0
|
|
||||||
C-wheel-dn = scrollback -1.0
|
|
||||||
|
|
||||||
[MouseTitlebarActions]
|
|
||||||
click-1 = minimize
|
|
||||||
click-3 = readonly
|
|
||||||
|
|
||||||
[MouseTagNamesActions]
|
|
||||||
click-1 = view
|
|
||||||
C-click-1 = viewtoggle
|
|
||||||
click-3 = tag
|
|
||||||
C-click-3 = tagtoggle
|
|
||||||
|
|
||||||
[MouseLayoutSymbolActions]
|
|
||||||
click-1 = layout +1
|
|
||||||
click-3 = layout -1
|
|
||||||
C-click-1 = zoomnum +1
|
|
||||||
C-click-3 = zoomnum -1
|
|
||||||
M-C-click-1 = zoomsize +.05
|
|
||||||
M-C-click-3 = zoomsize -.05
|
|
||||||
|
|
||||||
[MouseStatusTextActions]
|
|
||||||
click-1 = statusbar next
|
|
||||||
|
|
||||||
[MouseFrameLinesActions]
|
|
||||||
click-1 = layout fullscreen
|
|
||||||
|
|
||||||
# Terminals typically have a default foreground (fg) color, background (bg)
|
|
||||||
# color, and 16 standard colors that are used by terminal applications. They
|
|
||||||
# can also define color numbers up to 255, but the are used less often. In a4,
|
|
||||||
# you can define ColorSchemes that are then applied to terminal windows
|
|
||||||
# dynamically by comparing the terminal's title text to defined ColorRules (see
|
|
||||||
# below). The first defined ColorScheme is used by default for all windows.
|
|
||||||
# (The cursor color is not yet implemented.)
|
|
||||||
#include = cs_gruvbox.ini
|
|
||||||
#include = cs_solarized.ini
|
|
||||||
#include = cs_redsands.ini
|
|
||||||
#include = cs_fairyfloss.ini
|
|
||||||
#include = cs_kokuban.ini
|
|
||||||
#include = cs_frontend_fun_forrest.ini
|
|
||||||
#include = cs_seafoam_pastel.ini
|
|
||||||
[ColorScheme Basic]
|
|
||||||
fg = 7
|
|
||||||
bg = 0
|
|
||||||
#color123 = DarkOrange1
|
|
||||||
|
|
||||||
[ColorScheme BasicRed]
|
|
||||||
fg = 0
|
|
||||||
bg = 1
|
|
||||||
|
|
||||||
[ColorScheme Red160]
|
|
||||||
fg = 232
|
|
||||||
bg = 160
|
|
||||||
|
|
||||||
[ColorScheme Crimson]
|
|
||||||
fg = MidnightBlue
|
|
||||||
bg = Crimson
|
|
||||||
|
|
||||||
[colorscheme RedSands]
|
|
||||||
color00 = 0x000000
|
|
||||||
color01 = 0xff3f00
|
|
||||||
color02 = 0x00bb00
|
|
||||||
color03 = 0xe7b000
|
|
||||||
color04 = 0x0072ff
|
|
||||||
color05 = 0xbb00bb
|
|
||||||
color06 = 0x00bbbb
|
|
||||||
color07 = 0xbbbbbb
|
|
||||||
color08 = 0x555555
|
|
||||||
color09 = 0xbb0000
|
|
||||||
color10 = 0x00bb00
|
|
||||||
color11 = 0xe7b000
|
|
||||||
color12 = 0x0072ae
|
|
||||||
color13 = 0xff55ff
|
|
||||||
color14 = 0x55ffff
|
|
||||||
color15 = 0xffffff
|
|
||||||
fg = 0xd7c9a7
|
|
||||||
bg = 0x7a251e
|
|
||||||
cursor = 0xd7c9a7
|
|
||||||
|
|
||||||
# Color rules pair text with a colorscheme. A terminal window's title bar text
|
|
||||||
# is compared with each ColorRule text, in the order specified, until one
|
|
||||||
# matches, and then that colorscheme is applied to the terminal. If none of the
|
|
||||||
# rules match, then the first colorscheme defined in a4.ini is used.
|
|
||||||
# <pattern> = <colorscheme name> [<fg color|-1> [<bg color>]]
|
|
||||||
#[ColorRules]
|
|
||||||
#root@appdev.com = FairyFloss red
|
|
||||||
#@appdev.com = FairyFloss
|
|
||||||
#root@appprd = redsands red
|
|
||||||
#appprd = redsands
|
|
||||||
#root@appprddr = redsands red 0x521914
|
|
||||||
#appprddr = redsands -1 0x521914
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import = ["~/.config/alacritty/dark.toml"]
|
||||||
|
|
||||||
[colors]
|
[colors]
|
||||||
draw_bold_text_with_bright_colors = false
|
draw_bold_text_with_bright_colors = false
|
||||||
|
|
||||||
@@ -5,7 +7,7 @@ draw_bold_text_with_bright_colors = false
|
|||||||
TERM = "xterm-256color"
|
TERM = "xterm-256color"
|
||||||
|
|
||||||
[font]
|
[font]
|
||||||
size = 10
|
size = 10.5
|
||||||
|
|
||||||
[font.bold]
|
[font.bold]
|
||||||
family = "Fira Code Nerd Font"
|
family = "Fira Code Nerd Font"
|
||||||
@@ -13,5 +15,7 @@ family = "Fira Code Nerd Font"
|
|||||||
[font.normal]
|
[font.normal]
|
||||||
family = "Fira Code Nerd Font"
|
family = "Fira Code Nerd Font"
|
||||||
|
|
||||||
[general]
|
[keyboard]
|
||||||
import = ["~/.config/alacritty/dark.toml"]
|
bindings = [
|
||||||
|
{ key = ";", mods = "Control", chars = "\u001bOR" }
|
||||||
|
]
|
||||||
|
|||||||
306
alacritty/.config/alacritty/alacritty.yml
Normal file
306
alacritty/.config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
# See: /usr/share/doc/alacritty/example/alacritty.yml
|
||||||
|
|
||||||
|
env:
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
# From https://gist.github.com/sainnhe/6432f83181c4520ea87b5211fed27950
|
||||||
|
# Changed only to &dark and YAML &light labels
|
||||||
|
schemes:
|
||||||
|
dark: &dark
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '#2E3440'
|
||||||
|
foreground: '#C8D0E0'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#3B4252'
|
||||||
|
red: '#BF616A'
|
||||||
|
green: '#A3BE8C'
|
||||||
|
yellow: '#EBCB8B'
|
||||||
|
blue: '#81A1C1'
|
||||||
|
magenta: '#B988B0'
|
||||||
|
cyan: '#88C0D0'
|
||||||
|
white: '#E5E9F0'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#4C566A'
|
||||||
|
red: '#BF616A'
|
||||||
|
green: '#A3BE8C'
|
||||||
|
yellow: '#EBCB8B'
|
||||||
|
blue: '#81A1C1'
|
||||||
|
magenta: '#B988B0'
|
||||||
|
cyan: '#8FBCBB'
|
||||||
|
white: '#ECEFF4'
|
||||||
|
|
||||||
|
search:
|
||||||
|
matches:
|
||||||
|
foreground: '#81A1C1'
|
||||||
|
background: '#4C566A'
|
||||||
|
focused_match:
|
||||||
|
foreground: '#EBCB8B'
|
||||||
|
background: '#4C566A'
|
||||||
|
|
||||||
|
footer_bar:
|
||||||
|
background: '#434C5E'
|
||||||
|
foreground: '#88C0D0'
|
||||||
|
|
||||||
|
hints:
|
||||||
|
start:
|
||||||
|
foreground: '#B988B0'
|
||||||
|
background: '#4C566A'
|
||||||
|
|
||||||
|
end:
|
||||||
|
foreground: '#81A1C1'
|
||||||
|
background: '#4C566A'
|
||||||
|
|
||||||
|
selection:
|
||||||
|
text: CellForeground
|
||||||
|
background: '#3F4758'
|
||||||
|
|
||||||
|
light: &light
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '#F7F8FA'
|
||||||
|
foreground: '#2E3440'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#2E3440'
|
||||||
|
red: '#CB4F53'
|
||||||
|
green: '#48A53D'
|
||||||
|
yellow: '#EE5E25'
|
||||||
|
blue: '#3879C5'
|
||||||
|
magenta: '#9F4ACA'
|
||||||
|
cyan: '#3EA1AD'
|
||||||
|
white: '#E5E9F0'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#646A76'
|
||||||
|
red: '#D16366'
|
||||||
|
green: '#5F9E9D'
|
||||||
|
yellow: '#BA793E'
|
||||||
|
blue: '#1B40A6'
|
||||||
|
magenta: '#9665AF'
|
||||||
|
cyan: '#8FBCBB'
|
||||||
|
white: '#ECEFF4'
|
||||||
|
|
||||||
|
search:
|
||||||
|
matches:
|
||||||
|
foreground: '#3879C5'
|
||||||
|
background: '#646A76'
|
||||||
|
focused_match:
|
||||||
|
foreground: '#EE5E25'
|
||||||
|
background: '#646A76'
|
||||||
|
|
||||||
|
footer_bar:
|
||||||
|
background: '#DFE1E4'
|
||||||
|
foreground: '#3EA1AD'
|
||||||
|
|
||||||
|
hints:
|
||||||
|
start:
|
||||||
|
foreground: '#9665AF'
|
||||||
|
background: '#646A76'
|
||||||
|
|
||||||
|
end:
|
||||||
|
foreground: '#3879C5'
|
||||||
|
background: '#646A76'
|
||||||
|
|
||||||
|
selection:
|
||||||
|
text: CellForeground
|
||||||
|
background: '#EAEBED'
|
||||||
|
|
||||||
|
lupan-dark: &lupan-dark
|
||||||
|
primary:
|
||||||
|
background: '#2c393c'
|
||||||
|
foreground: '#b1babd'
|
||||||
|
normal:
|
||||||
|
black: '#232e31'
|
||||||
|
red: '#d8aeb5'
|
||||||
|
green: '#9bc48e'
|
||||||
|
yellow: '#ceb58e'
|
||||||
|
blue: '#94c0ca'
|
||||||
|
magenta: '#ceaed6'
|
||||||
|
cyan: '#93c2bb'
|
||||||
|
white: '#9ea7aa'
|
||||||
|
bright:
|
||||||
|
black: '#597177'
|
||||||
|
red: '#dcb8be'
|
||||||
|
green: '#a2cd94'
|
||||||
|
yellow: '#d7bd95'
|
||||||
|
blue: '#9bc8d3'
|
||||||
|
magenta: '#d4b8da'
|
||||||
|
cyan: '#99cac4'
|
||||||
|
white: '#b9c3c5'
|
||||||
|
lupan-light: &lupan-light
|
||||||
|
primary:
|
||||||
|
background: '#e9f2f5'
|
||||||
|
foreground: '#6d797c'
|
||||||
|
normal:
|
||||||
|
black: '#1b1c1c'
|
||||||
|
red: '#d0426a'
|
||||||
|
green: '#52833e'
|
||||||
|
yellow: '#8e733f'
|
||||||
|
blue: '#44808b'
|
||||||
|
magenta: '#b14cc1'
|
||||||
|
cyan: '#42827a'
|
||||||
|
white: '#c2c7c9'
|
||||||
|
bright:
|
||||||
|
black: '#454748'
|
||||||
|
red: '#e34d76'
|
||||||
|
green: '#5b9146'
|
||||||
|
yellow: '#9d8046'
|
||||||
|
blue: '#4c8d99'
|
||||||
|
magenta: '#c455d5'
|
||||||
|
cyan: '#4a8f87'
|
||||||
|
white: '#eff1f1'
|
||||||
|
everforest_dark_hard: &everforest_dark_hard
|
||||||
|
primary:
|
||||||
|
background: '#272e33'
|
||||||
|
foreground: '#d3c6aa'
|
||||||
|
normal:
|
||||||
|
black: '#414b50'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
bright:
|
||||||
|
black: '#475258'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
everforest_dark_medium: &everforest_dark_medium
|
||||||
|
primary:
|
||||||
|
background: '#2d353b'
|
||||||
|
foreground: '#d3c6aa'
|
||||||
|
normal:
|
||||||
|
black: '#475258'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
bright:
|
||||||
|
black: '#475258'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
everforest_dark_soft: &everforest_dark_soft
|
||||||
|
primary:
|
||||||
|
background: '#333c43'
|
||||||
|
foreground: '#d3c6aa'
|
||||||
|
normal:
|
||||||
|
black: '#4d5960'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
bright:
|
||||||
|
black: '#4d5960'
|
||||||
|
red: '#e67e80'
|
||||||
|
green: '#a7c080'
|
||||||
|
yellow: '#dbbc7f'
|
||||||
|
blue: '#7fbbb3'
|
||||||
|
magenta: '#d699b6'
|
||||||
|
cyan: '#83c092'
|
||||||
|
white: '#d3c6aa'
|
||||||
|
everforest_light_hard: &everforest_light_hard
|
||||||
|
primary:
|
||||||
|
background: '#fffbef'
|
||||||
|
foreground: '#5c6a72'
|
||||||
|
normal:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#e8e5d5'
|
||||||
|
bright:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#e8e5d5'
|
||||||
|
everforest_light_medium: &everforest_light_medium
|
||||||
|
primary:
|
||||||
|
background: '#fdf6e3'
|
||||||
|
foreground: '#5c6a72'
|
||||||
|
normal:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#e0dcc7'
|
||||||
|
bright:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#e0dcc7'
|
||||||
|
everforest_light_soft: &everforest_light_soft
|
||||||
|
primary:
|
||||||
|
background: '#f3ead3'
|
||||||
|
foreground: '#5c6a72'
|
||||||
|
normal:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#d8d3ba'
|
||||||
|
bright:
|
||||||
|
black: '#5c6a72'
|
||||||
|
red: '#f85552'
|
||||||
|
green: '#8da101'
|
||||||
|
yellow: '#dfa000'
|
||||||
|
blue: '#3a94c5'
|
||||||
|
magenta: '#df69ba'
|
||||||
|
cyan: '#35a77c'
|
||||||
|
white: '#d8d3ba'
|
||||||
|
|
||||||
|
draw_bold_text_with_bright_colors: false
|
||||||
|
|
||||||
|
colors: *dark
|
||||||
|
|
||||||
|
font:
|
||||||
|
size: 10.5
|
||||||
|
normal:
|
||||||
|
family: Fira Code Nerd Font
|
||||||
|
bold:
|
||||||
|
family: Fira Code Nerd Font
|
||||||
|
|
||||||
|
key_bindings:
|
||||||
|
- key: F6
|
||||||
|
mods: Control|Shift
|
||||||
|
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh --next"] }
|
||||||
@@ -1,31 +1,41 @@
|
|||||||
# https://github.com/alacritty/alacritty-theme/blob/master/themes/nordic.toml
|
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_storm.toml)
|
||||||
|
# TokyoNight Alacritty Colors
|
||||||
# Colors (Nordic)
|
# Default colors
|
||||||
|
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#242933'
|
background = '#24283b'
|
||||||
foreground = '#BBBDAF'
|
foreground = '#c0caf5'
|
||||||
|
|
||||||
|
#[colors.cursor]
|
||||||
|
#cursor = '#c0caf5'
|
||||||
|
#text = '#24283b'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = '#191C1D'
|
black = '#1d202f'
|
||||||
red = '#BD6062'
|
red = '#f7768e'
|
||||||
green = '#A3D6A9'
|
green = '#9ece6a'
|
||||||
yellow = '#F0DFAF'
|
yellow = '#e0af68'
|
||||||
blue = '#8FB4D8'
|
blue = '#7aa2f7'
|
||||||
magenta = '#C7A9D9'
|
magenta = '#bb9af7'
|
||||||
cyan = '#B6D7A8'
|
cyan = '#7dcfff'
|
||||||
white = '#BDC5BD'
|
white = '#a9b1d6'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = '#727C7C'
|
black = '#414868'
|
||||||
red = '#D18FAF'
|
red = '#f7768e'
|
||||||
green = '#B7CEB0'
|
green = '#9ece6a'
|
||||||
yellow = '#BCBCBC'
|
yellow = '#e0af68'
|
||||||
blue = '#E0CF9F'
|
blue = '#7aa2f7'
|
||||||
magenta = '#C7A9D9'
|
magenta = '#bb9af7'
|
||||||
cyan = '#BBDA97'
|
cyan = '#7dcfff'
|
||||||
white = '#BDC5BD'
|
white = '#c0caf5'
|
||||||
|
|
||||||
[colors.selection]
|
# Indexed Colors
|
||||||
text = '#000000'
|
[[colors.indexed_colors]]
|
||||||
background = '#F0DFAF'
|
index = 16
|
||||||
|
color = '#ff9e64'
|
||||||
|
|
||||||
|
[[colors.indexed_colors]]
|
||||||
|
index = 17
|
||||||
|
color = '#db4b4b'
|
||||||
|
|||||||
@@ -1,35 +1,41 @@
|
|||||||
# https://github.com/alacritty/alacritty-theme/blob/master/themes/night_owlish_light.toml
|
# (https://github.com/folke/tokyonight.nvim/blob/main/extras/alacritty/tokyonight_day.toml)
|
||||||
|
# TokyoNight Alacritty Colors
|
||||||
# Colors (Night Owlish Light)
|
# Default colors
|
||||||
|
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#ffffff'
|
background = '#e1e2e7'
|
||||||
foreground = '#403f53'
|
foreground = '#3760bf'
|
||||||
|
|
||||||
|
#[colors.cursor]
|
||||||
|
#cursor = '#3760bf'
|
||||||
|
#text = '#e1e2e7'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = '#011627'
|
black = '#e9e9ed'
|
||||||
red = '#d3423e'
|
red = '#f52a65'
|
||||||
green = '#2aa298'
|
green = '#587539'
|
||||||
yellow = '#daaa01'
|
yellow = '#8c6c3e'
|
||||||
blue = '#4876d6'
|
blue = '#2e7de9'
|
||||||
magenta = '#403f53'
|
magenta = '#9854f1'
|
||||||
cyan = '#08916a'
|
cyan = '#007197'
|
||||||
white = '#7a8181'
|
white = '#6172b0'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
[colors.bright]
|
[colors.bright]
|
||||||
black = '#7a8181'
|
black = '#a1a6c5'
|
||||||
red = '#f76e6e'
|
red = '#f52a65'
|
||||||
green = '#49d0c5'
|
green = '#587539'
|
||||||
yellow = '#dac26b'
|
yellow = '#8c6c3e'
|
||||||
blue = '#5ca7e4'
|
blue = '#2e7de9'
|
||||||
magenta = '#697098'
|
magenta = '#9854f1'
|
||||||
cyan = '#00c990'
|
cyan = '#007197'
|
||||||
white = '#989fb1'
|
white = '#3760bf'
|
||||||
|
|
||||||
[colors.cursor]
|
# Indexed Colors
|
||||||
cursor = '#403f53'
|
[[colors.indexed_colors]]
|
||||||
text = '#fbfbfb'
|
index = 16
|
||||||
|
color = '#b15c00'
|
||||||
|
|
||||||
[colors.selection]
|
[[colors.indexed_colors]]
|
||||||
background = '#f2f2f2'
|
index = 17
|
||||||
text = '#403f53'
|
color = '#c64343'
|
||||||
|
|||||||
30
alacritty/.config/alacritty/set_theme.sh
Executable file
30
alacritty/.config/alacritty/set_theme.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
lupan-dark|lupan-dark-blue|lupan-dark-gray|lupan-light|lupan-material-dark|lupan-material-light)
|
||||||
|
sed -i "s/^colors: [*].*/colors: *$1/" ~/.config/alacritty/alacritty.yml
|
||||||
|
;;
|
||||||
|
--next)
|
||||||
|
case $(grep colors: ~/.config/alacritty/alacritty.yml) in
|
||||||
|
'colors: *lupan-dark')
|
||||||
|
THEME=lupan-dark-blue
|
||||||
|
;;
|
||||||
|
'colors: *lupan-dark-blue')
|
||||||
|
THEME=lupan-dark-gray
|
||||||
|
;;
|
||||||
|
'colors: *lupan-dark-gray')
|
||||||
|
THEME=lupan-light
|
||||||
|
;;
|
||||||
|
'colors: *lupan-light')
|
||||||
|
THEME=lupan-material-dark
|
||||||
|
;;
|
||||||
|
'colors: *lupan-material-dark')
|
||||||
|
THEME=lupan-material-light
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
THEME=lupan-dark
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -51,18 +51,7 @@ end
|
|||||||
|
|
||||||
-- {{{ Variable definitions
|
-- {{{ Variable definitions
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
|
|
||||||
local function read_theme()
|
|
||||||
local theme = "theme_dark.lua"
|
local theme = "theme_dark.lua"
|
||||||
local f = io.open(os.getenv('HOME') .. '/.lightmode')
|
|
||||||
if f then
|
|
||||||
theme = 'theme_light.lua'
|
|
||||||
f:close()
|
|
||||||
end
|
|
||||||
return theme
|
|
||||||
end
|
|
||||||
|
|
||||||
local theme = read_theme()
|
|
||||||
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
|
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
|
||||||
|
|
||||||
local function set_wallpaper(s)
|
local function set_wallpaper(s)
|
||||||
@@ -86,7 +75,7 @@ local function switch_theme()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
local terminal = "kitty --single-instance --instance-group default"
|
local terminal = "alacritty"
|
||||||
|
|
||||||
-- Default modkey.
|
-- Default modkey.
|
||||||
local modkey = "Mod4"
|
local modkey = "Mod4"
|
||||||
@@ -121,7 +110,7 @@ local mykeyboardlayout = awful.widget.keyboardlayout()
|
|||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
-- Create a textclock widget
|
-- Create a textclock widget
|
||||||
local mytextclock = wibox.widget.textclock('%H:%M ')
|
local mytextclock = wibox.widget.textclock()
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
-- Create a wibox for each screen and add it
|
||||||
local taglist_buttons = gears.table.join(
|
local taglist_buttons = gears.table.join(
|
||||||
@@ -234,17 +223,6 @@ local function layout_menu()
|
|||||||
awful.menu(layouts):show()
|
awful.menu(layouts):show()
|
||||||
end
|
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
|
-- {{{ Key bindings
|
||||||
local globalkeys = gears.table.join(
|
local globalkeys = gears.table.join(
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
@@ -296,7 +274,7 @@ local globalkeys = gears.table.join(
|
|||||||
{ description = "open a terminal", group = "launcher" }),
|
{ description = "open a terminal", group = "launcher" }),
|
||||||
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
|
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
|
||||||
{ description = "open a terminal", group = "launcher" }),
|
{ description = "open a terminal", group = "launcher" }),
|
||||||
awful.key({ modkey, "Control", "Shift" }, "t", switch_theme,
|
awful.key({ modkey, "Shift" }, "F6", switch_theme,
|
||||||
{ description = "switch theme", group = "launcher" }),
|
{ description = "switch theme", group = "launcher" }),
|
||||||
awful.key({ modkey, }, "q", awesome.restart,
|
awful.key({ modkey, }, "q", awesome.restart,
|
||||||
{ description = "reload awesome", group = "awesome" }),
|
{ description = "reload awesome", group = "awesome" }),
|
||||||
@@ -347,8 +325,8 @@ local globalkeys = gears.table.join(
|
|||||||
end,
|
end,
|
||||||
{ description = "lua execute prompt", group = "awesome" }),
|
{ description = "lua execute prompt", group = "awesome" }),
|
||||||
-- Menubar
|
-- Menubar
|
||||||
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'HurmitNerdFont:size=16'") end,
|
awful.key({ modkey, }, "p", function() menubar.show() end,
|
||||||
{ description = "run command", group = "launcher" })
|
{ description = "show the menubar", group = "launcher" })
|
||||||
)
|
)
|
||||||
|
|
||||||
local clientkeys = gears.table.join(
|
local clientkeys = gears.table.join(
|
||||||
@@ -377,11 +355,8 @@ local clientkeys = gears.table.join(
|
|||||||
{ description = "minimize", group = "client" }),
|
{ description = "minimize", group = "client" }),
|
||||||
awful.key({ modkey, }, "m",
|
awful.key({ modkey, }, "m",
|
||||||
function(c)
|
function(c)
|
||||||
if awful.layout.getname() == "max" then
|
c.maximized = not c.maximized
|
||||||
awful.layout.set(awful.layout.suit.tile)
|
c:raise()
|
||||||
else
|
|
||||||
awful.layout.set(awful.layout.suit.max)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
{ description = "(un)maximize", group = "client" }),
|
{ description = "(un)maximize", group = "client" }),
|
||||||
awful.key({ modkey, }, "v",
|
awful.key({ modkey, }, "v",
|
||||||
@@ -444,11 +419,7 @@ for i = 1, 9 do
|
|||||||
end
|
end
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
@@ -484,8 +455,7 @@ awful.rules.rules = {
|
|||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons,
|
buttons = clientbuttons,
|
||||||
screen = awful.screen.preferred,
|
screen = awful.screen.preferred,
|
||||||
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
|
placement = awful.placement.no_overlap + awful.placement.no_offscreen
|
||||||
size_hints_honor = false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -537,19 +507,6 @@ awful.rules.rules = {
|
|||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Signals
|
-- {{{ Signals
|
||||||
|
|
||||||
local function set_border_width(c)
|
|
||||||
local t = awful.screen.focused().selected_tag
|
|
||||||
if #t:clients() == 1 or t.layout.name == 'max' then
|
|
||||||
c = c or client.focus
|
|
||||||
c.border_width = 0
|
|
||||||
else
|
|
||||||
for _, cl in ipairs(t:clients()) do
|
|
||||||
cl.border_width = beautiful.border_width
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Signal function to execute when a new client appears.
|
-- Signal function to execute when a new client appears.
|
||||||
client.connect_signal("manage", function(c)
|
client.connect_signal("manage", function(c)
|
||||||
-- Set the windows at the slave,
|
-- Set the windows at the slave,
|
||||||
@@ -562,7 +519,6 @@ client.connect_signal("manage", function(c)
|
|||||||
-- Prevent clients from being unreachable after screen count changes.
|
-- Prevent clients from being unreachable after screen count changes.
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
set_border_width(c)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable sloppy focus, so that focus follows mouse.
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
@@ -570,23 +526,6 @@ client.connect_signal("mouse::enter", function(c)
|
|||||||
c:emit_signal("request::activate", "mouse_enter", { raise = false })
|
c:emit_signal("request::activate", "mouse_enter", { raise = false })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- local function set_border(c)
|
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
||||||
-- local s = awful.screen.focused()
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
-- if c.maximized
|
|
||||||
-- or (#s.tiled_clients == 1 and not c.floating)
|
|
||||||
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
|
|
||||||
-- then
|
|
||||||
-- c.border_width = 0
|
|
||||||
-- else
|
|
||||||
-- c.border_width = beautiful.border_width
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
client.connect_signal("focus", function(c)
|
|
||||||
c.border_color = beautiful.border_focus
|
|
||||||
set_border_width(c)
|
|
||||||
end)
|
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal; end)
|
|
||||||
tag.connect_signal("property::layout", function() set_border_width(nil) end)
|
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|||||||
@@ -5,36 +5,30 @@ local dpi = xresources.apply_dpi
|
|||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "HurmitNerdFont 10"
|
theme.font = "Fira Code Nerd Font 10.5"
|
||||||
theme.tasklist_disable_icon = true
|
theme.tasklist_disable_icon = true
|
||||||
theme.wibar_height = 30
|
theme.wibar_height = 40
|
||||||
|
|
||||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
theme.bg_normal = "#283538"
|
||||||
theme.bg_focus = "#316781" -- hsl(200 45% 35%)
|
theme.bg_focus = "#36537d" -- hsl(215deg 40% 35%)
|
||||||
theme.bg_urgent = "#814c31" -- hsl(20 45% 35%)
|
theme.bg_urgent = "#d8aeb5"
|
||||||
theme.bg_minimize = "#454f54" -- hsl(200 10% 30%)
|
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
|
||||||
theme.bg_systray = theme.bg_normal
|
theme.bg_systray = theme.bg_normal
|
||||||
theme.tasklist_bg_focus = "#1c3b4a" -- hsl(200 45% 20%)
|
theme.tasklist_bg_focus = "#263c59" -- hsl(215deg 40% 25%)
|
||||||
|
|
||||||
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
|
theme.fg_normal = "#9ea7aa"
|
||||||
theme.fg_focus = "#abb5ba" -- hsl(200 10% 70%)
|
theme.fg_focus = "#b1babd"
|
||||||
theme.fg_urgent = theme.bg_focus
|
theme.fg_urgent = theme.bg_focus
|
||||||
theme.fg_minimize = theme.fg_normal
|
theme.fg_minimize = "#8a9294"
|
||||||
theme.taglist_fg_empty = "#454f54" -- hsl(200 10% 30%)
|
theme.taglist_fg_empty = "#798082"
|
||||||
|
|
||||||
theme.gap_single_client = false
|
|
||||||
theme.useless_gap = dpi(1)
|
theme.useless_gap = dpi(1)
|
||||||
theme.border_width = dpi(2)
|
theme.border_width = dpi(2)
|
||||||
theme.border_normal = "#73848c" -- hsl(200 10% 50%)
|
theme.border_normal = "#708090"
|
||||||
theme.border_focus = "#b25e34" -- hsl(20 55% 45%)
|
theme.border_focus = "#a0522d"
|
||||||
theme.border_marked = "#3488b2" -- hsl(200 55% 45%)
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
theme.bg_wallpaper = "#454f54" -- hsl(200 10% 30%)
|
theme.bg_wallpaper = "#424a4c"
|
||||||
|
|
||||||
theme.hotkeys_font = theme.font
|
|
||||||
theme.hotkeys_description_font = theme.font
|
|
||||||
theme.hotkeys_bg = theme.bg_minimize
|
|
||||||
theme.hotkeys_modifiers_fg = theme.border_focus
|
|
||||||
|
|
||||||
-- You can use your own layout icons like this:
|
-- You can use your own layout icons like this:
|
||||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||||
|
|||||||
@@ -5,36 +5,30 @@ local dpi = xresources.apply_dpi
|
|||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "HurmitNerdFont 10"
|
theme.font = "Fira Code Nerd Font 10.5"
|
||||||
theme.tasklist_disable_icon = true
|
theme.tasklist_disable_icon = true
|
||||||
theme.wibar_height = 30
|
theme.wibar_height = 40
|
||||||
|
|
||||||
theme.bg_normal = "#111c22" -- hsl(200 35% 10%)
|
theme.bg_normal = "#283538"
|
||||||
theme.bg_focus = "#d0e3fb" -- hsl(214 85% 90%)
|
theme.bg_focus = "#82a0c9" -- hsl(215deg 40% 65%)
|
||||||
theme.bg_urgent = "#f2d1a6" -- hsl(34 75% 80%)
|
theme.bg_urgent = "#d0426a"
|
||||||
theme.bg_minimize = "#8596ad" -- hsl(214 20% 60%)
|
theme.bg_minimize = "#7b899d" -- hsl(215deg 15% 55%)
|
||||||
theme.bg_systray = theme.bg_normal
|
theme.bg_systray = theme.bg_normal
|
||||||
theme.tasklist_bg_focus = "#a6c7f2" -- hsl(214 75% 80%)
|
theme.tasklist_bg_focus = "#5e85ba" -- hsl(215deg 40% 55%)
|
||||||
|
|
||||||
theme.fg_normal = "#8f9ca3" -- hsl(200 10% 60%)
|
theme.fg_normal = "#616c6f"
|
||||||
theme.fg_focus = "#454b54" -- hsl(214 10% 30%)
|
theme.fg_focus = "#363d3e"
|
||||||
theme.fg_urgent = "#70675c" -- hsl(34 10% 40%)
|
theme.fg_urgent = "#e9f2f5"
|
||||||
theme.fg_minimize = "#70675c" -- hsl(34 10% 40%)
|
theme.fg_minimize = "#4b5456"
|
||||||
theme.taglist_fg_empty = theme.fg_minimize
|
theme.taglist_fg_empty = "#566063"
|
||||||
|
|
||||||
theme.gap_single_client = false
|
|
||||||
theme.useless_gap = dpi(1)
|
theme.useless_gap = dpi(1)
|
||||||
theme.border_width = dpi(2)
|
theme.border_width = dpi(2)
|
||||||
theme.border_normal = theme.bg_minimize
|
theme.border_normal = "#bebebe"
|
||||||
theme.border_focus = "#df8c20" -- hsl(34 75% 50%)
|
theme.border_focus = "#ff7f50"
|
||||||
theme.border_marked = "#2073df" -- hsl(214 75% 50%)
|
theme.border_marked = "#91231c"
|
||||||
|
|
||||||
theme.bg_wallpaper = theme.fg_normal
|
theme.bg_wallpaper = "#b0bec2"
|
||||||
|
|
||||||
theme.hotkeys_font = theme.font
|
|
||||||
theme.hotkeys_description_font = theme.font
|
|
||||||
theme.hotkeys_bg = theme.border_normal
|
|
||||||
theme.hotkeys_modifiers_fg = theme.bg_focus
|
|
||||||
|
|
||||||
-- You can use your own layout icons like this:
|
-- You can use your own layout icons like this:
|
||||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||||
|
|||||||
@@ -1,53 +1,37 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
REQUIRED="$1"
|
|
||||||
|
|
||||||
check_dependency() {
|
|
||||||
local CMD="$1"
|
|
||||||
shift
|
|
||||||
for REQ in "$@"; do
|
|
||||||
if [ "$REQ" = "$REQUIRED" ]; then
|
|
||||||
which "$CMD"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
echo '# required:'
|
echo '# required:'
|
||||||
|
for CMD in \
|
||||||
check_dependency zsh dwm hypr
|
zsh \
|
||||||
check_dependency git dwm hypr
|
git \
|
||||||
check_dependency cc dwm
|
cc \
|
||||||
check_dependency make dwm
|
make \
|
||||||
check_dependency setxkbmap dwm
|
setxkbmap \
|
||||||
check_dependency slock dwm
|
slock \
|
||||||
check_dependency systemctl dwm hypr
|
systemctl \
|
||||||
check_dependency xmodmap dwm
|
xmodmap \
|
||||||
check_dependency xrandr dwm
|
xrandr \
|
||||||
check_dependency xrdb dwm
|
xrdb \
|
||||||
check_dependency xset dwm
|
xset \
|
||||||
check_dependency xsetroot dwm
|
xsetroot \
|
||||||
check_dependency hsetroot dwm
|
hsetroot \
|
||||||
check_dependency xsettingsd dwm
|
xsettingsd \
|
||||||
check_dependency sed dwm hypr
|
sed \
|
||||||
check_dependency pkill dwm
|
pkill \
|
||||||
check_dependency dmenu dwm
|
dmenu \
|
||||||
check_dependency dmenu_run dwm
|
dmenu_run \
|
||||||
check_dependency xss-lock dwm
|
xss-lock \
|
||||||
check_dependency exa dwm hypr
|
exa \
|
||||||
check_dependency fzf dwm hypr
|
fzf \
|
||||||
check_dependency Hyprland hypr
|
; do
|
||||||
check_dependency hyprctl hypr
|
which "$CMD"
|
||||||
check_dependency alacritty hypr
|
done
|
||||||
check_dependency swaylock hypr
|
|
||||||
check_dependency waybar hypr
|
|
||||||
check_dependency wofi hypr
|
|
||||||
|
|
||||||
echo -e '\n# optional:'
|
echo -e '\n# optional:'
|
||||||
|
for CMD in \
|
||||||
check_dependency sx dwm
|
sx \
|
||||||
check_dependency picom dwm
|
picom \
|
||||||
check_dependency compton dwm
|
compton \
|
||||||
check_dependency xbacklight dwm
|
xbacklight; do
|
||||||
check_dependency wl-copy hypr
|
which "$CMD"
|
||||||
check_dependency wl-paste hypr
|
done
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
mkdir -p tools/.local/bin
|
|
||||||
|
|
||||||
uid=$(id -u):$(id -g)
|
|
||||||
|
|
||||||
go-install() {
|
|
||||||
echo "build $1"
|
|
||||||
docker exec -u "$uid" dotfiles-go go install -ldflags="-s -w" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
cargo-install() {
|
|
||||||
B="$1"
|
|
||||||
shift
|
|
||||||
echo "build $B"
|
|
||||||
docker exec -u "$uid" dotfiles-rust cargo install --quiet "$@"
|
|
||||||
docker exec -u "$uid" dotfiles-rust cp "/usr/local/cargo/bin/$B" /rust/bin
|
|
||||||
strip "tools/.local/bin/$B"
|
|
||||||
}
|
|
||||||
|
|
||||||
docker kill dotfiles-go && sleep 3 || :
|
|
||||||
docker run --rm -d --name dotfiles-go -e HOME=/go -v ./tools/.local/bin:/go/bin golang:1.25.1-alpine3.22 tail -f /dev/null
|
|
||||||
docker exec dotfiles-go chown "$uid" /go
|
|
||||||
|
|
||||||
go-install github.com/junegunn/fzf@latest
|
|
||||||
go-install github.com/gokcehan/lf@latest
|
|
||||||
go-install github.com/rs/curlie@latest
|
|
||||||
|
|
||||||
docker kill dotfiles-go
|
|
||||||
|
|
||||||
docker kill dotfiles-rust && sleep 3 || :
|
|
||||||
docker run --rm -d --name dotfiles-rust -v ./tools/.local/bin:/rust/bin rust:1.90-bullseye tail -f /dev/null
|
|
||||||
|
|
||||||
cargo-install zoxide zoxide --locked
|
|
||||||
cargo-install rg ripgrep
|
|
||||||
cargo-install fd fd-find
|
|
||||||
cargo-install bat bat --locked
|
|
||||||
cargo-install eza eza
|
|
||||||
cargo-install delta git-delta
|
|
||||||
cargo-install jj --bin jj jj-cli --locked
|
|
||||||
cargo-install lazyjj lazyjj --locked
|
|
||||||
|
|
||||||
docker kill dotfiles-rust
|
|
||||||
@@ -1,175 +0,0 @@
|
|||||||
#!/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
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
# 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
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
source = ~/.config/hypr/white.conf
|
#source = ~/.config/hypr/white.conf
|
||||||
|
|
||||||
input {
|
input {
|
||||||
kb_layout = pl
|
kb_layout = pl
|
||||||
@@ -8,7 +8,7 @@ input {
|
|||||||
general {
|
general {
|
||||||
gaps_in = 3
|
gaps_in = 3
|
||||||
gaps_out = 4
|
gaps_out = 4
|
||||||
layout = master
|
layout = dwindle
|
||||||
border_size = 3
|
border_size = 3
|
||||||
col.inactive_border = 0xff5387ac
|
col.inactive_border = 0xff5387ac
|
||||||
col.active_border = 0xffac7853
|
col.active_border = 0xffac7853
|
||||||
@@ -19,11 +19,12 @@ dwindle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
decoration {
|
decoration {
|
||||||
|
drop_shadow = true
|
||||||
rounding = 4
|
rounding = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
animations {
|
animations {
|
||||||
enabled = false
|
enabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
misc {
|
misc {
|
||||||
@@ -38,29 +39,23 @@ binds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$menu = wofi -S run
|
$menu = wofi -S run
|
||||||
$terminal = alacritty || kitty
|
$terminal = alacritty
|
||||||
|
|
||||||
$mainMod = SUPER
|
$mainMod = SUPER
|
||||||
|
|
||||||
bind = $mainMod, P, exec, $menu
|
bind = $mainMod, P, exec, $menu
|
||||||
bind = $mainMod SHIFT, Return, exec, $terminal
|
bind = $mainMod SHIFT, Return, exec, $terminal
|
||||||
bind = $mainMod ALT, Return, exec, $terminal
|
|
||||||
bind = $mainMod, Return, layoutmsg,swapwithmaster master
|
bind = $mainMod, Return, layoutmsg,swapwithmaster master
|
||||||
bind = $mainMod CONTROL SHIFT, Q, exit
|
bind = $mainMod CONTROL SHIFT, Q, exit
|
||||||
bind = $mainMod, Q, exec, hyprctl reload
|
bind = $mainMod, Q, exec, hyprctl reload
|
||||||
bind = $mainMod CONTROL SHIFT, C, killactive
|
bind = $mainMod CONTROL SHIFT, C, killactive
|
||||||
bind = $mainMod CONTROL SHIFT, L, exec, swaylock -c 263c59
|
bind = $mainMod CONTROL SHIFT, L, exec, swaylock -c 263c59
|
||||||
bind = $mainMod ALT, O, exec, swaylock -c 263c59
|
|
||||||
bind = $mainMod CONTROL SHIFT, S, exec, swaylock -c 263c59
|
bind = $mainMod CONTROL SHIFT, S, exec, swaylock -c 263c59
|
||||||
bind = $mainMod CONTROL SHIFT, S, exec, systemctl suspend
|
bind = $mainMod CONTROL SHIFT, S, exec, systemctl suspend
|
||||||
bind = $mainMod ALT, S, exec, swaylock -c 263c59
|
|
||||||
bind = $mainMod ALT, S, exec, systemctl suspend
|
|
||||||
bind = $mainMod CONTROL, Space, togglefloating
|
bind = $mainMod CONTROL, Space, togglefloating
|
||||||
bind = $mainMod, D, exec, hyprctl keyword general:layout "dwindle"
|
bind = $mainMod, D, exec, hyprctl keyword general:layout "dwindle"
|
||||||
bind = $mainMod, M, exec, hyprctl keyword general:layout "master"
|
bind = $mainMod, M, exec, hyprctl keyword general:layout "master"
|
||||||
bind = $mainMod, F, fullscreen, 0
|
bind = $mainMod, F, fullscreen, 0
|
||||||
bind = $mainMod SHIFT, F, fullscreen, 1
|
|
||||||
bind = $mainMod ALT, F, fullscreen, 1
|
|
||||||
bind = $mainMod, U, layoutmsg, togglesplit
|
bind = $mainMod, U, layoutmsg, togglesplit
|
||||||
bind = $mainMod, I, layoutmsg, cycleprev
|
bind = $mainMod, I, layoutmsg, cycleprev
|
||||||
bind = $mainMod, O, layoutmsg, cyclenext
|
bind = $mainMod, O, layoutmsg, cyclenext
|
||||||
@@ -70,7 +65,6 @@ bind = $mainMod SHIFT, O, layoutmsg, swapnext
|
|||||||
bind = $mainMod CONTROL, I, layoutmsg, removemaster
|
bind = $mainMod CONTROL, I, layoutmsg, removemaster
|
||||||
bind = $mainMod CONTROL, O, layoutmsg, addmaster
|
bind = $mainMod CONTROL, O, layoutmsg, addmaster
|
||||||
bind = $mainMod SHIFT, F6, exec, ~/bin/lupan-set-theme toggle
|
bind = $mainMod SHIFT, F6, exec, ~/bin/lupan-set-theme toggle
|
||||||
bind = $mainMod ALT, T, exec, ~/bin/lupan-set-theme toggle
|
|
||||||
|
|
||||||
bind = $mainMod, h, movefocus, l
|
bind = $mainMod, h, movefocus, l
|
||||||
bind = $mainMod, j, movefocus, d
|
bind = $mainMod, j, movefocus, d
|
||||||
@@ -82,11 +76,6 @@ bind = $mainMod SHIFT, j, swapwindow, d
|
|||||||
bind = $mainMod SHIFT, k, swapwindow, u
|
bind = $mainMod SHIFT, k, swapwindow, u
|
||||||
bind = $mainMod SHIFT, l, swapwindow, r
|
bind = $mainMod SHIFT, l, swapwindow, r
|
||||||
|
|
||||||
bind = $mainMod ALT, h, swapwindow, l
|
|
||||||
bind = $mainMod ALT, j, swapwindow, d
|
|
||||||
bind = $mainMod ALT, k, swapwindow, u
|
|
||||||
bind = $mainMod ALT, l, swapwindow, r
|
|
||||||
|
|
||||||
bind = $mainMod CONTROL, h, layoutmsg, orientationleft
|
bind = $mainMod CONTROL, h, layoutmsg, orientationleft
|
||||||
bind = $mainMod CONTROL, j, layoutmsg, orientationbottom
|
bind = $mainMod CONTROL, j, layoutmsg, orientationbottom
|
||||||
bind = $mainMod CONTROL, k, layoutmsg, orientationtop
|
bind = $mainMod CONTROL, k, layoutmsg, orientationtop
|
||||||
@@ -116,21 +105,10 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
|||||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
bind = $mainMod ALT, 1, movetoworkspace, 1
|
|
||||||
bind = $mainMod ALT, 2, movetoworkspace, 2
|
|
||||||
bind = $mainMod ALT, 3, movetoworkspace, 3
|
|
||||||
bind = $mainMod ALT, 4, movetoworkspace, 4
|
|
||||||
bind = $mainMod ALT, 5, movetoworkspace, 5
|
|
||||||
bind = $mainMod ALT, 6, movetoworkspace, 6
|
|
||||||
bind = $mainMod ALT, 7, movetoworkspace, 7
|
|
||||||
bind = $mainMod ALT, 8, movetoworkspace, 8
|
|
||||||
bind = $mainMod ALT, 9, movetoworkspace, 9
|
|
||||||
bind = $mainMod ALT, 0, movetoworkspace, 10
|
|
||||||
|
|
||||||
bind = $mainMod, right, workspace, m+1
|
bind = $mainMod, right, workspace, m+1
|
||||||
bind = $mainMod, left, workspace, m-1
|
bind = $mainMod, left, workspace, m-1
|
||||||
|
|
||||||
# Switch workspaces on current monitor with mainMod + Control + [0-9]
|
# Switch workspaces on current monitor with mainMod CONTROL + Control + [0-9]
|
||||||
bind = $mainMod CONTROL, 1, focusworkspaceoncurrentmonitor, 1
|
bind = $mainMod CONTROL, 1, focusworkspaceoncurrentmonitor, 1
|
||||||
bind = $mainMod CONTROL, 2, focusworkspaceoncurrentmonitor, 2
|
bind = $mainMod CONTROL, 2, focusworkspaceoncurrentmonitor, 2
|
||||||
bind = $mainMod CONTROL, 3, focusworkspaceoncurrentmonitor, 3
|
bind = $mainMod CONTROL, 3, focusworkspaceoncurrentmonitor, 3
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
* {
|
* {
|
||||||
background-color: #3f4947;
|
background-color: #263c59;
|
||||||
color: #9bafac;
|
color: #7b899d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
border-bottom: 3px solid #9bafac;
|
border-bottom: 3px solid #7b899d;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
* {
|
* {
|
||||||
background-color: #dde4e3;
|
background-color: #8fa0a3;
|
||||||
color: #2c3131;
|
color: #394446;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
border-bottom: 3px solid #2c3131;
|
border-bottom: 3px solid #5c6d70;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: Fira Code Nerd Font;
|
font-family: Fira Code Nerd Font;
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces {
|
#workspaces {
|
||||||
padding: 0 0.5rem;
|
padding: 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
@@ -20,6 +20,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
padding: 0 0.5rem;
|
padding: 0 1rem;
|
||||||
border-bottom: 3px solid transparent;
|
border-bottom: 3px solid transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
font_family HurmitNerdFont
|
|
||||||
font_size 11
|
|
||||||
|
|
||||||
cursor_blink_interval 0
|
|
||||||
enable_audio_bell no
|
|
||||||
visual_bell_duration 1.0
|
|
||||||
|
|
||||||
tab_bar_min_tabs 1
|
|
||||||
tab_bar_style powerline
|
|
||||||
tab_bar_edge top
|
|
||||||
tab_bar_filter session:~ or session:^$
|
|
||||||
tab_title_template "{index}:{session_name}:{bell_symbol}{activity_symbol}{title}"
|
|
||||||
tab_powerline_style round
|
|
||||||
|
|
||||||
open_url_with qutebrowser
|
|
||||||
|
|
||||||
action_alias launch_tab_home launch --type tab --cwd=~
|
|
||||||
kitten_alias hints hints --hints-background-color red --hints-foreground-color white
|
|
||||||
|
|
||||||
map ctrl+shift+6 no_op
|
|
||||||
map ctrl+shift+0 nth_window -1
|
|
||||||
|
|
||||||
map ctrl+alt+1 goto_tab 1
|
|
||||||
map ctrl+alt+2 goto_tab 2
|
|
||||||
map ctrl+alt+3 goto_tab 3
|
|
||||||
map ctrl+alt+4 goto_tab 4
|
|
||||||
map ctrl+alt+5 goto_tab 5
|
|
||||||
map ctrl+alt+6 goto_tab 6
|
|
||||||
map ctrl+alt+7 goto_tab 7
|
|
||||||
map ctrl+alt+8 goto_tab 8
|
|
||||||
map ctrl+alt+9 goto_tab 9
|
|
||||||
map ctrl+alt+0 goto_tab -1
|
|
||||||
|
|
||||||
map ctrl+alt+h neighboring_window left
|
|
||||||
map ctrl+alt+j neighboring_window down
|
|
||||||
map ctrl+alt+k neighboring_window up
|
|
||||||
map ctrl+alt+l neighboring_window right
|
|
||||||
|
|
||||||
map ctrl+alt+a last_used_layout
|
|
||||||
map ctrl+alt+b goto_layout fat
|
|
||||||
map ctrl+alt+g goto_layout grid
|
|
||||||
map ctrl+alt+r goto_layout tall
|
|
||||||
|
|
||||||
map ctrl+alt+space goto_session -1
|
|
||||||
map ctrl+alt+return new_window_with_cwd
|
|
||||||
map ctrl+alt+d new_tab_with_cwd sh -c 'cd $(kitten choose-file --mode dir) && nvim'
|
|
||||||
map ctrl+alt+e new_tab_with_cwd nvim
|
|
||||||
map ctrl+alt+i new_tab_with_cwd lazygit
|
|
||||||
map ctrl+alt+f new_tab_with_cwd sh -c 'nvim $(kitten choose-file)'
|
|
||||||
map ctrl+alt+m toggle_layout stack
|
|
||||||
map ctrl+alt+o goto_session ~/.config/kitty/sessions
|
|
||||||
map ctrl+alt+/ goto_session --sort-by=alphabetical ~/.config/kitty/sessions
|
|
||||||
map ctrl+alt+p new_tab_with_cwd spf
|
|
||||||
map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R -
|
|
||||||
map ctrl+alt+w new_window_with_cwd
|
|
||||||
map ctrl+alt+t new_tab_with_cwd
|
|
||||||
map ctrl+alt+x close_window_with_confirmation
|
|
||||||
map ctrl+alt+u>d launch_tab_home sh -c 'cd $(kitten choose-file --mode dir) && nvim'
|
|
||||||
map ctrl+alt+u>f launch_tab_home sh -c 'nvim $(kitten choose-file)'
|
|
||||||
map ctrl+alt+v focus_visible_window
|
|
||||||
map ctrl+alt+y new_window nvim @selection
|
|
||||||
|
|
||||||
map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:.
|
|
||||||
map ctrl+alt+shift+t detach_tab
|
|
||||||
map ctrl+alt+shift+w detach_window
|
|
||||||
map ctrl+alt+shift+x close_session .
|
|
||||||
|
|
||||||
# BEGIN_KITTY_THEME
|
|
||||||
# Lupanbones-Dark
|
|
||||||
include current-theme.conf
|
|
||||||
# END_KITTY_THEME
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #9da0af
|
|
||||||
background #1f212e
|
|
||||||
selection_foreground #808080
|
|
||||||
selection_background #4d5580
|
|
||||||
|
|
||||||
cursor #bf8040
|
|
||||||
cursor_text_color #1f212e
|
|
||||||
|
|
||||||
active_border_color #862d2d
|
|
||||||
inactive_border_color #4d5580
|
|
||||||
|
|
||||||
active_tab_foreground #9da0af
|
|
||||||
active_tab_background #4d5580
|
|
||||||
inactive_tab_foreground #1f212e
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color1 #862d2d
|
|
||||||
color2 #3a783a
|
|
||||||
color3 #707010
|
|
||||||
color4 #345eb2
|
|
||||||
color5 #cc66cc
|
|
||||||
color6 #3a7878
|
|
||||||
color7 #a1a3aa
|
|
||||||
color8 #4d4d4d
|
|
||||||
color9 #c27070
|
|
||||||
color10 #40bf40
|
|
||||||
color11 #acac53
|
|
||||||
color12 #6b8ac7
|
|
||||||
color13 #8f248f
|
|
||||||
color14 #509595
|
|
||||||
color15 #dbdff0
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
# vim:ft=kitty
|
|
||||||
|
|
||||||
foreground #1f212e
|
|
||||||
background #faf8f5
|
|
||||||
selection_foreground #1f212e
|
|
||||||
selection_background #a6c7f2
|
|
||||||
|
|
||||||
cursor #1f212e
|
|
||||||
cursor_text_color #faf8f5
|
|
||||||
|
|
||||||
active_border_color #862d2d
|
|
||||||
inactive_border_color #a6c7f2
|
|
||||||
|
|
||||||
active_tab_foreground #1f212e
|
|
||||||
active_tab_background #a6c7f2
|
|
||||||
inactive_tab_foreground #faf8f5
|
|
||||||
inactive_tab_background #808080
|
|
||||||
|
|
||||||
color0 #1f212e
|
|
||||||
color1 #862d2d
|
|
||||||
color2 #3a783a
|
|
||||||
color3 #707010
|
|
||||||
color4 #345eb2
|
|
||||||
color5 #cc66cc
|
|
||||||
color6 #3a7878
|
|
||||||
color7 #a1a3aa
|
|
||||||
color8 #73778c
|
|
||||||
color9 #c27070
|
|
||||||
color10 #40bf40
|
|
||||||
color11 #acac53
|
|
||||||
color12 #6b8ac7
|
|
||||||
color13 #8f248f
|
|
||||||
color14 #509595
|
|
||||||
color15 #dae4f1
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
os:
|
|
||||||
edit: 'nvim {{filename}}'
|
|
||||||
editAtLine: 'nvim +{{line}} {{filename}}'
|
|
||||||
editAtLineAndWait: 'nvim +{{line}} {{filename}}'
|
|
||||||
editInTerminal: true
|
|
||||||
openDirInEditor: 'nvim {{dir}}'
|
|
||||||
|
|
||||||
gui:
|
|
||||||
nerdFontsVersion: "3"
|
|
||||||
|
|
||||||
theme:
|
|
||||||
selectedLineBgColor:
|
|
||||||
- reverse
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
local colors_name = "lupanbones"
|
|
||||||
vim.g.colors_name = colors_name -- Required when defining a colorscheme
|
|
||||||
|
|
||||||
local lush = require "lush"
|
|
||||||
local hsluv = lush.hsluv -- Human-friendly hsl
|
|
||||||
local util = require "zenbones.util"
|
|
||||||
|
|
||||||
local bg = vim.o.background
|
|
||||||
|
|
||||||
-- Define a palette. Use `palette_extend` to fill unspecified colors
|
|
||||||
local palette
|
|
||||||
if bg == "light" then
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#faf8f5",
|
|
||||||
fg = hsluv "#1f212e",
|
|
||||||
rose = hsluv "#bf8040",
|
|
||||||
leaf = hsluv "#3d8f66",
|
|
||||||
wood = hsluv "#acac53",
|
|
||||||
water = hsluv "#6b8ac7",
|
|
||||||
blossom = hsluv "#93806c",
|
|
||||||
sky = hsluv "#7461d1",
|
|
||||||
}, bg)
|
|
||||||
else
|
|
||||||
palette = util.palette_extend({
|
|
||||||
bg = hsluv "#1f212e",
|
|
||||||
fg = hsluv "#9da0af",
|
|
||||||
rose = hsluv "#bf8040",
|
|
||||||
leaf = hsluv "#3d8f66",
|
|
||||||
wood = hsluv "#d1d147",
|
|
||||||
water = hsluv "#6b8ac7",
|
|
||||||
blossom = hsluv "#93806c",
|
|
||||||
sky = hsluv "#7461d1",
|
|
||||||
}, bg)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Generate the lush specs using the generator util
|
|
||||||
local generator = require "zenbones.specs"
|
|
||||||
local base_specs = generator.generate(palette, bg, generator.get_global_config(colors_name, bg))
|
|
||||||
|
|
||||||
-- Optionally extend specs using Lush
|
|
||||||
local specs = lush.extends({ base_specs }).with(function()
|
|
||||||
return {
|
|
||||||
Statement { base_specs.Statement, fg = palette.rose },
|
|
||||||
String { fg = palette.leaf },
|
|
||||||
Special { fg = palette.water },
|
|
||||||
Type { fg = palette.sky, gui = "italic" },
|
|
||||||
Delimiter { fg = palette.blossom },
|
|
||||||
}
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Pass the specs to lush to apply
|
|
||||||
lush(specs)
|
|
||||||
|
|
||||||
-- Optionally set term colors
|
|
||||||
require("zenbones.term").apply_colors(palette)
|
|
||||||
@@ -1,20 +1 @@
|
|||||||
require("config.options")
|
require("lupan")
|
||||||
require("config.remap")
|
|
||||||
require("config.lsp")
|
|
||||||
|
|
||||||
require("plugins.arrow")
|
|
||||||
require("plugins.auto-session")
|
|
||||||
require("plugins.colorscheme")
|
|
||||||
require("plugins.conform")
|
|
||||||
require("plugins.flash")
|
|
||||||
require("plugins.fzf-lua")
|
|
||||||
require("plugins.guess-indent")
|
|
||||||
require("plugins.luasnip")
|
|
||||||
require("plugins.multicursor")
|
|
||||||
require("plugins.nvim-various-textobjs")
|
|
||||||
require("plugins.oil")
|
|
||||||
require("plugins.slimline")
|
|
||||||
require("plugins.snacks")
|
|
||||||
require("plugins.surround")
|
|
||||||
require("plugins.treesitter")
|
|
||||||
require("plugins.which-key")
|
|
||||||
|
|||||||
@@ -1,12 +1,55 @@
|
|||||||
{
|
{
|
||||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "1bf8b5b9caee51507aa51eaed3da5b0f2595c6b9" },
|
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
|
"arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
"blame.nvim": { "branch": "main", "commit": "dedbcdce857f708c63f261287ac7491a893912d0" },
|
||||||
"multicursor.nvim": { "branch": "1.0", "commit": "a6cf4e7daaf10a6b14bb7838caf779f0de5070cd" },
|
"bookmarks.nvim": { "branch": "main", "commit": "42371a76cdd786452b537490926b1b6a041672e5" },
|
||||||
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" }
|
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" },
|
||||||
|
"feline.nvim": { "branch": "main", "commit": "8bc28b94a16304aad2f53b8c3653b14803748c28" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "700c4a25caacbb4648c9a27972c2fe203948e0c2" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "47c8e3e571376b24de62408fd0c9d12f0a9fc0a3" },
|
||||||
|
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
|
||||||
|
"go.nvim": { "branch": "master", "commit": "fca26b05699ad06c077721823a0b1a8e02539d5c" },
|
||||||
|
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
|
||||||
|
"hierarchy-tree-go.nvim": { "branch": "main", "commit": "9fab9ddefe81edab4a144824955d2d085db3f49a" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "4c6479e98ad643cd584e9e7c4095c463e0d810eb" },
|
||||||
|
"leap.nvim": { "branch": "main", "commit": "24935d06c7e06bf8929feb24a3525cd128fc0cc4" },
|
||||||
|
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
|
||||||
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
|
||||||
|
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
|
||||||
|
"neogit": { "branch": "master", "commit": "71eb98630b5cb2277636fdccc74a7358e910c01b" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "bd7c76375a511994c9ca8d69441f134dc10ae3bd" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "687ea2f33955df0042bf228853a82696265e7e2d" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "9d68e876cce94fc9f8f8819da0c956a4429a3766" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "b77ed915ab1e53720a6283702816cea2695a2638" },
|
||||||
|
"orgmode": { "branch": "master", "commit": "cc51c1914e3f0bf20bd543a7176df5bab12ec247" },
|
||||||
|
"persisted.nvim": { "branch": "main", "commit": "0a9eebf5cc92b1113a382a660ee73f21ffd62ae7" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||||
|
"telescope-git-grep.nvim": { "branch": "main", "commit": "814217cb30c076bc5edebe36e525b05a7c9eb4b2" },
|
||||||
|
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
|
||||||
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" },
|
||||||
|
"tree-sitter-nu": { "branch": "main", "commit": "0bb9a602d9bc94b66fab96ce51d46a5a227ab76c" },
|
||||||
|
"tree-sitter-templ": { "branch": "master", "commit": "cf84ea53e2e2531f23009d676ac206090c1e2392" },
|
||||||
|
"treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "58a3acfc6d8d819324dab4c87068596319032e64" },
|
||||||
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
|
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||||
|
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||||
|
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }
|
||||||
}
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "clangd" },
|
|
||||||
filetypes = { "c", "cpp" },
|
|
||||||
root_markers = { ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "gopls" },
|
|
||||||
filetypes = { "go", "gomod", "gowork", "gosum", "gotmpl" },
|
|
||||||
root_markers = { "go.mod", "go.work", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "lua-language-server" },
|
|
||||||
filetypes = { "lua" },
|
|
||||||
root_markers = { ".luarc.json", ".git" },
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
runtime = {
|
|
||||||
version = "LuaJIT",
|
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" },
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "ols" },
|
|
||||||
filetypes = { "odin" },
|
|
||||||
root_markers = { ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "templ", "lsp" },
|
|
||||||
filetypes = { "templ" },
|
|
||||||
root_markers = { "go.mod", "go.work", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { "typescript-language-server", "--stdio" },
|
|
||||||
filetypes = { "javascript", "typescript", "javascriptreact", "typescriptreact" },
|
|
||||||
root_markers = { "package.json", "tsconfig.json", ".git" },
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
local home = os.getenv("HOME")
|
|
||||||
local filename = home .. "/.lightmode"
|
|
||||||
|
|
||||||
local colorschemes = nil
|
|
||||||
|
|
||||||
function M.set_colorschemes(dark, light)
|
|
||||||
colorschemes = { dark = dark, light = light }
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.terminalbg()
|
|
||||||
if vim.uv.fs_stat(filename) then
|
|
||||||
return "light"
|
|
||||||
else
|
|
||||||
return "dark"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.update_colorscheme(only_if_changed)
|
|
||||||
local next = M.terminalbg()
|
|
||||||
if not only_if_changed or next ~= vim.o.background then
|
|
||||||
vim.o.background = next
|
|
||||||
if colorschemes then
|
|
||||||
vim.cmd.colorscheme(colorschemes[next])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.toggle_colorscheme()
|
|
||||||
if vim.o.background == "dark" then
|
|
||||||
vim.o.background = "light"
|
|
||||||
else
|
|
||||||
vim.o.background = "dark"
|
|
||||||
end
|
|
||||||
if colorschemes then
|
|
||||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local w = vim.uv.new_fs_event()
|
|
||||||
|
|
||||||
local function watch(fname)
|
|
||||||
w:start(
|
|
||||||
fname,
|
|
||||||
{},
|
|
||||||
vim.schedule_wrap(function(...)
|
|
||||||
M.update_colorscheme(true)
|
|
||||||
w:stop()
|
|
||||||
watch(fname)
|
|
||||||
end)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
watch(home)
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
||||||
{ out, "WarningMsg" },
|
|
||||||
{ "\nPress any key to exit..." },
|
|
||||||
}, true, {})
|
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup({ { import = "plugins" } })
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
vim.lsp.enable({
|
|
||||||
"clangd",
|
|
||||||
"gopls",
|
|
||||||
"templ-lsp",
|
|
||||||
"lua_ls",
|
|
||||||
"ols",
|
|
||||||
"typescript-language-server",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
|
||||||
group = vim.api.nvim_create_augroup("lsp-keys-complete", { clear = true }),
|
|
||||||
callback = function(event)
|
|
||||||
vim.lsp.completion.enable(true, event.data.client_id, event.data.bufnr, {
|
|
||||||
convert = function(item)
|
|
||||||
return { abbr = item.label:gsub("%b()", "") }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get)
|
|
||||||
vim.keymap.set("n", "<leader>k", function()
|
|
||||||
vim.diagnostic.jump({ float = true, count = -1 })
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<leader>j", function()
|
|
||||||
vim.diagnostic.jump({ float = true, count = 1 })
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
vim.opt.shortmess = vim.opt.shortmess + "I"
|
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.maplocalleader = " \\"
|
|
||||||
|
|
||||||
vim.opt.number = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.title = true
|
|
||||||
|
|
||||||
vim.opt.ignorecase = true
|
|
||||||
vim.opt.smartcase = true
|
|
||||||
|
|
||||||
vim.opt.timeout = false
|
|
||||||
|
|
||||||
vim.o.undofile = true
|
|
||||||
|
|
||||||
vim.cmd([[autocmd TermOpen * startinsert]]);
|
|
||||||
|
|
||||||
vim.filetype.add({
|
|
||||||
extension = {
|
|
||||||
["kitty-session"] = 'kitty',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
set("n", "<M-h>", "<C-w>h")
|
|
||||||
set("n", "<M-k>", "<C-w>k")
|
|
||||||
set("n", "<M-j>", "<C-w>j")
|
|
||||||
set("n", "<M-l>", "<C-w>l")
|
|
||||||
|
|
||||||
set({ "n", 'v' }, "<leader>p", [["+p]])
|
|
||||||
set({ "n", 'v' }, "<leader>P", [["+P]])
|
|
||||||
set({ "n", 'v' }, "<leader>y", [["+y]])
|
|
||||||
set({ "n", 'v' }, "<leader>Y", [["+Y]])
|
|
||||||
|
|
||||||
set("n", "<Esc>", "<cmd>nohlsearch<cr>")
|
|
||||||
set("n", "<leader>K", "<cmd>cp<cr>")
|
|
||||||
set("n", "<leader>J", "<cmd>cn<cr>")
|
|
||||||
set("n", "<leader>x", "<cmd>copen<cr>")
|
|
||||||
set("n", "<leader>X", "<cmd>cclose<cr>")
|
|
||||||
|
|
||||||
set("n", "<leader>ga", "<cmd>tabnew | terminal lazygit<cr>")
|
|
||||||
18
nvim/.config/nvim/lua/lupan/autocmd.lua
Normal file
18
nvim/.config/nvim/lua/lupan/autocmd.lua
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-- [[ Highlight on yank ]]
|
||||||
|
-- See `:help vim.highlight.on_yank()`
|
||||||
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
desc = 'Highlight when yanking (copying) text',
|
||||||
|
group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
desc = 'Format on saving buffer',
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format()
|
||||||
|
end,
|
||||||
|
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
|
||||||
|
pattern = { '*.go', '*.lua', '*.rs' },
|
||||||
|
})
|
||||||
5
nvim/.config/nvim/lua/lupan/init.lua
Normal file
5
nvim/.config/nvim/lua/lupan/init.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
require("lupan.remap")
|
||||||
|
require("lupan.lazy")
|
||||||
|
require("lupan.options")
|
||||||
|
require("lupan.autocmd")
|
||||||
|
require('lazy').setup('plugins')
|
||||||
13
nvim/.config/nvim/lua/lupan/lazy.lua
Normal file
13
nvim/.config/nvim/lua/lupan/lazy.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
-- Install package manager (`:help lazy.nvim.txt`)
|
||||||
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system {
|
||||||
|
'git',
|
||||||
|
'clone',
|
||||||
|
'--filter=blob:none',
|
||||||
|
'https://github.com/folke/lazy.nvim.git',
|
||||||
|
'--branch=stable',
|
||||||
|
lazypath,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
54
nvim/.config/nvim/lua/lupan/options.lua
Normal file
54
nvim/.config/nvim/lua/lupan/options.lua
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
-- See `:help vim.o`
|
||||||
|
|
||||||
|
-- Disable intro message
|
||||||
|
vim.opt.shortmess = vim.opt.shortmess + 'I'
|
||||||
|
|
||||||
|
vim.opt.showmode = false
|
||||||
|
|
||||||
|
-- Set highlight on search
|
||||||
|
vim.o.hlsearch = true -- false
|
||||||
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||||
|
|
||||||
|
-- Make line numbers default
|
||||||
|
vim.wo.number = true
|
||||||
|
vim.wo.relativenumber = true
|
||||||
|
|
||||||
|
-- Enable mouse mode
|
||||||
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
-- Enable break indent
|
||||||
|
vim.o.breakindent = true
|
||||||
|
|
||||||
|
-- Save undo history
|
||||||
|
vim.o.undofile = true
|
||||||
|
|
||||||
|
-- Case-insensitive searching UNLESS \C or capital in search
|
||||||
|
vim.o.ignorecase = true
|
||||||
|
vim.o.smartcase = true
|
||||||
|
|
||||||
|
-- Keep signcolumn on by default
|
||||||
|
vim.wo.signcolumn = 'yes'
|
||||||
|
|
||||||
|
-- Decrease update time
|
||||||
|
vim.o.updatetime = 250
|
||||||
|
vim.o.timeoutlen = 300
|
||||||
|
|
||||||
|
-- Set completeopt to have a better completion experience
|
||||||
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
|
-- NOTE: You should make sure your terminal supports this
|
||||||
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
vim.o.scrolloff = 8
|
||||||
|
|
||||||
|
vim.o.tabstop = 8
|
||||||
|
vim.o.softtabstop = 4
|
||||||
|
vim.o.shiftwidth = 4
|
||||||
|
vim.o.expandtab = true
|
||||||
|
vim.o.expandtab = true
|
||||||
|
|
||||||
|
vim.g.lightspeed_no_default_keymaps = true
|
||||||
|
|
||||||
|
vim.o.cursorline = true
|
||||||
|
|
||||||
|
vim.opt.foldcolumn = '1'
|
||||||
119
nvim/.config/nvim/lua/lupan/remap.lua
Normal file
119
nvim/.config/nvim/lua/lupan/remap.lua
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
|
local key = vim.keymap.set
|
||||||
|
local opts = { silent = true, noremap = true }
|
||||||
|
|
||||||
|
key('v', '<Space>', '<Nop>', { silent = true })
|
||||||
|
|
||||||
|
-- Remap for dealing with word wrap
|
||||||
|
key('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||||
|
key('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||||
|
|
||||||
|
key("n", "<leader>dd", "<cmd>Oil<CR>", { desc = "[D]isplay [d]irectory" })
|
||||||
|
key("n", "<leader>df", "<cmd>Oil --float<CR>", { desc = "[D]isplay directory [f]loat" })
|
||||||
|
key("n", "<leader>ct", "<cmd>ColorizerToggle<CR>", { desc = "[C]olorizer [t]oggle" })
|
||||||
|
key("n", "<leader>ut", "<cmd>UndotreeToggle<CR>", { desc = "[U]undotree [t]oggle" })
|
||||||
|
|
||||||
|
-- tabs
|
||||||
|
|
||||||
|
key('n', '<leader>td', function()
|
||||||
|
require('lupan.ui').tab_change_dir()
|
||||||
|
end, { desc = '[T]ab change [d]irectory' })
|
||||||
|
|
||||||
|
key('n', '<leader>tD', function()
|
||||||
|
require('lupan.ui').tab_change_dir_newtab()
|
||||||
|
end, { desc = '[T]ab change [D]irectory (new tab)' })
|
||||||
|
|
||||||
|
key('n', '<leader>tm', function()
|
||||||
|
require('telescope-tabs').list_tabs(require 'telescope.themes'.get_dropdown())
|
||||||
|
end, { desc = '[T]ab change [D]irectory (new tab)' })
|
||||||
|
|
||||||
|
key('n', '<leader>tt', function()
|
||||||
|
require('telescope-tabs').go_to_previous()
|
||||||
|
end, { desc = '[T]ab [t]oggle previous' })
|
||||||
|
|
||||||
|
for i = 1, 9, 1 do
|
||||||
|
key('n', '<leader>t' .. i, '<cmd>' .. i .. 'tabnext<CR>', { desc = '[T]ab nr [' .. i .. ']' })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||||
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||||
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||||
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||||
|
|
||||||
|
key('n', '<leader>N', '<cmd>bn<CR>', { desc = '[N]ext buffer' })
|
||||||
|
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>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' })
|
||||||
|
key('n', '<leader>tl', '<cmd>tablast<CR>', { desc = '[T]tab [l]ast' })
|
||||||
|
|
||||||
|
key('v', 'J', ":m '>+1<CR>gv=gv", { desc = "Move lines down" })
|
||||||
|
key('v', 'K', ":m '<-2<CR>gv=gv", { desc = "Move lines up" })
|
||||||
|
|
||||||
|
-- Change window
|
||||||
|
key('n', '<C-j>', '<C-w>j', opts)
|
||||||
|
key('n', '<C-k>', '<C-w>k', opts)
|
||||||
|
key('n', '<C-h>', '<C-w>h', opts)
|
||||||
|
key('n', '<C-l>', '<C-w>l', opts)
|
||||||
|
|
||||||
|
-- Stay in key mode
|
||||||
|
key('v', '<', '<gv', opts)
|
||||||
|
key('v', '>', '>gv', opts)
|
||||||
|
|
||||||
|
-- Keep old value of register
|
||||||
|
key('v', 'P', '"_dP', opts)
|
||||||
|
|
||||||
|
-- LightSpeed
|
||||||
|
key('n', 'g/', '<Plug>Lightspeed_s', { desc = "Lightspeed forward search" })
|
||||||
|
key('n', 'g?', '<Plug>Lightspeed_S', { desc = "Lightspeed backward search" })
|
||||||
|
|
||||||
|
-- Clipboard and quickfix
|
||||||
|
key({ 'n', 'v' }, '<leader>y', '"+y', { desc = "Yank to clipboard" })
|
||||||
|
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" })
|
||||||
|
|
||||||
|
-- luasnip
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-k>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.expand_or_jumpable() then
|
||||||
|
ls.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-j>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.jumpable(-1) then
|
||||||
|
ls.jump(-1)
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ 'i', 's' }, "<c-l>", function()
|
||||||
|
local ls = require "luasnip"
|
||||||
|
if ls.choice_active() then
|
||||||
|
ls.change_choice(1)
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasnip.lua<CR>",
|
||||||
|
{ desc = "[S]nippets [s]ource" })
|
||||||
|
|
||||||
|
-- colors
|
||||||
|
|
||||||
|
key('n', '<F6>', function()
|
||||||
|
if vim.o.background == "dark" then
|
||||||
|
vim.o.background = "light"
|
||||||
|
else
|
||||||
|
vim.o.background = "dark"
|
||||||
|
end
|
||||||
|
end)
|
||||||
44
nvim/.config/nvim/lua/lupan/ui.lua
Normal file
44
nvim/.config/nvim/lua/lupan/ui.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
local actions = require "telescope.actions"
|
||||||
|
local action_state = require "telescope.actions.state"
|
||||||
|
local finders = require "telescope.finders"
|
||||||
|
local pickers = require "telescope.pickers"
|
||||||
|
local sorters = require "telescope.sorters"
|
||||||
|
local themes = require "telescope.themes"
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function enter(prompt_bufnr, action)
|
||||||
|
local selected = action_state.get_selected_entry()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
action(selected[1])
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.tab_change_dir(opts)
|
||||||
|
opts = opts or {}
|
||||||
|
local action = opts.action or vim.cmd.tc
|
||||||
|
local prompt_title = opts.prompt_title or "Tab change directory"
|
||||||
|
local cmd = { 'find', os.getenv('HOME'), '-maxdepth', '5', '-type', 'd', '-not', '-path', '*/.git*' }
|
||||||
|
local dropdown = themes.get_dropdown();
|
||||||
|
local picker_opts = {
|
||||||
|
prompt_title = prompt_title,
|
||||||
|
finder = finders.new_oneshot_job(cmd, {}),
|
||||||
|
sorter = sorters.get_fuzzy_file({}),
|
||||||
|
attach_mappings = function(_, map)
|
||||||
|
map({ "i", "n" }, "<CR>", function(prompt_bufnr) enter(prompt_bufnr, action) end)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
}
|
||||||
|
local change_dir = pickers.new(dropdown, picker_opts)
|
||||||
|
change_dir:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function tabnew_tcd(dir)
|
||||||
|
vim.cmd.tabnew(dir)
|
||||||
|
vim.cmd.tc(dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.tab_change_dir_newtab()
|
||||||
|
M.tab_change_dir({ action = tabnew_tcd, prompt_title = "Tab change directory (new tab)" })
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
35
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
35
nvim/.config/nvim/lua/plugins/appearance.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
local function terminalbg()
|
||||||
|
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
|
||||||
|
if ok then
|
||||||
|
for line in lines do
|
||||||
|
if string.find(line, 'light.toml') then
|
||||||
|
return "light"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return "dark"
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
-- Colorscheme
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.o.background = terminalbg()
|
||||||
|
vim.cmd.colorscheme('tokyonight')
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||||
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
|
main = "ibl",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'norcalli/nvim-colorizer.lua',
|
||||||
|
cmd = 'ColorizerToggle'
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
vim.pack.add({ "https://github.com/otavioschwanck/arrow.nvim" })
|
return {
|
||||||
|
{
|
||||||
local ok, arrow = pcall(require, "arrow")
|
"otavioschwanck/arrow.nvim",
|
||||||
if ok then
|
opts = {
|
||||||
arrow.setup({
|
show_icons = true,
|
||||||
show_icons = false,
|
leader_key = '<leader>;',
|
||||||
leader_key = "_",
|
buffer_leader_key = '<leader>m',
|
||||||
buffer_leader_key = " m",
|
}
|
||||||
})
|
}
|
||||||
else
|
}
|
||||||
print("plugin arrow missing")
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>wy", "<cmd>AutoSession search<cr>")
|
|
||||||
|
|
||||||
local ok, sess = pcall(require, "auto-session")
|
|
||||||
if ok then
|
|
||||||
sess.setup({
|
|
||||||
suppressed_dirs = { "~/", "~/src", "~/Downloads", "/" },
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin auto-session missing")
|
|
||||||
end
|
|
||||||
72
nvim/.config/nvim/lua/plugins/autocompletion.lua
Normal file
72
nvim/.config/nvim/lua/plugins/autocompletion.lua
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
return {
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
event = 'InsertEnter',
|
||||||
|
dependencies = {
|
||||||
|
-- Snippet Engine & its associated nvim-cmp source
|
||||||
|
{
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
build = (function()
|
||||||
|
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return 'make install_jsregexp'
|
||||||
|
end)(),
|
||||||
|
},
|
||||||
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
|
||||||
|
-- Adds LSP completion capabilities
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'hrsh7th/cmp-path',
|
||||||
|
|
||||||
|
-- Adds a number of user-friendly snippets
|
||||||
|
'rafamadriz/friendly-snippets',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
-- See `:help cmp`
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
local luasnip = require 'luasnip'
|
||||||
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
require('luasnip.loaders.from_lua').lazy_load({ paths = '~/.config/nvim/snippets' })
|
||||||
|
luasnip.config.setup {}
|
||||||
|
luasnip.filetype_extend('templ', { "html" })
|
||||||
|
|
||||||
|
cmp.setup {
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
-- completion = { autocomplete = false },
|
||||||
|
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||||
|
|
||||||
|
-- See `:help ins-completion`
|
||||||
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
-- ['<C-l>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||||
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
|
||||||
|
-- <c-l> will move you to the right of each of the expansion locations.
|
||||||
|
-- <c-h> is similar, except moving you backwards.
|
||||||
|
['<C-l>'] = cmp.mapping(function()
|
||||||
|
if luasnip.expand_or_locally_jumpable() then
|
||||||
|
luasnip.expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
['<C-h>'] = cmp.mapping(function()
|
||||||
|
if luasnip.locally_jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
end
|
||||||
|
end, { 'i', 's' }),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'path' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
14
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
14
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
vim.keymap.set({ "n", "v" }, "mm", "<cmd>BookmarksMark<cr>", { desc = "Mark current line into active BookmarkList." })
|
||||||
|
vim.keymap.set({ "n", "v" }, "mo", "<cmd>BookmarksGoto<cr>", { desc = "Go to bookmark at current active BookmarkList" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "ma", "<cmd>BookmarksCommands<cr>", { desc = "Find and trigger a bookmark command." })
|
||||||
|
vim.keymap.set({ "n", "v" }, "mg", "<cmd>BookmarksGotoRecent<cr>", { desc = "Go to latest visited/created Bookmark" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "ms", "<cmd>BookmarksSetActiveList<cr>", { desc = "Go to latest visited/created Bookmark" })
|
||||||
|
|
||||||
|
return {
|
||||||
|
"LintaoAmons/bookmarks.nvim",
|
||||||
|
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
|
||||||
|
dependencies = {
|
||||||
|
{ "nvim-telescope/telescope.nvim" },
|
||||||
|
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
"https://github.com/EdenEast/nightfox.nvim",
|
|
||||||
"https://github.com/rebelot/kanagawa.nvim",
|
|
||||||
"https://github.com/kepano/flexoki-neovim",
|
|
||||||
"https://github.com/rktjmp/lush.nvim",
|
|
||||||
"https://github.com/zenbones-theme/zenbones.nvim",
|
|
||||||
})
|
|
||||||
|
|
||||||
local cs = require("config.colorscheme")
|
|
||||||
cs.set_colorschemes("lupanbones", "lupanbones")
|
|
||||||
cs.update_colorscheme()
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
|
|
||||||
|
|
||||||
local ok, conform = pcall(require, "conform")
|
|
||||||
if ok then
|
|
||||||
conform.setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
})
|
|
||||||
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",
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin conform missing")
|
|
||||||
end
|
|
||||||
19
nvim/.config/nvim/lua/plugins/convenience.lua
Normal file
19
nvim/.config/nvim/lua/plugins/convenience.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
config = function()
|
||||||
|
require('which-key').setup()
|
||||||
|
|
||||||
|
-- Document existing key chains
|
||||||
|
require('which-key').register {
|
||||||
|
['<leader>c'] = { name = '[C]ode/Color', _ = 'which_key_ignore' },
|
||||||
|
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||||
|
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
||||||
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
22
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
22
nvim/.config/nvim/lua/plugins/editing.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
return {
|
||||||
|
-- "gc" to comment visual regions/lines
|
||||||
|
{
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
opts = {}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Undo browsing
|
||||||
|
'mbbill/undotree',
|
||||||
|
|
||||||
|
-- Tabstops autodetected
|
||||||
|
'tpope/vim-sleuth',
|
||||||
|
|
||||||
|
{
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||||
|
event = "VeryLazy",
|
||||||
|
config = function()
|
||||||
|
require("nvim-surround").setup({})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
220
nvim/.config/nvim/lua/plugins/feline.lua
Normal file
220
nvim/.config/nvim/lua/plugins/feline.lua
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
local function feline_config(_, opts)
|
||||||
|
local theme = {
|
||||||
|
bg = '#394b70',
|
||||||
|
black = '#1d202f',
|
||||||
|
skyblue = '#7aa2f7',
|
||||||
|
cyan = '#0db9d7',
|
||||||
|
fg = '#c0caf5',
|
||||||
|
green = '#1abc9c',
|
||||||
|
oceanblue = '#3d59a1',
|
||||||
|
magenta = '#bb9af7',
|
||||||
|
orange = '#ff9e64',
|
||||||
|
red = '#f7768e',
|
||||||
|
violet = '#9d7cd8',
|
||||||
|
white = '#a9b1d6',
|
||||||
|
yellow = '#e0af68',
|
||||||
|
}
|
||||||
|
|
||||||
|
local statusline = require('arrow.statusline')
|
||||||
|
local c = {
|
||||||
|
vi_mode = {
|
||||||
|
provider = 'vi_mode',
|
||||||
|
hl = function()
|
||||||
|
return {
|
||||||
|
name = require('feline.providers.vi_mode').get_mode_highlight_name(),
|
||||||
|
fg = require('feline.providers.vi_mode').get_mode_color(),
|
||||||
|
bg = theme.fg,
|
||||||
|
style = 'bold',
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
left_sep = {
|
||||||
|
str = ' █',
|
||||||
|
always_visible = true,
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
right_sep = {
|
||||||
|
str = '',
|
||||||
|
always_visible = true,
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
file_info = {
|
||||||
|
provider = 'file_info',
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = ' ',
|
||||||
|
},
|
||||||
|
right_sep = {
|
||||||
|
str = ' ',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
arrow = {
|
||||||
|
provider = function() return statusline.text_for_statusline_with_icons() end,
|
||||||
|
hl = {
|
||||||
|
fg = theme.red,
|
||||||
|
style = 'bold',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
file_size = {
|
||||||
|
provider = 'file_size',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
style = 'bold',
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = ' █',
|
||||||
|
always_visible = true,
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
line_percentage = {
|
||||||
|
provider = 'line_percentage',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
style = 'bold',
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = ' │ ',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
right_sep = {
|
||||||
|
str = ' │ ',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
position = {
|
||||||
|
provider = 'position',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
style = 'bold',
|
||||||
|
},
|
||||||
|
right_sep = {
|
||||||
|
str = '█ ',
|
||||||
|
always_visible = true,
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
diagnostic_errors = {
|
||||||
|
provider = 'diagnostic_errors',
|
||||||
|
hl = {
|
||||||
|
fg = theme.red,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostic_warnings = {
|
||||||
|
provider = 'diagnostic_warnings',
|
||||||
|
hl = {
|
||||||
|
fg = theme.yellow,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostic_info = {
|
||||||
|
provider = 'diagnostic_info',
|
||||||
|
hl = {
|
||||||
|
fg = theme.green,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
diagnostic_hints = {
|
||||||
|
provider = 'diagnostic_hints',
|
||||||
|
hl = {
|
||||||
|
fg = theme.blue,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
git_diff_added = {
|
||||||
|
provider = 'git_diff_added',
|
||||||
|
hl = {
|
||||||
|
fg = theme.green,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
git_diff_removed = {
|
||||||
|
provider = 'git_diff_removed',
|
||||||
|
hl = {
|
||||||
|
fg = theme.red,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
git_diff_changed = {
|
||||||
|
provider = 'git_diff_changed',
|
||||||
|
hl = {
|
||||||
|
fg = theme.yellow,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
git_branch = {
|
||||||
|
provider = 'git_branch',
|
||||||
|
hl = {
|
||||||
|
fg = theme.bg,
|
||||||
|
bg = theme.fg,
|
||||||
|
style = 'bold',
|
||||||
|
},
|
||||||
|
left_sep = {
|
||||||
|
str = ' █',
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
right_sep = {
|
||||||
|
str = ' ',
|
||||||
|
hl = {
|
||||||
|
fg = theme.fg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local active = {
|
||||||
|
{
|
||||||
|
c.vi_mode,
|
||||||
|
c.file_info,
|
||||||
|
c.arrow,
|
||||||
|
c.file_size,
|
||||||
|
c.line_percentage,
|
||||||
|
c.position,
|
||||||
|
c.diagnostic_errors,
|
||||||
|
c.diagnostic_warnings,
|
||||||
|
c.diagnostic_info,
|
||||||
|
c.diagnostic_hints,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
c.git_diff_added,
|
||||||
|
c.git_diff_removed,
|
||||||
|
c.git_diff_changed,
|
||||||
|
c.git_branch,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local inactive = {
|
||||||
|
{
|
||||||
|
c.file_info,
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
}
|
||||||
|
|
||||||
|
opts.components = { active = active, inactive = inactive }
|
||||||
|
local feline = require('feline')
|
||||||
|
feline.setup(opts)
|
||||||
|
feline.use_theme(theme)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- Statusline
|
||||||
|
'freddiehaddad/feline.nvim',
|
||||||
|
opts = {},
|
||||||
|
config = feline_config,
|
||||||
|
}
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/folke/flash.nvim" })
|
|
||||||
|
|
||||||
local ok, flash = pcall(require, "flash")
|
|
||||||
|
|
||||||
if ok then
|
|
||||||
flash.setup({
|
|
||||||
modes = {
|
|
||||||
char = {
|
|
||||||
enabled = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
set({ "n", "x", "o" }, "\\", function()
|
|
||||||
require("flash").jump()
|
|
||||||
end, { desc = "Flash" })
|
|
||||||
set({ "n", "x", "o" }, "=", function()
|
|
||||||
require("flash").treesitter()
|
|
||||||
end, { desc = "Flash Treesitter" })
|
|
||||||
set({ "o" }, "r", function()
|
|
||||||
require("flash").remote()
|
|
||||||
end, { desc = "Remote Flash" })
|
|
||||||
set({ "n", "x", "o" }, " t", function()
|
|
||||||
require("flash").treesitter_search()
|
|
||||||
end, { desc = "Treesitter Search" })
|
|
||||||
else
|
|
||||||
print("plugin flash missing")
|
|
||||||
end
|
|
||||||
@@ -1,232 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
"https://github.com/ibhagwan/fzf-lua",
|
|
||||||
"https://github.com/elanmed/fzf-lua-frecency.nvim",
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, fzf = pcall(require, "fzf-lua")
|
|
||||||
local ok2, frecency = pcall(require, "fzf-lua-frecency")
|
|
||||||
if ok then
|
|
||||||
fzf.setup({
|
|
||||||
keymap = {
|
|
||||||
builtin = {
|
|
||||||
true,
|
|
||||||
["<M-m>"] = "toggle-fullscreen",
|
|
||||||
},
|
|
||||||
fzf = {
|
|
||||||
true,
|
|
||||||
-- Use <c-q> to select all items and add them to the quickfix list
|
|
||||||
["ctrl-q"] = "select-all+accept",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
fzf.register_ui_select()
|
|
||||||
local odin_pkg = "~/cloned/Odin"
|
|
||||||
local function go_root()
|
|
||||||
return vim.fn.trim(vim.fn.system("go env GOROOT"))
|
|
||||||
end
|
|
||||||
local go_root_pkg = nil
|
|
||||||
local function go_mod()
|
|
||||||
return vim.fs.joinpath(vim.fn.trim(vim.fn.system("go env GOPATH")), "pkg/mod")
|
|
||||||
end
|
|
||||||
local go_mod_pkg = nil
|
|
||||||
local function go_grep(cwd)
|
|
||||||
local input = vim.fn.input("Go grep declarations> ")
|
|
||||||
if #input == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local search1 = "^(func|type) .*(?<= )(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]*( |\\()"
|
|
||||||
local search2 = "^[\\t]+(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +="
|
|
||||||
local search = "(" .. search1 .. "|" .. search2 .. ")"
|
|
||||||
fzf.grep({
|
|
||||||
cwd = cwd,
|
|
||||||
cmd = "rg -P -g '*.go'",
|
|
||||||
search = search,
|
|
||||||
no_esc = true,
|
|
||||||
profile = 'ivy',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local function odin_grep(cwd)
|
|
||||||
local input = vim.fn.input("Odin grep declarations> ")
|
|
||||||
if #input == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local search = "^[ \\t]*[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +::"
|
|
||||||
fzf.grep({
|
|
||||||
cwd = cwd,
|
|
||||||
cmd = "rg -g '*.odin'",
|
|
||||||
search = search,
|
|
||||||
no_esc = true,
|
|
||||||
profile = 'ivy',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
local set = vim.keymap.set
|
|
||||||
set("n", "<leader>ba", fzf.buffers, { desc = "FzfLua buffers" })
|
|
||||||
set("n", "<leader>bh", fzf.history, { desc = "FzfLua history" })
|
|
||||||
set("n", "<leader>bj", fzf.jumps, { desc = "FzfLua jumps" })
|
|
||||||
set("n", "<leader>ca", fzf.lsp_code_actions, { desc = "FzfLua LSP code actions" })
|
|
||||||
set("n", "<leader>cb", fzf.complete_bline, { desc = "FzfLua complete buffer line" })
|
|
||||||
set("n", "<leader>cc", fzf.commands, { desc = "FzfLua commands" })
|
|
||||||
set("n", "<leader>cf", fzf.complete_file, { desc = "FzfLua complete file" })
|
|
||||||
set("n", "<leader>cF", fzf.complete_path, { desc = "FzfLua complete path" })
|
|
||||||
set("n", "<leader>ch", fzf.command_history, { desc = "FzfLua command history" })
|
|
||||||
set("n", "<leader>cH", fzf.highlights, { desc = "FzfLua color highlights" })
|
|
||||||
set("n", "<leader>cl", fzf.complete_line, { desc = "FzfLua complete line" })
|
|
||||||
set("n", "<leader>co", fzf.nvim_options, { desc = "FzfLua nvim options" })
|
|
||||||
set("n", "<leader>cr", fzf.profiles, { desc = "FzfLua fzf profiles" })
|
|
||||||
set("n", "<leader>cs", fzf.colorschemes, { desc = "FzfLua color schemes" })
|
|
||||||
set("n", "<leader>ct", fzf.tabs, { desc = "FzfLua tabs" })
|
|
||||||
set("n", "<leader>da", fzf.diagnostics_document, { desc = "FzfLua document diagnostics" })
|
|
||||||
set("n", "<leader>dw", fzf.diagnostics_workspace, { desc = "FzfLua workspace diagnostics" })
|
|
||||||
set("n", "<leader>ec", function()
|
|
||||||
fzf.files({ cwd = vim.fn.stdpath("config") })
|
|
||||||
end, { desc = "FzfLua nvim config files" })
|
|
||||||
set("n", "<leader>ep", function()
|
|
||||||
fzf.files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
|
|
||||||
end, { desc = "FzfLua find files" })
|
|
||||||
set("n", "<leader>es", function()
|
|
||||||
fzf.files({ cwd = '~/.config/kitty/sessions' })
|
|
||||||
end, { desc = "FzfLua kitty sessions" })
|
|
||||||
set("n", "<leader>eS", "<cmd>Oil ~/.config/kitty/sessions<cr>", { desc = "Kitty sessions (dir)" })
|
|
||||||
set("n", "<leader>fa", fzf.git_files, { desc = "FzfLua git files" })
|
|
||||||
set("n", "<leader>ff", fzf.files, { desc = "FzfLua find files" })
|
|
||||||
set("n", "<leader>fg", fzf.global, { desc = "FzfLua global" })
|
|
||||||
set("n", "<leader>fo", frecency.frecency, { desc = "FzfLua frecency oldfiles" })
|
|
||||||
set("n", "<leader>ft", fzf.filetypes, { desc = "FzfLua file types" })
|
|
||||||
set("n", "<leader>;", function()
|
|
||||||
frecency.frecency({ cwd_only = true })
|
|
||||||
end, { desc = "FzfLua frecency files" })
|
|
||||||
set("n", "<leader>gb", fzf.git_branches, { desc = "FzfLua git branches" })
|
|
||||||
set("n", "<leader>gB", fzf.git_blame, { desc = "FzfLua git blame" })
|
|
||||||
set("n", "<leader>gc", fzf.git_bcommits, { desc = "FzfLua git buffer commits" })
|
|
||||||
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
|
|
||||||
set("n", "<leader>gd", fzf.git_diff, { desc = "FzfLua git diff" })
|
|
||||||
set("n", "<leader>gh", fzf.git_hunks, { desc = "FzfLua git hunks" })
|
|
||||||
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
|
|
||||||
set("n", "<leader>gs", fzf.git_status, { desc = "FzfLua git status" })
|
|
||||||
set("n", "<leader>gS", fzf.git_stash, { desc = "FzfLua git stash" })
|
|
||||||
set("n", "<leader>gt", fzf.git_tags, { desc = "FzfLua git tags" })
|
|
||||||
set("n", "<leader>gw", fzf.git_worktrees, { desc = "FzfLua git worktrees" })
|
|
||||||
set("n", "<leader>ha", fzf.helptags, { desc = "FzfLua help tags" })
|
|
||||||
set("n", "<leader>hk", fzf.keymaps, { desc = "FzfLua keymaps" })
|
|
||||||
set("n", "<leader>ma", fzf.marks, { desc = "FzfLua marks" })
|
|
||||||
set("n", "<leader>mp", fzf.manpages, { desc = "FzfLua man pages" })
|
|
||||||
set("n", "<leader>qa", fzf.quickfix, { desc = "FzfLua quickfix" })
|
|
||||||
set("n", "<leader>qs", fzf.quickfix_stack, { desc = "FzfLua quickfix stack" })
|
|
||||||
set("n", "<leader>ql", fzf.loclist, { desc = "FzfLua loclist" })
|
|
||||||
set("n", "<leader>qh", fzf.loclist_stack, { desc = "FzfLua loclist stack" })
|
|
||||||
set("n", "<leader>ra", fzf.resume, { desc = "FzfLua resume" })
|
|
||||||
set("n", "<leader>rr", fzf.registers, { desc = "FzfLua registers" })
|
|
||||||
set("n", "<leader>ta", fzf.treesitter, { desc = "FzfLua treesitter symbols" })
|
|
||||||
set("n", "<leader>sa", fzf.live_grep, { desc = "FzfLua live grep" })
|
|
||||||
set("n", "<leader>sb", fzf.blines, { desc = "FzfLua buffer lines" })
|
|
||||||
set("n", "<leader>sB", fzf.grep_curbuf, { desc = "FzfLua grep current buffer" })
|
|
||||||
set("n", "<leader>sg", fzf.grep, { desc = "FzfLua grep" })
|
|
||||||
set("n", "<leader>sh", fzf.search_history, { desc = "FzfLua search history" })
|
|
||||||
set("n", "<leader>sl", fzf.grep_loclist, { desc = "FzfLua grep loclist" })
|
|
||||||
set("n", "<leader>sn", fzf.live_grep_native, { desc = "FzfLua live grep native" })
|
|
||||||
set("n", "<leader>so", fzf.lines, { desc = "FzfLua open buffers lines" })
|
|
||||||
set("n", "<leader>sp", fzf.grep_project, { desc = "FzfLua grep project" })
|
|
||||||
set("n", "<leader>sq", fzf.grep_quickfix, { desc = "FzfLua grep quickfix" })
|
|
||||||
set("n", "<leader>sr", function() fzf.grep({ resume = true }) end, { desc = "FzfLua grep resume" })
|
|
||||||
set("n", "<leader>sc", fzf.spellcheck, { desc = "FzfLua spell check" })
|
|
||||||
set("n", "<leader>ss", fzf.spell_suggest, { desc = "FzfLua spell suggest" })
|
|
||||||
set({ "n", "v" }, "<leader>sv", fzf.grep_visual, { desc = "FzfLua grep visual" })
|
|
||||||
set("n", "<leader>sw", fzf.grep_cword, { desc = "FzfLua grep cword" })
|
|
||||||
set("n", "<leader>sW", fzf.grep_cWORD, { desc = "FzfLua grep cword" })
|
|
||||||
set("n", "<leader>U", fzf.undotree, { desc = "FzfLua undo tree" })
|
|
||||||
set("n", "<leader>wa", fzf.lsp_live_workspace_symbols, { desc = "FzfLua document symbols" })
|
|
||||||
set("n", "<leader>wd", fzf.lsp_document_symbols, { desc = "FzfLua document symbols" })
|
|
||||||
set("n", "<leader>wf", fzf.lsp_finder, { desc = "FzfLua LSP finder" })
|
|
||||||
set("n", "<leader>wp", fzf.lsp_workspace_symbols, { desc = "FzfLua workspace symbols" })
|
|
||||||
set("n", "<leader>wz", fzf.zoxide, { desc = "FzfLua zoxide" })
|
|
||||||
set("n", "gd", fzf.lsp_definitions, { desc = "Goto Definition" })
|
|
||||||
set("n", "gD", fzf.lsp_declarations, { desc = "Goto Declarations" })
|
|
||||||
set("n", "grr", fzf.lsp_references, { desc = "References" })
|
|
||||||
set("n", "gri", fzf.lsp_implementations, { desc = "Goto Implementation" })
|
|
||||||
set("n", "grI", fzf.lsp_incoming_calls, { desc = "Incomming calls" })
|
|
||||||
set("n", "grO", fzf.lsp_outgoing_calls, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grs", fzf.lsp_type_sub, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grp", fzf.lsp_type_super, { desc = "Outgouing calls" })
|
|
||||||
set("n", "grt", fzf.lsp_typedefs, { desc = "Goto Type Definition" })
|
|
||||||
|
|
||||||
set("n", "<leader>Gf", function()
|
|
||||||
fzf.files({ cwd = go_root(), cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go files" })
|
|
||||||
set("n", "<leader>GF", function()
|
|
||||||
fzf.files({ cwd = go_mod(), cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go mod files" })
|
|
||||||
set("n", "<leader>Gl", function()
|
|
||||||
fzf.files({ cmd = "fd --type f -e go" })
|
|
||||||
end, { desc = "FzfLua Go current dir files" })
|
|
||||||
set("n", "<leader>Gs", function()
|
|
||||||
go_grep(go_root())
|
|
||||||
end, { desc = "FzfLua Go grep declarations" })
|
|
||||||
set("n", "<leader>GS", function()
|
|
||||||
go_grep(go_mod())
|
|
||||||
end, { desc = "FzfLua Go grep mod declarations" })
|
|
||||||
set("n", "<leader>Gd", function()
|
|
||||||
go_grep(nil)
|
|
||||||
end, { desc = "FzfLua Go current dir grep declarations" })
|
|
||||||
set("n", "<leader>Gm", function()
|
|
||||||
go_grep(go_mod_pkg or go_mod())
|
|
||||||
end, { desc = "FzfLua Go grep mod declarations" })
|
|
||||||
set("n", "<leader>GM", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = "fd '' --type d " .. vim.fn.shellescape(go_mod()) .. [[ | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
go_mod_pkg = vim.fn.trim(a[1])
|
|
||||||
go_grep(go_mod_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Go select package and grep package declarations" })
|
|
||||||
set("n", "<leader>Gp", function()
|
|
||||||
go_grep(go_root_pkg or go_root())
|
|
||||||
end, { desc = "FzfLua Go grep package declarations" })
|
|
||||||
set("n", "<leader>GP", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = "fd '' --type d " .. vim.fn.shellescape(go_root()) .. [[ | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
go_root_pkg = vim.fn.trim(a[1])
|
|
||||||
go_grep(go_root_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Go select package and grep package declarations" })
|
|
||||||
|
|
||||||
set("n", "<leader>of", function()
|
|
||||||
fzf.files({ cwd = "~/cloned/Odin", cmd = "fd --type f -e odin" })
|
|
||||||
end, { desc = "FzfLua Odin files" })
|
|
||||||
set("n", "<leader>ol", function()
|
|
||||||
fzf.files({ cmd = "fd --type f -e odin" })
|
|
||||||
end, { desc = "FzfLua Odin current dir files" })
|
|
||||||
set("n", "<leader>os", function()
|
|
||||||
odin_grep("~/cloned/Odin")
|
|
||||||
end, { desc = "FzfLua Odin grep declarations" })
|
|
||||||
set("n", "<leader>od", function()
|
|
||||||
odin_grep(nil)
|
|
||||||
end, { desc = "FzfLua Odin grep declarations" })
|
|
||||||
set("n", "<leader>op", function()
|
|
||||||
odin_grep(odin_pkg)
|
|
||||||
end, { desc = "FzfLua Odin grep package declarations" })
|
|
||||||
set("n", "<leader>oP", function()
|
|
||||||
fzf.zoxide({
|
|
||||||
cmd = [[fd '' --type d ~/cloned/Odin | awk '{print "\t"$1}']],
|
|
||||||
actions = {
|
|
||||||
["enter"] = function(a)
|
|
||||||
odin_pkg = vim.fn.trim(a[1])
|
|
||||||
odin_grep(odin_pkg)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end, { desc = "FzfLua Odin select package and grep package declarations" })
|
|
||||||
else
|
|
||||||
print("plugin fzf-lua missing")
|
|
||||||
end
|
|
||||||
if not ok2 then
|
|
||||||
print("plugin fzf-lua-frecency missing")
|
|
||||||
end
|
|
||||||
|
|
||||||
--vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
|
||||||
58
nvim/.config/nvim/lua/plugins/git.lua
Normal file
58
nvim/.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
return {
|
||||||
|
-- Git
|
||||||
|
{
|
||||||
|
'NeogitOrg/neogit',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'sindrets/diffview.nvim',
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local neogit = require('neogit')
|
||||||
|
neogit.setup()
|
||||||
|
vim.keymap.set('n', '<leader>go', neogit.open, { desc = 'Neo[g]it [O]pen' })
|
||||||
|
vim.keymap.set('n', '<leader>g.', function() neogit.open({ cwd = '%:p:h' }) end,
|
||||||
|
{ desc = 'Neo[g]it open in current file repository' })
|
||||||
|
local diffview = require('diffview')
|
||||||
|
vim.keymap.set('n', '<leader>gh', diffview.file_history, { desc = '[G]it [H]istory' })
|
||||||
|
vim.keymap.set('n', '<leader>g%', function() diffview.file_history(nil, { '%' }) end,
|
||||||
|
{ desc = '[G]it history for [%] current file' })
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'FabijanZulj/blame.nvim',
|
||||||
|
config = function()
|
||||||
|
local blame = require('blame')
|
||||||
|
vim.keymap.set('n', '<leader>gb', function() blame.toggle({ args = 'window' }) end)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- Adds git releated signs to the gutter, as well as utilities for managing changes
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
opts = {
|
||||||
|
-- See `:help gitsigns.txt`
|
||||||
|
signs = {
|
||||||
|
add = { text = '+' },
|
||||||
|
change = { text = '~' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
local gs = require('gitsigns')
|
||||||
|
vim.keymap.set('n', '<leader>gp', gs.prev_hunk,
|
||||||
|
{ buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
|
||||||
|
vim.keymap.set('n', '<leader>gn', gs.next_hunk,
|
||||||
|
{ 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>HD', function() gs.diffthis('~') end,
|
||||||
|
{ buffer = bufnr, desc = '[H]unk [D]iff' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
'backdround/global-note.nvim',
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>n",
|
||||||
|
function()
|
||||||
|
require('global-note').toggle_note()
|
||||||
|
end,
|
||||||
|
desc = 'Toggle global [N]ote',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
"ray-x/go.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"ray-x/guihua.lua",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("go").setup()
|
||||||
|
end,
|
||||||
|
event = { "CmdlineEnter" },
|
||||||
|
ft = { "go", 'gomod' },
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/NMAC427/guess-indent.nvim" })
|
|
||||||
|
|
||||||
local ok, guess_indent = pcall(require, "guess-indent")
|
|
||||||
if ok then
|
|
||||||
guess_indent.setup()
|
|
||||||
else
|
|
||||||
print("plugin guess-indent missing")
|
|
||||||
end
|
|
||||||
53
nvim/.config/nvim/lua/plugins/init.lua
Normal file
53
nvim/.config/nvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'crusj/hierarchy-tree-go.nvim',
|
||||||
|
dependencies = 'neovim/nvim-lspconfig',
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'ggandor/leap.nvim',
|
||||||
|
opts = {
|
||||||
|
safe_labels = {},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set({ 'n', 'x', 'o' }, 'gs', '<Plug>(leap)')
|
||||||
|
vim.keymap.set({ 'n', 'x', 'o' }, 'gS', '<Plug>(leap-from-window)')
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"tpope/vim-repeat",
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'stevearc/oil.nvim',
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function(opts)
|
||||||
|
require("oil").setup({
|
||||||
|
default_file_explorer = true,
|
||||||
|
delete_to_trash = true,
|
||||||
|
})
|
||||||
|
vim.keymap.set("n", "-", "<cmd>Oil<CR>", { desc = "Open parent directory" })
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'Wansmer/treesj',
|
||||||
|
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||||
|
config = function()
|
||||||
|
local tsj = require('treesj')
|
||||||
|
tsj.setup({
|
||||||
|
use_default_keymaps = false,
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader>tg', tsj.toggle, { desc = "[T]ree to[g]gle one-line" })
|
||||||
|
vim.keymap.set('n', '<leader>tj', tsj.join, { desc = "[T]ree [J]oin one-line" })
|
||||||
|
vim.keymap.set('n', '<leader>ts', tsj.split, { desc = "[T]ree [S]plit one-line" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
156
nvim/.config/nvim/lua/plugins/lsp.lua
Normal file
156
nvim/.config/nvim/lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||||
|
'williamboman/mason.nvim',
|
||||||
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||||
|
'folke/neodev.nvim',
|
||||||
|
|
||||||
|
-- Useful status updates for LSP.
|
||||||
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('my-lsp-attach', { clear = true }),
|
||||||
|
callback = function(event)
|
||||||
|
local map = function(keys, func, desc)
|
||||||
|
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)
|
||||||
|
if client and client.server_capabilities.documentHighlightProvider then
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
callback = function()
|
||||||
|
local clients = vim.lsp.get_clients({ bufnr = event.buf })
|
||||||
|
for _i, cl in ipairs(clients) do
|
||||||
|
if cl.name == 'unocss' then
|
||||||
|
return -- skip highlight if unocss is attached (workaround)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.lsp.buf.document_highlight()
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
|
buffer = event.buf,
|
||||||
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||||
|
|
||||||
|
local servers = {
|
||||||
|
clangd = {},
|
||||||
|
gopls = {},
|
||||||
|
-- pyright = {},
|
||||||
|
rust_analyzer = {},
|
||||||
|
tsserver = {},
|
||||||
|
|
||||||
|
lua_ls = {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = { version = 'LuaJIT' },
|
||||||
|
workspace = { checkThirdParty = false },
|
||||||
|
telemetry = { enable = false },
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
html = {},
|
||||||
|
htmx = {},
|
||||||
|
unocss = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.html.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.htmx.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
require 'lspconfig'.unocss.setup {
|
||||||
|
filetypes = { "html", "templ" },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Setup neovim lua configuration
|
||||||
|
require('neodev').setup()
|
||||||
|
|
||||||
|
require('mason').setup()
|
||||||
|
|
||||||
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
|
vim.list_extend(ensure_installed, {
|
||||||
|
'stylua', -- Used to format lua code
|
||||||
|
})
|
||||||
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup {
|
||||||
|
handlers = {
|
||||||
|
function(server_name)
|
||||||
|
local server = servers[server_name] or {}
|
||||||
|
-- This handles overriding only values explicitly passed
|
||||||
|
-- by the server configuration above. Useful when disabling
|
||||||
|
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||||
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||||
|
require('lspconfig')[server_name].setup(server)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'nvimdev/lspsaga.nvim',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('lspsaga').setup({
|
||||||
|
lightbulb = { enable = false }
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader>la', '<cmd>Lspsaga code_action<CR>', { desc = "[L]spsaga code [A]ction" })
|
||||||
|
vim.keymap.set('n', '<leader>lb', '<cmd>Lspsaga show_buf_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [B]uffer diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>lc', '<cmd>Lspsaga show_cursor_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [C]ursor diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>ld', '<cmd>Lspsaga goto_definition<CR>', { desc = "[L]spsaga goto [D]efinition" })
|
||||||
|
vim.keymap.set('n', '<leader>lD', '<cmd>Lspsaga goto_type_definition<CR>',
|
||||||
|
{ desc = "[L]spsaga goto type [D]efinition" })
|
||||||
|
vim.keymap.set('n', '<leader>lf', '<cmd>Lspsaga finder<CR>', { desc = "[L]spsaga [F]inder" })
|
||||||
|
vim.keymap.set('n', '<leader>lI', '<cmd>Lspsaga finder imp<CR>', { desc = "[L]spsaga finder [I]mplementations" })
|
||||||
|
vim.keymap.set('n', '<leader>li', '<cmd>Lspsaga incoming_calls<CR>', { desc = "[L]spsaga [I]ncomping calls" })
|
||||||
|
vim.keymap.set('n', '<leader>ll', '<cmd>Lspsaga show_line_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [L]ine diagnostics" })
|
||||||
|
vim.keymap.set('n', '<leader>lo', '<cmd>Lspsaga outgoing_calls<CR>', { desc = "[L]spsaga [O]utgoing calls" })
|
||||||
|
vim.keymap.set('n', '<leader>lO', '<cmd>Lspsaga outline<CR>', { desc = "[L]spsaga [O]utline" })
|
||||||
|
vim.keymap.set('n', '<leader>lp', '<cmd>Lspsaga peek_definition<CR>', { desc = "[L]spsaga [P]eek definition" })
|
||||||
|
vim.keymap.set('n', '<leader>lP', '<cmd>Lspsaga peek_type_definition<CR>',
|
||||||
|
{ desc = "[L]spsaga [P]eek type definition" })
|
||||||
|
vim.keymap.set('n', '<leader>lw', '<cmd>Lspsaga show_workspace_diagnostics<CR>',
|
||||||
|
{ desc = "[L]spsaga [W]orkspace diagnostics" })
|
||||||
|
vim.keymap.set({ 'n', 't' }, '<C-_>', '<cmd>Lspsaga term_toggle<CR>', { desc = "[L]spsaga [T]erm toggle" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
vim.api.nvim_create_autocmd("PackChanged", {
|
|
||||||
group = vim.api.nvim_create_augroup("luasnip-update", { clear = true }),
|
|
||||||
callback = function(ev)
|
|
||||||
local name, kind = ev.data.spec.name, ev.data.kind
|
|
||||||
if name == "luasnip" and (kind == "install" or kind == "update") then
|
|
||||||
vim.system({ "make install_jsregexp" }, { cwd = ev.data.path }):wait()
|
|
||||||
print("luasnip make done.")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.pack.add({ { src = "https://github.com/L3MON4D3/LuaSnip", version = vim.version.range("^2.0.0") } })
|
|
||||||
local ok, ls = pcall(require, "luasnip")
|
|
||||||
|
|
||||||
if ok then
|
|
||||||
vim.keymap.set({ "i" }, "<C-K>", function()
|
|
||||||
ls.expand()
|
|
||||||
end, { silent = true })
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-L>", function(fallback)
|
|
||||||
if ls.locally_jumpable() then
|
|
||||||
ls.jump(1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-L>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-J>", function()
|
|
||||||
if ls.locally_jumpable() then
|
|
||||||
ls.jump(-1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-J>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
|
|
||||||
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
|
||||||
if ls.choice_active() then
|
|
||||||
ls.change_choice(1)
|
|
||||||
else
|
|
||||||
local key = vim.api.nvim_replace_termcodes("<C-E>", true, false, true)
|
|
||||||
vim.api.nvim_feedkeys(key, "n", false)
|
|
||||||
end
|
|
||||||
end, { silent = true })
|
|
||||||
|
|
||||||
require("luasnip.loaders.from_lua").load({ paths = vim.fs.joinpath(vim.fn.stdpath("config"), "lua", "snippets") })
|
|
||||||
else
|
|
||||||
print("plugin luasnip missing")
|
|
||||||
end
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
vim.pack.add({ { src = "https://github.com/jake-stewart/multicursor.nvim", version = "1.0" } })
|
|
||||||
|
|
||||||
local ok, mc = pcall(require, "multicursor-nvim")
|
|
||||||
if ok then
|
|
||||||
mc.setup()
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
-- Add or skip cursor above/below the main cursor.
|
|
||||||
set({ "n", "x" }, "<c-k>", function()
|
|
||||||
mc.lineAddCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<c-j>", function()
|
|
||||||
mc.lineAddCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-k>", function()
|
|
||||||
mc.lineSkipCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-j>", function()
|
|
||||||
mc.lineSkipCursor(1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Add or skip adding a new cursor by matching word/selection
|
|
||||||
set({ "n", "x" }, "<c-n>", function()
|
|
||||||
mc.matchAddCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-n>", function()
|
|
||||||
mc.matchSkipCursor(1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<c-p>", function()
|
|
||||||
mc.matchAddCursor(-1)
|
|
||||||
end)
|
|
||||||
set({ "n", "x" }, "<leader><c-p>", function()
|
|
||||||
mc.matchSkipCursor(-1)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Add and remove cursors with control + left click.
|
|
||||||
set("n", "<c-leftmouse>", mc.handleMouse)
|
|
||||||
set("n", "<c-leftdrag>", mc.handleMouseDrag)
|
|
||||||
set("n", "<c-leftrelease>", mc.handleMouseRelease)
|
|
||||||
|
|
||||||
-- Disable and enable cursors.
|
|
||||||
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor)
|
|
||||||
|
|
||||||
-- Mappings defined in a keymap layer only apply when there are
|
|
||||||
-- multiple cursors. This lets you have overlapping mappings.
|
|
||||||
mc.addKeymapLayer(function(layerSet)
|
|
||||||
-- Select a different cursor as the main one.
|
|
||||||
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
|
|
||||||
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
|
|
||||||
|
|
||||||
-- Delete the main cursor.
|
|
||||||
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
|
|
||||||
|
|
||||||
-- Enable and clear cursors using escape.
|
|
||||||
layerSet("n", "<esc>", function()
|
|
||||||
if not mc.cursorsEnabled() then
|
|
||||||
mc.enableCursors()
|
|
||||||
else
|
|
||||||
mc.clearCursors()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- Customize how cursors look.
|
|
||||||
local hl = vim.api.nvim_set_hl
|
|
||||||
hl(0, "MultiCursorCursor", { reverse = true })
|
|
||||||
hl(0, "MultiCursorVisual", { link = "Visual" })
|
|
||||||
hl(0, "MultiCursorSign", { link = "SignColumn" })
|
|
||||||
hl(0, "MultiCursorMatchPreview", { link = "Search" })
|
|
||||||
hl(0, "MultiCursorDisabledCursor", { reverse = true })
|
|
||||||
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
|
|
||||||
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
|
|
||||||
else
|
|
||||||
print("plugin multicursor-nvim missing")
|
|
||||||
end
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/chrisgrieser/nvim-various-textobjs" })
|
|
||||||
|
|
||||||
local ok, vto = pcall(require, "various-textobjs")
|
|
||||||
if ok then
|
|
||||||
vto.setup({ keymaps = { useDefaults = true, diabledDefaults = { 'r' } } })
|
|
||||||
vim.keymap.set({ 'o', 'x' }, ' }', vto.restOfParagraph)
|
|
||||||
else
|
|
||||||
print("plugin nvim-various-textobjs missing")
|
|
||||||
end
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/stevearc/oil.nvim" })
|
|
||||||
|
|
||||||
local ok, oil = pcall(require, "oil")
|
|
||||||
if ok then
|
|
||||||
oil.setup()
|
|
||||||
else
|
|
||||||
print("plugin oil missing")
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })
|
|
||||||
19
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
19
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
return {
|
||||||
|
"olimorris/persisted.nvim",
|
||||||
|
lazy = false, -- make sure the plugin is always loaded at startup
|
||||||
|
config = function()
|
||||||
|
require("persisted").setup({
|
||||||
|
autoload = true,
|
||||||
|
ignored_dirs = {
|
||||||
|
"~/.config",
|
||||||
|
"~/tmp",
|
||||||
|
"/tmp",
|
||||||
|
{ "/", exact = true },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("telescope").load_extension("persisted")
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>sp", "<cmd>:Telescope persisted<cr>", desc = "Search [P]ersisted" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/sschleemilch/slimline.nvim" })
|
|
||||||
|
|
||||||
local ok, slimline = pcall(require, "slimline")
|
|
||||||
if ok then
|
|
||||||
slimline.setup()
|
|
||||||
else
|
|
||||||
print("plugin slimline missing")
|
|
||||||
end
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/folke/snacks.nvim" })
|
|
||||||
|
|
||||||
local ok, snacks = pcall(require, "snacks")
|
|
||||||
if ok then
|
|
||||||
snacks.setup({
|
|
||||||
picker = { enabled = false },
|
|
||||||
})
|
|
||||||
else
|
|
||||||
print("plugin snacks missing")
|
|
||||||
end
|
|
||||||
|
|
||||||
local set = vim.keymap.set
|
|
||||||
|
|
||||||
set("n", "<leader>ea", function()
|
|
||||||
Snacks.explorer()
|
|
||||||
end, { desc = "File Explorer" })
|
|
||||||
|
|
||||||
set("n", "<leader>gl", function()
|
|
||||||
Snacks.picker.git_log_line()
|
|
||||||
end, { desc = "Git Log Line" })
|
|
||||||
|
|
||||||
set({ "n", "v" }, "<leader>gx", function()
|
|
||||||
Snacks.gitbrowse()
|
|
||||||
end, { desc = "Git Browse" })
|
|
||||||
|
|
||||||
set("n", "<leader>xR", function()
|
|
||||||
Snacks.picker.resume()
|
|
||||||
end, { desc = "Resume" })
|
|
||||||
|
|
||||||
set("n", "<leader>n", function()
|
|
||||||
Snacks.notifier.show_history()
|
|
||||||
end, { desc = "Notification History" })
|
|
||||||
|
|
||||||
set("n", "<leader>N", function()
|
|
||||||
Snacks.picker.notifications()
|
|
||||||
end, { desc = "Notifications" })
|
|
||||||
|
|
||||||
set("n", "<leader>$", function()
|
|
||||||
Snacks.rename.rename_file()
|
|
||||||
end, { desc = "Rename File" })
|
|
||||||
|
|
||||||
set("n", "<leader>z", function()
|
|
||||||
Snacks.zen.zoom()
|
|
||||||
end, { desc = "Toggle Zoom" })
|
|
||||||
|
|
||||||
set("n", "<leader>.", function()
|
|
||||||
Snacks.scratch()
|
|
||||||
end, { desc = "Toggle Scratch Buffer" })
|
|
||||||
|
|
||||||
set("n", "<leader>x.", function()
|
|
||||||
Snacks.scratch.select()
|
|
||||||
end, { desc = "Select Scratch Buffer" })
|
|
||||||
|
|
||||||
-- Terminal
|
|
||||||
|
|
||||||
set({ "n", "t" }, "<c-/>", function()
|
|
||||||
Snacks.terminal()
|
|
||||||
end, { desc = "Toggle Terminal" })
|
|
||||||
|
|
||||||
set({ "n", "t" }, "<c-_>", function()
|
|
||||||
Snacks.terminal()
|
|
||||||
end, { desc = "which_key_ignore" })
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("VimEnter", {
|
|
||||||
callback = function()
|
|
||||||
-- Setup some globals for debugging (lazy-loaded)
|
|
||||||
_G.dd = function(...)
|
|
||||||
Snacks.debug.inspect(...)
|
|
||||||
end
|
|
||||||
_G.bt = function()
|
|
||||||
Snacks.debug.backtrace()
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Override print to use snacks for `:=` command
|
|
||||||
if vim.fn.has("nvim-0.11") == 1 then
|
|
||||||
vim._print = function(_, ...)
|
|
||||||
dd(...)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
vim.print = _G.dd
|
|
||||||
end
|
|
||||||
|
|
||||||
-- 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,
|
|
||||||
})
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
vim.pack.add({
|
|
||||||
{
|
|
||||||
src = "https://github.com/kylechui/nvim-surround",
|
|
||||||
version = vim.version.range("^3.0.0"),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
local ok, surround = pcall(require, "nvim-surround")
|
|
||||||
if ok then
|
|
||||||
surround.setup()
|
|
||||||
else
|
|
||||||
print("plugin surround missing")
|
|
||||||
end
|
|
||||||
28
nvim/.config/nvim/lua/plugins/telescope-tabs.lua
Normal file
28
nvim/.config/nvim/lua/plugins/telescope-tabs.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
local function get_tab_idx(tab_id)
|
||||||
|
for i, tabnr in ipairs(vim.api.nvim_list_tabpages()) do
|
||||||
|
if tabnr == tab_id then
|
||||||
|
return i
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return -1
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
'LukasPietzschmann/telescope-tabs',
|
||||||
|
dependencies = { 'nvim-telescope/telescope.nvim' },
|
||||||
|
lazy = true,
|
||||||
|
config = function()
|
||||||
|
require 'telescope-tabs'.setup {
|
||||||
|
entry_formatter = function(tab_id, buffer_ids, file_names, file_paths, is_current)
|
||||||
|
local cwd = vim.fn.getcwd(-1, get_tab_idx(tab_id))
|
||||||
|
local entry_string = table.concat(file_names, ', ')
|
||||||
|
return string.format('%d: %s %s%s', tab_id, cwd, entry_string, is_current and ' <' or '')
|
||||||
|
end,
|
||||||
|
entry_ordinal = function(tab_id, buffer_ids, file_names, file_paths, is_current)
|
||||||
|
local cwd = vim.fn.getcwd(-1, get_tab_idx(tab_id))
|
||||||
|
local entry_string = table.concat(file_names, ', ')
|
||||||
|
return string.format('%s %s', cwd, entry_string)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
101
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
101
nvim/.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
return {
|
||||||
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
{ -- If encountering errors, see telescope-fzf-native README for install instructions
|
||||||
|
'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
build = 'make',
|
||||||
|
cond = function()
|
||||||
|
return vim.fn.executable 'make' == 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||||
|
|
||||||
|
|
||||||
|
-- change directory with telescope from a list of directories
|
||||||
|
{
|
||||||
|
"SalOrak/whaler",
|
||||||
|
opts = {
|
||||||
|
directories = { "/home/lupan/src" },
|
||||||
|
oneoff_directories = { "/home/lupan/dotfiles" },
|
||||||
|
auto_file_explorer = false,
|
||||||
|
auto_cwd = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Icons, requires Nerd font.
|
||||||
|
{ 'nvim-tree/nvim-web-devicons' },
|
||||||
|
|
||||||
|
'davvid/telescope-git-grep.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local telescope = require 'telescope'
|
||||||
|
-- To list available key bindings inside given telescope picker:
|
||||||
|
-- - Insert mode: <c-/>
|
||||||
|
-- - Normal mode: ?
|
||||||
|
telescope.setup {
|
||||||
|
extensions = {
|
||||||
|
['ui-select'] = {
|
||||||
|
require('telescope.themes').get_dropdown(),
|
||||||
|
},
|
||||||
|
whaler = {
|
||||||
|
directories = { "/home/lupan/src" },
|
||||||
|
oneoff_directories = { "/home/lupan/dotfiles" },
|
||||||
|
auto_file_explorer = false,
|
||||||
|
auto_cwd = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
pcall(telescope.load_extension, 'fzf')
|
||||||
|
pcall(telescope.load_extension, 'ui-select')
|
||||||
|
pcall(telescope.load_extension, 'whaler')
|
||||||
|
pcall(telescope.load_extension, 'git_grep')
|
||||||
|
|
||||||
|
-- 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>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,
|
||||||
|
{ 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,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,84 +1,93 @@
|
|||||||
-- run ":TSUpdate" after plugin update
|
return {
|
||||||
-- If hooks need to run on install, run this before `vim.pack.add()`
|
|
||||||
vim.api.nvim_create_autocmd("PackChanged", {
|
|
||||||
group = vim.api.nvim_create_augroup("nvim-treesitter-update", { clear = true }),
|
|
||||||
callback = function(ev)
|
|
||||||
local name, kind = ev.data.spec.name, ev.data.kind
|
|
||||||
if name == "nvim-treesitter" and kind == "update" then
|
|
||||||
if not ev.data.active then
|
|
||||||
vim.cmd.packadd("nvim-treesitter")
|
|
||||||
end
|
|
||||||
vim.cmd("TSUpdate")
|
|
||||||
print("TSUpdate done.")
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.pack.add({
|
{ -- Highlight, edit, and navigate code
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", version = "master" },
|
'nvim-treesitter/nvim-treesitter',
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
|
dependencies = {
|
||||||
})
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
local ok, configs = pcall(require, "nvim-treesitter.configs")
|
'nvim-orgmode/orgmode', -- as configured together
|
||||||
if ok then
|
'vrischmann/tree-sitter-templ',
|
||||||
configs.setup({
|
"nushell/tree-sitter-nu", -- additional parser
|
||||||
|
},
|
||||||
|
build = ':TSUpdate',
|
||||||
|
config = function()
|
||||||
|
-- See `:help nvim-treesitter`
|
||||||
|
local org = require('orgmode')
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
require('nvim-treesitter.configs').setup {
|
||||||
|
ensure_installed = { 'c', 'cpp', 'go', 'haskell', 'lua', 'org', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
|
||||||
|
auto_install = false,
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = { 'org' },
|
||||||
|
},
|
||||||
|
indent = { enable = true },
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = '<c-space>',
|
||||||
|
node_incremental = '<c-space>',
|
||||||
|
scope_incremental = '<c-s>',
|
||||||
|
node_decremental = '<C-p>',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
lookahead = true,
|
lookahead = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["aa"] = "@parameter.outer",
|
['aa'] = '@parameter.outer',
|
||||||
["ia"] = "@parameter.inner",
|
['ia'] = '@parameter.inner',
|
||||||
["af"] = "@function.outer",
|
['af'] = '@function.outer',
|
||||||
["if"] = "@function.inner",
|
['if'] = '@function.inner',
|
||||||
["ac"] = "@class.outer",
|
['ac'] = '@class.outer',
|
||||||
["ic"] = "@class.inner",
|
['ic'] = '@class.inner',
|
||||||
["al"] = "@call.outer",
|
['al'] = '@call.outer',
|
||||||
["il"] = "@call.inner",
|
['il'] = '@call.inner',
|
||||||
["ao"] = "@loop.outer",
|
['ao'] = '@loop.outer',
|
||||||
["io"] = "@loop.inner",
|
['io'] = '@loop.inner',
|
||||||
["ad"] = "@conditional.outer",
|
['ar'] = '@return.outer',
|
||||||
["id"] = "@conditional.inner",
|
['ir'] = '@return.inner',
|
||||||
["ar"] = "@return.outer",
|
['as'] = '@statement.outer',
|
||||||
["ir"] = "@return.inner",
|
['ag'] = '@assignment.outer',
|
||||||
["as"] = "@statement.outer",
|
['ig'] = '@assignment.inner',
|
||||||
["ag"] = "@assignment.outer",
|
|
||||||
["ig"] = "@assignment.inner",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
move = {
|
move = {
|
||||||
enable = true,
|
enable = true,
|
||||||
set_jumps = true,
|
set_jumps = true,
|
||||||
goto_next_start = {
|
goto_next_start = {
|
||||||
["]m"] = "@function.outer",
|
[']m'] = '@function.outer',
|
||||||
["]]"] = "@class.outer",
|
[']]'] = '@class.outer',
|
||||||
},
|
},
|
||||||
goto_next_end = {
|
goto_next_end = {
|
||||||
["]M"] = "@function.outer",
|
[']M'] = '@function.outer',
|
||||||
["]["] = "@class.outer",
|
[']['] = '@class.outer',
|
||||||
},
|
},
|
||||||
goto_previous_start = {
|
goto_previous_start = {
|
||||||
["[m"] = "@function.outer",
|
['[m'] = '@function.outer',
|
||||||
["[["] = "@class.outer",
|
['[['] = '@class.outer',
|
||||||
},
|
},
|
||||||
goto_previous_end = {
|
goto_previous_end = {
|
||||||
["[M"] = "@function.outer",
|
['[M'] = '@function.outer',
|
||||||
["[]"] = "@class.outer",
|
['[]'] = '@class.outer',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
swap = {
|
swap = {
|
||||||
enable = true,
|
enable = true,
|
||||||
swap_next = {
|
swap_next = {
|
||||||
["<leader>cp"] = "@parameter.inner",
|
['<leader>a'] = '@parameter.inner',
|
||||||
},
|
},
|
||||||
swap_previous = {
|
swap_previous = {
|
||||||
["<leader>cP"] = "@parameter.inner",
|
['<leader>A'] = '@parameter.inner',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
org.setup({
|
||||||
|
org_agenda_files = { '~/org/*.org' },
|
||||||
|
org_default_notes_file = '~/org/capture.org',
|
||||||
})
|
})
|
||||||
else
|
end,
|
||||||
print("plugin nvim-treesitter.configs missing")
|
}
|
||||||
end
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
vim.pack.add({ "https://github.com/folke/which-key.nvim" })
|
|
||||||
|
|
||||||
local ok, whichkey = pcall(require, "which-key")
|
|
||||||
if ok then
|
|
||||||
whichkey.setup({ preset = "helix", delay = 1000 })
|
|
||||||
else
|
|
||||||
print("plugin whichkey missing")
|
|
||||||
end
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
return {
|
|
||||||
s(
|
|
||||||
"ife",
|
|
||||||
fmt(
|
|
||||||
[[
|
|
||||||
if err != nil {
|
|
||||||
<>
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(0),
|
|
||||||
},
|
|
||||||
{ delimiters = "<>" }
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
s(
|
|
||||||
"ifse",
|
|
||||||
fmt(
|
|
||||||
[[
|
|
||||||
if <><>err = <>; err != nil {
|
|
||||||
<>
|
|
||||||
}
|
|
||||||
]],
|
|
||||||
{
|
|
||||||
i(1),
|
|
||||||
f(function(args)
|
|
||||||
local a = args[1][1]
|
|
||||||
if string.sub(a, -2) == ", " or a == "" then
|
|
||||||
return ""
|
|
||||||
elseif string.sub(a, -1) == "," then
|
|
||||||
return " "
|
|
||||||
else
|
|
||||||
return ", "
|
|
||||||
end
|
|
||||||
end, { 1 }),
|
|
||||||
i(2),
|
|
||||||
i(0),
|
|
||||||
},
|
|
||||||
{ delimiters = "<>" }
|
|
||||||
)
|
|
||||||
),
|
|
||||||
}
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": {
|
|
||||||
"LuaSnip": {
|
|
||||||
"rev": "5a1e39223db9a0498024a77b8441169d260c8c25",
|
|
||||||
"src": "https://github.com/L3MON4D3/LuaSnip",
|
|
||||||
"version": "2.0.0 - 3.0.0"
|
|
||||||
},
|
|
||||||
"arrow.nvim": {
|
|
||||||
"rev": "6e0f726f55f99332dd726a53effd6813786b6d49",
|
|
||||||
"src": "https://github.com/otavioschwanck/arrow.nvim"
|
|
||||||
},
|
|
||||||
"auto-session": {
|
|
||||||
"rev": "62437532b38495551410b3f377bcf4aaac574ebe",
|
|
||||||
"src": "https://github.com/rmagatti/auto-session"
|
|
||||||
},
|
|
||||||
"conform.nvim": {
|
|
||||||
"rev": "c2526f1cde528a66e086ab1668e996d162c75f4f",
|
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
|
||||||
},
|
|
||||||
"flash.nvim": {
|
|
||||||
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
|
||||||
"src": "https://github.com/folke/flash.nvim"
|
|
||||||
},
|
|
||||||
"flexoki-neovim": {
|
|
||||||
"rev": "c3e2251e813d29d885a7cbbe9808a7af234d845d",
|
|
||||||
"src": "https://github.com/kepano/flexoki-neovim"
|
|
||||||
},
|
|
||||||
"fzf-lua": {
|
|
||||||
"rev": "d9908fd0a5474994f00526ed17f0b77339dc0152",
|
|
||||||
"src": "https://github.com/ibhagwan/fzf-lua"
|
|
||||||
},
|
|
||||||
"fzf-lua-frecency.nvim": {
|
|
||||||
"rev": "5726403e132fe8699d670c7ef8d59dbed887b4e6",
|
|
||||||
"src": "https://github.com/elanmed/fzf-lua-frecency.nvim"
|
|
||||||
},
|
|
||||||
"guess-indent.nvim": {
|
|
||||||
"rev": "84a4987ff36798c2fc1169cbaff67960aed9776f",
|
|
||||||
"src": "https://github.com/NMAC427/guess-indent.nvim"
|
|
||||||
},
|
|
||||||
"kanagawa.nvim": {
|
|
||||||
"rev": "aef7f5cec0a40dbe7f3304214850c472e2264b10",
|
|
||||||
"src": "https://github.com/rebelot/kanagawa.nvim"
|
|
||||||
},
|
|
||||||
"lush.nvim": {
|
|
||||||
"rev": "9c60ec2279d62487d942ce095e49006af28eed6e",
|
|
||||||
"src": "https://github.com/rktjmp/lush.nvim"
|
|
||||||
},
|
|
||||||
"multicursor.nvim": {
|
|
||||||
"rev": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4",
|
|
||||||
"src": "https://github.com/jake-stewart/multicursor.nvim",
|
|
||||||
"version": "'1.0'"
|
|
||||||
},
|
|
||||||
"nightfox.nvim": {
|
|
||||||
"rev": "ba47d4b4c5ec308718641ba7402c143836f35aa9",
|
|
||||||
"src": "https://github.com/EdenEast/nightfox.nvim"
|
|
||||||
},
|
|
||||||
"nvim-surround": {
|
|
||||||
"rev": "1098d7b3c34adcfa7feb3289ee434529abd4afd1",
|
|
||||||
"src": "https://github.com/kylechui/nvim-surround",
|
|
||||||
"version": "3.0.0 - 4.0.0"
|
|
||||||
},
|
|
||||||
"nvim-treesitter": {
|
|
||||||
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
|
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
|
|
||||||
"version": "'master'"
|
|
||||||
},
|
|
||||||
"nvim-treesitter-textobjects": {
|
|
||||||
"rev": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef",
|
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
"version": "'master'"
|
|
||||||
},
|
|
||||||
"nvim-various-textobjs": {
|
|
||||||
"rev": "34ca4f6b54cf167554c5792cacc69c930b654136",
|
|
||||||
"src": "https://github.com/chrisgrieser/nvim-various-textobjs"
|
|
||||||
},
|
|
||||||
"oil.nvim": {
|
|
||||||
"rev": "f55b25e493a7df76371cfadd0ded5004cb9cd48a",
|
|
||||||
"src": "https://github.com/stevearc/oil.nvim"
|
|
||||||
},
|
|
||||||
"slimline.nvim": {
|
|
||||||
"rev": "6b1f20780a26813ba3c2f248c6c6f61e7281bb7b",
|
|
||||||
"src": "https://github.com/sschleemilch/slimline.nvim"
|
|
||||||
},
|
|
||||||
"snacks.nvim": {
|
|
||||||
"rev": "fe7cfe9800a182274d0f868a74b7263b8c0c020b",
|
|
||||||
"src": "https://github.com/folke/snacks.nvim"
|
|
||||||
},
|
|
||||||
"which-key.nvim": {
|
|
||||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
|
||||||
"src": "https://github.com/folke/which-key.nvim"
|
|
||||||
},
|
|
||||||
"zenbones.nvim": {
|
|
||||||
"rev": "22b7fb75593412e0dc81b4bdefae718e9e84aa82",
|
|
||||||
"src": "https://github.com/zenbones-theme/zenbones.nvim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
3
nvim/.config/nvim/snippets/lua/snippets.lua
Normal file
3
nvim/.config/nvim/snippets/lua/snippets.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
s("ct", t "-- TODO: ")
|
||||||
|
}
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"workspace.library" : [
|
|
||||||
"/usr/local/share/oxwm"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,321 +0,0 @@
|
|||||||
---@meta
|
|
||||||
|
|
||||||
---Load type definitions for LSP
|
|
||||||
---@module 'oxwm'
|
|
||||||
|
|
||||||
-- Modifier key: "Mod4" is the Super/Windows key, "Mod1" is Alt
|
|
||||||
local modkey = "Mod4"
|
|
||||||
|
|
||||||
-- Terminal emulator command (defaults to alacritty)
|
|
||||||
local terminal = "st"
|
|
||||||
|
|
||||||
local colors
|
|
||||||
local f = io.open(os.getenv("HOME") .. "/.lightmode")
|
|
||||||
if f ~= nil then
|
|
||||||
io.close(f)
|
|
||||||
colors = require("light")
|
|
||||||
else
|
|
||||||
colors = require("dark")
|
|
||||||
end
|
|
||||||
os.execute("hsetroot -solid '" .. colors.bg .. "'")
|
|
||||||
|
|
||||||
-- Workspace tags - can be numbers, names, or icons (requires a Nerd Font)
|
|
||||||
local tags = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }
|
|
||||||
|
|
||||||
-- Font for the status bar (use "fc-list" to see available fonts)
|
|
||||||
local bar_font = "monospace:style=Bold:size=10"
|
|
||||||
|
|
||||||
-- Define your blocks
|
|
||||||
-- Similar to widgets in qtile, or dwmblocks
|
|
||||||
local blocks = {
|
|
||||||
oxwm.bar.block.ram({
|
|
||||||
format = "Ram: {used}/{total} GB",
|
|
||||||
interval = 5,
|
|
||||||
color = colors.light_blue,
|
|
||||||
underline = false,
|
|
||||||
}),
|
|
||||||
oxwm.bar.block.static({
|
|
||||||
text = " │ ",
|
|
||||||
interval = 999999999,
|
|
||||||
color = colors.lavender,
|
|
||||||
underline = false,
|
|
||||||
}),
|
|
||||||
oxwm.bar.block.shell({
|
|
||||||
format = "{}",
|
|
||||||
command = "uname -r",
|
|
||||||
interval = 999999999,
|
|
||||||
color = colors.red,
|
|
||||||
underline = false,
|
|
||||||
}),
|
|
||||||
-- oxwm.bar.block.static({
|
|
||||||
-- text = " │ ",
|
|
||||||
-- interval = 999999999,
|
|
||||||
-- color = colors.lavender,
|
|
||||||
-- underline = false,
|
|
||||||
-- }),
|
|
||||||
-- oxwm.bar.block.battery({
|
|
||||||
-- format = "Bat: {}%",
|
|
||||||
-- charging = "⚡ Bat: {}%",
|
|
||||||
-- discharging = "- Bat: {}%",
|
|
||||||
-- full = "✓ Bat: {}%",
|
|
||||||
-- interval = 30,
|
|
||||||
-- color = colors.green,
|
|
||||||
-- underline = false,
|
|
||||||
-- }),
|
|
||||||
oxwm.bar.block.static({
|
|
||||||
text = " │ ",
|
|
||||||
interval = 999999999,
|
|
||||||
color = colors.lavender,
|
|
||||||
underline = false,
|
|
||||||
}),
|
|
||||||
oxwm.bar.block.datetime({
|
|
||||||
format = "{}",
|
|
||||||
date_format = "%a, %b %d - %H:%M",
|
|
||||||
interval = 1,
|
|
||||||
color = colors.cyan,
|
|
||||||
underline = false,
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Basic Settings
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
oxwm.set_terminal(terminal)
|
|
||||||
oxwm.set_modkey(modkey) -- This is for Mod + mouse binds, such as drag/resize
|
|
||||||
oxwm.set_tags(tags)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Layouts
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Set custom symbols for layouts (displayed in the status bar)
|
|
||||||
-- Available layouts: "tiling", "normie" (floating), "grid", "monocle", "tabbed"
|
|
||||||
oxwm.set_layout_symbol("tiling", "[T]")
|
|
||||||
oxwm.set_layout_symbol("normie", "[F]")
|
|
||||||
oxwm.set_layout_symbol("tabbed", "[=]")
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Appearance
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Border configuration
|
|
||||||
|
|
||||||
-- Width in pixels
|
|
||||||
oxwm.border.set_width(3)
|
|
||||||
-- Color of focused window border
|
|
||||||
oxwm.border.set_focused_color(colors.orange)
|
|
||||||
-- Color of unfocused window borders
|
|
||||||
oxwm.border.set_unfocused_color(colors.grey)
|
|
||||||
|
|
||||||
-- Smart Enabled = No border if 1 window
|
|
||||||
oxwm.gaps.set_smart(true)
|
|
||||||
-- Inner gaps (horizontal, vertical) in pixels
|
|
||||||
oxwm.gaps.set_inner(5, 5)
|
|
||||||
-- Outer gaps (horizontal, vertical) in pixels
|
|
||||||
oxwm.gaps.set_outer(5, 5)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Window Rules
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Rules allow you to automatically configure windows based on their properties
|
|
||||||
-- You can match windows by class, instance, title, or role
|
|
||||||
-- Available properties: floating, tag, fullscreen, etc.
|
|
||||||
--
|
|
||||||
-- Common use cases:
|
|
||||||
-- - Force floating for certain applications (dialogs, utilities)
|
|
||||||
-- - Send specific applications to specific workspaces
|
|
||||||
-- - Configure window behavior based on title or class
|
|
||||||
|
|
||||||
-- Examples (uncomment to use):
|
|
||||||
oxwm.rule.add({ instance = "gimp", floating = true })
|
|
||||||
-- oxwm.rule.add({ class = "Alacritty", tag = 9, focus = true })
|
|
||||||
-- oxwm.rule.add({ class = "firefox", title = "Library", floating = true })
|
|
||||||
-- oxwm.rule.add({ class = "firefox", tag = 2 })
|
|
||||||
-- oxwm.rule.add({ instance = "mpv", floating = true })
|
|
||||||
|
|
||||||
-- To find window properties, use xprop and click on the window
|
|
||||||
-- WM_CLASS(STRING) shows both instance and class (instance, class)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Status Bar Configuration
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Font configuration
|
|
||||||
oxwm.bar.set_font(bar_font)
|
|
||||||
|
|
||||||
-- Set your blocks here (defined above)
|
|
||||||
oxwm.bar.set_blocks(blocks)
|
|
||||||
|
|
||||||
-- Bar color schemes (for workspace tag display)
|
|
||||||
-- Parameters: foreground, background, border
|
|
||||||
|
|
||||||
-- Unoccupied tags
|
|
||||||
oxwm.bar.set_scheme_normal(colors.fg, colors.bg, "#444444")
|
|
||||||
-- Occupied tags
|
|
||||||
oxwm.bar.set_scheme_occupied(colors.cyan, colors.bg, colors.cyan)
|
|
||||||
-- Currently selected tag
|
|
||||||
oxwm.bar.set_scheme_selected(colors.orange, colors.bg, colors.orange)
|
|
||||||
-- Urgent tags (windows requesting attention)
|
|
||||||
oxwm.bar.set_scheme_urgent(colors.red, colors.bg, colors.red)
|
|
||||||
|
|
||||||
-- Hide tags that have no windows and are not selected
|
|
||||||
-- oxwm.bar.set_hide_vacant_tags(true)
|
|
||||||
--
|
|
||||||
function shell_quote(s)
|
|
||||||
return '"' .. string.gsub(s, '[$"!`\\]', "\\%1") .. '"'
|
|
||||||
end
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Keybindings
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Keybindings are defined using oxwm.key.bind(modifiers, key, action)
|
|
||||||
-- Modifiers: {"Mod4"}, {"Mod1"}, {"Shift"}, {"Control"}, or combinations like {"Mod4", "Shift"}
|
|
||||||
-- Keys: Use uppercase for letters (e.g., "Return", "H", "J", "K", "L")
|
|
||||||
-- Actions: Functions that return actions (e.g., oxwm.spawn(), oxwm.client.kill())
|
|
||||||
--
|
|
||||||
-- A list of available keysyms can be found in the X11 keysym definitions.
|
|
||||||
-- Common keys: Return, Space, Tab, Escape, Backspace, Delete, Left, Right, Up, Down
|
|
||||||
|
|
||||||
-- Basic window management
|
|
||||||
|
|
||||||
oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal())
|
|
||||||
-- Launch Dmenu
|
|
||||||
oxwm.key.bind(
|
|
||||||
{ modkey },
|
|
||||||
"P",
|
|
||||||
oxwm.spawn({
|
|
||||||
"sh",
|
|
||||||
"-c",
|
|
||||||
"dmenu_run -l 10 -fn " .. shell_quote(bar_font) .. " -nb " .. shell_quote(colors.bg) .. " -nf " .. shell_quote(
|
|
||||||
colors.fg
|
|
||||||
) .. " -sb " .. shell_quote(colors.orange) .. " -sf " .. shell_quote(colors.black),
|
|
||||||
})
|
|
||||||
)
|
|
||||||
-- Copy screenshot to clipboard
|
|
||||||
oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" }))
|
|
||||||
oxwm.key.bind({ modkey }, "X", oxwm.client.kill())
|
|
||||||
|
|
||||||
-- Keybind overlay - Shows important keybindings on screen
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "Slash", oxwm.show_keybinds())
|
|
||||||
|
|
||||||
-- Window state toggles
|
|
||||||
oxwm.key.bind({ modkey }, "F", oxwm.client.toggle_fullscreen())
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating())
|
|
||||||
|
|
||||||
-- Layout management
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.layout.set("normie"))
|
|
||||||
oxwm.key.bind({ modkey }, "T", oxwm.layout.set("tiling"))
|
|
||||||
oxwm.key.bind({ modkey }, "G", oxwm.layout.set("grid"))
|
|
||||||
oxwm.key.bind({ modkey }, "M", oxwm.layout.set("monocle"))
|
|
||||||
oxwm.key.bind({ modkey }, "B", oxwm.layout.set("tabbed"))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "S", oxwm.layout.set("scrolling"))
|
|
||||||
oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle())
|
|
||||||
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "T", oxwm.spawn({ "lupan-set-theme", "toggle" }))
|
|
||||||
|
|
||||||
-- Master area controls (tiling layout)
|
|
||||||
|
|
||||||
-- Decrease/Increase master area width
|
|
||||||
oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-5))
|
|
||||||
oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(5))
|
|
||||||
-- Increment/Decrement number of master windows
|
|
||||||
oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "I", oxwm.inc_num_master(-1))
|
|
||||||
|
|
||||||
-- Gaps toggle
|
|
||||||
oxwm.key.bind({ modkey }, "A", oxwm.toggle_gaps())
|
|
||||||
|
|
||||||
-- Window manager controls
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "Q", oxwm.quit())
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "R", oxwm.restart())
|
|
||||||
|
|
||||||
-- Focus movement [1 for up in the stack, -1 for down]
|
|
||||||
oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1))
|
|
||||||
oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1))
|
|
||||||
|
|
||||||
-- Window movement (swap position in stack)
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1))
|
|
||||||
|
|
||||||
-- Multi-monitor support
|
|
||||||
|
|
||||||
-- Focus next/previous Monitors
|
|
||||||
oxwm.key.bind({ modkey }, "Comma", oxwm.monitor.focus(-1))
|
|
||||||
oxwm.key.bind({ modkey }, "Period", oxwm.monitor.focus(1))
|
|
||||||
-- Move window to next/previous Monitors
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "Comma", oxwm.monitor.tag(-1))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "Period", oxwm.monitor.tag(1))
|
|
||||||
|
|
||||||
-- Workspace (tag) navigation
|
|
||||||
-- Switch to workspace N (tags are 0-indexed, so tag "1" is index 0)
|
|
||||||
oxwm.key.bind({ modkey }, "1", oxwm.tag.view(0))
|
|
||||||
oxwm.key.bind({ modkey }, "2", oxwm.tag.view(1))
|
|
||||||
oxwm.key.bind({ modkey }, "3", oxwm.tag.view(2))
|
|
||||||
oxwm.key.bind({ modkey }, "4", oxwm.tag.view(3))
|
|
||||||
oxwm.key.bind({ modkey }, "5", oxwm.tag.view(4))
|
|
||||||
oxwm.key.bind({ modkey }, "6", oxwm.tag.view(5))
|
|
||||||
oxwm.key.bind({ modkey }, "7", oxwm.tag.view(6))
|
|
||||||
oxwm.key.bind({ modkey }, "8", oxwm.tag.view(7))
|
|
||||||
oxwm.key.bind({ modkey }, "9", oxwm.tag.view(8))
|
|
||||||
|
|
||||||
-- Move focused window to workspace N
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "1", oxwm.tag.move_to(0))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "2", oxwm.tag.move_to(1))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "3", oxwm.tag.move_to(2))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "4", oxwm.tag.move_to(3))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "5", oxwm.tag.move_to(4))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "6", oxwm.tag.move_to(5))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "7", oxwm.tag.move_to(6))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "8", oxwm.tag.move_to(7))
|
|
||||||
oxwm.key.bind({ modkey, "Shift" }, "9", oxwm.tag.move_to(8))
|
|
||||||
|
|
||||||
-- Combo view (view multiple tags at once) {argos_nothing}
|
|
||||||
-- Example: Mod+Ctrl+2 while on tag 1 will show BOTH tags 1 and 2
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "1", oxwm.tag.toggleview(0))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "2", oxwm.tag.toggleview(1))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "3", oxwm.tag.toggleview(2))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "4", oxwm.tag.toggleview(3))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "5", oxwm.tag.toggleview(4))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "6", oxwm.tag.toggleview(5))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "7", oxwm.tag.toggleview(6))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "8", oxwm.tag.toggleview(7))
|
|
||||||
oxwm.key.bind({ modkey, "Control" }, "9", oxwm.tag.toggleview(8))
|
|
||||||
|
|
||||||
-- Multi tag (window on multiple tags)
|
|
||||||
-- Example: Mod+Ctrl+Shift+2 puts focused window on BOTH current tag and tag 2
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "1", oxwm.tag.toggletag(0))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "2", oxwm.tag.toggletag(1))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "3", oxwm.tag.toggletag(2))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "4", oxwm.tag.toggletag(3))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "5", oxwm.tag.toggletag(4))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "6", oxwm.tag.toggletag(5))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "7", oxwm.tag.toggletag(6))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "8", oxwm.tag.toggletag(7))
|
|
||||||
oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8))
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Advanced: Keychords
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Keychords allow you to bind multiple-key sequences (like Emacs or Vim)
|
|
||||||
-- Format: {{modifiers}, key1}, {{modifiers}, key2}, ...
|
|
||||||
-- Example: Press Mod4+Space, then release and press T to spawn a terminal
|
|
||||||
oxwm.key.chord({
|
|
||||||
{ { modkey }, "Space" },
|
|
||||||
{ {}, "T" },
|
|
||||||
}, oxwm.spawn_terminal())
|
|
||||||
oxwm.key.chord({
|
|
||||||
{ { modkey }, "Space" },
|
|
||||||
{ {}, "F" },
|
|
||||||
}, oxwm.spawn({ "firefox" }))
|
|
||||||
oxwm.key.chord({
|
|
||||||
{ { modkey }, "Space" },
|
|
||||||
{ {}, "L" },
|
|
||||||
}, oxwm.spawn({ "slock" }))
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Autostart
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Commands to run once when OXWM starts
|
|
||||||
-- Uncomment and modify these examples, or add your own
|
|
||||||
|
|
||||||
-- oxwm.autostart("picom")
|
|
||||||
-- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg")
|
|
||||||
-- oxwm.autostart("dunst")
|
|
||||||
-- oxwm.autostart("nm-applet")
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
fg = "#aaaaaa",
|
|
||||||
red = "#f7768e",
|
|
||||||
bg = "#1a1b26",
|
|
||||||
black = "#1a1b26",
|
|
||||||
cyan = "#0db9d7",
|
|
||||||
green = "#9ece6a",
|
|
||||||
lavender = "#a9b1d6",
|
|
||||||
light_blue = "#7aa2f7",
|
|
||||||
grey = "#737373",
|
|
||||||
blue = "#6dade3",
|
|
||||||
purple = "#ad8ee6",
|
|
||||||
orange = "#bd6628",
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
return {
|
|
||||||
fg = "#1a1b26",
|
|
||||||
red = "#b94646",
|
|
||||||
bg = "#dddddd",
|
|
||||||
black = "#1a1b26",
|
|
||||||
cyan = "#4d8080",
|
|
||||||
green = "#9ece6a",
|
|
||||||
lavender = "#a9b1d6",
|
|
||||||
light_blue = "#7aa2f7",
|
|
||||||
grey = "#bbbbbb",
|
|
||||||
blue = "#6dade3",
|
|
||||||
purple = "#ad8ee6",
|
|
||||||
orange = "#d78042",
|
|
||||||
}
|
|
||||||
@@ -46,7 +46,7 @@ static const Layout layouts[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* key definitions */
|
/* key definitions */
|
||||||
#define MODKEY Mod4Mask
|
#define MODKEY Mod1Mask
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
@@ -66,24 +66,24 @@ static const char *toggletheme[] = { "lupan-set-theme", "toggle", NULL };
|
|||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
{ MODKEY|ControlMask, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||||
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||||
{ MODKEY|ShiftMask, XK_F6, spawn, {.v = toggletheme } },
|
{ MODKEY|ShiftMask, XK_F6, spawn, {.v = toggletheme } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY|ControlMask, XK_b, togglebar, {0} },
|
||||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
{ MODKEY|ControlMask, XK_j, focusstack, {.i = +1 } },
|
||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
{ MODKEY|ControlMask, XK_k, focusstack, {.i = -1 } },
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY|ControlMask, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY|ControlMask, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
{ MODKEY|ControlMask, XK_h, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
{ MODKEY|ControlMask, XK_l, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
{ MODKEY|ControlMask|ShiftMask, XK_c, killclient, {0} },
|
||||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
{ MODKEY|ControlMask, XK_t, setlayout, {.v = &layouts[0]} },
|
||||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
{ MODKEY|ControlMask, XK_f, setlayout, {.v = &layouts[1]} },
|
||||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
{ MODKEY|ControlMask, XK_m, setlayout, {.v = &layouts[2]} },
|
||||||
{ MODKEY, XK_space, setlayout, {0} },
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
@@ -101,7 +101,7 @@ static const Key keys[] = {
|
|||||||
TAGKEYS( XK_7, 6)
|
TAGKEYS( XK_7, 6)
|
||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
|
|||||||
@@ -1,197 +0,0 @@
|
|||||||
;==========================================================
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
|
||||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
|
||||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
|
||||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
|
||||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
|
||||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
|
||||||
;
|
|
||||||
;
|
|
||||||
; 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,33 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
FIFO="$XDG_RUNTIME_DIR/sandbar"
|
|
||||||
|
|
||||||
run() {
|
|
||||||
echo run
|
|
||||||
[ -e "$FIFO" ] && rm -f "$FIFO"
|
|
||||||
mkfifo "$FIFO"
|
|
||||||
|
|
||||||
"$HOME/.config/river/status" &
|
|
||||||
|
|
||||||
while cat "$FIFO"; do :; done | sandbar \
|
|
||||||
-font "FiraCode Nerd Font Ret:size=10" \
|
|
||||||
-active-fg-color "#000000" \
|
|
||||||
-active-bg-color "#e8c47d" \
|
|
||||||
-inactive-fg-color "#e8c47d" \
|
|
||||||
-inactive-bg-color "#000000" \
|
|
||||||
-urgent-fg-color "#000000" \
|
|
||||||
-urgent-bg-color "#cc241d" \
|
|
||||||
-title-fg-color "#000000" \
|
|
||||||
-title-bg-color "#e8c47d"
|
|
||||||
}
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
run
|
|
||||||
CODE=$?
|
|
||||||
if [ $CODE -ne 139 && $CODE -ne 134 ]; then
|
|
||||||
echo exit because $CODE
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
echo sleep and continue
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
LOCK_COMMAND='swaylock -f -c 1f7693'
|
|
||||||
RANDR_COMMAND='${HOME}/.config/river/randr --on'
|
|
||||||
RANDR_OFF_COMMAND='${HOME}/.config/river/randr --off'
|
|
||||||
|
|
||||||
riverctl spawn "${RANDR_COMMAND}"
|
|
||||||
|
|
||||||
"${HOME}/.config/river/keymap"
|
|
||||||
|
|
||||||
# Set the default layout generator to be rivertile and start it.
|
|
||||||
# River will send the process group of the init executable SIGTERM on exit.
|
|
||||||
riverctl default-layout rivertile
|
|
||||||
rivertile -view-padding 1 -outer-padding 0 &
|
|
||||||
|
|
||||||
riverctl spawn "${HOME}/.config/river/bar"
|
|
||||||
|
|
||||||
riverctl spawn "swayidle -w timeout 300 '${LOCK_COMMAND}' \
|
|
||||||
timeout 330 '${RANDR_OFF_COMMAND}' resume '${RANDR_COMMAND}' \
|
|
||||||
before-sleep '${LOCK_COMMAND}' after-resume '${RANDR_COMMAND}'"
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
LOCK_COMMAND='swaylock -f -c 1f7693'
|
|
||||||
|
|
||||||
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
|
|
||||||
|
|
||||||
# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
|
|
||||||
riverctl map normal Super+Shift Return spawn alacritty
|
|
||||||
riverctl map normal Super+Alt Return spawn alacritty
|
|
||||||
|
|
||||||
riverctl map normal Super P spawn "wofi -S run"
|
|
||||||
|
|
||||||
# Super+Q to close the focused view
|
|
||||||
riverctl map normal Super Q close
|
|
||||||
|
|
||||||
# Super+Shift+E to exit river
|
|
||||||
riverctl map normal Super+Shift E exit
|
|
||||||
|
|
||||||
# Super+J and Super+K to focus the next/previous view in the layout stack
|
|
||||||
riverctl map normal Super J focus-view next
|
|
||||||
riverctl map normal Super K focus-view previous
|
|
||||||
|
|
||||||
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
|
|
||||||
# view in the layout stack
|
|
||||||
riverctl map normal Super+Shift J swap next
|
|
||||||
riverctl map normal Super+Shift K swap previous
|
|
||||||
|
|
||||||
# Super+Period and Super+Comma to focus the next/previous output
|
|
||||||
riverctl map normal Super Period focus-output next
|
|
||||||
riverctl map normal Super Comma focus-output previous
|
|
||||||
|
|
||||||
# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
|
|
||||||
riverctl map normal Super+Shift Period send-to-output next
|
|
||||||
riverctl map normal Super+Shift Comma send-to-output previous
|
|
||||||
|
|
||||||
# Super+Return to bump the focused view to the top of the layout stack
|
|
||||||
riverctl map normal Super Return zoom
|
|
||||||
|
|
||||||
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
|
|
||||||
riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
|
|
||||||
riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
|
|
||||||
|
|
||||||
# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
|
|
||||||
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
|
|
||||||
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
|
|
||||||
|
|
||||||
# Super+Alt+{H,J,K,L} to move views
|
|
||||||
riverctl map normal Super+Alt H move left 100
|
|
||||||
riverctl map normal Super+Alt J move down 100
|
|
||||||
riverctl map normal Super+Alt K move up 100
|
|
||||||
riverctl map normal Super+Alt L move right 100
|
|
||||||
|
|
||||||
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
|
|
||||||
riverctl map normal Super+Alt+Control H snap left
|
|
||||||
riverctl map normal Super+Alt+Control J snap down
|
|
||||||
riverctl map normal Super+Alt+Control K snap up
|
|
||||||
riverctl map normal Super+Alt+Control L snap right
|
|
||||||
|
|
||||||
# Super+Alt+Shift+{H,J,K,L} to resize views
|
|
||||||
riverctl map normal Super+Alt+Shift H resize horizontal -100
|
|
||||||
riverctl map normal Super+Alt+Shift J resize vertical 100
|
|
||||||
riverctl map normal Super+Alt+Shift K resize vertical -100
|
|
||||||
riverctl map normal Super+Alt+Shift L resize horizontal 100
|
|
||||||
|
|
||||||
# Super + Left Mouse Button to move views
|
|
||||||
riverctl map-pointer normal Super BTN_LEFT move-view
|
|
||||||
|
|
||||||
# Super + Right Mouse Button to resize views
|
|
||||||
riverctl map-pointer normal Super BTN_RIGHT resize-view
|
|
||||||
|
|
||||||
# Super + Middle Mouse Button to toggle float
|
|
||||||
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
|
|
||||||
|
|
||||||
for i in $(seq 1 9)
|
|
||||||
do
|
|
||||||
tags=$((1 << ($i - 1)))
|
|
||||||
|
|
||||||
# Super+[1-9] to focus tag [0-8]
|
|
||||||
riverctl map normal Super $i set-focused-tags $tags
|
|
||||||
|
|
||||||
# Super+Shift+[1-9] to tag focused view with tag [0-8]
|
|
||||||
riverctl map normal Super+Shift $i set-view-tags $tags
|
|
||||||
|
|
||||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
|
||||||
riverctl map normal Super+Control $i toggle-focused-tags $tags
|
|
||||||
|
|
||||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
|
||||||
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
|
|
||||||
done
|
|
||||||
|
|
||||||
# Super+0 to focus all tags
|
|
||||||
# Super+Shift+0 to tag focused view with all tags
|
|
||||||
all_tags=$(((1 << 32) - 1))
|
|
||||||
riverctl map normal Super 0 set-focused-tags $all_tags
|
|
||||||
riverctl map normal Super+Shift 0 set-view-tags $all_tags
|
|
||||||
|
|
||||||
# Super+Space to toggle float
|
|
||||||
riverctl map normal Super Space toggle-float
|
|
||||||
|
|
||||||
# Super+F to toggle fullscreen
|
|
||||||
riverctl map normal Super F toggle-fullscreen
|
|
||||||
|
|
||||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
|
||||||
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
|
|
||||||
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
|
|
||||||
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
|
|
||||||
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
|
|
||||||
|
|
||||||
# Declare a passthrough mode. This mode has only a single mapping to return to
|
|
||||||
# normal mode. This makes it useful for testing a nested wayland compositor
|
|
||||||
riverctl declare-mode passthrough
|
|
||||||
|
|
||||||
# Super+F11 to enter passthrough mode
|
|
||||||
riverctl map normal Super F11 enter-mode passthrough
|
|
||||||
|
|
||||||
# Super+F11 to return to normal mode
|
|
||||||
riverctl map passthrough Super F11 enter-mode normal
|
|
||||||
|
|
||||||
# Various media key mapping examples for both normal and locked mode which do
|
|
||||||
# not have a modifier
|
|
||||||
for mode in normal locked
|
|
||||||
do
|
|
||||||
# Eject the optical drive (well if you still have one that is)
|
|
||||||
riverctl map $mode None XF86Eject spawn 'eject -T'
|
|
||||||
|
|
||||||
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
|
|
||||||
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
|
|
||||||
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
|
|
||||||
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
|
|
||||||
|
|
||||||
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
|
|
||||||
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
|
|
||||||
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
|
|
||||||
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
|
|
||||||
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
|
|
||||||
|
|
||||||
# Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl)
|
|
||||||
riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%'
|
|
||||||
riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-'
|
|
||||||
done
|
|
||||||
|
|
||||||
riverctl map normal Super A focus-previous-tags
|
|
||||||
riverctl map normal Super+Control+Shift L spawn "${LOCK_COMMAND}"
|
|
||||||
riverctl map normal Super+Control+Shift S spawn "systemctl suspend"
|
|
||||||
|
|
||||||
riverctl map normal Super+Alt O spawn "${LOCK_COMMAND}"
|
|
||||||
riverctl map normal Super+Alt S spawn "systemctl suspend"
|
|
||||||
|
|
||||||
riverctl map normal Super+Alt T spawn "${HOME}/bin/lupan-set-theme toggle"
|
|
||||||
|
|
||||||
# Set background and border color
|
|
||||||
riverctl background-color 0x002b36
|
|
||||||
riverctl border-color-focused 0xac7853
|
|
||||||
riverctl border-color-unfocused 0x5387ac
|
|
||||||
|
|
||||||
riverctl keyboard-layout -options ctrl:nocaps pl
|
|
||||||
# Set keyboard repeat rate
|
|
||||||
riverctl set-repeat 50 300
|
|
||||||
|
|
||||||
# Make all views with an app-id that starts with "float" and title "foo" start floating.
|
|
||||||
riverctl rule-add -app-id 'float*' -title 'foo' float
|
|
||||||
|
|
||||||
# Make all views with app-id "bar" and any title use client-side decorations
|
|
||||||
riverctl rule-add -app-id "bar" csd
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
repeat() {
|
|
||||||
for x in {0..10}; do
|
|
||||||
echo "$@"
|
|
||||||
"$@"
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--on)
|
|
||||||
repeat wlr-randr --output DP-1 --on --scale 2 --pos 0,0 &
|
|
||||||
repeat wlr-randr --output DP-2 --on --scale 2 --pos 1920,0 &
|
|
||||||
sleep 10
|
|
||||||
;;
|
|
||||||
--off)
|
|
||||||
wlr-randr --output DP-1 --off
|
|
||||||
wlr-randr --output DP-2 --off
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/env sh
|
|
||||||
|
|
||||||
cpu() {
|
|
||||||
cpu="$(grep -o "^[^ ]*" /proc/loadavg)"
|
|
||||||
}
|
|
||||||
|
|
||||||
memory() {
|
|
||||||
memory="$(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
|
|
||||||
}
|
|
||||||
|
|
||||||
disk() {
|
|
||||||
disk="$(df -h | awk 'NR==2{print $4}')"
|
|
||||||
}
|
|
||||||
|
|
||||||
datetime() {
|
|
||||||
datetime="$(date "+%F %H:%M")"
|
|
||||||
}
|
|
||||||
|
|
||||||
bat() {
|
|
||||||
read -r bat_status </sys/class/power_supply/BAT0/status
|
|
||||||
read -r bat_capacity </sys/class/power_supply/BAT0/capacity
|
|
||||||
bat="$bat_status $bat_capacity%"
|
|
||||||
}
|
|
||||||
|
|
||||||
vol() {
|
|
||||||
vol="$([ "$(pamixer --get-mute)" = "false" ] && printf "%s%%" "$(pamixer --get-volume)" || printf '-')"
|
|
||||||
}
|
|
||||||
|
|
||||||
display() {
|
|
||||||
echo "all status [$memory $cpu $disk] [$bat] [$vol] [$datetime]" >"$FIFO"
|
|
||||||
}
|
|
||||||
|
|
||||||
printf "%s" "$$" > "$XDG_RUNTIME_DIR/status_pid"
|
|
||||||
FIFO="$XDG_RUNTIME_DIR/sandbar"
|
|
||||||
[ -e "$FIFO" ] || mkfifo "$FIFO"
|
|
||||||
sec=0
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
sleep 1 &
|
|
||||||
wait && {
|
|
||||||
[ $((sec % 15)) -eq 0 ] && memory
|
|
||||||
[ $((sec % 15)) -eq 0 ] && cpu
|
|
||||||
[ $((sec % 15)) -eq 0 ] && disk
|
|
||||||
[ $((sec % 60)) -eq 0 ] && bat
|
|
||||||
[ $((sec % 5)) -eq 0 ] && vol
|
|
||||||
[ $((sec % 5)) -eq 0 ] && datetime
|
|
||||||
|
|
||||||
[ $((sec % 5)) -eq 0 ] && display
|
|
||||||
|
|
||||||
sec=$((sec + 1))
|
|
||||||
}
|
|
||||||
done
|
|
||||||
@@ -5,12 +5,7 @@
|
|||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
which nu >/dev/null && exec nu
|
||||||
|
|
||||||
alias ls='ls --color=auto'
|
alias ls='ls --color=auto'
|
||||||
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
|
PS1='[\u@\h \W]\$ '
|
||||||
|
|
||||||
function before_command() { echo -ne '\e[2 q'; }
|
|
||||||
trap before_command DEBUG
|
|
||||||
|
|
||||||
if [[ -f /usr/share/bash-completion/bash_completion ]]; then
|
|
||||||
. /usr/share/bash-completion/bash_completion
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,96 +1,13 @@
|
|||||||
alias v=nvim
|
alias v=nvim
|
||||||
alias ll='ls -l'
|
alias ll='ls -l'
|
||||||
|
alias ta='tmux attach -t'
|
||||||
alias tl='tmux list-sessions'
|
alias tl='tmux list-sessions'
|
||||||
alias rgh='rg -.'
|
alias tn='tmux new -s'
|
||||||
alias fdh='fd -H'
|
|
||||||
alias lg=lazygit
|
|
||||||
|
|
||||||
if alias st > /dev/null; then
|
if which exa > /dev/null; then
|
||||||
alias gst='_vcs status'
|
|
||||||
unalias st
|
|
||||||
fi
|
|
||||||
if alias r > /dev/null; then
|
|
||||||
unalias r
|
|
||||||
fi
|
|
||||||
|
|
||||||
if which eza > /dev/null; then
|
|
||||||
alias ls='eza --icons'
|
|
||||||
alias tree='eza --tree --icons'
|
|
||||||
elif which exa > /dev/null; then
|
|
||||||
alias ls='exa --icons'
|
alias ls='exa --icons'
|
||||||
alias tree='exa --tree --icons'
|
alias tree='exa --tree --icons'
|
||||||
else
|
|
||||||
eval $(dircolors)
|
|
||||||
alias ls='ls --color'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias nocaps='setxkbmap pl -option ctrl:nocaps'
|
alias nocaps='setxkbmap pl -option ctrl:nocaps'
|
||||||
alias fixdp='xrandr --output DP-0 --right-of DP-2'
|
alias fixdp='xrandr --output DP-0 --right-of DP-2'
|
||||||
alias a4='COLORTERM=truecolor TERM=xterm-256color a4'
|
|
||||||
|
|
||||||
a4i() {
|
|
||||||
local Q="${@:-}"
|
|
||||||
local NAME=$(a4 -l | grep '^ ' | fzy -q "$Q" | tr '\t' ' ' | cut -d' ' -f6-)
|
|
||||||
if [ -n "$NAME" ]; then
|
|
||||||
a4 -a "$NAME"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
tn() {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
tmux new
|
|
||||||
else
|
|
||||||
tmux new -A -s "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
tni() {
|
|
||||||
local Q="${@:-}"
|
|
||||||
local DIR=$(zoxide query -l | vis-menu -p 'Dir:' -l 10 "$Q")
|
|
||||||
if [ -n "$DIR" ]; then
|
|
||||||
local NAME=$(echo | vis-menu -p 'Session name:' $(basename $DIR))
|
|
||||||
if [ -n "$DIR" ]; then
|
|
||||||
tmux new -A -s "$NAME" -c "$DIR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
ta() {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
tmux attach
|
|
||||||
else
|
|
||||||
tmux attach -t "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
tai() {
|
|
||||||
local Q="${@:-}"
|
|
||||||
local NAME=$(tmux ls | vis-menu -p 'Session:' -l 10 "$Q" | cut -d: -f1)
|
|
||||||
if [ -n "$NAME" ]; then
|
|
||||||
tmux attach -t "$NAME"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
vf() {
|
|
||||||
if [ "$TERM" = "xterm-kitty" ]; then
|
|
||||||
local FILE=$(kitten choose-file)
|
|
||||||
[ -n "$FILE" ] && nvim "$FILE"
|
|
||||||
else
|
|
||||||
nvim $(fzf --multi)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
vd() {
|
|
||||||
if [ "$TERM" = "xterm-kitty" ]; then
|
|
||||||
local DIR=$(kitten choose-file --mode dir)
|
|
||||||
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
|
|
||||||
else
|
|
||||||
local DIR=$(fzf --walker dir,follow,hidden)
|
|
||||||
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
vz() {
|
|
||||||
local DIR=$(zoxide query -l | fzf --query "$Q")
|
|
||||||
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
[ -e ~/.profile ] && . ~/.profile
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Firstly, load the common customization script.
|
|
||||||
. --autoload --no-alias initialization/common
|
|
||||||
|
|
||||||
LANG=pl_PL.UTF-8
|
|
||||||
|
|
||||||
set -o vi
|
|
||||||
|
|
||||||
[ -e ~/.config/shellconfig/aliases.sh ] && . ~/.config/shellconfig/aliases.sh
|
|
||||||
|
|
||||||
# Clear the screen with Ctrl-L.
|
|
||||||
bindkey --emacs '\^L' clear-and-redraw-all
|
|
||||||
bindkey --vi-insert '\^L' clear-and-redraw-all
|
|
||||||
bindkey --vi-command '\^L' clear-and-redraw-all
|
|
||||||
|
|
||||||
# And add your own customization below.
|
|
||||||
|
|
||||||
eval "$(zoxide init posix --hook prompt)"
|
|
||||||
@@ -3,9 +3,3 @@ set show-mode-in-prompt on
|
|||||||
set vi-ins-mode-string \1\e[6 q\2
|
set vi-ins-mode-string \1\e[6 q\2
|
||||||
set vi-cmd-mode-string \1\e[2 q\2
|
set vi-cmd-mode-string \1\e[2 q\2
|
||||||
|
|
||||||
set keymap vi-command
|
|
||||||
"k": history-substring-search-backward
|
|
||||||
"j": history-substring-search-forward
|
|
||||||
|
|
||||||
set keymap vi-insert
|
|
||||||
"\C-l": clear-screen
|
|
||||||
|
|||||||
@@ -8,8 +8,6 @@
|
|||||||
# for ssh logins, install and configure the libpam-umask package.
|
# for ssh logins, install and configure the libpam-umask package.
|
||||||
#umask 022
|
#umask 022
|
||||||
|
|
||||||
export LANG=pl_PL.UTF-8
|
|
||||||
|
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export VISUAL=nvim
|
export VISUAL=nvim
|
||||||
|
|
||||||
@@ -29,22 +27,11 @@ done
|
|||||||
|
|
||||||
export PATH
|
export PATH
|
||||||
|
|
||||||
if [ -d ~/.local/share/man ]; then
|
|
||||||
export MANPATH="$HOME/.local/share/man:$MANPATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export GOPATH=~/.cache/go
|
|
||||||
export GOBIN=~/.local/bin
|
|
||||||
|
|
||||||
# start X or Hyprland at login
|
# start X or Hyprland at login
|
||||||
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
|
if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
|
||||||
if which /usr/bin/sx > /dev/null; then
|
if which /usr/bin/Hyprland > /dev/null; then
|
||||||
|
exec /usr/bin/Hyprland
|
||||||
|
elif which /usr/bin/sx > /dev/null; then
|
||||||
exec /usr/bin/sx ~/.xsession
|
exec /usr/bin/sx ~/.xsession
|
||||||
elif which /usr/bin/startx > /dev/null; then
|
|
||||||
exec /usr/bin/startx ~/.xsession
|
|
||||||
elif which Hyprland > /dev/null && [ -d ~/.config/hypr ]; then
|
|
||||||
exec Hyprland
|
|
||||||
elif which river > /dev/null && [ -d ~/.config/river ]; then
|
|
||||||
exec river
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
28
shell/.zshrc
28
shell/.zshrc
@@ -1,11 +1,10 @@
|
|||||||
# Install zap:
|
# Install zap:
|
||||||
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1 ~/.local/share/zap
|
# % cd ~/.local/share
|
||||||
|
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1
|
||||||
|
|
||||||
export FZF_DEFAULT_OPTS='--color=bg+:#808080'
|
export FZF_DEFAULT_OPTS='--color=bw,hl:green,hl+:green'
|
||||||
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS
|
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS
|
||||||
|
|
||||||
export BAT_THEME=ansi
|
|
||||||
|
|
||||||
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
|
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
|
||||||
plug "jeffreytse/zsh-vi-mode"
|
plug "jeffreytse/zsh-vi-mode"
|
||||||
|
|
||||||
@@ -17,30 +16,11 @@ plug "zap-zsh/fzf"
|
|||||||
plug "zsh-users/zsh-autosuggestions"
|
plug "zsh-users/zsh-autosuggestions"
|
||||||
plug "zsh-users/zsh-syntax-highlighting"
|
plug "zsh-users/zsh-syntax-highlighting"
|
||||||
plug "MichaelAquilina/zsh-you-should-use"
|
plug "MichaelAquilina/zsh-you-should-use"
|
||||||
plug "zsh-users/zsh-history-substring-search"
|
|
||||||
|
|
||||||
if which zoxide > /dev/null; then
|
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
else
|
|
||||||
plug "agkozak/zsh-z"
|
|
||||||
ZSHZ_ECHO=1
|
|
||||||
setopt autocd
|
|
||||||
fi
|
|
||||||
|
|
||||||
ZSH_HIGHLIGHT_STYLES[comment]=fg=blue
|
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
|
|
||||||
|
|
||||||
bindkey '^[[A' history-substring-search-up
|
|
||||||
bindkey '^[[B' history-substring-search-down
|
|
||||||
bindkey -M vicmd 'k' history-substring-search-up
|
|
||||||
bindkey -M vicmd 'j' history-substring-search-down
|
|
||||||
|
|
||||||
# Prompt.
|
# Prompt.
|
||||||
|
|
||||||
if which starship > /dev/null; then
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
else
|
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
precmd () { vcs_info }
|
precmd () { vcs_info }
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
@@ -51,7 +31,6 @@ else
|
|||||||
zstyle ':vcs_info:*' enable git
|
zstyle ':vcs_info:*' enable git
|
||||||
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
|
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
|
||||||
RPROMPT='%(?..%B%F{red}%?%f%b)'
|
RPROMPT='%(?..%B%F{red}%?%f%b)'
|
||||||
fi
|
|
||||||
|
|
||||||
# History.
|
# History.
|
||||||
|
|
||||||
@@ -70,6 +49,7 @@ setopt share_history
|
|||||||
|
|
||||||
# Convenience.
|
# Convenience.
|
||||||
|
|
||||||
|
setopt autocd
|
||||||
bindkey -M vicmd '^[h' run-help
|
bindkey -M vicmd '^[h' run-help
|
||||||
bindkey -M viins '^[h' run-help
|
bindkey -M viins '^[h' run-help
|
||||||
|
|
||||||
|
|||||||
@@ -1,178 +0,0 @@
|
|||||||
##############################################
|
|
||||||
# #
|
|
||||||
# Superfile Configuration #
|
|
||||||
# #
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
# This contains the root config file for superfile! More details can be found at
|
|
||||||
# https://superfile.dev/configure/superfile-config/.
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Defaults #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
#-- File Editor
|
|
||||||
# Default: $EDITOR
|
|
||||||
editor = "nvim"
|
|
||||||
|
|
||||||
#-- Directory Editor
|
|
||||||
#
|
|
||||||
dir_editor = "nvim ."
|
|
||||||
|
|
||||||
#-- Auto check for update
|
|
||||||
auto_check_update = false
|
|
||||||
|
|
||||||
#-- cd on quit
|
|
||||||
# Should we cd the shell to the last directory open in superfile when the
|
|
||||||
# program exits?
|
|
||||||
cd_on_quit = false
|
|
||||||
|
|
||||||
#-- File Preview
|
|
||||||
# Should we open a file preview by default whenever selection-hovering over a
|
|
||||||
# file?
|
|
||||||
default_open_file_preview = true
|
|
||||||
|
|
||||||
#-- Image Preview
|
|
||||||
# Should we open an image preview by default whenever selection-hovering over an
|
|
||||||
# image?
|
|
||||||
show_image_preview = true
|
|
||||||
|
|
||||||
#-- File Info Footer
|
|
||||||
# Should we display a footer in the file panel that provides more file information?
|
|
||||||
show_panel_footer_info = true
|
|
||||||
|
|
||||||
#-- Default Directory
|
|
||||||
# The initial path that the file panel should navigate to when superfile is
|
|
||||||
# opened. This setting understands relative paths such as ".", "..", etc.
|
|
||||||
default_directory = "."
|
|
||||||
|
|
||||||
#-- File Size Units
|
|
||||||
# true: SI decimal units of 1000 (kB, MB, GB).
|
|
||||||
# false: IEC binary units of 1024 (KiB, MiB, GiB).
|
|
||||||
file_size_use_si = false
|
|
||||||
|
|
||||||
#-- Default File Sort Type
|
|
||||||
# (0: Name, 1: Size, 2: Date Modified, 3: Type).
|
|
||||||
default_sort_type = 0
|
|
||||||
|
|
||||||
#-- Sort Order Reversing
|
|
||||||
# true: Descending.
|
|
||||||
# false: Ascending.
|
|
||||||
sort_order_reversed = false
|
|
||||||
|
|
||||||
#-- Case-Sensitive Sorting (only for Name Sort)
|
|
||||||
# An uppercase "B" comes before a lowercase "a" if true.
|
|
||||||
case_sensitive_sort = false
|
|
||||||
|
|
||||||
#-- Exit Shell on Success
|
|
||||||
# Whether to exit the shell on successful command execution.
|
|
||||||
shell_close_on_success = false
|
|
||||||
|
|
||||||
#-- Page Scroll Size
|
|
||||||
# Number of lines to scroll for PgUp/PgDown keys (0: full page, default behavior).
|
|
||||||
page_scroll_size = 0
|
|
||||||
|
|
||||||
#-- Debug Mode
|
|
||||||
debug = false
|
|
||||||
|
|
||||||
#-- Ignore Missing Config Fields
|
|
||||||
# Whether to silence any warnings about missing config fields.
|
|
||||||
ignore_missing_fields = false
|
|
||||||
|
|
||||||
#-- File Panel Extra Columns Count
|
|
||||||
# Count of extra columns in file panel in addition to file name. When option equal 0 then feature is disabled.
|
|
||||||
file_panel_extra_columns = 0
|
|
||||||
|
|
||||||
#-- File name width in File Panel
|
|
||||||
# Percentage of file panel width allocated to file names (25-100). Higher values give more space to names, less to extra columns.
|
|
||||||
file_panel_name_percent = 50
|
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Styling #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
#-- Theme
|
|
||||||
# Put your theme's name here!
|
|
||||||
theme = "catppuccin-mocha"
|
|
||||||
|
|
||||||
#-- Code Previewer
|
|
||||||
# Whether to use the builtin syntax highlighting with chroma or use bat. Values: "" for builtin chroma, "bat" for bat
|
|
||||||
code_previewer = ""
|
|
||||||
|
|
||||||
#-- Nerd Fonts Support
|
|
||||||
# Whether to enable support for Nerd Fonts symbols.
|
|
||||||
# Requires: Font patched with the Nerd Fonts patch.
|
|
||||||
nerdfont = true
|
|
||||||
|
|
||||||
#-- Show checkbox icons in select mode
|
|
||||||
# Requires: nerdfont = true
|
|
||||||
show_select_icons = true
|
|
||||||
|
|
||||||
#-- Transparent Background Support
|
|
||||||
# Set to true to enable background transparency.
|
|
||||||
# Requires: terminal support for colour transparency
|
|
||||||
transparent_background = false
|
|
||||||
|
|
||||||
#-- File Preview Panel Width
|
|
||||||
# Width of the file preview panel will be 1/n of the total width.
|
|
||||||
# Values recommended to be in 2–10.
|
|
||||||
# Default (0): Use the same width as file picker panel.
|
|
||||||
file_preview_width = 0
|
|
||||||
|
|
||||||
#-- File Preview Border
|
|
||||||
# Enable border around the file preview panel for better visual separation.
|
|
||||||
# Default: false (no border)
|
|
||||||
enable_file_preview_border = false
|
|
||||||
|
|
||||||
#-- Sidebar Width
|
|
||||||
# If you don't want to display the sidebar, you can input 0 directly.
|
|
||||||
# Values recommended to be in 5–20.
|
|
||||||
sidebar_width = 20
|
|
||||||
|
|
||||||
#-- Border
|
|
||||||
# Make sure to add strings that are exactly one character wide!
|
|
||||||
# Use ' ' for borderless.
|
|
||||||
border_top = '─'
|
|
||||||
border_bottom = '─'
|
|
||||||
border_left = '│'
|
|
||||||
border_right = '│'
|
|
||||||
border_top_left = '╭'
|
|
||||||
border_top_right = '╮'
|
|
||||||
border_bottom_left = '╰'
|
|
||||||
border_bottom_right = '╯'
|
|
||||||
border_middle_left = '├'
|
|
||||||
border_middle_right = '┤'
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Plugins #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# This section is for using plugins with superfile, external addons that extend
|
|
||||||
# the default capabilities of the program! More info can be found at
|
|
||||||
# https://superfile.dev/list/plugin-list/.
|
|
||||||
|
|
||||||
#-- Detailed Metadata
|
|
||||||
# Requires: exiftool
|
|
||||||
metadata = false
|
|
||||||
|
|
||||||
#-- MD5 Checksum Generation
|
|
||||||
# Requires: md5sum
|
|
||||||
enable_md5_checksum = false
|
|
||||||
#
|
|
||||||
#-- Zoxide Support - Smart directory navigation!
|
|
||||||
# Requires: zoxide
|
|
||||||
zoxide_support = true
|
|
||||||
|
|
||||||
#-- File opening rules
|
|
||||||
# Map file extensions to commands used to open them.
|
|
||||||
# The file path will be appended as the last argument.
|
|
||||||
# MUST BE IN THE VERY END OF THE FILE BECAUSE TOML CANNOT CLOSE TABLES
|
|
||||||
# Example:
|
|
||||||
# png = "feh"
|
|
||||||
# pdf = "zathura"
|
|
||||||
# conf = "nvim"
|
|
||||||
[open_with]
|
|
||||||
pdf = "zathura"
|
|
||||||
png = "sxiv"
|
|
||||||
jpg = "sxiv"
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
##############################################
|
|
||||||
# #
|
|
||||||
# Superfile vim-like Hotkeys #
|
|
||||||
# #
|
|
||||||
##############################################
|
|
||||||
|
|
||||||
#-- Maintainer: nonepork <https://github.com/nonepork>
|
|
||||||
|
|
||||||
# This contains a hotkey config file for superfile, that's themed around vim
|
|
||||||
# controls! More details can be found at
|
|
||||||
# https://superfile.dev/configure/custom-hotkeys/.
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Global hotkeys #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# Note: These hotkeys should be unique.
|
|
||||||
|
|
||||||
#-- Basic Actions
|
|
||||||
confirm = ['enter', 'l']
|
|
||||||
quit = ['ctrl+c', ''] # a.k.a. "theprimeagen troller"
|
|
||||||
cd_quit = ['Q', '']
|
|
||||||
|
|
||||||
#-- Navigation
|
|
||||||
list_up = ['k', '']
|
|
||||||
list_down = ['j', '']
|
|
||||||
page_up = ['pgup','']
|
|
||||||
page_down = ['pgdown','']
|
|
||||||
|
|
||||||
#-- File Panel Controls
|
|
||||||
create_new_file_panel = ['n', '']
|
|
||||||
close_file_panel = ['q', '']
|
|
||||||
next_file_panel = ['tab', 'L']
|
|
||||||
previous_file_panel = ['shift+tab', 'H']
|
|
||||||
toggle_file_preview_panel = ['f', '']
|
|
||||||
open_sort_options_menu = ['o', '']
|
|
||||||
toggle_reverse_sort = ['R', '']
|
|
||||||
|
|
||||||
#-- Focus Manipulation
|
|
||||||
focus_on_process_bar = ['ctrl+p', '']
|
|
||||||
focus_on_sidebar = ['ctrl+s', '']
|
|
||||||
focus_on_metadata = ['ctrl+d', '']
|
|
||||||
|
|
||||||
#-- File/Dir Creation/Renaming
|
|
||||||
file_panel_item_create = ['a', '']
|
|
||||||
file_panel_item_rename = ['r', '']
|
|
||||||
|
|
||||||
#-- Main File Operations
|
|
||||||
copy_items = ['y', '']
|
|
||||||
cut_items = ['x', '']
|
|
||||||
paste_items = ['p', '']
|
|
||||||
delete_items = ['d', '']
|
|
||||||
permanently_delete_items = ['D', '']
|
|
||||||
|
|
||||||
#-- Archive Manipulation
|
|
||||||
extract_file = ['ctrl+e', '']
|
|
||||||
compress_file = ['ctrl+a', '']
|
|
||||||
|
|
||||||
#-- Editor Actions
|
|
||||||
open_file_with_editor = ['e', '']
|
|
||||||
open_current_directory_with_editor = ['E', '']
|
|
||||||
|
|
||||||
#-- Other Actions
|
|
||||||
pinned_directory = ['P', '']
|
|
||||||
toggle_dot_file = ['.', '']
|
|
||||||
change_panel_mode = ['m', '']
|
|
||||||
open_help_menu = ['?', '']
|
|
||||||
open_spf_prompt = ['>', '']
|
|
||||||
open_command_line = [':', '']
|
|
||||||
open_zoxide = ['z', '']
|
|
||||||
copy_path = ['Y', '']
|
|
||||||
copy_present_working_directory = ['c', '']
|
|
||||||
toggle_footer = ['ctrl+f', '']
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Typing hotkeys #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# Note: These hotkeys can override all hotkeys.
|
|
||||||
|
|
||||||
confirm_typing = ['enter', '']
|
|
||||||
cancel_typing = ['esc', '']
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# Mode-Specific Hotkeys #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
# Note: These hotkeys can conflict with other modes, but not with global
|
|
||||||
# hotkeys.
|
|
||||||
|
|
||||||
#-- Normal Mode Actions
|
|
||||||
parent_directory = ['-', 'h']
|
|
||||||
search_bar = ['/', '']
|
|
||||||
|
|
||||||
#-- Selection Mode Actions
|
|
||||||
file_panel_select_mode_items_select_down = ['J', '']
|
|
||||||
file_panel_select_mode_items_select_up = ['K', '']
|
|
||||||
file_panel_select_all_items = ['A', '']
|
|
||||||
@@ -3,53 +3,33 @@ set -g status-fg colour7
|
|||||||
|
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
bind-key -n M-1 select-window -t 1
|
bind-key -n M-j select-pane -D
|
||||||
bind-key -n M-2 select-window -t 2
|
bind-key -n M-k select-pane -U
|
||||||
bind-key -n M-3 select-window -t 3
|
bind-key -n M-h select-pane -L
|
||||||
bind-key -n M-4 select-window -t 4
|
bind-key -n M-l select-pane -R
|
||||||
bind-key -n M-5 select-window -t 5
|
bind-key -n M-J switch-client -n
|
||||||
bind-key -n M-6 select-window -t 6
|
bind-key -n M-K switch-client -p
|
||||||
bind-key -n M-7 select-window -t 7
|
bind-key -n M-H previous-window
|
||||||
bind-key -n M-8 select-window -t 8
|
bind-key -n M-L next-window
|
||||||
bind-key -n M-9 select-window -t 9
|
|
||||||
#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
|
|
||||||
bind-key -n M-# swap-window -t 3
|
|
||||||
bind-key -n M-$ swap-window -t 4
|
|
||||||
bind-key -n M-% swap-window -t 5
|
|
||||||
bind-key -n M-^ swap-window -t 6
|
|
||||||
bind-key -n M-& swap-window -t 7
|
|
||||||
bind-key -n M-* swap-window -t 8
|
|
||||||
bind-key -n M-( swap-window -t 9
|
|
||||||
bind-key -n M-) swap-window -t 10
|
|
||||||
|
|
||||||
bind-key S new-session
|
|
||||||
bind-key T switch-client -l
|
bind-key T switch-client -l
|
||||||
|
|
||||||
bind-key Right resize-pane -R 8
|
bind -n C-S-Left swap-window -t -1
|
||||||
bind-key Left resize-pane -L 8
|
bind -n C-S-Right swap-window -t 1
|
||||||
bind-key Up resize-pane -U 4
|
|
||||||
bind-key Down resize-pane -D 4
|
|
||||||
|
|
||||||
set -g default-terminal "xterm-256color"
|
set -g default-terminal "screen-256color"
|
||||||
set -as terminal-features ",*:RGB"
|
set -as terminal-features ",*:RGB"
|
||||||
|
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
setw -g base-index 1
|
setw -g base-index 1
|
||||||
|
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g set-titles-string "#H [#S] #W"
|
set -g set-titles-string "#H [#S]"
|
||||||
|
|
||||||
set -g status-justify centre
|
set -g status-justify centre
|
||||||
set -g status-left " #[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #H #[bg=default]#[fg=#316781]#[fg=default] #S"
|
set -g status-left "#[bg=green]#[fg=black] #H #[bg=default]#[fg=default] #S"
|
||||||
set -g status-left-length 50
|
set -g status-left-length 50
|
||||||
set -g status-right "#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] %H:%M #[bg=default]#[fg=#316781] "
|
set -g status-right "#[bg=green]#[fg=black] %H:%M "
|
||||||
set-window-option -g window-status-current-format '#[fg=#316781]#[bg=#316781]#[fg=#abb5ba] #I:#W#F #[fg=#316781]#[bg=black]'
|
|
||||||
|
|
||||||
bind-key -n M-0 run-shell tmux-session-menu
|
set-window-option -g window-status-current-style bg=green
|
||||||
|
set-window-option -ga window-status-current-style fg=black
|
||||||
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
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/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"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
set nocompatible
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
set hlsearch
|
|
||||||
set relativenumber
|
|
||||||
|
|
||||||
syntax enable
|
|
||||||
filetype plugin on
|
|
||||||
|
|
||||||
" open nested file with :find file.name
|
|
||||||
" include * in path for fuzzy find
|
|
||||||
set path+=**
|
|
||||||
set wildmenu
|
|
||||||
|
|
||||||
let g:netrw_banner=0
|
|
||||||
let g:netrw_liststyle=3
|
|
||||||
|
|
||||||
nmap <esc> <cmd>nohlsearch<cr>
|
|
||||||
|
|
||||||
colorscheme catppuccin
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user