Compare commits

..

121 Commits

Author SHA1 Message Date
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
7a4e0e7e61 hyperland: back to alacritty 2024-02-24 12:40:44 +01:00
4930040bef tmux more vi-like global keybindings 2024-02-24 12:38:16 +01:00
b1cfffafc7 hyprland: use foot as term, nvim: nordfox, zsh: non-blinking vi mode 2024-02-22 23:41:57 +01:00
3f1609b384 nushell: add user and host to the prompt 2024-02-21 19:20:47 +01:00
f410f907ef hyperland: thicker border, smaller gaps, changed border and bg color 2024-02-17 23:27:45 +01:00
054068a205 waybar: underline active workspace 2024-02-17 23:27:45 +01:00
cfec54cc6c hyprland: add key for closing window and toggling theme 2024-02-17 23:27:45 +01:00
253baf505e zellij/alacritty: Ctrl+; sends F3 and switch to tmux mode 2024-02-17 20:25:41 +01:00
75c21332b8 add hyprland 2024-02-17 17:44:37 +01:00
113c96ede4 awesome: change focus and minimized colors 2024-02-13 20:29:43 +01:00
81a729d005 zellij: "Ctrl b" only Ctrl command in normal mode 2024-02-12 22:01:39 +01:00
b18031ffc4 nu: add l as ls in a grid 2024-02-09 22:52:17 +01:00
df7e4085a9 zellij: Alt H/L to switch tab 2024-02-09 22:19:24 +01:00
9a7ab0608e nu: use ctrl+hjkl for movement and history (alt are used by zellij) 2024-02-09 22:05:54 +01:00
71355aa027 nu: use carapace for completion (if found), add nocaps alias 2024-02-09 21:55:28 +01:00
2cb9042040 nvim: switch between nightfox and dayfox 2024-02-07 22:37:22 +01:00
48d8b50b5a add zellij config 2024-02-07 20:33:16 +01:00
0401ab01bf add nushell config 2024-02-07 20:33:16 +01:00
6a049c283f nvim add nightfox themes, hierarchy-tree-go, and tree-sitter-nu 2024-02-07 18:50:46 +01:00
a667c5a237 use themes from alacritty themes (assumed to be cloned there) 2024-02-07 18:50:46 +01:00
ff6bb86881 tmux aliases and nvim lua auto commands 2024-02-03 07:16:41 +01:00
38fe2f7481 nvim: add lsp servers for html, htmx, and unocss 2024-01-30 21:36:58 +01:00
7582ed78c3 nvim: remove unused and no longer needed config code 2024-01-30 21:02:52 +01:00
e566a44c56 add alacritty.toml with theme switching 2024-01-21 01:10:00 +01:00
a46fd42e1e nvim and alacritty: onenord 2023-12-22 09:30:07 +01:00
af53c0ce53 nvim: add more treesitter textobjects keys 2023-12-18 23:50:21 +01:00
f1244ddfde zsh: glob_complete and interactive_comments 2023-12-18 23:37:57 +01:00
fa925a6a3d alacritty: fix: back to dark background as default 2023-12-09 20:37:57 +01:00
dd671ecb4a awesome: dark and light sync with lupan-colors-nvim 2023-12-07 22:21:04 +01:00
de8dc9fa41 alacritty: light: fix white and black colors 2023-12-07 21:14:50 +01:00
72771b0ea8 alacritty: sync with lupan-colors-nvim 2023-12-06 22:45:51 +01:00
ddcbced9ff awesome/alacritty: change base hue from 235 to 210 2023-12-04 21:46:36 +01:00
744e838901 zsh: replace supercharge with autocd and run-help 2023-12-03 23:08:15 +01:00
4bb111c3bb zsh: history options, in particular share history 2023-12-03 23:07:08 +01:00
6d55a0f4b5 shell: add aliases and remove exa plugin 2023-12-03 23:05:44 +01:00
e0b0aa1dc5 lupan-set-theme: do not change background and emacs theme 2023-12-02 16:22:16 +01:00
89e648a623 awesome: disable undefined-global and some fixes
- redraw top bar after theme change
2023-12-02 16:22:16 +01:00
8ce9da4e25 awesome: improve light theme 2023-12-02 16:22:16 +01:00
cbc71f5371 awesome: improve dark theme 2023-12-02 16:22:16 +01:00
3c37cc460a tmux: true color, key bindings and style status line 2023-12-02 16:22:16 +01:00
843d683a1d alacritty: dark and light from lupan-colors-nvim 2023-12-01 00:10:45 +01:00
78a59b9334 use GoMono Nerd Font (alacritty and awesome wm) 2023-11-28 22:57:50 +01:00
e86fa41784 nvim: use cursorline 2023-11-25 14:44:01 +01:00
c9feefd91f nvim: colorscheme onenord, load also other colorschemes 2023-11-25 14:32:15 +01:00
3070322f7d nvim: display current directory on the right of lualine 2023-11-25 14:32:02 +01:00
fee1f12743 nvim: use whaler 2023-11-25 14:31:50 +01:00
56 changed files with 2495 additions and 667 deletions

View File

@ -0,0 +1,16 @@
import = ["~/.config/alacritty/dark.toml"]
[colors]
draw_bold_text_with_bright_colors = false
[env]
TERM = "xterm-256color"
[font]
size = 9
[font.bold]
family = "Fira Code Nerd Font"
[font.normal]
family = "Fira Code Nerd Font"

View File

@ -1,156 +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:
everforest_dark_hard: &dark
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: &light
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
normal:
family: FiraCode Nerd Font Ret
bold:
family: FiraCode Nerd Font Ret
key_bindings:
- key: F6
mods: Control|Shift
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh --next"] }

View File

@ -0,0 +1,26 @@
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_dark.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = "#403833"
red = "#E8838F"
green = "#8BAE68"
yellow = "#D68C67"
blue = "#61ABDA"
magenta = "#CF86C1"
cyan = "#65B8C1"
white = "#888F94"
[colors.cursor]
cursor = "#C4CACF"
text = "#1C1917"
[colors.normal]
black = "#1C1917"
blue = "#6099C0"
cyan = "#66A5AD"
green = "#819B69"
magenta = "#B279A7"
red = "#DE6E7C"
white = "#B4BDC3"
yellow = "#B77E64"
[colors.primary]
background = "#1C1917"
foreground = "#B4BDC3"

View File

@ -0,0 +1,26 @@
# https://github.com/zenbones-theme/zenbones.nvim/blob/main/extras/alacritty/zenbones_light.toml
# This file is auto-generated by shipwright.nvim
[colors.bright]
black = "#CFC1BA"
red = "#94253E"
green = "#3F5A22"
yellow = "#803D1C"
blue = "#1D5573"
magenta = "#7B3B70"
cyan = "#2B747C"
white = "#4F5E68"
[colors.cursor]
cursor = "#2C363C"
text = "#F0EDEC"
[colors.normal]
black = "#F0EDEC"
blue = "#286486"
cyan = "#3B8992"
green = "#4F6C31"
magenta = "#88507D"
red = "#A8334C"
white = "#2C363C"
yellow = "#944927"
[colors.primary]
background = "#F0EDEC"
foreground = "#2C363C"

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

@ -18,6 +18,8 @@ local hotkeys_popup = require("awful.hotkeys_popup")
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
---@diagnostic disable: undefined-global
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
@ -52,6 +54,10 @@ end
local theme = "theme_dark.lua"
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
local function set_wallpaper(s)
gears.wallpaper.set(beautiful.bg_wallpaper)
end
local function switch_theme()
if theme == "theme_dark.lua" then
theme = "theme_light.lua"
@ -61,6 +67,11 @@ local function switch_theme()
awful.spawn("lupan-set-theme dark")
end
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
set_wallpaper()
for s in screen do
awful.tag.viewtoggle(s.tags[1])
awful.tag.viewtoggle(s.tags[1])
end
end
-- This is used later as the default terminal and editor to run.
@ -141,10 +152,6 @@ local tasklist_buttons = gears.table.join(
awful.client.focus.byidx(-1)
end))
local function set_wallpaper(s)
gears.wallpaper.set(beautiful.bg_wallpaper)
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
@ -202,7 +209,7 @@ awful.screen.connect_for_each_screen(function(s)
end)
-- }}}
function layout_menu()
local function layout_menu()
local layouts = {}
for i, layout in pairs(awful.layout.layouts) do
layouts[i] =
@ -217,7 +224,7 @@ function layout_menu()
end
-- {{{ Key bindings
globalkeys = gears.table.join(
local globalkeys = gears.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{ description = "show help", group = "awesome" }),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
@ -322,7 +329,7 @@ globalkeys = gears.table.join(
{ description = "show the menubar", group = "launcher" })
)
clientkeys = gears.table.join(
local clientkeys = gears.table.join(
awful.key({ modkey, }, "f",
function(c)
c.fullscreen = not c.fullscreen
@ -416,7 +423,7 @@ for i = 1, 9 do
)
end
clientbuttons = gears.table.join(
local clientbuttons = gears.table.join(
awful.button({}, 1, function(c)
c:emit_signal("request::activate", "mouse_click", { raise = true })
end),
@ -514,21 +521,6 @@ client.connect_signal("manage", function(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.move(c)
end),
awful.button({}, 3, function()
c:emit_signal("request::activate", "titlebar", { raise = true })
awful.mouse.client.resize(c)
end)
)
end)
-- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", { raise = false })

View File

@ -5,22 +5,22 @@ local dpi = xresources.apply_dpi
local theme = {}
theme.font = "FiraCode Nerd Font Ret:size=10"
theme.font = "Fira Code Nerd Font 10.5"
theme.tasklist_disable_icon = true
theme.wibar_height = 40
theme.bg_normal = "#1e293b"
theme.bg_focus = "#475569"
theme.bg_urgent = "#ff5555"
theme.bg_minimize = "#444444"
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 = "#334155"
theme.tasklist_bg_focus = "#263c59" -- hsl(215deg 40% 25%)
theme.fg_normal = "#64748B"
theme.fg_focus = "#94A3B8"
theme.fg_urgent = "#111827"
theme.fg_minimize = "#ffffff"
theme.taglist_fg_empty = "#334155"
theme.fg_normal = "#9ea7aa"
theme.fg_focus = "#b1babd"
theme.fg_urgent = theme.bg_focus
theme.fg_minimize = "#8a9294"
theme.taglist_fg_empty = "#798082"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
@ -28,7 +28,7 @@ theme.border_normal = "#708090"
theme.border_focus = "#a0522d"
theme.border_marked = "#91231c"
theme.bg_wallpaper = "#4a4a4a"
theme.bg_wallpaper = "#424a4c"
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"

View File

@ -5,22 +5,22 @@ local dpi = xresources.apply_dpi
local theme = {}
theme.font = "FiraCode Nerd Font Ret:size=10"
theme.font = "Fira Code Nerd Font 10.5"
theme.tasklist_disable_icon = true
theme.wibar_height = 40
theme.bg_normal = "#0c4a6e"
theme.bg_focus = "#0284c7"
theme.bg_urgent = "#ff5555"
theme.bg_minimize = "#444444"
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 = "#075985"
theme.tasklist_bg_focus = "#5e85ba" -- hsl(215deg 40% 55%)
theme.fg_normal = "#cbd5e1"
theme.fg_focus = "#bae6fd"
theme.fg_urgent = "#111827"
theme.fg_minimize = "#ffffff"
theme.taglist_fg_empty = "#9ca3af"
theme.fg_normal = "#616c6f"
theme.fg_focus = "#363d3e"
theme.fg_urgent = "#e9f2f5"
theme.fg_minimize = "#4b5456"
theme.taglist_fg_empty = "#566063"
theme.useless_gap = dpi(1)
theme.border_width = dpi(2)
@ -28,7 +28,7 @@ theme.border_normal = "#bebebe"
theme.border_focus = "#ff7f50"
theme.border_marked = "#91231c"
theme.bg_wallpaper = "#dde1e3"
theme.bg_wallpaper = "#b0bec2"
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"

View File

@ -0,0 +1,4 @@
[main]
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

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

View File

@ -0,0 +1,152 @@
source = ~/.config/hypr/white.conf
input {
kb_layout = pl
kb_options = ctrl:nocaps
}
general {
gaps_in = 3
gaps_out = 4
layout = dwindle
border_size = 3
col.inactive_border = 0xff5387ac
col.active_border = 0xffac7853
}
dwindle {
preserve_split = true
}
decoration {
drop_shadow = true
rounding = 4
}
animations {
enabled = true
}
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
disable_autoreload = true
background_color = 0xff808080
}
binds {
workspace_back_and_forth = true
}
$menu = wofi -S run
$terminal = alacritty
$mainMod = SUPER
bind = $mainMod, P, exec, $menu
bind = $mainMod SHIFT, Return, exec, $terminal
bind = $mainMod, Return, exec, $terminal
bind = $mainMod ALT, 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
bind = $mainMod, A, focuscurrentorlast
bind = $mainMod SHIFT, I, layoutmsg, swapprev
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
bind = $mainMod, k, movefocus, u
bind = $mainMod, l, movefocus, r
bind = $mainMod SHIFT, h, swapwindow, l
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
bind = $mainMod CONTROL, l, layoutmsg, orientationright
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
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 + [0-9]
bind = $mainMod CONTROL, 1, focusworkspaceoncurrentmonitor, 1
bind = $mainMod CONTROL, 2, focusworkspaceoncurrentmonitor, 2
bind = $mainMod CONTROL, 3, focusworkspaceoncurrentmonitor, 3
bind = $mainMod CONTROL, 4, focusworkspaceoncurrentmonitor, 4
bind = $mainMod CONTROL, 5, focusworkspaceoncurrentmonitor, 5
bind = $mainMod CONTROL, 6, focusworkspaceoncurrentmonitor, 6
bind = $mainMod CONTROL, 7, focusworkspaceoncurrentmonitor, 7
bind = $mainMod CONTROL, 8, focusworkspaceoncurrentmonitor, 8
bind = $mainMod CONTROL, 9, focusworkspaceoncurrentmonitor, 9
bind = $mainMod CONTROL, 0, focusworkspaceoncurrentmonitor, 10
bindm = $mainMod,mouse:272,movewindow
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

@ -0,0 +1,10 @@
env = LIBVA_DRIVER_NAME,nvidia
env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1
monitor=DP-1,highres,0x0,2
monitor=DP-2,highres,1920x0,2
# vim: ft=hyprlang

View File

@ -0,0 +1,13 @@
{
"layer": "top",
"position": "top",
"modules-left": [
"hyprland/workspaces",
"hyprland/window"
],
"modules-right": [
"tray",
"clock"
],
"reload_style_on_change": true,
}

View File

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

View File

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

View File

@ -0,0 +1,25 @@
@import url("file:///home/lupan/.config/waybar/dark.css");
* {
font-family: Fira Code Nerd Font;
font-size: 12px;
}
#workspaces {
padding: 0 0.5rem;
}
#workspaces button {
padding: 0 3px;
border-radius: 0;
border-bottom: 3px solid transparent;
}
#window {
border-bottom: 3px solid transparent;
}
#clock {
padding: 0 0.5rem;
border-bottom: 3px solid transparent;
}

View File

@ -1,124 +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 },
},
},
}
-- 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,80 +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', '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',
},
},
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',
},
},
},
}
local treesitter_parser_config = require "nvim-treesitter.parsers".get_parser_configs()
treesitter_parser_config.templ = {
install_info = {
url = "https://github.com/vrischmann/tree-sitter-templ.git",
files = { "src/parser.c", "src/scanner.c" },
branch = "master",
},
}
vim.treesitter.language.register('templ', 'templ')
org.setup({
org_agenda_files = { '~/org/*.org' },
org_default_notes_file = '~/org/capture.org',
})

View File

@ -1 +0,0 @@
vim.keymap.set('n', '<leader>gg', ':Git grep ')

View File

@ -0,0 +1,62 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"arrow.nvim": { "branch": "master", "commit": "0b0191d967d9fd837a850f2ccaa95d5917239404" },
"better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
"blame.nvim": { "branch": "main", "commit": "dedbcdce857f708c63f261287ac7491a893912d0" },
"bookmarks.nvim": { "branch": "main", "commit": "42371a76cdd786452b537490926b1b6a041672e5" },
"ccc.nvim": { "branch": "main", "commit": "4fb5abaef2f2e0540fe22d4d74a9841205fff9e4" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"feline.nvim": { "branch": "main", "commit": "8bc28b94a16304aad2f53b8c3653b14803748c28" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" },
"gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" },
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
"go.nvim": { "branch": "master", "commit": "cde0c7a110c0f65b9e4e6baf342654268efff371" },
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
"hierarchy-tree-go.nvim": { "branch": "main", "commit": "9fab9ddefe81edab4a144824955d2d085db3f49a" },
"indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" },
"lackluster.nvim": { "branch": "main", "commit": "6788541c4fc2e018fb29a85556728ab88d9af0b5" },
"lazy.nvim": { "branch": "main", "commit": "332a7ff9b3d226529d8afda4e61979e8b410f350" },
"leap.nvim": { "branch": "main", "commit": "eca8108dcd5f41fbde2a674dceb58b81ed887dc8" },
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
"lush.nvim": { "branch": "main", "commit": "7c0e27f50901481fe83b974493c4ea67a4296aeb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
"neogit": { "branch": "master", "commit": "76380b650ce2bb752cebf34a15583b9f2f141d62" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-lspconfig": { "branch": "master", "commit": "7edfd6692ba17f8d4fe08d84142781898ab0a672" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "f0e3b5c5fe38d0012c63368db90017fef87c85a2" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"oil.nvim": { "branch": "master", "commit": "65c53dbe4f2140236590a7568a5f22a77d16be39" },
"orgmode": { "branch": "master", "commit": "cc51c1914e3f0bf20bd543a7176df5bab12ec247" },
"persisted.nvim": { "branch": "main", "commit": "0a9eebf5cc92b1113a382a660ee73f21ffd62ae7" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-git-grep.nvim": { "branch": "main", "commit": "814217cb30c076bc5edebe36e525b05a7c9eb4b2" },
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"tokyonight.nvim": { "branch": "main", "commit": "30d7be361a7fbf187a881f17e574e9213d5108ea" },
"tree-sitter-nu": { "branch": "main", "commit": "0bb9a602d9bc94b66fab96ce51d46a5a227ab76c" },
"tree-sitter-templ": { "branch": "master", "commit": "a4f14aa248b84df73cc1c00bf06edac8d7c96acd" },
"treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" },
"trouble.nvim": { "branch": "main", "commit": "e5d0e04121c662ce29190a57dd03655d43c59d44" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "8c9051c1cfc73fcf5bfe9a84db7097e4f7c0180d" },
"vim-dadbod-ui": { "branch": "master", "commit": "2527310098e7458488e61a528614da142aa2dc42" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"zenbones.nvim": { "branch": "main", "commit": "e9ba8305f65524f9355515cdd8704b2c6ba2def6" }
}

View File

@ -1,13 +1,26 @@
-- [[ 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.cmd('autocmd BufWritePre *.go :Format')
vim.cmd('autocmd BufWritePre *.lua :Format')
vim.api.nvim_create_autocmd('BufWritePre', {
desc = 'Format on saving buffer',
callback = function()
vim.lsp.buf.format()
end,
group = vim.api.nvim_create_augroup('BufWriteFormat', { clear = true }),
pattern = { '*.go', '*.lua', '*.rs' },
})
vim.api.nvim_create_autocmd('ColorScheme', {
desc = 'Change feline theme',
group = vim.api.nvim_create_augroup('ChangeFelineTheme', { clear = true }),
callback = function()
require('feline').use_theme(vim.o.background)
end,
})

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
@ -42,3 +48,7 @@ vim.o.expandtab = true
vim.o.expandtab = true
vim.g.lightspeed_no_default_keymaps = true
vim.o.cursorline = true
vim.opt.foldcolumn = '1'

View File

@ -1 +0,0 @@
-- require('lazy').setup('plugins')

View File

@ -10,33 +10,11 @@ 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>dd", "<cmd>Oil<CR>", { desc = "[D]isplay [d]irectory" })
key("n", "<leader>df", "<cmd>Oil --float<CR>", { desc = "[D]isplay directory [f]loat" })
key("n", "<leader>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>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()
@ -55,27 +33,28 @@ 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
-- 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)
@ -96,8 +75,11 @@ 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>ct', '<cmd>TroubleToggle<CR>', { desc = "Toggle [T]rouble" })
-- luasnip
@ -125,40 +107,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()

View File

@ -0,0 +1,15 @@
local M = {}
function M.terminalbg()
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if ok then
for line in lines do
if string.find(line, 'light.toml') then
return "light"
end
end
end
return "dark"
end
return M

View File

@ -1,42 +1,32 @@
return {
-- Colorscheme
{
'neanias/everforest-nvim',
priority = 1000,
lazy = false,
-- Colorscheme
'zenbones-theme/zenbones.nvim',
dependencies = { 'rktjmp/lush.nvim' },
config = function()
require("everforest").setup({
background = 'hard',
})
vim.cmd.colorscheme 'everforest'
end
vim.o.background = require('lupan.utils').terminalbg()
vim.cmd.colorscheme('zenbones')
end,
},
{
-- Statusline (see `:help lualine.txt`)
'nvim-lualine/lualine.nvim',
opts = {
options = {
icons_enabled = false,
theme = 'everforest',
component_separators = '|',
section_separators = '',
},
},
},
"slugbyte/lackluster.nvim",
"folke/tokyonight.nvim",
{
-- Indentation guides (see `:help indent_blankline.txt`)
'lukas-reineke/indent-blankline.nvim',
main = "ibl",
opts = {
-- char = '┊',
-- show_trailing_blankline_indent = false,
},
opts = {},
},
{
'norcalli/nvim-colorizer.lua',
cmd = 'ColorizerToggle'
--- 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" },
},
},
}

View File

@ -0,0 +1,22 @@
return {
{
"otavioschwanck/arrow.nvim",
opts = {
show_icons = true,
leader_key = '<leader>;',
buffer_leader_key = '<leader>m',
},
keys = {
{ "<leader>1", function() require("arrow.persist").go_to(1) end },
{ "<leader>2", function() require("arrow.persist").go_to(2) end },
{ "<leader>3", function() require("arrow.persist").go_to(3) end },
{ "<leader>4", function() require("arrow.persist").go_to(4) end },
{ "<leader>5", function() require("arrow.persist").go_to(5) end },
{ "<leader>6", function() require("arrow.persist").go_to(6) end },
{ "<leader>7", function() require("arrow.persist").go_to(7) end },
{ "<leader>8", function() require("arrow.persist").go_to(8) end },
{ "<leader>9", function() require("arrow.persist").go_to(9) end },
{ "<leader>0", function() require("arrow.persist").go_to(10) end },
}
}
}

View File

@ -0,0 +1,78 @@
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' },
},
})
end,
}

View File

@ -0,0 +1,18 @@
return {
{
"LintaoAmons/bookmarks.nvim",
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
dependencies = {
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
},
event = 'VimEnter',
keys = {
{ "mm", "<cmd>BookmarksMark<cr>", mode = { "n", "v" }, desc = "Mark current line into active BookmarkList." },
{ "mo", "<cmd>BookmarksGoto<cr>", mode = { "n", "v" }, desc = "Go to bookmark at current active BookmarkList" },
{ "ma", "<cmd>BookmarksCommands<cr>", mode = { "n", "v" }, desc = "Find and trigger a bookmark command." },
{ "mg", "<cmd>BookmarksGotoRecent<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
{ "ms", "<cmd>BookmarksSetActiveList<cr>", mode = { "n", "v" }, desc = "Go to latest visited/created Bookmark" },
},
},
{ "nvim-telescope/telescope.nvim", lazy = true },
}

View File

@ -0,0 +1,25 @@
return {
{
'folke/which-key.nvim',
event = 'VimEnter',
config = function(_, opts)
require('which-key').setup(opts)
-- Document existing key chains
require('which-key').register {
['<leader>c'] = { name = '[C]ode/Color', _ = 'which_key_ignore' },
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
}
end,
},
{
"max397574/better-escape.nvim",
config = function(_, opts)
require("better_escape").setup(opts)
end,
},
}

View File

@ -8,7 +8,6 @@ return {
-- Undo browsing
'mbbill/undotree',
-- Tabstops autodetected
'tpope/vim-sleuth',
@ -16,10 +15,8 @@ return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup({})
config = function(_, opts)
require("nvim-surround").setup(opts)
end
},
'ggandor/lightspeed.nvim',
}

View File

@ -0,0 +1,243 @@
local function feline_config(_, opts)
local feline = require('feline')
local dark_theme = {
bg = '#615853',
bg2 = '#352f2d',
black = '#403833',
skyblue = '#61abda',
cyan = '#65b8c1',
fg = '#b4bdc3',
green = '#8bae68',
oceanblue = '#6099c0',
magenta = '#cf86c1',
orange = '#d68c67',
red = '#e8838f',
violet = '#b279a7',
white = '#b4bdc3',
yellow = '#b77e64',
}
feline.add_theme('dark', dark_theme)
local light_theme = {
bg = '#e1dcd9',
bg2 = '#d6cdc9',
black = '#c4b6af',
skyblue = '#1d5573',
cyan = '#2b747c',
fg = '#2c363c',
green = '#3f5a22',
oceanblue = '#286486',
magenta = '#7b3b70',
orange = '#803d1c',
red = '#94253e',
violet = '#88507d',
white = '#4f5e68',
yellow = '#944927',
}
feline.add_theme('light', light_theme)
local statusline = require('arrow.statusline')
local vimode = require('feline.providers.vi_mode')
local c = {
vi_mode = {
provider = 'vi_mode',
hl = function()
return {
name = vimode.get_mode_highlight_name(),
fg = vimode.get_mode_color(),
bg = 'bg2',
style = 'bold',
}
end,
left_sep = {
str = ' █',
always_visible = true,
hl = {
fg = 'bg2',
},
},
right_sep = {
str = '',
always_visible = true,
hl = {
fg = 'bg2',
},
}
},
file_info = {
provider = 'file_info',
hl = {
fg = 'fg',
},
left_sep = {
str = ' ',
},
right_sep = {
str = ' ',
},
},
arrow = {
provider = function() return statusline.text_for_statusline_with_icons() end,
hl = {
fg = 'red',
style = 'bold',
},
},
file_size = {
provider = 'file_size',
hl = {
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
always_visible = true,
hl = {
fg = 'bg2',
},
},
},
line_percentage = {
provider = 'line_percentage',
hl = {
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = '',
hl = {
fg = 'fg',
bg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = 'fg',
bg = 'bg2',
},
},
},
position = {
provider = 'position',
hl = {
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
right_sep = {
str = '█ ',
always_visible = true,
hl = {
fg = 'bg2',
},
}
},
diagnostic_errors = {
provider = 'diagnostic_errors',
hl = {
fg = 'red',
},
},
diagnostic_warnings = {
provider = 'diagnostic_warnings',
hl = {
fg = 'yellow',
},
},
diagnostic_hints = {
provider = 'diagnostic_hints',
hl = {
fg = 'cyan',
},
},
diagnostic_info = {
provider = 'diagnostic_info',
hl = {
fg = 'skyblue',
},
},
git_diff_added = {
provider = 'git_diff_added',
hl = {
fg = 'green',
},
},
git_diff_removed = {
provider = 'git_diff_removed',
hl = {
fg = 'red',
},
},
git_diff_changed = {
provider = 'git_diff_changed',
hl = {
fg = 'yellow',
},
},
git_branch = {
provider = 'git_branch',
hl = {
fg = 'fg',
bg = 'bg2',
style = 'bold',
},
left_sep = {
str = ' █',
hl = {
fg = 'bg2',
},
},
right_sep = {
str = '',
hl = {
fg = 'bg2',
},
}
},
}
local active = {
{
c.vi_mode,
c.file_info,
c.arrow,
c.file_size,
c.line_percentage,
c.position,
c.diagnostic_errors,
c.diagnostic_warnings,
c.diagnostic_info,
c.diagnostic_hints,
},
{
c.git_diff_added,
c.git_diff_removed,
c.git_diff_changed,
c.git_branch,
},
}
local inactive = {
{
c.file_info,
},
{},
}
opts.components = { active = active, inactive = inactive }
feline.setup(opts)
feline.use_theme(require('lupan.utils').terminalbg())
end
return {
-- Statusline
'freddiehaddad/feline.nvim',
opts = {},
config = feline_config,
}

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

View File

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

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

@ -1,75 +1,51 @@
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',
'crusj/hierarchy-tree-go.nvim',
dependencies = 'neovim/nvim-lspconfig',
lazy = true,
},
{
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
'nvim-orgmode/orgmode', -- as configured together
'vrischmann/tree-sitter-templ',
},
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 = {} },
{
'akinsho/toggleterm.nvim',
keys = { '<C-_>', '<cmd>ToggleTerm<cr>', desc = 'Toggle term' },
version = "*",
'ggandor/leap.nvim',
opts = {
direction = "float",
open_mapping = [[<C-_>]],
safe_labels = {},
},
dependencies = {
"tpope/vim-repeat",
},
keys = {
{ 'gs', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
{ 'gS', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
}
},
{
'ThePrimeagen/harpoon',
dependencies = { 'nvim-lua/plenary.nvim' },
lazy = true,
}
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
},
{
'stevearc/oil.nvim',
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
default_file_explorer = true,
delete_to_trash = true,
},
keys = {
{ "-", "<cmd>Oil<CR>", desc = "Open parent directory" },
},
},
{
'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" },
},
},
}

View File

@ -0,0 +1,157 @@
return {
{
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for neovim
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
'folke/neodev.nvim',
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('my-lsp-attach', { clear = true }),
callback = function(event)
local map = function(keys, func, desc)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
map('<leader>rn', '<cmd>Lspsaga rename<CR>', '[R]e[n]ame')
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
map('K', '<cmd>Lspsaga hover_doc<CR>', 'Hover Documentation')
map('<leader>K', vim.lsp.buf.signature_help, 'Signature Documentation')
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
-- Highlight references under cursor (clear highlight when cursor moves).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.documentHighlightProvider then
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
buffer = event.buf,
callback = function()
local clients = vim.lsp.get_clients({ bufnr = event.buf })
for _i, cl in ipairs(clients) do
if cl.name == 'unocss' then
return -- skip highlight if unocss is attached (workaround)
end
end
vim.lsp.buf.document_highlight()
end
})
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
buffer = event.buf,
callback = vim.lsp.buf.clear_references,
})
end
end,
})
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
local servers = {
clangd = {},
gopls = {},
-- pyright = {},
rust_analyzer = {},
tsserver = {},
lua_ls = {
settings = {
Lua = {
runtime = { version = 'LuaJIT' },
workspace = { checkThirdParty = false },
telemetry = { enable = false },
completion = {
callSnippet = 'Replace',
},
},
},
},
html = {},
htmx = {},
unocss = {},
}
require 'lspconfig'.html.setup {
filetypes = { "html", "templ" },
}
require 'lspconfig'.htmx.setup {
filetypes = { "html", "templ" },
}
require 'lspconfig'.unocss.setup {
filetypes = { "html", "templ" },
}
-- Setup neovim lua configuration
require('neodev').setup()
require('mason').setup()
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'stylua', -- Used to format lua code
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
require('mason-lspconfig').setup {
handlers = {
function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
},
}
end,
},
{
'nvimdev/lspsaga.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-tree/nvim-web-devicons',
},
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,
},
}

View File

@ -0,0 +1,16 @@
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 },
},
},
keys = {
{ "<leader>sp", "<cmd>:Telescope persisted<cr>", desc = "Search [P]ersisted" },
},
}

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,102 @@
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')
pcall(telescope.load_extension, 'persisted')
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>sF', function() builtin.find_files { hidden = true } end,
{ desc = '[S]earch [F]iles (with hidden)' })
vim.keymap.set('n', '<leader>sl', function() telescope.extensions.whaler.whaler() end,
{ desc = '[S]earch with wha[L]er' })
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = '[G]it [F]iles' })
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = '[G]it [S]tatus' })
vim.keymap.set('n', '<leader>gg', function() telescope.extensions.git_grep.live_grep() end,
{ desc = '[G]it [g]rep' })
vim.keymap.set('n', '<leader>gw', function() telescope.extensions.git_grep.grep() end,
{ desc = '[G]it grep current [W]ord' })
vim.keymap.set('n', '<leader>/', function()
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer' })
vim.keymap.set('n', '<leader>s/', function()
builtin.live_grep {
grep_open_files = true,
prompt_title = 'Live Grep in Open Files',
}
end, { desc = '[S]earch [/] in Open Files' })
vim.keymap.set('n', '<leader>sn', function()
builtin.find_files { cwd = vim.fn.stdpath 'config' }
end, { desc = '[S]earch [N]eovim files' })
end,
}
}

View File

@ -0,0 +1,93 @@
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', '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',
})
end,
}
}

16
shell/.bashrc Normal file
View File

@ -0,0 +1,16 @@
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
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

@ -0,0 +1,831 @@
# Nushell Config File
#
# version = "0.89.0"
# For more information on defining custom themes, see
# https://www.nushell.sh/book/coloring_and_theming.html
# And here is the theme collection
# https://github.com/nushell/nu_scripts/tree/main/themes
let dark_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
bool: light_cyan
int: white
filesize: cyan
duration: white
date: purple
range: white
float: white
string: white
nothing: white
binary: white
cell-path: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
search_result: {bg: red fg: white}
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_yellow_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
let light_theme = {
# color for nushell primitives
separator: dark_gray
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
bool: dark_cyan
int: dark_gray
filesize: cyan_bold
duration: dark_gray
date: purple
range: dark_gray
float: dark_gray
string: dark_gray
nothing: dark_gray
binary: dark_gray
cell-path: dark_gray
row_index: green_bold
record: dark_gray
list: dark_gray
block: dark_gray
hints: dark_gray
search_result: {fg: white bg: red}
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_purple_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
# External completer example
let carapace_completer = if (which carapace | is-empty) {
null
} else {
{|spans| carapace $spans.0 nushell ...$spans | from json}
}
# The default config record. This is where much of your global configuration is setup.
$env.config = {
show_banner: false # true or false to enable or disable the welcome banner at startup
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
}
rm: {
always_trash: false # always act as if -t was given. Can be overridden with -p
}
table: {
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
padding: { left: 1, right: 1 } # a left right padding of each column in a table
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
}
header_on_separator: false # show header text on separator/border line
# abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
}
error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
# datetime_format determines what a datetime rendered in the shell would look like.
# Behavior without this configuration point will be to "humanize" the datetime display,
# showing something like "a day ago."
datetime_format: {
# normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
# table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
}
explore: {
status_bar_background: {fg: "#1D1F21", bg: "#C4C9C6"},
command_bar_text: {fg: "#C4C9C6"},
highlight: {fg: "black", bg: "yellow"},
status: {
error: {fg: "white", bg: "red"},
warn: {}
info: {}
},
table: {
split_line: {fg: "#404040"},
selected_cell: {bg: light_blue},
selected_row: {},
selected_column: {},
},
}
history: {
max_size: 100_000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "plaintext" # "sqlite" or "plaintext"
isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: $carapace_completer
}
}
filesize: {
metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
}
cursor_shape: {
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
vi_insert: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
vi_normal: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
}
color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto
float_precision: 2 # the precision for displaying floats in tables
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
use_ansi_coloring: true
bracketed_paste: true # enable bracketed paste, currently useless on windows
edit_mode: vi # emacs, vi
shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this.
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
hooks: {
pre_prompt: [{ null }] # run before the prompt is shown
pre_execution: [{ null }] # run before the repl input is run
env_change: {
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
}
display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
command_not_found: { null } # return an error message when a command is not found
}
menus: [
# Configuration for default nushell menus
# Note the lack of source parameter
{
name: completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: history_menu
only_buffer_difference: true
marker: "? "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: help_menu
only_buffer_difference: true
marker: "? "
type: {
layout: description
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
]
keybindings: [
{
name: completion_menu
modifier: none
keycode: tab
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: history_menu
modifier: control
keycode: char_r
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: history_menu }
}
{
name: help_menu
modifier: none
keycode: f1
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: help_menu }
}
{
name: completion_previous_menu
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert]
event: { send: menuprevious }
}
{
name: next_page_menu
modifier: control
keycode: char_x
mode: emacs
event: { send: menupagenext }
}
{
name: undo_or_previous_page_menu
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
{
name: escape
modifier: none
keycode: escape
mode: [emacs, vi_normal, vi_insert]
event: { send: esc } # NOTE: does not appear to work
}
{
name: cancel_command
modifier: control
keycode: char_c
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrlc }
}
{
name: quit_shell
modifier: control
keycode: char_d
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrld }
}
{
name: clear_screen
modifier: control
keycode: char_l
mode: [emacs, vi_normal, vi_insert]
event: { send: clearscreen }
}
{
name: search_history
modifier: control
keycode: char_q
mode: [emacs, vi_normal, vi_insert]
event: { send: searchhistory }
}
{
name: open_command_editor
modifier: control
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: openeditor }
}
{
name: move_up
modifier: none
keycode: up
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuup}
{send: up}
]
}
}
{
name: move_down
modifier: none
keycode: down
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menudown}
{send: down}
]
}
}
{
name: move_left
modifier: none
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuleft}
{send: left}
]
}
}
{
name: move_right_or_take_history_hint
modifier: none
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{send: menuright}
{send: right}
]
}
}
{
name: move_one_word_left
modifier: control
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: control
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: move_to_line_start
modifier: none
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_start
modifier: control
keycode: char_a
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_end_or_take_history_hint
modifier: none
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{edit: movetolineend}
]
}
}
{
name: move_to_line_end_or_take_history_hint
modifier: control
keycode: char_e
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{edit: movetolineend}
]
}
}
{
name: move_to_line_start
modifier: control
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolinestart}
}
{
name: move_to_line_end
modifier: control
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {edit: movetolineend}
}
{
name: move_up
modifier: control
keycode: char_p
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menuup}
{send: up}
]
}
}
{
name: move_down
modifier: control
keycode: char_t
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{send: menudown}
{send: down}
]
}
}
{
name: delete_one_character_backward
modifier: none
keycode: backspace
mode: [emacs, vi_insert]
event: {edit: backspace}
}
{
name: delete_one_word_backward
modifier: control
keycode: backspace
mode: [emacs, vi_insert]
event: {edit: backspaceword}
}
{
name: delete_one_character_forward
modifier: none
keycode: delete
mode: [emacs, vi_insert]
event: {edit: delete}
}
{
name: delete_one_character_forward
modifier: control
keycode: delete
mode: [emacs, vi_insert]
event: {edit: delete}
}
{
name: delete_one_character_forward
modifier: control
keycode: char_h
mode: [emacs, vi_insert]
event: {edit: backspace}
}
{
name: delete_one_word_backward
modifier: control
keycode: char_w
mode: [emacs, vi_insert]
event: {edit: backspaceword}
}
{
name: move_left
modifier: none
keycode: backspace
mode: vi_normal
event: {edit: moveleft}
}
{
name: newline_or_run_command
modifier: none
keycode: enter
mode: emacs
event: {send: enter}
}
{
name: move_left
modifier: control
keycode: char_b
mode: emacs
event: {
until: [
{send: menuleft}
{send: left}
]
}
}
{
name: move_right_or_take_history_hint
modifier: control
keycode: char_f
mode: emacs
event: {
until: [
{send: historyhintcomplete}
{send: menuright}
{send: right}
]
}
}
{
name: redo_change
modifier: control
keycode: char_g
mode: emacs
event: {edit: redo}
}
{
name: undo_change
modifier: control
keycode: char_z
mode: emacs
event: {edit: undo}
}
{
name: paste_before
modifier: control
keycode: char_y
mode: emacs
event: {edit: pastecutbufferbefore}
}
{
name: cut_word_left
modifier: control
keycode: char_w
mode: emacs
event: {edit: cutwordleft}
}
{
name: cut_line_to_end
modifier: control
keycode: char_k
mode: emacs
event: {edit: cuttoend}
}
{
name: cut_line_from_start
modifier: control
keycode: char_u
mode: [emacs vi_insert]
event: {edit: cutfromstart}
}
{
name: swap_graphemes
modifier: control
keycode: char_t
mode: emacs
event: {edit: swapgraphemes}
}
{
name: move_one_word_left
modifier: alt
keycode: left
mode: emacs
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: right
mode: emacs
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: move_one_word_left
modifier: alt
keycode: char_b
mode: emacs
event: {edit: movewordleft}
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: char_f
mode: emacs
event: {
until: [
{send: historyhintwordcomplete}
{edit: movewordright}
]
}
}
{
name: delete_one_word_forward
modifier: alt
keycode: delete
mode: emacs
event: {edit: deleteword}
}
{
name: delete_one_word_backward
modifier: alt
keycode: backspace
mode: emacs
event: {edit: backspaceword}
}
{
name: delete_one_word_backward
modifier: alt
keycode: char_m
mode: emacs
event: {edit: backspaceword}
}
{
name: cut_word_to_right
modifier: alt
keycode: char_d
mode: emacs
event: {edit: cutwordright}
}
{
name: upper_case_word
modifier: alt
keycode: char_u
mode: emacs
event: {edit: uppercaseword}
}
{
name: lower_case_word
modifier: alt
keycode: char_l
mode: emacs
event: {edit: lowercaseword}
}
{
name: capitalize_char
modifier: alt
keycode: char_c
mode: emacs
event: {edit: capitalizechar}
}
{
name: move_up
modifier: control
keycode: char_k
mode: [vi_normal, vi_insert]
event: {
until: [
{send: menuup}
{send: up}
]
}
}
{
name: move_down
modifier: control
keycode: char_j
mode: [vi_normal, vi_insert]
event: {
until: [
{send: menudown}
{send: down}
]
}
}
{
name: move_left
modifier: control
keycode: char_h
mode: [vi_normal, vi_insert]
event: {
until: [
{send: menuleft}
{send: left}
]
}
}
{
name: move_right_or_take_history_hint
modifier: control
keycode: char_l
mode: [vi_normal, vi_insert]
event: {
until: [
{send: historyhintcomplete}
{send: menuright}
{send: right}
]
}
}
]
}
alias v = nvim
alias tl = tmux list-sessions
alias tn = tmux new -s
alias ta = tmux attach -t
alias nocaps = setxkbmap pl -option ctrl:nocaps
def gst [] {
git status -s | detect columns -n | rename status file
}
def glog [] {
git log --pretty=%h»¦«%aN»¦«%s»¦«%aD | lines | split column "»¦«" sha1 committer desc merged_at
}
def l [pattern? = '.'] {
ls $pattern | grid -c
}

View File

@ -0,0 +1,109 @@
# Nushell Environment Config File
#
# version = "0.89.0"
def create_left_prompt [] {
let home = $nu.home-path
# Perform tilde substitution on dir
# To determine if the prefix of the path matches the home dir, we split the current path into
# segments, and compare those with the segments of the home dir. In cases where the current dir
# is a parent of the home dir (e.g. `/home`, homedir is `/home/user`), this comparison will
# also evaluate to true. Inside the condition, we attempt to str replace `$home` with `~`.
# Inside the condition, either:
# 1. The home prefix will be replaced
# 2. The current dir is a parent of the home dir, so it will be uneffected by the str replace
let dir = (
if ($env.PWD | path split | zip ($home | path split) | all { $in.0 == $in.1 }) {
($env.PWD | str replace $home "~")
} else {
$env.PWD
}
)
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
let path_segment = $"($path_color)($dir)"
let userhost = $'(ansi blue_bold)(id -un)@(hostname)(ansi reset)'
let base = $path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)"
let branch = do { git rev-parse --abbrev-ref HEAD } | complete
if $branch.exit_code == 0 {
$"($userhost) ($base) ($separator_color)\((ansi magenta)($branch.stdout | str trim)($separator_color)) "
} else {
$'($userhost) ($base) '
}
}
def create_right_prompt [] {
# create a right prompt in magenta with green separators and am/pm underlined
let time_segment = ([
(ansi reset)
(ansi magenta)
(date now | format date '%x %X %p') # try to respect user's locale
] | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
str replace --regex --all "([AP]M)" $"(ansi magenta_underline)${1}")
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
(ansi rb)
($env.LAST_EXIT_CODE)
] | str join)
} else { "" }
([$last_exit_code, (char space), $time_segment] | str join)
}
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = {|| create_left_prompt }
# FIXME: This default is not implemented in rust code as of 2023-09-08.
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = {|| "> " }
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " }
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
# If you want previously entered commands to have a different prompt from the usual one,
# you can uncomment one or more of the following lines.
# This can be useful if you have a 2-line prompt and it's taking up a lot of space
# because every command entered takes up 2 lines instead of 1. You can then uncomment
# the line below so that previously entered commands show with a single `🚀`.
# $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " }
# $env.TRANSIENT_PROMPT_INDICATOR = {|| "" }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" }
# $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" }
# $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" }
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
# The default for this is $nu.default-config-dir/scripts
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
]
# Directories to search for plugin binaries when calling register
# The default for this is $nu.default-config-dir/plugins
$env.NU_PLUGIN_DIRS = [
($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
]
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path')

View File

@ -0,0 +1,13 @@
alias v=nvim
alias ll='ls -l'
alias ta='tmux attach -t'
alias tl='tmux list-sessions'
alias tn='tmux new -s'
if which exa > /dev/null; then
alias ls='exa --icons'
alias tree='exa --tree --icons'
fi
alias nocaps='setxkbmap pl -option ctrl:nocaps'
alias fixdp='xrandr --output DP-0 --right-of DP-2'

View File

@ -0,0 +1,4 @@
alias hs='history -$HISTSIZE | rg'
alias -s pdf=zathura
alias -s {jpg,jpeg,png}=sxiv

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,11 @@ 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 /usr/bin/Hyprland > /dev/null; then
exec /usr/bin/Hyprland
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

@ -6,9 +6,7 @@ export FZF_DEFAULT_OPTS='--color=bw,hl:green,hl+:green'
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
plug "zap-zsh/supercharge"
plug "zap-zsh/exa"
plug "zap-zsh/vim"
plug "jeffreytse/zsh-vi-mode"
autoload -Uz compinit
compinit
@ -17,16 +15,62 @@ 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"
plug "agkozak/zsh-z"
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
ZSH_HIGHLIGHT_STYLES[comment]=fg=blue
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=magenta,fg=black,bold
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=bg=red,fg=black,bold
ZSHZ_ECHO=1
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.
HISTFILE=${ZDOTDIR:-~}/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_find_no_dups
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt inc_append_history
setopt share_history
# Convenience.
setopt autocd
bindkey -M vicmd '^[h' run-help
bindkey -M viins '^[h' run-help
setopt glob_complete
setopt interactive_comments
# Aliases.
for f in ~/.config/shellconfig/*.sh(N) ~/.config/shellconfig/*.zsh(N); do source "$f"; done

View File

@ -1,13 +1,53 @@
set -g status-bg colour0
set -g status-fg colour7
set -g prefix C-t
bind-key C-t send-prefix
bind-key C-j select-pane -D
bind-key C-k select-pane -U
bind-key C-h select-pane -L
bind-key C-l select-pane -R
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
set -g default-terminal "screen-256color"
set -as terminal-features ",*:RGB"
set -g base-index 1
setw -g base-index 1
set -g set-titles on
set -g set-titles-string "[#S] #P:#W #T"
set -g set-titles-string "#H [#S]"
set -g status-justify centre
set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S"
set -g status-left-length 50
set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] "
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W #[fg=green]#[bg=black]'

View File

@ -11,33 +11,30 @@ if [ "$THEME" = "toggle" ]; then
fi
if [ "$THEME" = dark ]; then
BGCOLOR=#4a4a4a
GTK_THEME=Materia-dark
elif [ "$THEME" = light ]; then
BGCOLOR=#cacaca
GTK_THEME=Materia-light
else
echo "error: unknown theme: should be either dark, light or toggle" >&2
exit 1
fi
# Background color
if [ ! -x ~/.fehbg ]; then
hsetroot -solid "$BGCOLOR"
fi
# Alacritty
if [ -f ~/.config/alacritty/alacritty.yml ]; then
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
fi
if [ -f ~/.config/alacritty/alacritty.toml ]; then
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml
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
# Emacs
if which emacsclient > /dev/null; then
emacsclient --eval "(my-select-theme '$THEME)"
# 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" }
]