Compare commits

...

157 Commits

Author SHA1 Message Date
9064a389e9 dwm: reformat config.h 2025-08-01 00:10:33 +02:00
e507e258e3 nvim: add lazyjj 2025-07-22 23:09:32 +02:00
d138f4c1da nvim, alacritty: switch to kanagawa-paper 2025-07-21 23:59:21 +02:00
fa085ae00c nvim: add snipe 2025-06-25 23:59:37 +02:00
d8a21e78c4 nvim: switch to sweetie colorscheme, also update alacritty themes 2025-06-25 22:05:48 +02:00
213a93acd9 nvim: remove telescope persisted key and grep_string 2025-06-24 22:51:01 +02:00
bdde8238c9 nvim: use snacks, remove lisp related and replaced packages 2025-06-12 09:38:21 +02:00
d21fdc925c nvim: add key for session change and change keys for namu 2025-06-07 21:51:54 +02:00
dba234077e nvim: add commands FormatDisable and FormatEnable 2025-06-07 11:08:57 +02:00
867e3d6991 nvim: move arrow, add namu and odin 2025-06-04 22:55:37 +02:00
ecb466f230 nvim: lazy update 2025-06-03 23:36:38 +02:00
f5302fc646 nvim/zsh: remove jj key mapping, add two aliases, nvim: back to arrow 2025-06-03 23:16:50 +02:00
3eaba86825 nvim: remove hardtime 2025-05-14 00:02:42 +02:00
1b0d0597b0 zsh: change escape bind key 2025-05-13 23:35:24 +02:00
63860cd661 nvim: color scheme nightfox 2025-05-13 23:35:24 +02:00
d122f56ab6 nvim: handle lisp file type, change local leader 2025-05-13 23:35:11 +02:00
a5c491d1ce awesome: use dmenu 2025-05-13 23:00:18 +02:00
d6ba2a78b9 tmux: bind tmux-session-menu 2025-05-13 23:00:18 +02:00
29608ff8c4 nvim: support different dark and light colorschemes 2025-04-02 00:00:53 +02:00
1513d23ec4 nvim: remove nvim-various-textobjs 2025-04-01 21:47:27 +02:00
28de145180 nvim: which-key: preset helix, delay 1000 2025-03-30 23:26:51 +02:00
17997c0550 nvim: add rest.nvim plugin 2025-03-30 23:26:51 +02:00
d47467e161 nvim: bump package versions 2025-03-30 23:26:51 +02:00
8033f2e2a9 nvim: change vim-ReplaceWithRegister mapping 2025-03-30 23:26:51 +02:00
3fa1a018ee awesome: change to green colors 2025-03-30 23:26:51 +02:00
dd9de18aa7 awesome: detect theme on (re)start 2025-03-30 23:26:32 +02:00
6d8e00fabf zsh: use zoxide if available otherwise use zsh-z
WIP zoxide: use z not cd
2025-03-30 23:26:32 +02:00
b54ece050d nvim: add lsp_signature plugin 2025-03-30 23:26:32 +02:00
437ca39309 alacritty: change colors, nvim: change rabbit file color 2025-03-30 23:26:32 +02:00
1835f61e49 awesome: change font and colors of help window 2025-03-30 23:26:32 +02:00
7caf112500 alacritty: increase font to 10 2025-03-30 23:26:32 +02:00
6b84ae6f3a xsession: add xrandr for white 2025-03-30 23:26:20 +02:00
d3b8e76787 nvim: add zen-mode plugin
toggles hyperland and awesome fullscreen mode
2025-03-29 12:38:21 +01:00
24d031c214 nvim: add slimline horizontal line (as slimline by default has no background) 2025-03-29 12:34:58 +01:00
bfa2c6313f nvim add melange (now default) and nordic colorschemes 2025-03-29 12:29:55 +01:00
cfb882fdc9 nvim: auto switch light/dark background 2025-03-29 12:24:16 +01:00
b6bc1de7af nvim: add tmux integration 2025-03-22 14:14:00 +01:00
48664abc41 nvim: add hardtime plugin 2025-03-22 12:02:08 +01:00
3fc6280267 nvim: non-floating Oil in the key bind 2025-03-22 12:02:08 +01:00
ef95853433 nvim: replace feline with slimline and incline plugin
display only bottom status line
2025-03-22 12:02:08 +01:00
3146aeee3e nvim: bump plugin versions 2025-03-22 12:02:08 +01:00
f685ebee2c nvim: notimeout 2025-03-22 12:02:08 +01:00
5a40a5b3ab nvim: add marks.nvim and mini.ai plugins 2025-03-22 12:02:08 +01:00
c06364cd27 nvim: replace arrow with rabbit plugin 2025-03-22 12:02:08 +01:00
f2f29762a4 nvim: add toggleterm plugin 2025-03-22 12:02:08 +01:00
7f850d115f nvim add iswap and treewaker plugins 2025-03-22 12:02:08 +01:00
fc88cb9801 nvim: add hlsearch plugin 2025-03-22 12:02:08 +01:00
75c39a5613 nvim: simplify nvim-surround config
note: you need to type ys, cs, ds fast to activate surround bindings
2025-03-22 12:02:08 +01:00
e90c2c7e4a nvim: add quicker plugin 2025-03-22 12:02:08 +01:00
24966cfc69 nvim: change arrow leader key 2025-03-17 00:34:41 +01:00
78ab1671ab nvim: add tardis plugin 2025-03-17 00:34:41 +01:00
d38ae42668 nvim: add yankbank plugin 2025-03-17 00:34:30 +01:00
240d466e3d nvim: add godoc plugin 2025-03-16 23:17:20 +01:00
9e8f036f62 nvim: fix trouble conf, remove hierarchy-tree-go, split init.lua 2025-03-16 21:14:03 +01:00
8a6ecfe7b9 nvim: remap leap and oil, move leap to editing 2025-03-16 21:14:03 +01:00
8714b847a7 alacritty: change dark theme to meliora to match nvim dark colorscheme 2025-03-11 21:40:19 +01:00
2c672e497c nvim: change default colorscheme to mellifluous 2025-03-11 21:40:19 +01:00
6d22ed0187 nvim: lazy update 2025-03-11 21:40:16 +01:00
f5397295d3 update for newer versions of alacritty and hyprland 2025-03-10 23:14:17 +01:00
2a14edd39c nvim: lazy update, persisted: add exact ~ to ignored directories 2024-09-09 21:47:42 +02:00
00a77bf58a use Hyprland as first option with alacritty and master layout 2024-09-09 21:45:56 +02:00
9e9ccd0fde river: repeat randr and restart sandbar if needed 2024-08-11 00:18:58 +02:00
d72a4540b9 shell: minimal fzf colors change working on dark and light backgrounds 2024-08-10 14:07:01 +02:00
b0385dc277 river: second bind for alacritty, run two wlr-randr using subshell 2024-08-09 22:51:35 +02:00
f3f859d9a1 add river wm 2024-08-06 23:11:11 +02:00
5b421c7999 nvim: update which-key naming groups to new format 2024-08-04 23:02:15 +02:00
cf729da8ef nvim: lazy update 2024-08-04 22:52:56 +02:00
341499f9a7 nvim: add go tr snippet and bind key for find translation key 2024-08-04 22:52:00 +02:00
10ba42cb1d kitty: rebind tab change keys, make ctrl+shift+6 no_op 2024-08-04 22:42:58 +02:00
154b1a11be zsh: fzf add and change colors 2024-07-08 23:42:35 +02:00
ec9c92ab9f zsh: fzf colors with dark background 2024-07-07 11:59:25 +02:00
c321000834 tmux: window current status bring back window flags and resize pane keys 2024-07-06 22:22:47 +02:00
06218e16d4 nvim: more text objects 2024-07-06 20:48:07 +02:00
a7c29799b8 nvim: conditional text objects 2024-07-06 20:41:45 +02:00
3035ab9acb kitty shell key and check for wayland clipboard dependency 2024-07-06 20:22:27 +02:00
e6216fb3cd nvim: add replace with register 2024-07-06 20:21:58 +02:00
24d4f9e638 nvim: lazy update 2024-07-06 14:26:38 +02:00
ab1a7df7f4 zsh: add fv alias 2024-07-06 14:26:38 +02:00
4a666b8d21 nvim: colorscheme one nord 2024-07-06 14:26:38 +02:00
3324aae2d6 add kitty 2024-07-06 14:26:38 +02:00
10e03987be waybar/feline/alacritty: use my colors 2024-07-06 13:31:08 +02:00
728b00c2ca update README.md and check_dependencies.sh, use Hyprland without path 2024-06-29 18:41:26 +02:00
30793b5a46 nvim: load persisted plugin in telescope configuration 2024-06-29 16:41:21 +02:00
8fb8e43f59 nvim: use keys to lazy load 2024-06-29 16:41:21 +02:00
1f040c70ab nvim: use config second opts option when calling setup 2024-06-29 13:41:33 +02:00
e03d46c3ab nvim: lazy update 2024-06-29 12:52:16 +02:00
d9f7f0961f nvim: add vim-dadbod with UI and completion 2024-06-29 12:42:17 +02:00
b73ebaf338 nvim: use zenbones theme, adjust feline, alacritty and waybar 2024-06-29 12:37:13 +02:00
da18d28504 bash (no vi mode at line start), hyperland (term key), yazi (zathura) 2024-06-28 22:56:39 +02:00
e50284111b nvim: go to arrow on <leader>Digit 2024-06-25 23:51:53 +02:00
faaf5807d5 alacritty/waybar: decrease font size 2024-06-25 19:13:18 +02:00
7d4b8f4f7a alacritty: remove yaml config 2024-06-25 19:10:54 +02:00
98e69defac bash: remove exec new, improve prompt, block cursor during command 2024-06-24 22:59:59 +02:00
9062aeb17a hyprland: lock with Meta4+Alt+O/S 2024-06-24 22:59:59 +02:00
e1610e3874 nvim: lazy update 2024-06-22 14:45:53 +02:00
8c303ca0d1 tmux switch select window with Alt+Digit and swap with Alt+Shift+Digit
also bind S to new session
2024-06-21 21:43:20 +02:00
b032608fd9 hyprland: use mod4+alt as alternative to mod4+shift
also add key for fullscreen mode with gaps and bar
2024-06-21 20:24:15 +02:00
1dfb8e7e7b yazi: add config 2024-06-20 21:39:27 +02:00
4d7bd1a487 nvim/zsh/tmux: better-escape, starship prompt and plugins, tmux rounded corners
- zsh: add plugins: zsh-history-substring-search, zsh-z
2024-06-20 20:48:51 +02:00
ad79dc5bbf nvim: fix git blame 2024-06-19 23:01:20 +02:00
d522104407 nvim: use ccc for highlighting colors and color pickers 2024-06-19 22:40:42 +02:00
01f6327e9e nvim: own feline theme 2024-06-19 22:01:04 +02:00
ad9aacbbcb waybar: change light background 2024-06-19 00:21:21 +02:00
7373c7b653 alacritty: use dark and light themes from folke/tokyonight.nvim 2024-06-19 00:01:02 +02:00
a1736b33e0 nvim: add persisted 2024-06-18 21:23:55 +02:00
f10efa6808 nvim: switch colorscheme to tokyonight 2024-06-18 00:05:40 +02:00
3810c83e14 waybar: toggle light and dark theme 2024-06-16 10:47:58 +02:00
e08245989a alacritty: change dark theme to nightfly 2024-06-15 23:52:45 +02:00
492adae580 nvim: add global-note 2024-06-15 23:37:14 +02:00
09ffb3b2d9 nvim: replace harpoon with arrow 2024-06-15 23:37:14 +02:00
a8bf055a0b nvim: fix function name typo 2024-06-15 22:08:40 +02:00
a22b7125a5 hyperland: switch workspace back and forth 2024-06-15 22:07:47 +02:00
72f2a053c0 hyprland: change background and active and inactive border and gaps 2024-06-15 21:09:55 +02:00
7111817d6f hyprland: add vim file type 2024-06-15 19:38:49 +02:00
0c0a1a9f9c nvim: change harpoon keys 2024-06-15 16:07:34 +02:00
e1ba513fa6 nvim: add go.nvim 2024-06-15 16:07:09 +02:00
1ce7cac540 nvim: remove lspsaga jump do diagnostic 2024-06-15 13:51:23 +02:00
ec7153193b nvim: add bookmarks 2024-06-15 13:41:38 +02:00
a2a13c901a alacritty: change themes 2024-06-15 13:14:46 +02:00
afc7829f1f nvim: select colorscheme based on alacritty theme
the theme is read from file so this also works in tmux
2024-06-15 12:16:01 +02:00
bfe74b7499 nvim: lazy update 2024-06-15 11:34:00 +02:00
fa84b139af nvim: bamboo colorscheme 2024-06-15 11:33:13 +02:00
557bb04d71 hyprland(white): swap monitors 2024-06-15 10:41:41 +02:00
55e747eec2 nvim: zenbones colorscheme; use Fira Code Nerd Font 2024-06-14 22:35:13 +02:00
d3b783cb55 nvim: update lazy packages 2024-06-13 19:52:24 +02:00
f6e3c9acb4 zsh: add zsh-you-should-use 2024-06-13 19:52:24 +02:00
c68109aa92 nvim: replace lualine with feline, remove noice 2024-06-13 19:52:24 +02:00
f87bdec4eb hyprland: add seven.conf 2024-05-11 07:44:47 +02:00
1d77cf6c1e hyprland: rename five.conf to five-rotated.conf, add nonrotated five.conf 2024-05-11 06:18:15 +02:00
85e31b13c1 hyprland: more gaps, shadow, animations, lighter bg color 2024-05-10 21:45:15 +02:00
ac26cef63a nvim: change bindings to Oil, remove some old 2024-04-17 23:03:08 +02:00
f72f18f5c7 nvim: add lspsaga 2024-04-17 23:03:08 +02:00
ccf3dcc500 nvim: add noice last and history key bindings 2024-04-17 23:02:30 +02:00
a987843e95 nvim: add nightfox colorscheme 2024-04-17 23:02:30 +02:00
fef6cbc6bb nvim: add noice.nvim 2024-04-16 23:41:08 +02:00
118211652b nvim: add oil.nvim 2024-04-16 00:12:32 +02:00
c9ccef2f8a nvim: lazy update 2024-04-13 12:25:01 +02:00
3c34d8942e nvim: switch to everforest color scheme, also add NeoSolarized 2024-04-13 12:19:24 +02:00
7dbe42b087 nvim: use html snippets in templ files 2024-04-13 12:15:31 +02:00
60cd08c395 nvim: add blame.nvim 2024-04-11 23:37:40 +02:00
c47799a7e1 hyprland: white both screens horizontal 2024-04-09 22:54:48 +02:00
73bfbcc3a3 nvim: add telescope git_grep 2024-04-09 22:53:24 +02:00
7dbf926206 nvim: key for tabclose, consistent use of <cmd> and <CR> 2024-04-09 22:45:41 +02:00
4995ac177b nvim: treesj, neogit, and diffview keys 2024-04-09 22:45:41 +02:00
56abd08940 nvim: use Neogit 2024-04-07 21:20:57 +02:00
d86e4ec4a3 nvim: leap: remap gs/gS instead of s/S/gs 2024-04-05 00:28:04 +02:00
b774bb44d9 nvim: add lazy-lock.json, fix orgmode config 2024-04-04 21:01:22 +02:00
b8cd095b8b nvim: add treesj (for toggle one-line) 2024-03-24 22:13:42 +01:00
021226fc80 nvim: add trouble and keys for copen and cclose 2024-03-24 21:46:07 +01:00
a84dac1b3d nvim: add leap 2024-03-24 00:06:22 +01:00
7110966df9 hyprland: use wofi 2024-03-23 15:07:34 +01:00
9c1613f567 nvim: switch to harpoon2, change menu/add keys 2024-03-16 18:47:14 +01:00
f3b5b49899 remove zellij 2024-03-15 00:21:11 +01:00
8068766afc nvim: disable startup message 2024-03-15 00:19:31 +01:00
d6a8dc4d1e nvim: borrow from kickstart, move code from after/plugin to lua/plugins 2024-03-15 00:19:11 +01:00
b264e9d805 nvim: switch to onenord theme 2024-02-24 14:38:57 +01:00
6181681134 Hyprland: try Hyperland before sx 2024-02-24 14:38:31 +01:00
76 changed files with 2113 additions and 1369 deletions

View File

@ -4,11 +4,40 @@ Lupan's config files
Installation
------------
Install Hyprland
----------------
To reproduce my environment clone this repo into `~/dotfiles` and check
that you have required programs in your `PATH` with
```
$ sh check_dependencies.sh
$ sh check_dependencies.sh hypr
```
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).

View File

@ -1,5 +1,3 @@
import = ["~/.config/alacritty/dark.toml"]
[colors]
draw_bold_text_with_bright_colors = false
@ -7,15 +5,13 @@ draw_bold_text_with_bright_colors = false
TERM = "xterm-256color"
[font]
size = 10.5
size = 10
[font.bold]
family = "GoMono Nerd Font"
family = "Fira Code Nerd Font"
[font.normal]
family = "GoMono Nerd Font"
family = "Fira Code Nerd Font"
[keyboard]
bindings = [
{ key = ";", mods = "Control", chars = "\u001bOR" }
]
[general]
import = ["~/.config/alacritty/dark.toml"]

View File

@ -1,306 +0,0 @@
# 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: GoMono Nerd Font
bold:
family: GoMono Nerd Font
key_bindings:
- key: F6
mods: Control|Shift
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh --next"] }

View File

@ -1,3 +1,45 @@
import = [
"~/.config/alacritty/themes/themes/nord.toml"
]
# -----------------------------------------------------------------------------
# Kanagawa Paper Ink
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-ink.toml
# URL: https://github.com/alacritty/alacritty
# -----------------------------------------------------------------------------
[colors.primary]
background = '#1F1F28'
foreground = '#DCD7BA'
[colors.cursor]
cursor = '#c4b28a'
text = '#1F1F28'
[colors.selection]
background = '#363646'
foreground = '#9e9b93'
[colors.normal]
black = '#393836'
red = '#c4746e'
green = '#699469'
yellow = '#c4b28a'
blue = '#435965'
magenta = '#a292a3'
cyan = '#8ea49e'
white = '#C8C093'
[colors.bright]
black = '#aca9a4'
red = '#cc928e'
green = '#72a072'
yellow = '#d4c196'
blue = '#698a9b'
magenta = '#b4a7b5'
cyan = '#96ada7'
white = '#d5cd9d'
[[colors.indexed_colors]]
index = 16
color = '#b6927b'
[[colors.indexed_colors]]
index = 17
color = '#c4746e'

View File

@ -1,3 +1,45 @@
import = [
"~/.config/alacritty/themes/themes/ayu_light.toml"
]
# -----------------------------------------------------------------------------
# Kanagawa Paper Canvas
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-canvas.toml
# URL: https://github.com/alacritty/alacritty
# -----------------------------------------------------------------------------
[colors.primary]
background = '#e1e1de'
foreground = '#595b62'
[colors.cursor]
cursor = '#618bb6'
text = '#e1e1de'
[colors.selection]
background = '#c4cbdc'
foreground = '#858479'
[colors.normal]
black = '#4c4c65'
red = '#b35560'
green = '#57786c'
yellow = '#a67337'
blue = '#719ac2'
magenta = '#ac7085'
cyan = '#526c79'
white = '#858479'
[colors.bright]
black = '#5c5c75'
red = '#c75f6b'
green = '#618679'
yellow = '#b67e3d'
blue = '#86aed7'
magenta = '#b57e91'
cyan = '#5d7a89'
white = '#919084'
[[colors.indexed_colors]]
index = 16
color = '#b8805e'
[[colors.indexed_colors]]
index = 17
color = '#b35560'

View File

@ -1,30 +0,0 @@
#!/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

View File

@ -51,7 +51,20 @@ end
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
local theme = "theme_dark.lua"
local function read_theme()
local theme = "theme_dark.lua"
local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if f then
if string.find(f:read('*all'), 'light') then
theme = 'theme_light.lua'
end
f:close()
return theme
end
end
local theme = read_theme()
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
local function set_wallpaper(s)
@ -325,8 +338,8 @@ local globalkeys = gears.table.join(
end,
{ description = "lua execute prompt", group = "awesome" }),
-- Menubar
awful.key({ modkey, }, "p", function() menubar.show() end,
{ description = "show the menubar", group = "launcher" })
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end,
{ description = "run command", group = "launcher" })
)
local clientkeys = gears.table.join(

View File

@ -1,51 +1,56 @@
local themes_path = require("gears.filesystem").get_themes_dir()
local themes_path = require("gears.filesystem").get_themes_dir()
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local theme = {}
local theme = {}
theme.font = "GoMono Nerd Font 10.5"
theme.tasklist_disable_icon = true
theme.wibar_height = 40
theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30
theme.bg_normal = "#283538"
theme.bg_focus = "#36537d" -- hsl(215deg 40% 35%)
theme.bg_urgent = "#d8aeb5"
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#263c59" -- hsl(215deg 40% 25%)
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
theme.bg_focus = "#478575" -- hsl(165deg 30% 40%)
theme.bg_urgent = "#5c3d45" -- hsl(345deg 20% 30%)
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#3d5c54" -- hsl(165deg 20% 30%)
theme.fg_normal = "#9ea7aa"
theme.fg_focus = "#b1babd"
theme.fg_urgent = theme.bg_focus
theme.fg_minimize = "#8a9294"
theme.taglist_fg_empty = "#798082"
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
theme.fg_focus = "#b1babd"
theme.fg_urgent = theme.bg_focus
theme.fg_minimize = "#8a9294"
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#708090"
theme.border_focus = "#a0522d"
theme.border_marked = "#91231c"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#708090"
theme.border_focus = "#a0522d"
theme.border_marked = "#91231c"
theme.bg_wallpaper = "#424a4c"
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:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
return theme

View File

@ -1,51 +1,56 @@
local themes_path = require("gears.filesystem").get_themes_dir()
local themes_path = require("gears.filesystem").get_themes_dir()
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local theme = {}
local theme = {}
theme.font = "GoMono Nerd Font 10.5"
theme.tasklist_disable_icon = true
theme.wibar_height = 40
theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30
theme.bg_normal = "#283538"
theme.bg_focus = "#82a0c9" -- hsl(215deg 40% 65%)
theme.bg_urgent = "#d0426a"
theme.bg_minimize = "#7b899d" -- hsl(215deg 15% 55%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#5e85ba" -- hsl(215deg 40% 55%)
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
theme.bg_focus = "#a9d6ca" -- hsl(165deg 35% 75%)
theme.bg_urgent = "#bc8f9b" -- hsl(345deg 25% 65%)
theme.bg_minimize = "#62847b" -- hsl(165deg 15% 45%)
theme.bg_systray = theme.bg_normal
theme.tasklist_bg_focus = "#8fbcb1" -- hsl(165deg 25% 65%)
theme.fg_normal = "#616c6f"
theme.fg_focus = "#363d3e"
theme.fg_urgent = "#e9f2f5"
theme.fg_minimize = "#4b5456"
theme.taglist_fg_empty = "#566063"
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
theme.fg_focus = "#363d3e"
theme.fg_urgent = "#e9f2f5"
theme.fg_minimize = "#4b5456"
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#bebebe"
theme.border_focus = "#ff7f50"
theme.border_marked = "#91231c"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
theme.border_normal = "#bebebe"
theme.border_focus = "#ff7f50"
theme.border_marked = "#91231c"
theme.bg_wallpaper = "#b0bec2"
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:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
theme.layout_max = themes_path .. "default/layouts/maxw.png"
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
return theme

View File

@ -1,37 +1,53 @@
#!/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:'
for CMD in \
zsh \
git \
cc \
make \
setxkbmap \
slock \
systemctl \
xmodmap \
xrandr \
xrdb \
xset \
xsetroot \
hsetroot \
xsettingsd \
sed \
pkill \
dmenu \
dmenu_run \
xss-lock \
exa \
fzf \
; do
which "$CMD"
done
check_dependency zsh dwm hypr
check_dependency git dwm hypr
check_dependency cc dwm
check_dependency make dwm
check_dependency setxkbmap dwm
check_dependency slock dwm
check_dependency systemctl dwm hypr
check_dependency xmodmap dwm
check_dependency xrandr dwm
check_dependency xrdb dwm
check_dependency xset dwm
check_dependency xsetroot dwm
check_dependency hsetroot dwm
check_dependency xsettingsd dwm
check_dependency sed dwm hypr
check_dependency pkill dwm
check_dependency dmenu dwm
check_dependency dmenu_run dwm
check_dependency xss-lock dwm
check_dependency exa dwm hypr
check_dependency fzf dwm hypr
check_dependency Hyprland hypr
check_dependency hyprctl hypr
check_dependency alacritty hypr
check_dependency swaylock hypr
check_dependency waybar hypr
check_dependency wofi hypr
echo -e '\n# optional:'
for CMD in \
sx \
picom \
compton \
xbacklight; do
which "$CMD"
done
check_dependency sx dwm
check_dependency picom dwm
check_dependency compton dwm
check_dependency xbacklight dwm
check_dependency wl-copy hypr
check_dependency wl-paste hypr

View File

@ -1,4 +1,4 @@
[main]
font = GoMono Nerd Font:size=11
font = Fira Code Nerd Font:size=11
include = /usr/share/foot/themes/nord

View File

@ -0,0 +1,4 @@
monitor=DP-1,highres,0x0,2,transform,1
monitor=HDMI-A-2,highres,1080x0,2
# vim: ft=hyprlang

View File

@ -1,2 +1,4 @@
monitor=DP-1,highres,0x0,2,transform,1
monitor=HDMI-A-2,highres,1080x0,2
monitor=DP-1,highres,0x0,2
monitor=HDMI-A-2,highres,1920x0,2
# vim: ft=hyprlang

View File

@ -1,4 +1,4 @@
#source = ~/.config/hypr/white.conf
source = ~/.config/hypr/white.conf
input {
kb_layout = pl
@ -6,12 +6,12 @@ input {
}
general {
gaps_in = 1
gaps_out = 3
layout = dwindle
border_size = 2
col.inactive_border = 0xff808080
col.active_border = 0xffbf6a40
gaps_in = 3
gaps_out = 4
layout = master
border_size = 3
col.inactive_border = 0xff5387ac
col.active_border = 0xffac7853
}
dwindle {
@ -19,7 +19,7 @@ dwindle {
}
decoration {
drop_shadow = false
rounding = 4
}
animations {
@ -30,27 +30,37 @@ misc {
disable_hyprland_logo = true
disable_splash_rendering = true
disable_autoreload = true
background_color = rgb(404040)
background_color = 0xff808080
}
$menu = rofi -show drun -theme Arc-Dark
$terminal = alacritty
binds {
workspace_back_and_forth = true
}
$menu = wofi -S run
$terminal = alacritty || kitty
$mainMod = SUPER
bind = $mainMod, P, exec, $menu
bind = $mainMod SHIFT, Return, exec, $terminal
bind = $mainMod ALT, Return, exec, $terminal
bind = $mainMod, Return, layoutmsg,swapwithmaster master
bind = $mainMod CONTROL SHIFT, Q, exit
bind = $mainMod, Q, exec, hyprctl reload
bind = $mainMod CONTROL SHIFT, C, killactive
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, systemctl suspend
bind = $mainMod ALT, S, exec, swaylock -c 263c59
bind = $mainMod ALT, S, exec, systemctl suspend
bind = $mainMod CONTROL, Space, togglefloating
bind = $mainMod, D, exec, hyprctl keyword general:layout "dwindle"
bind = $mainMod, M, exec, hyprctl keyword general:layout "master"
bind = $mainMod, F, fullscreen, 0
bind = $mainMod SHIFT, F, fullscreen, 1
bind = $mainMod ALT, F, fullscreen, 1
bind = $mainMod, U, layoutmsg, togglesplit
bind = $mainMod, I, layoutmsg, cycleprev
bind = $mainMod, O, layoutmsg, cyclenext
@ -60,6 +70,7 @@ bind = $mainMod SHIFT, O, layoutmsg, swapnext
bind = $mainMod CONTROL, I, layoutmsg, removemaster
bind = $mainMod CONTROL, O, layoutmsg, addmaster
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, j, movefocus, d
@ -71,6 +82,11 @@ bind = $mainMod SHIFT, j, swapwindow, d
bind = $mainMod SHIFT, k, swapwindow, u
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, j, layoutmsg, orientationbottom
bind = $mainMod CONTROL, k, layoutmsg, orientationtop
@ -100,10 +116,21 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
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, left, workspace, m-1
# Switch workspaces on current monitor with mainMod CONTROL + Control + [0-9]
# Switch workspaces on current monitor with mainMod + Control + [0-9]
bind = $mainMod CONTROL, 1, focusworkspaceoncurrentmonitor, 1
bind = $mainMod CONTROL, 2, focusworkspaceoncurrentmonitor, 2
bind = $mainMod CONTROL, 3, focusworkspaceoncurrentmonitor, 3
@ -120,3 +147,5 @@ bindm = $mainMod,mouse:273,resizewindow
exec-once = waybar
exec-once = swayidle -w timeout 300 'swaylock -f -c 263c59' before-sleep 'swaylock -f -c 263c59'
# vim: ft=hyprlang

View File

@ -0,0 +1,5 @@
monitor=eDP-1,prefered,0x0,1.5
monitor=DP-1,highres,1280x0,2
monitor=HDMI-A-1,highres,3200x0,2
# vim: ft=hyprlang

View File

@ -4,5 +4,7 @@ env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
monitor=DP-2,highres,0x0,2,transform,1
monitor=DP-1,highres,1080x0,2
monitor=DP-1,highres,0x0,2
monitor=DP-2,highres,1920x0,2
# vim: ft=hyprlang

View File

@ -9,4 +9,5 @@
"tray",
"clock"
],
"reload_style_on_change": true,
}

View File

@ -0,0 +1,12 @@
* {
background-color: #3f4947;
color: #9bafac;
}
#workspaces button.active {
border-bottom: 3px solid #9bafac;
}
#workspaces button.urgent {
border-bottom: 3px solid #a65959;
}

View File

@ -0,0 +1,13 @@
* {
background-color: #dde4e3;
color: #2c3131;
}
#workspaces button.active {
border-bottom: 3px solid #2c3131;
}
#workspaces button.urgent {
border-bottom: 3px solid #9e412e;
}

View File

@ -1,12 +1,12 @@
@import url("file:///home/lupan/.config/waybar/dark.css");
* {
font-family: GoMono Nerd Font;
font-size: 14;
background-color: #263c59;
color: #7b899d;
font-family: Fira Code Nerd Font;
font-size: 12px;
}
#workspaces {
padding: 0 1rem;
padding: 0 0.5rem;
}
#workspaces button {
@ -15,19 +15,11 @@
border-bottom: 3px solid transparent;
}
#workspaces button.active {
border-bottom: 3px solid #7b899d;
}
#workspaces button.urgent {
border-bottom: 3px solid #a65959;
}
#window {
border-bottom: 3px solid transparent;
}
#clock {
padding: 0 1rem;
padding: 0 0.5rem;
border-bottom: 3px solid transparent;
}

View File

@ -0,0 +1,32 @@
font_family FiraCode Nerd
font_size 11
cursor_blink_interval 0
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title} {index}"
action_alias launch_tab launch --type=tab --cwd=current
map ctrl+shift+n launch_tab tmux
map ctrl+shift+t launch_tab tmux attach
map ctrl+shift+s launch_tab zsh
map ctrl+shift+6 no_op
map ctrl+shift+h previous_tab
map ctrl+shift+l next_tab
map ctrl+shift+p goto_tab -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 10
# BEGIN_KITTY_THEME
# Afterglow
include current-theme.conf
# END_KITTY_THEME

View File

@ -1,140 +0,0 @@
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)
local nmap = function(keys, func, desc)
if desc then
desc = 'LSP: ' .. desc
end
vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc })
end
nmap('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
nmap('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-- See `:help K` for why this keymap
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
nmap('<leader>K', vim.lsp.buf.signature_help, 'Signature Documentation')
-- Lesser used LSP functionality
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
nmap('<leader>wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
nmap('<leader>wl', function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, '[W]orkspace [L]ist Folders')
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
vim.lsp.buf.format()
end, { desc = 'Format current buffer with LSP' })
end
-- Enable the following language servers. They will automatically be installed.
local servers = {
clangd = {},
gopls = {},
-- pyright = {},
rust_analyzer = {},
tsserver = {},
lua_ls = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
},
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()
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
-- Ensure the servers above are installed
local mason_lspconfig = require 'mason-lspconfig'
mason_lspconfig.setup {
ensure_installed = vim.tbl_keys(servers),
}
mason_lspconfig.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
}
end,
}
-- [[ Configure nvim-cmp ]]
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load()
luasnip.config.setup {}
cmp.setup {
completion = { autocomplete = false },
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
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-Space>'] = cmp.mapping.complete {},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
}

View File

@ -1,8 +0,0 @@
local ls = require "luasnip"
ls.config.set_config {
history = true,
updateevents = "TextChanged,TextChangedI",
}
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })

View File

@ -1,14 +0,0 @@
local telescope = require 'telescope'
telescope.setup({
extensions = {
whaler = {
directories = { "/home/lupan/src" },
oneoff_directories = { "/home/lupan/dotfiles" },
auto_file_explorer = false,
auto_cwd = true,
}
}
})
telescope.load_extension("whaler")

View File

@ -1,78 +0,0 @@
local org = require('orgmode')
org.setup_ts_grammar()
require('nvim-treesitter.configs').setup {
ensure_installed = { 'c', 'cpp', 'go', 'haskell', 'lua', 'org', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
auto_install = false,
highlight = {
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 = {
select = {
enable = true,
lookahead = true,
keymaps = {
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
['al'] = '@call.outer',
['il'] = '@call.inner',
['ao'] = '@loop.outer',
['io'] = '@loop.inner',
['ar'] = '@return.outer',
['ir'] = '@return.inner',
['as'] = '@statement.outer',
['ag'] = '@assignment.outer',
['ig'] = '@assignment.inner',
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
},
},
},
}
org.setup({
org_agenda_files = { '~/org/*.org' },
org_default_notes_file = '~/org/capture.org',
})

View File

@ -0,0 +1,75 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
"blame.nvim": { "branch": "main", "commit": "b87b8c820e4cec06fbbd2f946b7b35c45906ee0c" },
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "f643d1b51d1d3d14c8641a46ce44f6bce73c2697" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
"guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
"hererocks": { "branch": "master", "commit": "344c46ed54df9a4dbc2d2bf510dcd9a9d90497bf" },
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
"kanagawa-paper.nvim": { "branch": "master", "commit": "b0df20cca3b7087c06f241983b488190cc8e23af" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazyjj.nvim": { "branch": "main", "commit": "bba66a1351ff1f1bd078c8a1b00b8d12b3ed0017" },
"leap.nvim": { "branch": "main", "commit": "08ca7ec9e859856251d56c22ea107f82f563ff3c" },
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2682b0d9732bf52cbc34862056f143e71dc4a6d" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"namu.nvim": { "branch": "main", "commit": "a3a3d81d12b61a38f131253bcd3ce5e2c6599850" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogit": { "branch": "master", "commit": "7fe60f9aa6eacf2eb730c4e9b83d06a36d028161" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"oil.nvim": { "branch": "master", "commit": "5b6068aad7d2057dd399fac73b7fb2cdf23ccd6e" },
"orgmode": { "branch": "master", "commit": "32ef9e95f43a6e951fb931b438372546a4f0c524" },
"persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"quicker.nvim": { "branch": "master", "commit": "51d3926f183c2d98fbc237cc237ae0926839af3a" },
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
"slimline.nvim": { "branch": "main", "commit": "10dd807685997d1b72b950dfb4ec1a01cb259101" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"snipe.nvim": { "branch": "main", "commit": "2a1b738dfae8502e6162eddfc774da65ed404142" },
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope-git-grep.nvim": { "branch": "main", "commit": "d2e1322934e334ee9eb8e838c30f3afb3e7a730e" },
"telescope-tabs": { "branch": "master", "commit": "9ca0800d4e9c2610d5cac4d121cde0d9fbd89a64" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"tree-sitter-nu": { "branch": "main", "commit": "100d06e29d13a8ebfc3f29173c07a5c4f2050586" },
"tree-sitter-templ": { "branch": "master", "commit": "de35706f89beed5087670a9c4421b7794ef02411" },
"treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
"treewalker.nvim": { "branch": "main", "commit": "86ae3cf9896b43f3cfa35b962428f32fed8b5ee8" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
"vim-ReplaceWithRegister": { "branch": "master", "commit": "a487af6efd1be3fc6fac8da47d00efc9d1f6f724" },
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
"vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"whaler": { "branch": "main", "commit": "b3a4257f6225a9a6c42f33b56ca316325e395f22" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" }
}

View File

@ -1,17 +1,18 @@
-- [[ Highlight on yank ]]
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
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,
group = highlight_group,
pattern = '*',
})
vim.api.nvim_create_autocmd('BufWritePre', {
desc = 'Format on saving buffer',
callback = function()
vim.lsp.buf.format()
end,
pattern = { '*.go', '*.lua' },
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
pattern = { '*.go', '*.lua', '*.rs' },
})

View File

@ -1,7 +1,13 @@
-- 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 = false
vim.o.hlsearch = true -- false
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Make line numbers default
vim.wo.number = true
@ -25,7 +31,7 @@ vim.wo.signcolumn = 'yes'
-- Decrease update time
vim.o.updatetime = 250
vim.o.timeoutlen = 300
vim.o.timeout = false
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
@ -46,3 +52,5 @@ vim.g.lightspeed_no_default_keymaps = true
vim.o.cursorline = true
vim.opt.foldcolumn = '1'
vim.opt.laststatus = 3

View File

@ -1,5 +1,5 @@
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.maplocalleader = ' \\'
local key = vim.keymap.set
local opts = { silent = true, noremap = true }
@ -10,34 +10,9 @@ key('v', '<Space>', '<Nop>', { silent = true })
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", ":Explore<cr>", { desc = "[D]isplay [d]irectory" })
key("n", "<leader>dv", ":Vexplore<cr>", { desc = "[D]isplay directory ([v]ertical split)" })
key("n", "<leader>dh", ":Sexplore<cr>", { desc = "[D]isplay [d]irectory ([h]orizontal split)" })
key("n", "<leader>dt", ":Lexplore 30<cr>", { desc = "[D]isplay directory [t]oggle" })
key("n", "<leader>ct", ":ColorizerToggle<cr>", { desc = "[C]olorizer [t]oggle" })
key("n", "<leader>ut", ":UndotreeToggle<cr>", { desc = "[U]undotree [t]oggle" })
key("n", "<leader>ut", "<cmd>UndotreeToggle<CR>", { desc = "[U]undotree [t]oggle" })
-- telescope
key('n', '<leader><space>', '<cmd>Telescope buffers<cr>', { desc = '[ ] Find existing buffers' })
key('n', '<leader>?', '<cmd>Telescope oldfiles<cr>', { desc = '[?] Find recently opened buffers' })
key('n', '<leader>/', function()
require('telescope.builtin').current_buffer_fuzzy_find(require("telescope.themes").get_dropdown { previewer = false })
end, { desc = '[/] Find in current buffer' })
key('n', '<leader>gf', '<cmd>Telescope git_files<cr>', { desc = '[G]it [f]iles' })
key('n', '<leader>gs', '<cmd>Telescope git_status<cr>', { desc = '[G]it [s]tatus' })
key('n', '<leader>gg', ':Git grep ', { desc = '[G]it [g]rep' })
key('n', '<leader>ff', '<cmd>Telescope find_files<cr>', { desc = '[F]ind [f]iles' })
key('n', '<leader>fg', '<cmd>Telescope live_grep<cr>', { desc = '[F]ind [g]rep' })
key('n', '<leader>fw', '<cmd>Telescope grep_string<cr>', { desc = '[F]ind [w]ord' })
key('n', '<leader>fh', '<cmd>Telescope help_tags<cr>', { desc = '[F]ind [h]elp (tags)' })
key('n', '<leader>fd', '<cmd>Telescope diagnostics<cr>', { desc = '[F]ind [d]iagnostics' })
key('n', '<leader>fk', '<cmd>Telescope keymaps<cr>', { desc = '[F]ind [k]eymaps' })
key('n', '<leader>fF', function()
require('telescope.builtin').find_files { hidden = true }
end, { desc = '[F]ind [F]iles (with hidden)' })
-- tabs
key('n', '<leader>td', function()
require('lupan.ui').tab_change_dir()
@ -56,29 +31,34 @@ key('n', '<leader>tt', function()
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 .. ']' })
key('n', '<leader>t' .. i, '<cmd>' .. i .. 'tabnext<CR>', { desc = '[T]ab nr [' .. i .. ']' })
end
key("n", "<leader>fl", '<cmd>Telescope whaler<cr>', { desc = '[F]ind with wha[l]er' })
-- translations
key('n', '<leader>tr', function()
require('lupan.ui').find_translation_key()
end, { desc = '[T][r]anlation key find' })
-- Diagnostic keymaps
key('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
key('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
key('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
key('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
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', ':bn<cr>', { desc = '[N]ext buffer' })
key('n', '<leader>P', ':bp<cr>', { desc = '[P]revious buffer' })
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', ':tabnew<cr>', { desc = '[T]ab [c]reate' })
key('n', '<leader>ts', ':tab split<cr>', { desc = '[T]ab [s]plit' })
key('n', '<leader>tn', ':tabnext<cr>', { desc = '[T]ab [n]ext' })
key('n', '<leader>tp', ':tabprevious<cr>', { desc = '[T]ab [p]revious' })
key('n', '<leader>tf', ':tabfirst<cr>', { desc = '[T]ab [f]irst' })
key('n', '<leader>tl', ':tablast<cr>', { desc = '[T]tab [l]ast' })
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" })
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)
@ -99,8 +79,12 @@ 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', ':cn<CR>', { desc = "Quickfix next" })
key('n', '<leader>k', ':cp<CR>', { desc = "Quickfix previous" })
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>s;', '<cmd>SessionSelect<CR>', { desc = '[S]ession Select' })
-- luasnip
@ -128,46 +112,6 @@ end, { silent = true })
vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasnip.lua<CR>",
{ desc = "[S]nippets [s]ource" })
-- terminal
key('t', '<C-_>', '<C-\\><C-n>')
-- harpoon
key('n', '<leader>ha', function()
require("harpoon.mark").add_file()
end, { desc = '[H]arpoon [a]dd' })
key('n', '<leader>hm', function()
require("harpoon.ui").toggle_quick_menu()
end, { desc = '[H]arpoon toggle quick [m]enu' })
key('n', '<leader>hj', function()
require("harpoon.ui").nav_next()
end, { desc = '[H]arpoon next (j)' })
key('n', '<leader>hk', function()
require("harpoon.ui").nav_prev()
end, { desc = '[H]arpoon prev (k)' })
for i = 1, 9, 1 do
key('n', '<M-' .. i .. '>', function()
require("harpoon.ui").nav_file(i)
end, { desc = '[H]arpoon nav_file [' .. i .. ']' })
end
for i = 1, 9, 1 do
key('n', '<leader>T' .. i, function()
require("harpoon.term").gotoTerminal(i)
end, { desc = '[H]arpoon nav_file [' .. i .. ']' })
end
-- colors
key('n', '<F6>', function()
if vim.o.background == "dark" then
vim.o.background = "light"
else
vim.o.background = "dark"
end
end)
key('n', '<F6>', function() require('lupan.utils').toggle_color_scheme() end, { desc = 'Toggle background' })

View File

@ -41,4 +41,29 @@ function M.tab_change_dir_newtab()
M.tab_change_dir({ action = tabnew_tcd, prompt_title = "Tab change directory (new tab)" })
end
local function append_text(text)
text = string.gsub(text, "^ + %w+%.([%w%p]+) +.*", "%1")
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_buf_set_text(0, row - 1, col, row - 1, col, { text })
end
function M.find_translation_key(opts)
opts = opts or {}
local action = opts.action or append_text
local prompt_title = opts.prompt_title or "Get translation key"
local cmd = { 'list-translation-keys' }
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 find_translation_key = pickers.new(dropdown, picker_opts)
find_translation_key:find()
end
return M

View File

@ -0,0 +1,53 @@
local M = {}
local filename = os.getenv('HOME') .. '/.config/alacritty/alacritty.toml'
local colorschemes = nil
function M.set_color_schemes(dark, light)
colorschemes = { dark = dark, light = light }
end
function M.terminalbg()
local ok, lines = pcall(io.lines, filename)
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
function M.update_color_scheme()
vim.o.background = M.terminalbg()
if colorschemes then
vim.cmd.colorscheme(colorschemes[vim.o.background])
end
end
function M.toggle_color_scheme()
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(filename, {}, vim.schedule_wrap(function(...)
M.update_color_scheme()
w:stop()
watch(fname)
end))
end
watch(filename)
return M

View File

@ -1,54 +1,20 @@
local function cwd()
return vim.fn.getcwd()
end
local function set_bg()
if vim.o.background == 'dark' then
vim.cmd.colorscheme("nordfox")
else
vim.cmd.colorscheme("dayfox")
end
end
vim.api.nvim_create_autocmd('OptionSet', {
callback = set_bg,
pattern = { 'background' },
})
return {
-- Colorscheme
{
'EdenEast/nightfox.nvim',
'thesimonho/kanagawa-paper.nvim',
config = function()
set_bg()
vim.cmd.colorscheme('kanagawa-paper')
end
},
{
-- Statusline (see `:help lualine.txt`)
'nvim-lualine/lualine.nvim',
opts = {
options = {
icons_enabled = false,
theme = 'auto',
component_separators = '|',
section_separators = '',
},
sections = {
lualine_x = { cwd, 'encoding', 'fileformat', 'filetype' }
}
--- Create Color Code
'uga-rosa/ccc.nvim',
config = function(_, opts)
require('ccc').setup(opts)
end,
cmd = { 'CccPick', 'CccHighlighterToggle' },
keys = {
{ "<leader>ct", "<cmd>CccHighlighterToggle<cr>", desc = "[C]olorizer [T]oggle" },
{ "<leader>cp", "<cmd>CccPick<cr>", desc = "[C]olor [P]ick" },
},
},
{
-- Indentation guides (see `:help indent_blankline.txt`)
'lukas-reineke/indent-blankline.nvim',
main = "ibl",
opts = {},
},
{
'norcalli/nvim-colorizer.lua',
cmd = 'ColorizerToggle'
},
}

View File

@ -0,0 +1,81 @@
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' },
},
}
cmp.setup.filetype('sql', {
sources = {
{ name = 'vim-dadbod-completion' },
{ name = 'buffer' },
},
})
cmp.setup.filetype('lisp', {
sources = cmp.config.sources({ { name = 'nvlime' } })
})
end,
}

View File

@ -0,0 +1,56 @@
return {
{
"otavioschwanck/arrow.nvim",
dependencies = {
{ "nvim-tree/nvim-web-devicons" },
},
opts = {
show_icons = true,
leader_key = '-', -- Recommended to be a single key
buffer_leader_key = '+', -- Per Buffer Mappings
}
},
{
"leath-dub/snipe.nvim",
keys = {
{ "_", function() require("snipe").open_buffer_menu() end, desc = "Open Snipe buffer menu" }
},
opts = {}
},
{
"chentoast/marks.nvim",
event = "VeryLazy",
config = true,
keys = {
{ '<leader>ma', '<cmd>MarksListAll<CR>' },
{ '<leader>mb', '<cmd>MarksListBuf<CR>' },
{ '<leader>mg', '<cmd>MarksListGlobal<CR>' },
},
},
{
"bassamsdata/namu.nvim",
config = function()
require("namu").setup({
-- Enable the modules you want
namu_symbols = {
enable = true,
options = {}, -- here you can configure namu
},
-- Optional: Enable other modules if needed
ui_select = { enable = false }, -- vim.ui.select() wrapper
})
-- === Suggested Keymaps: ===
vim.keymap.set("n", "<leader>;", ":Namu symbols<cr>", {
desc = "Jump to LSP symbol",
silent = true,
})
vim.keymap.set("n", "<leader>.", ":Namu workspace<cr>", {
desc = "LSP Symbols - Workspace",
silent = true,
})
end,
}
}

View File

@ -0,0 +1,23 @@
return {
{
'folke/which-key.nvim',
event = 'VimEnter',
opts = {
preset = 'helix',
delay = 1000,
},
config = function(_, opts)
require('which-key').setup(opts)
-- Document existing key chains
require('which-key').add {
{ "<leader>c", group = "[C]ode/Color" },
{ "<leader>d", group = "[D]ocument" },
{ "<leader>g", group = "[G]it" },
{ "<leader>r", group = "[R]ename" },
{ "<leader>s", group = "[S]earch" },
{ "<leader>w", group = "[W]orkspace" },
}
end,
},
}

View File

@ -8,19 +8,80 @@ return {
-- 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
version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({})
end
config = true,
},
{
'inkarkat/vim-ReplaceWithRegister',
keys = {
{ '<leader>rp', '<Plug>ReplaceWithRegisterOperator' },
{ '<leader>rpp', '<Plug>ReplaceWithRegisterLine' },
{ '<leader>rp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
},
},
{
'ggandor/leap.nvim',
opts = {
safe_labels = {},
},
dependencies = {
"tpope/vim-repeat",
},
keys = {
{ '\\', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
{ 'gs', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
}
},
{
'Wansmer/treesj',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
opts = {
use_default_keymaps = false,
},
keys = {
{ '<leader>tg', function() require('treesj').toggle() end, desc = "[T]ree to[g]gle one-line" },
{ '<leader>tj', function() require('treesj').join() end, desc = "[T]ree [J]oin one-line" },
{ '<leader>ts', function() require('treesj').split() end, desc = "[T]ree [S]plit one-line" },
},
},
-- rehighlight search on n or N
{
'nvimdev/hlsearch.nvim',
event = 'BufRead',
config = true,
},
{
'mizlan/iswap.nvim',
event = 'VeryLazy',
keys = {
{ '<leader>cs', '<cmd>ISwapWith<CR>', desc = 'I[S]wap' },
{ '<leader>cS', '<cmd>ISwap<CR>', desc = 'I[S]wapWith' },
{ '<leader>cn', '<cmd>ISwapNodeWith<CR>', desc = 'ISwap[N]ode' },
{ '<leader>cN', '<cmd>ISwapNode<CR>', desc = 'ISwap[N]ode' },
},
},
{
'aaronik/treewalker.nvim',
keys = {
{ '<leader>ch', '<cmd>Treewalker Left<CR>', desc = 'Tree Left' },
{ '<leader>cj', '<cmd>Treewalker Down<CR>', desc = 'Tree Down' },
{ '<leader>ck', '<cmd>Treewalker Up<CR>', desc = 'Tree Up' },
{ '<leader>cl', '<cmd>Treewalker Right<CR>', desc = 'Tree Right' },
{ '<leader>cJ', '<cmd>Treewalker SwapDown<CR>', desc = 'Tree Swap Down' },
{ '<leader>cK', '<cmd>Treewalker SwapUp<CR>', desc = 'Tree Swap Up' },
},
},
-- change directory with telescope from a list of dierectories
"SalOrak/whaler",
}

View File

@ -0,0 +1,13 @@
return {
{
'stevearc/oil.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
default_file_explorer = true,
delete_to_trash = true,
},
keys = {
{ "<leader>-", "<cmd>Oil<CR>", desc = "Open parent directory" },
},
},
}

View File

@ -1,6 +1,48 @@
return {
-- Git
'tpope/vim-fugitive',
{
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim',
'sindrets/diffview.nvim',
'nvim-telescope/telescope.nvim',
},
opts = {
graph_style = 'unicode',
use_per_project_settings = false,
},
keys = {
{
'<leader>go',
function() require('neogit').open() end,
desc = 'Neo[g]it [O]pen'
},
{
'<leader>g.',
function() require('neogit').open({ cwd = '%:p:h' }) end,
desc = 'Neo[g]it open in current file repository'
},
{
'<leader>gh',
function() require('diffview').file_history() end,
desc = '[G]it [H]istory',
},
{
'<leader>g%',
function() require('diffview').file_history(nil, { '%' }) end,
desc = '[G]it history for [%] current file'
},
},
},
{
'FabijanZulj/blame.nvim',
config = true,
cmd = 'BlameToggle',
keys = {
{ '<leader>gb', '<cmd>BlameToggle<cr>', desc = '[G]it [B]lame toggle' },
},
},
{
-- Adds git releated signs to the gutter, as well as utilities for managing changes
@ -22,8 +64,8 @@ return {
{ buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
vim.keymap.set('n', '<leader>ph', gs.preview_hunk,
{ buffer = bufnr, desc = '[P]review [H]unk' })
vim.keymap.set('n', '<leader>sh', gs.stage_hunk,
{ buffer = bufnr, desc = '[S]tage [H]unk' })
vim.keymap.set('n', '<leader>sA', gs.stage_hunk,
{ buffer = bufnr, desc = '[S]tage Hunk' })
vim.keymap.set('n', '<leader>HD', function() gs.diffthis('~') end,
{ buffer = bufnr, desc = '[H]unk [D]iff' })
end,

View File

@ -0,0 +1,12 @@
return {
'backdround/global-note.nvim',
keys = {
{
"<leader>tn",
function()
require('global-note').toggle_note()
end,
desc = '[T]oggle global [N]ote',
},
},
}

View File

@ -0,0 +1,13 @@
return {
"ray-x/go.nvim",
dependencies = {
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function(_, opts)
require("go").setup(opts)
end,
event = { "CmdlineEnter" },
ft = { "go", 'gomod' },
}

View File

@ -0,0 +1,24 @@
return {
{
'fredrikaverpil/godoc.nvim',
version = '*',
dependencies = {
{ 'nvim-telescope/telescope.nvim' },
{
'nvim-treesitter/nvim-treesitter',
opts = {
ensure_installed = { 'go' },
},
},
},
event = 'VeryLazy',
cmd = 'GoDoc',
keys = {
{ '<leader>gd', '<cmd>GoDoc<CR>', desc = '[G]o[D]oc' },
},
build = 'go install github.com/lotusirous/gostdsym/stdsym@latest',
opts = {
picker = { type = 'telescope' },
},
},
}

View File

@ -0,0 +1,16 @@
return {
{
"rest-nvim/rest.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
table.insert(opts.ensure_installed, "http")
end,
},
ft = 'http',
keys = {
{ '<leader>S', '<cmd>Rest run<CR>', ft = 'http' },
},
},
}

View File

@ -1,71 +0,0 @@
return {
-- Fuzzy finder
{
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim' },
config = function()
pcall(require('telescope').load_extension, 'fzf')
end,
cmd = 'Telescope',
},
{
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-orgmode/orgmode', -- as configured together
'vrischmann/tree-sitter-templ',
"nushell/tree-sitter-nu", -- additional parser
},
build =
':TSUpdate'
},
{
-- LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs to stdpath for neovim
{ 'williamboman/mason.nvim', config = true },
'williamboman/mason-lspconfig.nvim',
-- Useful status updates for LSP
{ 'j-hui/fidget.nvim', tag = 'legacy', opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
'folke/neodev.nvim',
},
},
{
-- Autocompletion
'hrsh7th/nvim-cmp',
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
-- Adds LSP completion capabilities
'hrsh7th/cmp-nvim-lsp',
-- Adds a number of user-friendly snippets
'rafamadriz/friendly-snippets',
},
},
-- Show pending keybinds
{ 'folke/which-key.nvim', opts = {} },
{
'ThePrimeagen/harpoon',
dependencies = { 'nvim-lua/plenary.nvim' },
lazy = true,
},
{
'crusj/hierarchy-tree-go.nvim',
dependencies = 'neovim/nvim-lspconfig',
},
}

View File

@ -0,0 +1,9 @@
return {
{
'swaits/lazyjj.nvim',
dependencies = 'nvim-lua/plenary.nvim',
opts = {
mapping = '<leader>gj'
}
},
}

View File

@ -0,0 +1,25 @@
vim.opt.fillchars = {
stl = "",
}
return {
{
"sschleemilch/slimline.nvim",
opts = {
spaces = {
components = "",
left = "",
right = "",
},
},
},
{
'b0o/incline.nvim',
config = function()
require('incline').setup()
end,
-- Optional: Lazy load Incline
event = 'VeryLazy',
},
}

View File

@ -0,0 +1,167 @@
return {
{
'neovim/nvim-lspconfig',
version = '*',
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('<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')
-- 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 _, 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 = {},
ts_ls = {},
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',
},
opts = {
lightbulb = { enable = false }
},
config = function(_, opts)
require('lspsaga').setup(opts)
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,
},
{
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {},
cmd = 'Trouble'
},
{
"ray-x/lsp_signature.nvim",
event = "InsertEnter",
opts = {
-- cfg options
},
}
}

View File

@ -0,0 +1,49 @@
require 'lspconfig'.ols.setup {}
vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
vim.api.nvim_create_user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
return {
{
"stevearc/conform.nvim",
opts = {
-- notify_on_error = false,
-- Odinfmt gets its configuration from odinfmt.json. It defaults
-- writing to stdout but needs to be told to read from stdin.
formatters = {
odinfmt = {
-- Change where to find the command if it isn't in your path.
command = "odinfmt",
args = { "-stdin" },
stdin = true,
},
},
-- and instruct conform to use odinfmt.
formatters_by_ft = {
odin = { "odinfmt" },
},
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return { timeout_ms = 500, lsp_format = "fallback" }
end,
},
}
}

View File

@ -0,0 +1,14 @@
return {
"olimorris/persisted.nvim",
lazy = false, -- make sure the plugin is always loaded at startup
opts = {
autoload = true,
ignored_dirs = {
"~/.config",
"~/tmp",
"/tmp",
{ "~", exact = true },
{ "/", exact = true },
},
},
}

View File

@ -0,0 +1,7 @@
return {
'stevearc/quicker.nvim',
event = "FileType qf",
---@module "quicker"
---@type quicker.SetupOptions
opts = {},
}

View File

@ -0,0 +1,171 @@
return {
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
bigfile = { enabled = true },
dashboard = { enabled = false },
explorer = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
notifier = {
enabled = true,
timeout = 3000,
},
picker = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
scroll = { enabled = false },
statuscolumn = { enabled = true },
words = { enabled = true },
styles = {
notification = {
-- wo = { wrap = true } -- Wrap notifications
}
},
zen = {
win = { width = 180, backdrop = { transparent = false } },
on_open = function()
vim.opt.laststatus = 1
require('incline').disable()
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
end,
on_close = function()
vim.opt.laststatus = 3
require('incline').enable()
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
end
}
},
keys = {
-- Top Pickr & Explorer
{ "<leader><space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
-- find
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
{ "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
{ "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
-- git
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
{ "<leader>gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" },
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
{ "<leader>gg", function() Snacks.picker.git_grep() end, desc = "Git Grep" },
-- Grep
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
{ "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
{ "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
{ "<leader>so", function() Snacks.picker.grep({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
{ "<leader>sO", function() Snacks.picker.files({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
{ "<leader>sX", function() Snacks.picker.grep({ cwd = "/usr/include/xcb" }) end, desc = "Grep" },
-- search
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
-- LSP
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
{ "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
{ "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
-- Other
{ "<leader>z", function() Snacks.zen() end, desc = "Toggle Zen Mode" },
{ "<leader>Z", function() Snacks.zen.zoom() end, desc = "Toggle Zoom" },
{ "<leader>'", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
{ "<leader>bd", function() Snacks.bufdelete() end, desc = "Delete Buffer" },
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File" },
{ "<leader>gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } },
{ "<leader>gG", function() Snacks.lazygit() end, desc = "Lazygit" },
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
{ "<leader>bl", function() Snacks.git.blame_line() end, desc = "Git Blame Line" },
{ "<c-/>", function() Snacks.terminal() end, desc = "Toggle Terminal" },
{ "<c-_>", function() Snacks.terminal() end, desc = "which_key_ignore" },
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
{
"<leader>N",
desc = "Neovim News",
function()
Snacks.win({
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
width = 0.6,
height = 0.6,
wo = {
spell = false,
wrap = false,
signcolumn = "yes",
statuscolumn = " ",
conceallevel = 3,
},
})
end,
}
},
init = function()
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
vim.print = _G.dd -- Override print to use snacks for `:=` command
-- Create some toggle mappings
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map(
"<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end,
}
}

View File

@ -0,0 +1,17 @@
return {
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
'DBUI',
'DBUIToggle',
'DBUIAddConnection',
'DBUIFindBuffer',
},
init = function()
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}

View File

@ -0,0 +1,5 @@
return {
'fredeeb/tardis.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = true,
}

View File

@ -0,0 +1,71 @@
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>sT', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader>sL', function() telescope.extensions.whaler.whaler() end,
{ desc = '[S]earch with wha[L]er' })
vim.keymap.set('n', '<leader>gw', function() telescope.extensions.git_grep.grep() end,
{ desc = '[G]it grep current [W]ord' })
end,
}
}

View File

@ -0,0 +1,25 @@
return {
{
'aserowy/tmux.nvim',
opts = {
navigation = {
enable_default_keybindings = false,
},
resize = {
enable_default_keybindings = false,
},
},
keys = {
{ '<M-h>', [[<cmd>lua require("tmux").move_left()<cr>]] },
{ '<M-j>', [[<cmd>lua require("tmux").move_bottom()<cr>]] },
{ '<M-k>', [[<cmd>lua require("tmux").move_top()<cr>]] },
{ '<M-l>', [[<cmd>lua require("tmux").move_right()<cr>]] },
{ '<M-n>', [[<cmd>lua require("tmux").next_window()<cr>]] },
{ '<M-p>', [[<cmd>lua require("tmux").previous_window()<cr>]] },
{ '<M-H>', [[<cmd>lua require("tmux").resize_left()<cr>]] },
{ '<M-J>', [[<cmd>lua require("tmux").resize_bottom()<cr>]] },
{ '<M-K>', [[<cmd>lua require("tmux").resize_top()<cr>]] },
{ '<M-L>', [[<cmd>lua require("tmux").resize_right()<cr>]] },
},
},
}

View File

@ -0,0 +1,9 @@
return {
'akinsho/toggleterm.nvim',
version = '*',
config = true,
keys = {
{ '<F2>', '<cmd>ToggleTerm size=25<CR>', mode = { 'n', 'i', 't', }, },
{ '<C-w>', [[<C-\><C-n><C-w>]], mode = 't' },
}
}

View File

@ -0,0 +1,95 @@
return {
{ -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-orgmode/orgmode', -- as configured together
'vrischmann/tree-sitter-templ',
"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', 'commonlisp', 'cpp', 'go', 'haskell', 'lua', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
auto_install = false,
highlight = {
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 = {
select = {
enable = true,
lookahead = true,
keymaps = {
['aa'] = '@parameter.outer',
['ia'] = '@parameter.inner',
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
['al'] = '@call.outer',
['il'] = '@call.inner',
['ao'] = '@loop.outer',
['io'] = '@loop.inner',
['ad'] = '@conditional.outer',
['id'] = '@conditional.inner',
['ar'] = '@return.outer',
['ir'] = '@return.inner',
['as'] = '@statement.outer',
['ag'] = '@assignment.outer',
['ig'] = '@assignment.inner',
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
[']m'] = '@function.outer',
[']]'] = '@class.outer',
},
goto_next_end = {
[']M'] = '@function.outer',
[']['] = '@class.outer',
},
goto_previous_start = {
['[m'] = '@function.outer',
['[['] = '@class.outer',
},
goto_previous_end = {
['[M'] = '@function.outer',
['[]'] = '@class.outer',
},
},
swap = {
enable = true,
swap_next = {
['<leader>a'] = '@parameter.inner',
},
swap_previous = {
['<leader>A'] = '@parameter.inner',
},
},
},
}
org.setup({
org_agenda_files = { '~/org/*.org' },
org_default_notes_file = '~/org/capture.org',
})
end,
}
}

View File

@ -0,0 +1,12 @@
return {
"ptdewey/yankbank-nvim",
dependencies = "kkharji/sqlite.lua",
config = function()
require('yankbank').setup({
persist_type = "sqlite",
})
end,
keys = {
{ "<leader>yb", "<cmd>YankBank<CR>", desc = "Yank[B]ank" },
},
}

View File

@ -0,0 +1,3 @@
return {
s("tr", { t "i18n.T(ctx, \"", i(1), t "\")" })
}

View File

@ -6,7 +6,7 @@ static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "FiraCode Nerd Font Ret:size=10" };
static const char dmenufont[] = "FiraCode Nerd Font Ret:size=10";
static const char dmenufont[] = "FiraCode Nerd Font Ret:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
@ -16,7 +16,7 @@ static const char col_cyan[] = "#7dcfff";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
[SchemeSel] = { col_gray4, col_blue, col_cyan },
[SchemeSel] = { col_gray4, col_blue, col_cyan },
};
/* tagging */
@ -46,7 +46,7 @@ static const Layout layouts[] = {
};
/* key definitions */
#define MODKEY Mod1Mask
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
@ -58,32 +58,32 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static const char *lockcmd[] = { "slock", NULL };
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
static const char *toggletheme[] = { "lupan-set-theme", "toggle", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY|ControlMask, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
{ MODKEY|ShiftMask, XK_F6, spawn, {.v = toggletheme } },
{ MODKEY|ControlMask, XK_b, togglebar, {0} },
{ MODKEY|ControlMask, XK_j, focusstack, {.i = +1 } },
{ MODKEY|ControlMask, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ControlMask, XK_i, incnmaster, {.i = +1 } },
{ MODKEY|ControlMask, XK_d, incnmaster, {.i = -1 } },
{ MODKEY|ControlMask, XK_h, setmfact, {.f = -0.05} },
{ MODKEY|ControlMask, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ControlMask|ShiftMask, XK_c, killclient, {0} },
{ MODKEY|ControlMask, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY|ControlMask, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY|ControlMask, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
@ -101,7 +101,7 @@ static const Key keys[] = {
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */

33
river/.config/river/bar Executable file
View File

@ -0,0 +1,33 @@
#!/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

20
river/.config/river/init Executable file
View File

@ -0,0 +1,20 @@
#!/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}'"

164
river/.config/river/keymap Executable file
View File

@ -0,0 +1,164 @@
#!/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

21
river/.config/river/randr Executable file
View File

@ -0,0 +1,21 @@
#!/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

52
river/.config/river/status Executable file
View File

@ -0,0 +1,52 @@
#!/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

View File

@ -5,7 +5,12 @@
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
which nu >/dev/null && exec nu
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
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

View File

@ -3,6 +3,9 @@ alias ll='ls -l'
alias ta='tmux attach -t'
alias tl='tmux list-sessions'
alias tn='tmux new -s'
alias fv='fzf --preview="bat --color=always --theme=Nord {}" --bind="enter:become(nvim {})"'
alias rgh='rg -.'
alias fdh='fd -H'
if which exa > /dev/null; then
alias ls='exa --icons'

View File

@ -3,3 +3,9 @@ set show-mode-in-prompt on
set vi-ins-mode-string \1\e[6 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

View File

@ -27,5 +27,13 @@ done
export PATH
# start X at login
[[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null && exec sx ~/.xsession
# start X or Hyprland at login
if [[ -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" && "$XDG_VTNR" -eq 1 ]]; then
if which Hyprland > /dev/null && [ -d ~/.config/hypr ]; then
exec Hyprland
elif which river > /dev/null && [ -d ~/.config/river ]; then
exec river
elif which /usr/bin/sx > /dev/null; then
exec /usr/bin/sx ~/.xsession
fi
fi

View File

@ -1,6 +1 @@
# start X at login on first console or otherwise source ~/.profile
if [[ -z "$DISPLAY" && "$XDG_VTNR" -eq 1 ]] && which /bin/sx > /dev/null; then
exec sx ~/.xsession
else
source ~/.profile
fi
source ~/.profile

View File

@ -2,9 +2,11 @@
# % cd ~/.local/share
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1
export FZF_DEFAULT_OPTS='--color=bw,hl:green,hl+:green'
export FZF_DEFAULT_OPTS='--color=bg+:#808080'
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"
plug "jeffreytse/zsh-vi-mode"
@ -15,21 +17,42 @@ plug "Aloxaf/fzf-tab"
plug "zap-zsh/fzf"
plug "zsh-users/zsh-autosuggestions"
plug "zsh-users/zsh-syntax-highlighting"
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
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.
autoload -Uz vcs_info
precmd () { vcs_info }
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f '
zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f '
zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b '
zstyle ':vcs_info:*' enable git
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
RPROMPT='%(?..%B%F{red}%?%f%b)'
if which starship > /dev/null; then
eval "$(starship init zsh)"
else
autoload -Uz vcs_info
precmd () { vcs_info }
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f '
zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f '
zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b '
zstyle ':vcs_info:*' enable git
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
RPROMPT='%(?..%B%F{red}%?%f%b)'
fi
# History.
@ -48,7 +71,6 @@ setopt share_history
# Convenience.
setopt autocd
bindkey -M vicmd '^[h' run-help
bindkey -M viins '^[h' run-help

View File

@ -3,19 +3,35 @@ set -g status-fg colour7
set -sg escape-time 0
bind-key -n M-j select-pane -D
bind-key -n M-k select-pane -U
bind-key -n M-h select-pane -L
bind-key -n M-l select-pane -R
bind-key -n M-J switch-client -n
bind-key -n M-K switch-client -p
bind-key -n M-H previous-window
bind-key -n M-L next-window
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
#bind-key -n M-0 select-window -t 10
bind-key -n M-! 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 -n C-S-Left swap-window -t -1
bind -n C-S-Right swap-window -t 1
bind-key Right resize-pane -R 8
bind-key Left resize-pane -L 8
bind-key Up resize-pane -U 4
bind-key Down resize-pane -D 4
set -g default-terminal "screen-256color"
set -as terminal-features ",*:RGB"
@ -27,9 +43,45 @@ set -g set-titles on
set -g set-titles-string "#H [#S]"
set -g status-justify centre
set -g status-left "#[bg=green]#[fg=black] #H #[bg=default]#[fg=default] #S"
set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S"
set -g status-left-length 50
set -g status-right "#[bg=green]#[fg=black] %H:%M "
set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] "
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W#F #[fg=green]#[bg=black]'
set-window-option -g window-status-current-style bg=green
set-window-option -ga window-status-current-style fg=black
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'select-pane -L'
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'select-pane -D'
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'select-pane -U'
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'select-pane -R'
bind-key -n 'M-n' if-shell "$is_vim" 'send-keys M-n' 'select-window -n'
bind-key -n 'M-p' if-shell "$is_vim" 'send-keys M-p' 'select-window -p'
bind-key -T copy-mode-vi 'M-h' select-pane -L
bind-key -T copy-mode-vi 'M-j' select-pane -D
bind-key -T copy-mode-vi 'M-k' select-pane -U
bind-key -T copy-mode-vi 'M-l' select-pane -R
bind-key -T copy-mode-vi 'M-n' select-window -n
bind-key -T copy-mode-vi 'M-p' select-window -p
bind -n 'M-H' if-shell "$is_vim" 'send-keys M-H' 'resize-pane -L 1'
bind -n 'M-J' if-shell "$is_vim" 'send-keys M-J' 'resize-pane -D 1'
bind -n 'M-K' if-shell "$is_vim" 'send-keys M-K' 'resize-pane -U 1'
bind -n 'M-L' if-shell "$is_vim" 'send-keys M-L' 'resize-pane -R 1'
bind-key -T copy-mode-vi M-H resize-pane -L 1
bind-key -T copy-mode-vi M-J resize-pane -D 1
bind-key -T copy-mode-vi M-K resize-pane -U 1
bind-key -T copy-mode-vi M-L resize-pane -R 1
bind -n 'C-M-h' if-shell "$is_vim" 'send-keys C-M-h' 'swap-pane -s "{left-of}"'
bind -n 'C-M-j' if-shell "$is_vim" 'send-keys C-M-j' 'swap-pane -s "{down-of}"'
bind -n 'C-M-k' if-shell "$is_vim" 'send-keys C-M-k' 'swap-pane -s "{up-of}"'
bind -n 'C-M-l' if-shell "$is_vim" 'send-keys C-M-l' 'swap-pane -s "{right-of}"'
bind-key -T copy-mode-vi C-M-h swap-pane -s "{left-of}"
bind-key -T copy-mode-vi C-M-j swap-pane -s "{down-of}"
bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
bind-key -n M-0 run-shell tmux-session-menu

5
tmux/bin/tmux-session-menu Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
tmux list-sessions -F '#S' \
| awk 'BEGIN {ORS=" "; print "toggle t \"switch-client -l\""} {print $1, NR, "\"switch-client -t", $1 "\""}' \
| xargs tmux display-menu -T "Switch session"

View File

@ -7,6 +7,7 @@ fi
xset b off
xrandr --auto
xrandr --output HDMI1 --right-of DP1
xrandr --output DP-0 --left-of DP-2
xrdb -merge ~/.Xresources
setxkbmap pl -option ctrl:nocaps

View File

@ -27,9 +27,20 @@ if [ -f ~/.config/alacritty/alacritty.toml ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml
fi
if [ "$THEME" = dark ]; then
kitten themes --reload-in=all Afterglow
elif [ "$THEME" = light ]; then
kitten themes --reload-in=all One Half Light
fi
# GTK
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
pkill -HUP -x xsettingsd
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
fi
# waybar
if [ -f ~/.config/waybar/style.css ]; then
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" ~/.config/waybar/style.css
fi

View File

@ -0,0 +1,17 @@
[opener]
imv = [
{ run = 'imv "$@"', orphan = true },
]
zathura = [
{ run = 'zathura "$@"', orphan = true },
]
nvim_cd = [
{ run = 'nvim -c "cd $@"', block = true }
]
[open]
prepend_rules = [
{ mime = "image/*", use = "imv" },
{ mime = "application/pdf", use = "zathura" },
{ mime = "inode/directory", use = "nvim_cd" }
]

View File

@ -1,356 +0,0 @@
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true {
normal {
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
locked {
}
resize {
bind "Ctrl n" { SwitchToMode "Normal"; }
bind "h" "Left" { Resize "Increase Left"; }
bind "j" "Down" { Resize "Increase Down"; }
bind "k" "Up" { Resize "Increase Up"; }
bind "l" "Right" { Resize "Increase Right"; }
bind "H" { Resize "Decrease Left"; }
bind "J" { Resize "Decrease Down"; }
bind "K" { Resize "Decrease Up"; }
bind "L" { Resize "Decrease Right"; }
bind "=" "+" { Resize "Increase"; }
bind "-" { Resize "Decrease"; }
}
pane {
bind "Ctrl p" { SwitchToMode "Normal"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "l" "Right" { MoveFocus "Right"; }
bind "j" "Down" { MoveFocus "Down"; }
bind "k" "Up" { MoveFocus "Up"; }
bind "p" { SwitchFocus; }
bind "n" { NewPane; SwitchToMode "Normal"; }
bind "d" { NewPane "Down"; SwitchToMode "Normal"; }
bind "r" { NewPane "Right"; SwitchToMode "Normal"; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "z" { TogglePaneFrames; SwitchToMode "Normal"; }
bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; }
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; }
bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;}
}
move {
bind "Ctrl h" { SwitchToMode "Normal"; }
bind "n" "Tab" { MovePane; }
bind "p" { MovePaneBackwards; }
bind "h" "Left" { MovePane "Left"; }
bind "j" "Down" { MovePane "Down"; }
bind "k" "Up" { MovePane "Up"; }
bind "l" "Right" { MovePane "Right"; }
}
tab {
bind "Ctrl t" { SwitchToMode "Normal"; }
bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; }
bind "h" "Left" "Up" "k" { GoToPreviousTab; }
bind "l" "Right" "Down" "j" { GoToNextTab; }
bind "n" { NewTab; SwitchToMode "Normal"; }
bind "x" { CloseTab; SwitchToMode "Normal"; }
bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; }
bind "b" { BreakPane; SwitchToMode "Normal"; }
bind "]" { BreakPaneRight; SwitchToMode "Normal"; }
bind "[" { BreakPaneLeft; SwitchToMode "Normal"; }
bind "1" { GoToTab 1; SwitchToMode "Normal"; }
bind "2" { GoToTab 2; SwitchToMode "Normal"; }
bind "3" { GoToTab 3; SwitchToMode "Normal"; }
bind "4" { GoToTab 4; SwitchToMode "Normal"; }
bind "5" { GoToTab 5; SwitchToMode "Normal"; }
bind "6" { GoToTab 6; SwitchToMode "Normal"; }
bind "7" { GoToTab 7; SwitchToMode "Normal"; }
bind "8" { GoToTab 8; SwitchToMode "Normal"; }
bind "9" { GoToTab 9; SwitchToMode "Normal"; }
bind "Tab" { ToggleTab; }
}
scroll {
bind "Ctrl s" { SwitchToMode "Normal"; }
bind "e" { EditScrollback; SwitchToMode "Normal"; }
bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
// uncomment this and adjust key if using copy_on_select=false
// bind "Alt c" { Copy; }
}
search {
bind "Ctrl s" { SwitchToMode "Normal"; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
bind "p" { Search "up"; }
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "w" { SearchToggleOption "Wrap"; }
bind "o" { SearchToggleOption "WholeWord"; }
}
entersearch {
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
bind "Enter" { SwitchToMode "Search"; }
}
renametab {
bind "Ctrl c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; }
}
renamepane {
bind "Ctrl c" { SwitchToMode "Normal"; }
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
}
session {
bind "Ctrl o" { SwitchToMode "Normal"; }
bind "Ctrl s" { SwitchToMode "Scroll"; }
bind "d" { Detach; }
bind "w" {
LaunchOrFocusPlugin "zellij:session-manager" {
floating true
move_to_focused_tab true
};
SwitchToMode "Normal"
}
}
tmux {
bind "[" { SwitchToMode "Scroll"; }
bind "Ctrl b" { Write 2; SwitchToMode "Normal"; }
bind "\"" { NewPane "Down"; SwitchToMode "Normal"; }
bind "%" { NewPane "Right"; SwitchToMode "Normal"; }
bind "s" { NewPane "Down"; SwitchToMode "Normal"; }
bind "v" { NewPane "Right"; SwitchToMode "Normal"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; }
bind "c" { NewTab; SwitchToMode "Normal"; }
bind "," { SwitchToMode "RenameTab"; }
bind "p" { GoToPreviousTab; SwitchToMode "Normal"; }
bind "n" { GoToNextTab; SwitchToMode "Normal"; }
bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; }
bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; }
bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; }
bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; }
bind "o" { FocusNextPane; }
bind "d" { Detach; }
bind "Space" { NextSwapLayout; }
bind "x" { CloseFocus; SwitchToMode "Normal"; }
}
shared_except "locked" {
bind "Alt n" { NewPane; }
bind "Alt N" { NewTab; }
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
bind "Alt =" "Alt +" { Resize "Increase"; }
bind "Alt -" { Resize "Decrease"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
bind "Alt H" { GoToPreviousTab; }
bind "Alt L" { GoToNextTab; }
bind "Alt K" { ToggleFloatingPanes; }
}
shared_except "normal" "locked" {
bind "Ctrl g" { SwitchToMode "Locked"; }
bind "Enter" "Esc" { SwitchToMode "Normal"; }
}
shared_except "pane" "locked" "normal" {
bind "Ctrl p" { SwitchToMode "Pane"; }
}
shared_except "resize" "locked" "normal" {
bind "Ctrl n" { SwitchToMode "Resize"; }
}
shared_except "scroll" "locked" "normal" {
bind "Ctrl s" { SwitchToMode "Scroll"; }
}
shared_except "session" "locked" "normal" {
bind "Ctrl o" { SwitchToMode "Session"; }
}
shared_except "tab" "locked" "normal" {
bind "Ctrl t" { SwitchToMode "Tab"; }
}
shared_except "move" "locked" "normal" {
bind "Ctrl h" { SwitchToMode "Move"; }
}
shared_except "tmux" {
bind "F3" { SwitchToMode "Tmux"; }
bind "Ctrl b" { SwitchToMode "Tmux"; }
}
}
plugins {
tab-bar { path "tab-bar"; }
status-bar { path "status-bar"; }
strider { path "strider"; }
compact-bar { path "compact-bar"; }
session-manager { path "session-manager"; }
}
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
// eg. when terminal window with an active zellij session is closed
// Options:
// - detach (Default)
// - quit
//
// on_force_close "quit"
// Send a request for a simplified ui (without arrow fonts) to plugins
// Options:
// - true
// - false (Default)
//
// simplified_ui true
// Choose the path to the default shell that zellij will use for opening new panes
// Default: $SHELL
//
// default_shell "fish"
// Choose the path to override cwd that zellij will use for opening new panes
//
// default_cwd ""
// Toggle between having pane frames around the panes
// Options:
// - true (default)
// - false
//
pane_frames false
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
// Options:
// - true (default)
// - false
//
// auto_layout true
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
// Options:
// - true (default)
// - false
//
// session_serialization false
// Whether pane viewports are serialized along with the session, default is false
// Options:
// - true
// - false (default)
// serialize_pane_viewport true
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
//
// scrollback_lines_to_serialize 10000
// Define color themes for Zellij
// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes
// Once these themes are defined, one of them should to be selected in the "theme" section of this file
//
themes {
nightfox {
bg "#192330"
fg "#cdcecf"
red "#c94f6d"
green "#81b29a"
blue "#719cd6"
yellow "#dbc074"
magenta "#9d79d6"
orange "#f4a261"
cyan "#63cdcf"
black "#29394f"
white "#aeafb0"
}
}
// Choose the theme that is specified in the themes section.
// Default: default
//
theme "nightfox"
// The name of the default layout to load on startup
// Default: "default"
//
default_layout "compact"
// Choose the mode that zellij uses when starting up.
// Default: normal
//
// default_mode "locked"
// Toggle enabling the mouse mode.
// On certain configurations, or terminals this could
// potentially interfere with copying text.
// Options:
// - true (default)
// - false
//
// mouse_mode false
// Configure the scroll back buffer size
// This is the number of lines zellij stores for each pane in the scroll back
// buffer. Excess number of lines are discarded in a FIFO fashion.
// Valid values: positive integers
// Default value: 10000
//
// scroll_buffer_size 10000
// Provide a command to execute when copying text. The text will be piped to
// the stdin of the program to perform the copy. This can be used with
// terminal emulators which do not support the OSC 52 ANSI control sequence
// that will be used by default if this option is not set.
// Examples:
//
// copy_command "xclip -selection clipboard" // x11
// copy_command "wl-copy" // wayland
// copy_command "pbcopy" // osx
// Choose the destination for copied text
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
// Does not apply when using copy_command.
// Options:
// - system (default)
// - primary
//
// copy_clipboard "primary"
// Enable or disable automatic copy (and clear) of selection when releasing mouse
// Default: true
//
// copy_on_select false
// Path to the default editor to use to edit pane scrollbuffer
// Default: $EDITOR or $VISUAL
//
// scrollback_editor "/usr/bin/vim"
// When attaching to an existing session with other users,
// should the session be mirrored (true)
// or should each user have their own cursor (false)
// Default: false
//
// mirror_session true
// The folder in which Zellij will look for layouts
//
// layout_dir "/path/to/my/layout_dir"
// The folder in which Zellij will look for themes
//
// theme_dir "/path/to/my/theme_dir"
// Enable or disable the rendering of styled and colored underlines (undercurl).
// May need to be disabled for certain unsupported terminals
// Default: true
//
// styled_underlines false