Compare commits
84 Commits
8f09411356
...
wip
Author | SHA1 | Date | |
---|---|---|---|
9064a389e9 | |||
e507e258e3 | |||
d138f4c1da | |||
fa085ae00c | |||
d8a21e78c4 | |||
213a93acd9 | |||
bdde8238c9 | |||
d21fdc925c | |||
dba234077e | |||
867e3d6991 | |||
ecb466f230 | |||
f5302fc646 | |||
3eaba86825 | |||
1b0d0597b0 | |||
63860cd661 | |||
d122f56ab6 | |||
a5c491d1ce | |||
d6ba2a78b9 | |||
29608ff8c4 | |||
1513d23ec4 | |||
28de145180 | |||
17997c0550 | |||
d47467e161 | |||
8033f2e2a9 | |||
3fa1a018ee | |||
dd9de18aa7 | |||
6d8e00fabf | |||
b54ece050d | |||
437ca39309 | |||
1835f61e49 | |||
7caf112500 | |||
6b84ae6f3a | |||
d3b8e76787 | |||
24d031c214 | |||
bfa2c6313f | |||
cfb882fdc9 | |||
b6bc1de7af | |||
48664abc41 | |||
3fc6280267 | |||
ef95853433 | |||
3146aeee3e | |||
f685ebee2c | |||
5a40a5b3ab | |||
c06364cd27 | |||
f2f29762a4 | |||
7f850d115f | |||
fc88cb9801 | |||
75c39a5613 | |||
e90c2c7e4a | |||
24966cfc69 | |||
78ab1671ab | |||
d38ae42668 | |||
240d466e3d | |||
9e8f036f62 | |||
8a6ecfe7b9 | |||
8714b847a7 | |||
2c672e497c | |||
6d22ed0187 | |||
f5397295d3 | |||
2a14edd39c | |||
00a77bf58a | |||
9e9ccd0fde | |||
d72a4540b9 | |||
b0385dc277 | |||
f3f859d9a1 | |||
5b421c7999 | |||
cf729da8ef | |||
341499f9a7 | |||
10ba42cb1d | |||
154b1a11be | |||
ec9c92ab9f | |||
c321000834 | |||
06218e16d4 | |||
a7c29799b8 | |||
3035ab9acb | |||
e6216fb3cd | |||
24d4f9e638 | |||
ab1a7df7f4 | |||
4a666b8d21 | |||
3324aae2d6 | |||
10e03987be | |||
728b00c2ca | |||
30793b5a46 | |||
8fb8e43f59 |
31
README.md
31
README.md
@ -4,11 +4,40 @@ Lupan's config files
|
||||
Installation
|
||||
------------
|
||||
|
||||
Install Hyprland
|
||||
----------------
|
||||
|
||||
To reproduce my environment clone this repo into `~/dotfiles` and check
|
||||
that you have required programs in your `PATH` with
|
||||
|
||||
```
|
||||
$ sh check_dependencies.sh
|
||||
$ sh check_dependencies.sh hypr
|
||||
```
|
||||
|
||||
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
||||
|
||||
Install proper configurations with
|
||||
|
||||
```
|
||||
$ stow shell hyprland alacritty xsession nvim yazi
|
||||
```
|
||||
|
||||
Where `xsession` is just to install `lupan-set-theme` script, `nvim` and `yazi` may be skipped if you do not use them.
|
||||
|
||||
Change to `zsh` as your login shell with
|
||||
|
||||
```
|
||||
$ chsh -s /usr/bin/zsh
|
||||
```
|
||||
|
||||
Install DWM (old)
|
||||
-----------------
|
||||
|
||||
To reproduce my environment clone this repo into `~/dotfiles` and check
|
||||
that you have required programs in your `PATH` with
|
||||
|
||||
```
|
||||
$ sh check_dependencies.sh dwm
|
||||
```
|
||||
|
||||
Install font `ttf-firacode-nerd` (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FiraCode.zip).
|
||||
|
@ -1,5 +1,3 @@
|
||||
import = ["~/.config/alacritty/dark.toml"]
|
||||
|
||||
[colors]
|
||||
draw_bold_text_with_bright_colors = false
|
||||
|
||||
@ -7,10 +5,13 @@ draw_bold_text_with_bright_colors = false
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
size = 9
|
||||
size = 10
|
||||
|
||||
[font.bold]
|
||||
family = "Fira Code Nerd Font"
|
||||
|
||||
[font.normal]
|
||||
family = "Fira Code Nerd Font"
|
||||
|
||||
[general]
|
||||
import = ["~/.config/alacritty/dark.toml"]
|
||||
|
@ -1,26 +1,45 @@
|
||||
# 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"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kanagawa Paper Ink
|
||||
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-ink.toml
|
||||
# URL: https://github.com/alacritty/alacritty
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
[colors.primary]
|
||||
background = "#1C1917"
|
||||
foreground = "#B4BDC3"
|
||||
background = '#1F1F28'
|
||||
foreground = '#DCD7BA'
|
||||
|
||||
[colors.cursor]
|
||||
cursor = '#c4b28a'
|
||||
text = '#1F1F28'
|
||||
|
||||
[colors.selection]
|
||||
background = '#363646'
|
||||
foreground = '#9e9b93'
|
||||
|
||||
[colors.normal]
|
||||
black = '#393836'
|
||||
red = '#c4746e'
|
||||
green = '#699469'
|
||||
yellow = '#c4b28a'
|
||||
blue = '#435965'
|
||||
magenta = '#a292a3'
|
||||
cyan = '#8ea49e'
|
||||
white = '#C8C093'
|
||||
|
||||
[colors.bright]
|
||||
black = '#aca9a4'
|
||||
red = '#cc928e'
|
||||
green = '#72a072'
|
||||
yellow = '#d4c196'
|
||||
blue = '#698a9b'
|
||||
magenta = '#b4a7b5'
|
||||
cyan = '#96ada7'
|
||||
white = '#d5cd9d'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = '#b6927b'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = '#c4746e'
|
||||
|
@ -1,26 +1,45 @@
|
||||
# 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"
|
||||
# -----------------------------------------------------------------------------
|
||||
# Kanagawa Paper Canvas
|
||||
# Upstream: https://github.com/thesimonho/kanagawa-paper.nvim/master/extras/alacritty/kanagawa-paper-canvas.toml
|
||||
# URL: https://github.com/alacritty/alacritty
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
[colors.primary]
|
||||
background = "#F0EDEC"
|
||||
foreground = "#2C363C"
|
||||
background = '#e1e1de'
|
||||
foreground = '#595b62'
|
||||
|
||||
[colors.cursor]
|
||||
cursor = '#618bb6'
|
||||
text = '#e1e1de'
|
||||
|
||||
[colors.selection]
|
||||
background = '#c4cbdc'
|
||||
foreground = '#858479'
|
||||
|
||||
[colors.normal]
|
||||
black = '#4c4c65'
|
||||
red = '#b35560'
|
||||
green = '#57786c'
|
||||
yellow = '#a67337'
|
||||
blue = '#719ac2'
|
||||
magenta = '#ac7085'
|
||||
cyan = '#526c79'
|
||||
white = '#858479'
|
||||
|
||||
[colors.bright]
|
||||
black = '#5c5c75'
|
||||
red = '#c75f6b'
|
||||
green = '#618679'
|
||||
yellow = '#b67e3d'
|
||||
blue = '#86aed7'
|
||||
magenta = '#b57e91'
|
||||
cyan = '#5d7a89'
|
||||
white = '#919084'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = '#b8805e'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = '#b35560'
|
||||
|
@ -51,7 +51,20 @@ end
|
||||
|
||||
-- {{{ Variable definitions
|
||||
-- Themes define colours, icons, font and wallpapers.
|
||||
local theme = "theme_dark.lua"
|
||||
|
||||
local function read_theme()
|
||||
local theme = "theme_dark.lua"
|
||||
local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
|
||||
if f then
|
||||
if string.find(f:read('*all'), 'light') then
|
||||
theme = 'theme_light.lua'
|
||||
end
|
||||
f:close()
|
||||
return theme
|
||||
end
|
||||
end
|
||||
|
||||
local theme = read_theme()
|
||||
beautiful.init(gears.filesystem.get_configuration_dir() .. theme)
|
||||
|
||||
local function set_wallpaper(s)
|
||||
@ -325,8 +338,8 @@ local globalkeys = gears.table.join(
|
||||
end,
|
||||
{ description = "lua execute prompt", group = "awesome" }),
|
||||
-- Menubar
|
||||
awful.key({ modkey, }, "p", function() menubar.show() end,
|
||||
{ description = "show the menubar", group = "launcher" })
|
||||
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end,
|
||||
{ description = "run command", group = "launcher" })
|
||||
)
|
||||
|
||||
local clientkeys = gears.table.join(
|
||||
|
@ -1,51 +1,56 @@
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
local theme = {}
|
||||
local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10.5"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 30
|
||||
|
||||
theme.bg_normal = "#283538"
|
||||
theme.bg_focus = "#36537d" -- hsl(215deg 40% 35%)
|
||||
theme.bg_urgent = "#d8aeb5"
|
||||
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#263c59" -- hsl(215deg 40% 25%)
|
||||
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||
theme.bg_focus = "#478575" -- hsl(165deg 30% 40%)
|
||||
theme.bg_urgent = "#5c3d45" -- hsl(345deg 20% 30%)
|
||||
theme.bg_minimize = "#363e49" -- hsl(215deg 15% 25%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#3d5c54" -- hsl(165deg 20% 30%)
|
||||
|
||||
theme.fg_normal = "#9ea7aa"
|
||||
theme.fg_focus = "#b1babd"
|
||||
theme.fg_urgent = theme.bg_focus
|
||||
theme.fg_minimize = "#8a9294"
|
||||
theme.taglist_fg_empty = "#798082"
|
||||
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||
theme.fg_focus = "#b1babd"
|
||||
theme.fg_urgent = theme.bg_focus
|
||||
theme.fg_minimize = "#8a9294"
|
||||
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#708090"
|
||||
theme.border_focus = "#a0522d"
|
||||
theme.border_marked = "#91231c"
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#708090"
|
||||
theme.border_focus = "#a0522d"
|
||||
theme.border_marked = "#91231c"
|
||||
|
||||
theme.bg_wallpaper = "#424a4c"
|
||||
theme.bg_wallpaper = "#424a4c"
|
||||
|
||||
theme.hotkeys_font = theme.font
|
||||
theme.hotkeys_description_font = theme.font
|
||||
theme.hotkeys_bg = theme.bg_minimize
|
||||
theme.hotkeys_modifiers_fg = theme.border_focus
|
||||
|
||||
-- You can use your own layout icons like this:
|
||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
|
||||
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
|
||||
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
|
||||
theme.layout_max = themes_path .. "default/layouts/maxw.png"
|
||||
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
|
||||
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
|
||||
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
|
||||
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
|
||||
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
|
||||
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
|
||||
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
|
||||
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
|
||||
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
|
||||
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
|
||||
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
|
||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
|
||||
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
|
||||
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
|
||||
theme.layout_max = themes_path .. "default/layouts/maxw.png"
|
||||
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
|
||||
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
|
||||
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
|
||||
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
|
||||
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
|
||||
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
|
||||
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
|
||||
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
|
||||
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
|
||||
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
|
||||
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
|
||||
|
||||
return theme
|
||||
|
@ -1,51 +1,56 @@
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
local theme = {}
|
||||
local theme = {}
|
||||
|
||||
theme.font = "Fira Code Nerd Font 10.5"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 30
|
||||
|
||||
theme.bg_normal = "#283538"
|
||||
theme.bg_focus = "#82a0c9" -- hsl(215deg 40% 65%)
|
||||
theme.bg_urgent = "#d0426a"
|
||||
theme.bg_minimize = "#7b899d" -- hsl(215deg 15% 55%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#5e85ba" -- hsl(215deg 40% 55%)
|
||||
theme.bg_normal = "#293d38" -- hsl(165deg 20% 20%)
|
||||
theme.bg_focus = "#a9d6ca" -- hsl(165deg 35% 75%)
|
||||
theme.bg_urgent = "#bc8f9b" -- hsl(345deg 25% 65%)
|
||||
theme.bg_minimize = "#62847b" -- hsl(165deg 15% 45%)
|
||||
theme.bg_systray = theme.bg_normal
|
||||
theme.tasklist_bg_focus = "#8fbcb1" -- hsl(165deg 25% 65%)
|
||||
|
||||
theme.fg_normal = "#616c6f"
|
||||
theme.fg_focus = "#363d3e"
|
||||
theme.fg_urgent = "#e9f2f5"
|
||||
theme.fg_minimize = "#4b5456"
|
||||
theme.taglist_fg_empty = "#566063"
|
||||
theme.fg_normal = "#a9d6ca" -- hsl(165deg 35% 75%)"
|
||||
theme.fg_focus = "#363d3e"
|
||||
theme.fg_urgent = "#e9f2f5"
|
||||
theme.fg_minimize = "#4b5456"
|
||||
theme.taglist_fg_empty = "#62847b" -- hsl(165deg 15% 45%)"
|
||||
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#bebebe"
|
||||
theme.border_focus = "#ff7f50"
|
||||
theme.border_marked = "#91231c"
|
||||
theme.useless_gap = dpi(1)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#bebebe"
|
||||
theme.border_focus = "#ff7f50"
|
||||
theme.border_marked = "#91231c"
|
||||
|
||||
theme.bg_wallpaper = "#b0bec2"
|
||||
theme.bg_wallpaper = "#b0bec2"
|
||||
|
||||
theme.hotkeys_font = theme.font
|
||||
theme.hotkeys_description_font = theme.font
|
||||
theme.hotkeys_bg = theme.border_normal
|
||||
theme.hotkeys_modifiers_fg = theme.bg_focus
|
||||
|
||||
-- You can use your own layout icons like this:
|
||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
|
||||
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
|
||||
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
|
||||
theme.layout_max = themes_path .. "default/layouts/maxw.png"
|
||||
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
|
||||
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
|
||||
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
|
||||
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
|
||||
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
|
||||
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
|
||||
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
|
||||
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
|
||||
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
|
||||
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
|
||||
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
|
||||
theme.layout_fairh = themes_path .. "default/layouts/fairhw.png"
|
||||
theme.layout_fairv = themes_path .. "default/layouts/fairvw.png"
|
||||
theme.layout_floating = themes_path .. "default/layouts/floatingw.png"
|
||||
theme.layout_magnifier = themes_path .. "default/layouts/magnifierw.png"
|
||||
theme.layout_max = themes_path .. "default/layouts/maxw.png"
|
||||
theme.layout_fullscreen = themes_path .. "default/layouts/fullscreenw.png"
|
||||
theme.layout_tilebottom = themes_path .. "default/layouts/tilebottomw.png"
|
||||
theme.layout_tileleft = themes_path .. "default/layouts/tileleftw.png"
|
||||
theme.layout_tile = themes_path .. "default/layouts/tilew.png"
|
||||
theme.layout_tiletop = themes_path .. "default/layouts/tiletopw.png"
|
||||
theme.layout_spiral = themes_path .. "default/layouts/spiralw.png"
|
||||
theme.layout_dwindle = themes_path .. "default/layouts/dwindlew.png"
|
||||
theme.layout_cornernw = themes_path .. "default/layouts/cornernww.png"
|
||||
theme.layout_cornerne = themes_path .. "default/layouts/cornernew.png"
|
||||
theme.layout_cornersw = themes_path .. "default/layouts/cornersww.png"
|
||||
theme.layout_cornerse = themes_path .. "default/layouts/cornersew.png"
|
||||
|
||||
return theme
|
||||
|
@ -1,37 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
REQUIRED="$1"
|
||||
|
||||
check_dependency() {
|
||||
local CMD="$1"
|
||||
shift
|
||||
for REQ in "$@"; do
|
||||
if [ "$REQ" = "$REQUIRED" ]; then
|
||||
which "$CMD"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
echo '# required:'
|
||||
for CMD in \
|
||||
zsh \
|
||||
git \
|
||||
cc \
|
||||
make \
|
||||
setxkbmap \
|
||||
slock \
|
||||
systemctl \
|
||||
xmodmap \
|
||||
xrandr \
|
||||
xrdb \
|
||||
xset \
|
||||
xsetroot \
|
||||
hsetroot \
|
||||
xsettingsd \
|
||||
sed \
|
||||
pkill \
|
||||
dmenu \
|
||||
dmenu_run \
|
||||
xss-lock \
|
||||
exa \
|
||||
fzf \
|
||||
; do
|
||||
which "$CMD"
|
||||
done
|
||||
|
||||
check_dependency zsh dwm hypr
|
||||
check_dependency git dwm hypr
|
||||
check_dependency cc dwm
|
||||
check_dependency make dwm
|
||||
check_dependency setxkbmap dwm
|
||||
check_dependency slock dwm
|
||||
check_dependency systemctl dwm hypr
|
||||
check_dependency xmodmap dwm
|
||||
check_dependency xrandr dwm
|
||||
check_dependency xrdb dwm
|
||||
check_dependency xset dwm
|
||||
check_dependency xsetroot dwm
|
||||
check_dependency hsetroot dwm
|
||||
check_dependency xsettingsd dwm
|
||||
check_dependency sed dwm hypr
|
||||
check_dependency pkill dwm
|
||||
check_dependency dmenu dwm
|
||||
check_dependency dmenu_run dwm
|
||||
check_dependency xss-lock dwm
|
||||
check_dependency exa dwm hypr
|
||||
check_dependency fzf dwm hypr
|
||||
check_dependency Hyprland hypr
|
||||
check_dependency hyprctl hypr
|
||||
check_dependency alacritty hypr
|
||||
check_dependency swaylock hypr
|
||||
check_dependency waybar hypr
|
||||
check_dependency wofi hypr
|
||||
|
||||
echo -e '\n# optional:'
|
||||
for CMD in \
|
||||
sx \
|
||||
picom \
|
||||
compton \
|
||||
xbacklight; do
|
||||
which "$CMD"
|
||||
done
|
||||
|
||||
check_dependency sx dwm
|
||||
check_dependency picom dwm
|
||||
check_dependency compton dwm
|
||||
check_dependency xbacklight dwm
|
||||
check_dependency wl-copy hypr
|
||||
check_dependency wl-paste hypr
|
||||
|
@ -8,7 +8,7 @@ input {
|
||||
general {
|
||||
gaps_in = 3
|
||||
gaps_out = 4
|
||||
layout = dwindle
|
||||
layout = master
|
||||
border_size = 3
|
||||
col.inactive_border = 0xff5387ac
|
||||
col.active_border = 0xffac7853
|
||||
@ -19,12 +19,11 @@ dwindle {
|
||||
}
|
||||
|
||||
decoration {
|
||||
drop_shadow = true
|
||||
rounding = 4
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
enabled = false
|
||||
}
|
||||
|
||||
misc {
|
||||
@ -39,14 +38,14 @@ binds {
|
||||
}
|
||||
|
||||
$menu = wofi -S run
|
||||
$terminal = alacritty
|
||||
$terminal = alacritty || kitty
|
||||
|
||||
$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 ALT, Return, exec, $terminal
|
||||
bind = $mainMod, Return, layoutmsg,swapwithmaster master
|
||||
bind = $mainMod CONTROL SHIFT, Q, exit
|
||||
bind = $mainMod, Q, exec, hyprctl reload
|
||||
bind = $mainMod CONTROL SHIFT, C, killactive
|
||||
|
@ -1,10 +1,10 @@
|
||||
* {
|
||||
background-color: #352f2d;
|
||||
color: #afa099;
|
||||
background-color: #3f4947;
|
||||
color: #9bafac;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid #afa099;
|
||||
border-bottom: 3px solid #9bafac;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
|
@ -1,10 +1,11 @@
|
||||
* {
|
||||
background-color: #e1dcd9;
|
||||
color: #2c363c;
|
||||
background-color: #dde4e3;
|
||||
color: #2c3131;
|
||||
}
|
||||
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid #2c363c;
|
||||
border-bottom: 3px solid #2c3131;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
|
32
kitty/.config/kitty/kitty.conf
Normal file
32
kitty/.config/kitty/kitty.conf
Normal file
@ -0,0 +1,32 @@
|
||||
font_family FiraCode Nerd
|
||||
font_size 11
|
||||
|
||||
cursor_blink_interval 0
|
||||
|
||||
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title} {index}"
|
||||
|
||||
action_alias launch_tab launch --type=tab --cwd=current
|
||||
|
||||
map ctrl+shift+n launch_tab tmux
|
||||
map ctrl+shift+t launch_tab tmux attach
|
||||
map ctrl+shift+s launch_tab zsh
|
||||
map ctrl+shift+6 no_op
|
||||
|
||||
map ctrl+shift+h previous_tab
|
||||
map ctrl+shift+l next_tab
|
||||
map ctrl+shift+p goto_tab -1
|
||||
map ctrl+alt+1 goto_tab 1
|
||||
map ctrl+alt+2 goto_tab 2
|
||||
map ctrl+alt+3 goto_tab 3
|
||||
map ctrl+alt+4 goto_tab 4
|
||||
map ctrl+alt+5 goto_tab 5
|
||||
map ctrl+alt+6 goto_tab 6
|
||||
map ctrl+alt+7 goto_tab 7
|
||||
map ctrl+alt+8 goto_tab 8
|
||||
map ctrl+alt+9 goto_tab 9
|
||||
map ctrl+alt+0 goto_tab 10
|
||||
|
||||
# BEGIN_KITTY_THEME
|
||||
# Afterglow
|
||||
include current-theme.conf
|
||||
# END_KITTY_THEME
|
@ -1,62 +1,75 @@
|
||||
{
|
||||
"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" },
|
||||
"LuaSnip": { "branch": "master", "commit": "faf3c94a44508cec1b961406d36cc65113ff3b98" },
|
||||
"arrow.nvim": { "branch": "master", "commit": "6e0f726f55f99332dd726a53effd6813786b6d49" },
|
||||
"blame.nvim": { "branch": "main", "commit": "b87b8c820e4cec06fbbd2f946b7b35c45906ee0c" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "9d1a256e006decc574789dfc7d628ca11644d4c2" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "f643d1b51d1d3d14c8641a46ce44f6bce73c2697" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"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" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
|
||||
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
|
||||
"go.nvim": { "branch": "master", "commit": "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" },
|
||||
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
|
||||
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
|
||||
"guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
|
||||
"hererocks": { "branch": "master", "commit": "344c46ed54df9a4dbc2d2bf510dcd9a9d90497bf" },
|
||||
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
|
||||
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
|
||||
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
|
||||
"kanagawa-paper.nvim": { "branch": "master", "commit": "b0df20cca3b7087c06f241983b488190cc8e23af" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazyjj.nvim": { "branch": "main", "commit": "bba66a1351ff1f1bd078c8a1b00b8d12b3ed0017" },
|
||||
"leap.nvim": { "branch": "main", "commit": "08ca7ec9e859856251d56c22ea107f82f563ff3c" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
|
||||
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2682b0d9732bf52cbc34862056f143e71dc4a6d" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "93a9ff9b34c91c0cb0f7de8d5f7e4abce51d8903" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"namu.nvim": { "branch": "main", "commit": "a3a3d81d12b61a38f131253bcd3ce5e2c6599850" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "7fe60f9aa6eacf2eb730c4e9b83d06a36d028161" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
|
||||
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"oil.nvim": { "branch": "master", "commit": "5b6068aad7d2057dd399fac73b7fb2cdf23ccd6e" },
|
||||
"orgmode": { "branch": "master", "commit": "32ef9e95f43a6e951fb931b438372546a4f0c524" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "51d3926f183c2d98fbc237cc237ae0926839af3a" },
|
||||
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
|
||||
"slimline.nvim": { "branch": "main", "commit": "10dd807685997d1b72b950dfb4ec1a01cb259101" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"snipe.nvim": { "branch": "main", "commit": "2a1b738dfae8502e6162eddfc774da65ed404142" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-git-grep.nvim": { "branch": "main", "commit": "d2e1322934e334ee9eb8e838c30f3afb3e7a730e" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "9ca0800d4e9c2610d5cac4d121cde0d9fbd89a64" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"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" }
|
||||
}
|
||||
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"tree-sitter-nu": { "branch": "main", "commit": "100d06e29d13a8ebfc3f29173c07a5c4f2050586" },
|
||||
"tree-sitter-templ": { "branch": "master", "commit": "de35706f89beed5087670a9c4421b7794ef02411" },
|
||||
"treesj": { "branch": "main", "commit": "3b4a2bc42738a63de17e7485d4cc5e49970ddbcc" },
|
||||
"treewalker.nvim": { "branch": "main", "commit": "86ae3cf9896b43f3cfa35b962428f32fed8b5ee8" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-ReplaceWithRegister": { "branch": "master", "commit": "a487af6efd1be3fc6fac8da47d00efc9d1f6f724" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "2900a1617b3df1a48683d872eadbe1101146a49a" },
|
||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"whaler": { "branch": "main", "commit": "b3a4257f6225a9a6c42f33b56ca316325e395f22" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" }
|
||||
}
|
||||
|
@ -16,11 +16,3 @@ vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
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,
|
||||
})
|
||||
|
@ -31,7 +31,7 @@ vim.wo.signcolumn = 'yes'
|
||||
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeoutlen = 300
|
||||
vim.o.timeout = false
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
@ -52,3 +52,5 @@ vim.g.lightspeed_no_default_keymaps = true
|
||||
vim.o.cursorline = true
|
||||
|
||||
vim.opt.foldcolumn = '1'
|
||||
|
||||
vim.opt.laststatus = 3
|
||||
|
@ -1,5 +1,5 @@
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.g.maplocalleader = ' \\'
|
||||
|
||||
local key = vim.keymap.set
|
||||
local opts = { silent = true, noremap = true }
|
||||
@ -10,8 +10,6 @@ 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", "<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" })
|
||||
|
||||
-- tabs
|
||||
@ -36,6 +34,12 @@ for i = 1, 9, 1 do
|
||||
key('n', '<leader>t' .. i, '<cmd>' .. i .. 'tabnext<CR>', { desc = '[T]ab nr [' .. i .. ']' })
|
||||
end
|
||||
|
||||
-- translations
|
||||
|
||||
key('n', '<leader>tr', function()
|
||||
require('lupan.ui').find_translation_key()
|
||||
end, { desc = '[T][r]anlation key find' })
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
@ -47,7 +51,7 @@ key('n', '<leader>P', '<cmd>bp<CR>', { desc = '[P]revious buffer' })
|
||||
|
||||
key('n', '<leader>tc', '<cmd>tabnew<CR>', { desc = '[T]ab [c]reate' })
|
||||
key('n', '<leader>tx', '<cmd>tabclose<CR>', { desc = '[T]ab close' })
|
||||
key('n', '<leader>ts', '<cmd>tab split<CR>', { desc = '[T]ab [s]plit' })
|
||||
key('n', '<leader>tS', '<cmd>tab split<CR>', { desc = '[T]ab [s]plit' })
|
||||
key('n', '<leader>tn', '<cmd>tabnext<CR>', { desc = '[T]ab [n]ext' })
|
||||
key('n', '<leader>tp', '<cmd>tabprevious<CR>', { desc = '[T]ab [p]revious' })
|
||||
key('n', '<leader>tf', '<cmd>tabfirst<CR>', { desc = '[T]ab [f]irst' })
|
||||
@ -79,7 +83,8 @@ key('n', '<leader>j', '<cmd>cn<CR>', { desc = "Quickfix next" })
|
||||
key('n', '<leader>k', '<cmd>cp<CR>', { desc = "Quickfix previous" })
|
||||
key('n', '<leader>co', '<cmd>copen<CR>', { desc = "Quickfix [O]pen" })
|
||||
key('n', '<leader>cc', '<cmd>cclose<CR>', { desc = "Quickfix [C]lose" })
|
||||
key('n', '<leader>ct', '<cmd>TroubleToggle<CR>', { desc = "Toggle [T]rouble" })
|
||||
|
||||
key('n', '<leader>s;', '<cmd>SessionSelect<CR>', { desc = '[S]ession Select' })
|
||||
|
||||
-- luasnip
|
||||
|
||||
@ -109,10 +114,4 @@ vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasn
|
||||
|
||||
-- colors
|
||||
|
||||
key('n', '<F6>', function()
|
||||
if vim.o.background == "dark" then
|
||||
vim.o.background = "light"
|
||||
else
|
||||
vim.o.background = "dark"
|
||||
end
|
||||
end)
|
||||
key('n', '<F6>', function() require('lupan.utils').toggle_color_scheme() end, { desc = 'Toggle background' })
|
||||
|
@ -41,4 +41,29 @@ function M.tab_change_dir_newtab()
|
||||
M.tab_change_dir({ action = tabnew_tcd, prompt_title = "Tab change directory (new tab)" })
|
||||
end
|
||||
|
||||
local function append_text(text)
|
||||
text = string.gsub(text, "^ + %w+%.([%w%p]+) +.*", "%1")
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
vim.api.nvim_buf_set_text(0, row - 1, col, row - 1, col, { text })
|
||||
end
|
||||
|
||||
function M.find_translation_key(opts)
|
||||
opts = opts or {}
|
||||
local action = opts.action or append_text
|
||||
local prompt_title = opts.prompt_title or "Get translation key"
|
||||
local cmd = { 'list-translation-keys' }
|
||||
local dropdown = themes.get_dropdown();
|
||||
local picker_opts = {
|
||||
prompt_title = prompt_title,
|
||||
finder = finders.new_oneshot_job(cmd, {}),
|
||||
sorter = sorters.get_fuzzy_file({}),
|
||||
attach_mappings = function(_, map)
|
||||
map({ "i", "n" }, "<CR>", function(prompt_bufnr) enter(prompt_bufnr, action) end)
|
||||
return true
|
||||
end
|
||||
}
|
||||
local find_translation_key = pickers.new(dropdown, picker_opts)
|
||||
find_translation_key:find()
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -1,7 +1,15 @@
|
||||
local M = {}
|
||||
|
||||
local filename = os.getenv('HOME') .. '/.config/alacritty/alacritty.toml'
|
||||
|
||||
local colorschemes = nil
|
||||
|
||||
function M.set_color_schemes(dark, light)
|
||||
colorschemes = { dark = dark, light = light }
|
||||
end
|
||||
|
||||
function M.terminalbg()
|
||||
local ok, lines = pcall(io.lines, os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
|
||||
local ok, lines = pcall(io.lines, filename)
|
||||
if ok then
|
||||
for line in lines do
|
||||
if string.find(line, 'light.toml') then
|
||||
@ -12,4 +20,34 @@ function M.terminalbg()
|
||||
return "dark"
|
||||
end
|
||||
|
||||
function M.update_color_scheme()
|
||||
vim.o.background = M.terminalbg()
|
||||
if colorschemes then
|
||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||
end
|
||||
end
|
||||
|
||||
function M.toggle_color_scheme()
|
||||
if vim.o.background == "dark" then
|
||||
vim.o.background = "light"
|
||||
else
|
||||
vim.o.background = "dark"
|
||||
end
|
||||
if colorschemes then
|
||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||
end
|
||||
end
|
||||
|
||||
local w = vim.uv.new_fs_event()
|
||||
|
||||
local function watch(fname)
|
||||
w:start(filename, {}, vim.schedule_wrap(function(...)
|
||||
M.update_color_scheme()
|
||||
w:stop()
|
||||
watch(fname)
|
||||
end))
|
||||
end
|
||||
|
||||
watch(filename)
|
||||
|
||||
return M
|
||||
|
@ -1,22 +1,10 @@
|
||||
return {
|
||||
{
|
||||
-- Colorscheme
|
||||
'zenbones-theme/zenbones.nvim',
|
||||
dependencies = { 'rktjmp/lush.nvim' },
|
||||
'thesimonho/kanagawa-paper.nvim',
|
||||
config = function()
|
||||
vim.o.background = require('lupan.utils').terminalbg()
|
||||
vim.cmd.colorscheme('zenbones')
|
||||
end,
|
||||
vim.cmd.colorscheme('kanagawa-paper')
|
||||
end
|
||||
},
|
||||
"slugbyte/lackluster.nvim",
|
||||
"folke/tokyonight.nvim",
|
||||
{
|
||||
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = "ibl",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
{
|
||||
--- Create Color Code
|
||||
'uga-rosa/ccc.nvim',
|
||||
|
@ -1,22 +0,0 @@
|
||||
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 },
|
||||
}
|
||||
}
|
||||
}
|
@ -74,5 +74,8 @@ return {
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
cmp.setup.filetype('lisp', {
|
||||
sources = cmp.config.sources({ { name = 'nvlime' } })
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
@ -1,18 +1,56 @@
|
||||
return {
|
||||
{
|
||||
"LintaoAmons/bookmarks.nvim",
|
||||
tag = "v0.5.3", -- optional, pin the plugin at specific version for stability
|
||||
"otavioschwanck/arrow.nvim",
|
||||
dependencies = {
|
||||
{ "stevearc/dressing.nvim" } -- optional: to have the same UI shown in the GIF
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
show_icons = true,
|
||||
leader_key = '-', -- Recommended to be a single key
|
||||
buffer_leader_key = '+', -- Per Buffer Mappings
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"leath-dub/snipe.nvim",
|
||||
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" },
|
||||
{ "_", function() require("snipe").open_buffer_menu() end, desc = "Open Snipe buffer menu" }
|
||||
},
|
||||
opts = {}
|
||||
},
|
||||
|
||||
{
|
||||
"chentoast/marks.nvim",
|
||||
event = "VeryLazy",
|
||||
config = true,
|
||||
keys = {
|
||||
{ '<leader>ma', '<cmd>MarksListAll<CR>' },
|
||||
{ '<leader>mb', '<cmd>MarksListBuf<CR>' },
|
||||
{ '<leader>mg', '<cmd>MarksListGlobal<CR>' },
|
||||
},
|
||||
},
|
||||
{ "nvim-telescope/telescope.nvim", lazy = true },
|
||||
|
||||
{
|
||||
"bassamsdata/namu.nvim",
|
||||
config = function()
|
||||
require("namu").setup({
|
||||
-- Enable the modules you want
|
||||
namu_symbols = {
|
||||
enable = true,
|
||||
options = {}, -- here you can configure namu
|
||||
},
|
||||
-- Optional: Enable other modules if needed
|
||||
ui_select = { enable = false }, -- vim.ui.select() wrapper
|
||||
})
|
||||
-- === Suggested Keymaps: ===
|
||||
vim.keymap.set("n", "<leader>;", ":Namu symbols<cr>", {
|
||||
desc = "Jump to LSP symbol",
|
||||
silent = true,
|
||||
})
|
||||
vim.keymap.set("n", "<leader>.", ":Namu workspace<cr>", {
|
||||
desc = "LSP Symbols - Workspace",
|
||||
silent = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
@ -2,24 +2,22 @@ return {
|
||||
{
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter',
|
||||
opts = {
|
||||
preset = 'helix',
|
||||
delay = 1000,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('which-key').setup(opts)
|
||||
|
||||
-- Document existing key chains
|
||||
require('which-key').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' },
|
||||
require('which-key').add {
|
||||
{ "<leader>c", group = "[C]ode/Color" },
|
||||
{ "<leader>d", group = "[D]ocument" },
|
||||
{ "<leader>g", group = "[G]it" },
|
||||
{ "<leader>r", group = "[R]ename" },
|
||||
{ "<leader>s", group = "[S]earch" },
|
||||
{ "<leader>w", group = "[W]orkspace" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"max397574/better-escape.nvim",
|
||||
config = function(_, opts)
|
||||
require("better_escape").setup(opts)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -13,10 +13,75 @@ return {
|
||||
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
version = "^3.0.0", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-surround").setup(opts)
|
||||
end
|
||||
config = true,
|
||||
},
|
||||
|
||||
{
|
||||
'inkarkat/vim-ReplaceWithRegister',
|
||||
keys = {
|
||||
{ '<leader>rp', '<Plug>ReplaceWithRegisterOperator' },
|
||||
{ '<leader>rpp', '<Plug>ReplaceWithRegisterLine' },
|
||||
{ '<leader>rp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'ggandor/leap.nvim',
|
||||
opts = {
|
||||
safe_labels = {},
|
||||
},
|
||||
dependencies = {
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
keys = {
|
||||
{ '\\', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
|
||||
{ 'gs', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
'Wansmer/treesj',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||
opts = {
|
||||
use_default_keymaps = false,
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>tg', function() require('treesj').toggle() end, desc = "[T]ree to[g]gle one-line" },
|
||||
{ '<leader>tj', function() require('treesj').join() end, desc = "[T]ree [J]oin one-line" },
|
||||
{ '<leader>ts', function() require('treesj').split() end, desc = "[T]ree [S]plit one-line" },
|
||||
},
|
||||
},
|
||||
|
||||
-- rehighlight search on n or N
|
||||
{
|
||||
'nvimdev/hlsearch.nvim',
|
||||
event = 'BufRead',
|
||||
config = true,
|
||||
},
|
||||
|
||||
{
|
||||
'mizlan/iswap.nvim',
|
||||
event = 'VeryLazy',
|
||||
keys = {
|
||||
{ '<leader>cs', '<cmd>ISwapWith<CR>', desc = 'I[S]wap' },
|
||||
{ '<leader>cS', '<cmd>ISwap<CR>', desc = 'I[S]wapWith' },
|
||||
{ '<leader>cn', '<cmd>ISwapNodeWith<CR>', desc = 'ISwap[N]ode' },
|
||||
{ '<leader>cN', '<cmd>ISwapNode<CR>', desc = 'ISwap[N]ode' },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'aaronik/treewalker.nvim',
|
||||
keys = {
|
||||
{ '<leader>ch', '<cmd>Treewalker Left<CR>', desc = 'Tree Left' },
|
||||
{ '<leader>cj', '<cmd>Treewalker Down<CR>', desc = 'Tree Down' },
|
||||
{ '<leader>ck', '<cmd>Treewalker Up<CR>', desc = 'Tree Up' },
|
||||
{ '<leader>cl', '<cmd>Treewalker Right<CR>', desc = 'Tree Right' },
|
||||
{ '<leader>cJ', '<cmd>Treewalker SwapDown<CR>', desc = 'Tree Swap Down' },
|
||||
{ '<leader>cK', '<cmd>Treewalker SwapUp<CR>', desc = 'Tree Swap Up' },
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -1,243 +0,0 @@
|
||||
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,
|
||||
}
|
13
nvim/.config/nvim/lua/plugins/file-explorer.lua
Normal file
13
nvim/.config/nvim/lua/plugins/file-explorer.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
{
|
||||
'stevearc/oil.nvim',
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
delete_to_trash = true,
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>-", "<cmd>Oil<CR>", desc = "Open parent directory" },
|
||||
},
|
||||
},
|
||||
}
|
@ -64,8 +64,8 @@ return {
|
||||
{ buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
|
||||
vim.keymap.set('n', '<leader>ph', gs.preview_hunk,
|
||||
{ buffer = bufnr, desc = '[P]review [H]unk' })
|
||||
vim.keymap.set('n', '<leader>sh', gs.stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage [H]unk' })
|
||||
vim.keymap.set('n', '<leader>sA', gs.stage_hunk,
|
||||
{ buffer = bufnr, desc = '[S]tage Hunk' })
|
||||
vim.keymap.set('n', '<leader>HD', function() gs.diffthis('~') end,
|
||||
{ buffer = bufnr, desc = '[H]unk [D]iff' })
|
||||
end,
|
||||
|
@ -2,11 +2,11 @@ return {
|
||||
'backdround/global-note.nvim',
|
||||
keys = {
|
||||
{
|
||||
"<leader>n",
|
||||
"<leader>tn",
|
||||
function()
|
||||
require('global-note').toggle_note()
|
||||
end,
|
||||
desc = 'Toggle global [N]ote',
|
||||
desc = '[T]oggle global [N]ote',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
24
nvim/.config/nvim/lua/plugins/godoc.lua
Normal file
24
nvim/.config/nvim/lua/plugins/godoc.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
{
|
||||
'fredrikaverpil/godoc.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
{ 'nvim-telescope/telescope.nvim' },
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
opts = {
|
||||
ensure_installed = { 'go' },
|
||||
},
|
||||
},
|
||||
},
|
||||
event = 'VeryLazy',
|
||||
cmd = 'GoDoc',
|
||||
keys = {
|
||||
{ '<leader>gd', '<cmd>GoDoc<CR>', desc = '[G]o[D]oc' },
|
||||
},
|
||||
build = 'go install github.com/lotusirous/gostdsym/stdsym@latest',
|
||||
opts = {
|
||||
picker = { type = 'telescope' },
|
||||
},
|
||||
},
|
||||
}
|
16
nvim/.config/nvim/lua/plugins/http.lua
Normal file
16
nvim/.config/nvim/lua/plugins/http.lua
Normal file
@ -0,0 +1,16 @@
|
||||
return {
|
||||
{
|
||||
"rest-nvim/rest.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
table.insert(opts.ensure_installed, "http")
|
||||
end,
|
||||
},
|
||||
ft = 'http',
|
||||
keys = {
|
||||
{ '<leader>S', '<cmd>Rest run<CR>', ft = 'http' },
|
||||
},
|
||||
},
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'crusj/hierarchy-tree-go.nvim',
|
||||
dependencies = 'neovim/nvim-lspconfig',
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
{
|
||||
'ggandor/leap.nvim',
|
||||
opts = {
|
||||
safe_labels = {},
|
||||
},
|
||||
dependencies = {
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
keys = {
|
||||
{ 'gs', '<Plug>(leap)', mode = { 'n', 'x', 'o' } },
|
||||
{ 'gS', '<Plug>(leap-from-window)', mode = { 'n', 'x', 'o' } },
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"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" },
|
||||
},
|
||||
},
|
||||
}
|
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
9
nvim/.config/nvim/lua/plugins/jj.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
{
|
||||
'swaits/lazyjj.nvim',
|
||||
dependencies = 'nvim-lua/plenary.nvim',
|
||||
opts = {
|
||||
mapping = '<leader>gj'
|
||||
}
|
||||
},
|
||||
}
|
25
nvim/.config/nvim/lua/plugins/line.lua
Normal file
25
nvim/.config/nvim/lua/plugins/line.lua
Normal file
@ -0,0 +1,25 @@
|
||||
vim.opt.fillchars = {
|
||||
stl = "─",
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
"sschleemilch/slimline.nvim",
|
||||
opts = {
|
||||
spaces = {
|
||||
components = "─",
|
||||
left = "─",
|
||||
right = "─",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'b0o/incline.nvim',
|
||||
config = function()
|
||||
require('incline').setup()
|
||||
end,
|
||||
-- Optional: Lazy load Incline
|
||||
event = 'VeryLazy',
|
||||
},
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||
'williamboman/mason.nvim',
|
||||
@ -19,17 +20,10 @@ return {
|
||||
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
map('<leader>rn', '<cmd>Lspsaga rename<CR>', '[R]e[n]ame')
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
||||
map('K', '<cmd>Lspsaga hover_doc<CR>', 'Hover Documentation')
|
||||
map('<leader>K', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
|
||||
-- Highlight references under cursor (clear highlight when cursor moves).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
@ -38,7 +32,7 @@ return {
|
||||
buffer = event.buf,
|
||||
callback = function()
|
||||
local clients = vim.lsp.get_clients({ bufnr = event.buf })
|
||||
for _i, cl in ipairs(clients) do
|
||||
for _, cl in ipairs(clients) do
|
||||
if cl.name == 'unocss' then
|
||||
return -- skip highlight if unocss is attached (workaround)
|
||||
end
|
||||
@ -63,7 +57,7 @@ return {
|
||||
gopls = {},
|
||||
-- pyright = {},
|
||||
rust_analyzer = {},
|
||||
tsserver = {},
|
||||
ts_ls = {},
|
||||
|
||||
lua_ls = {
|
||||
settings = {
|
||||
@ -120,6 +114,7 @@ return {
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'nvimdev/lspsaga.nvim',
|
||||
dependencies = {
|
||||
@ -154,4 +149,19 @@ return {
|
||||
vim.keymap.set({ 'n', 't' }, '<C-_>', '<cmd>Lspsaga term_toggle<CR>', { desc = "[L]spsaga [T]erm toggle" })
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
cmd = 'Trouble'
|
||||
},
|
||||
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
-- cfg options
|
||||
},
|
||||
}
|
||||
}
|
||||
|
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
49
nvim/.config/nvim/lua/plugins/odin.lua
Normal file
@ -0,0 +1,49 @@
|
||||
require 'lspconfig'.ols.setup {}
|
||||
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
-- notify_on_error = false,
|
||||
-- Odinfmt gets its configuration from odinfmt.json. It defaults
|
||||
-- writing to stdout but needs to be told to read from stdin.
|
||||
formatters = {
|
||||
odinfmt = {
|
||||
-- Change where to find the command if it isn't in your path.
|
||||
command = "odinfmt",
|
||||
args = { "-stdin" },
|
||||
stdin = true,
|
||||
},
|
||||
},
|
||||
-- and instruct conform to use odinfmt.
|
||||
formatters_by_ft = {
|
||||
odin = { "odinfmt" },
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_format = "fallback" }
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
@ -7,10 +7,8 @@ return {
|
||||
"~/.config",
|
||||
"~/tmp",
|
||||
"/tmp",
|
||||
{ "~", exact = true },
|
||||
{ "/", exact = true },
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>sp", "<cmd>:Telescope persisted<cr>", desc = "Search [P]ersisted" },
|
||||
},
|
||||
}
|
||||
|
7
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
7
nvim/.config/nvim/lua/plugins/quicker.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
'stevearc/quicker.nvim',
|
||||
event = "FileType qf",
|
||||
---@module "quicker"
|
||||
---@type quicker.SetupOptions
|
||||
opts = {},
|
||||
}
|
171
nvim/.config/nvim/lua/plugins/snacks.lua
Normal file
171
nvim/.config/nvim/lua/plugins/snacks.lua
Normal file
@ -0,0 +1,171 @@
|
||||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
dashboard = { enabled = false },
|
||||
explorer = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
input = { enabled = true },
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
picker = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
scope = { enabled = true },
|
||||
scroll = { enabled = false },
|
||||
statuscolumn = { enabled = true },
|
||||
words = { enabled = true },
|
||||
styles = {
|
||||
notification = {
|
||||
-- wo = { wrap = true } -- Wrap notifications
|
||||
}
|
||||
},
|
||||
zen = {
|
||||
win = { width = 180, backdrop = { transparent = false } },
|
||||
on_open = function()
|
||||
vim.opt.laststatus = 1
|
||||
require('incline').disable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
|
||||
end,
|
||||
on_close = function()
|
||||
vim.opt.laststatus = 3
|
||||
require('incline').enable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
|
||||
end
|
||||
}
|
||||
},
|
||||
keys = {
|
||||
-- Top Pickr & Explorer
|
||||
{ "<leader><space>", function() Snacks.picker.smart() end, desc = "Smart Find Files" },
|
||||
{ "<leader>,", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>/", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>:", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader>n", function() Snacks.picker.notifications() end, desc = "Notification History" },
|
||||
{ "<leader>e", function() Snacks.explorer() end, desc = "File Explorer" },
|
||||
-- find
|
||||
{ "<leader>fb", function() Snacks.picker.buffers() end, desc = "Buffers" },
|
||||
{ "<leader>fc", function() Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) end, desc = "Find Config File" },
|
||||
{ "<leader>ff", function() Snacks.picker.files() end, desc = "Find Files" },
|
||||
{ "<leader>fg", function() Snacks.picker.git_files() end, desc = "Find Git Files" },
|
||||
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||
{ "<leader>fr", function() Snacks.picker.recent() end, desc = "Recent" },
|
||||
-- git
|
||||
{ "<leader>gb", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
|
||||
{ "<leader>gl", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||
{ "<leader>gL", function() Snacks.picker.git_log_line() end, desc = "Git Log Line" },
|
||||
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (Hunks)" },
|
||||
{ "<leader>gf", function() Snacks.picker.git_log_file() end, desc = "Git Log File" },
|
||||
{ "<leader>gg", function() Snacks.picker.git_grep() end, desc = "Git Grep" },
|
||||
-- Grep
|
||||
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||
{ "<leader>sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" },
|
||||
{ "<leader>sg", function() Snacks.picker.grep() end, desc = "Grep" },
|
||||
{ "<leader>sw", function() Snacks.picker.grep_word() end, desc = "Visual selection or word", mode = { "n", "x" } },
|
||||
{ "<leader>so", function() Snacks.picker.grep({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||
{ "<leader>sO", function() Snacks.picker.files({ cwd = "/usr/lib/odin" }) end, desc = "Grep" },
|
||||
{ "<leader>sX", function() Snacks.picker.grep({ cwd = "/usr/include/xcb" }) end, desc = "Grep" },
|
||||
-- search
|
||||
{ '<leader>s"', function() Snacks.picker.registers() end, desc = "Registers" },
|
||||
{ '<leader>s/', function() Snacks.picker.search_history() end, desc = "Search History" },
|
||||
{ "<leader>sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" },
|
||||
{ "<leader>sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" },
|
||||
{ "<leader>sc", function() Snacks.picker.command_history() end, desc = "Command History" },
|
||||
{ "<leader>sC", function() Snacks.picker.commands() end, desc = "Commands" },
|
||||
{ "<leader>sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" },
|
||||
{ "<leader>sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" },
|
||||
{ "<leader>sh", function() Snacks.picker.help() end, desc = "Help Pages" },
|
||||
{ "<leader>sH", function() Snacks.picker.highlights() end, desc = "Highlights" },
|
||||
{ "<leader>si", function() Snacks.picker.icons() end, desc = "Icons" },
|
||||
{ "<leader>sj", function() Snacks.picker.jumps() end, desc = "Jumps" },
|
||||
{ "<leader>sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" },
|
||||
{ "<leader>sl", function() Snacks.picker.loclist() end, desc = "Location List" },
|
||||
{ "<leader>sm", function() Snacks.picker.marks() end, desc = "Marks" },
|
||||
{ "<leader>sM", function() Snacks.picker.man() end, desc = "Man Pages" },
|
||||
{ "<leader>sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" },
|
||||
{ "<leader>sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" },
|
||||
{ "<leader>sR", function() Snacks.picker.resume() end, desc = "Resume" },
|
||||
{ "<leader>su", function() Snacks.picker.undo() end, desc = "Undo History" },
|
||||
{ "<leader>uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" },
|
||||
-- LSP
|
||||
{ "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition" },
|
||||
{ "gD", function() Snacks.picker.lsp_declarations() end, desc = "Goto Declaration" },
|
||||
{ "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" },
|
||||
{ "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" },
|
||||
{ "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" },
|
||||
{ "<leader>ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols" },
|
||||
{ "<leader>sS", function() Snacks.picker.lsp_workspace_symbols() end, desc = "LSP Workspace Symbols" },
|
||||
-- Other
|
||||
{ "<leader>z", function() Snacks.zen() end, desc = "Toggle Zen Mode" },
|
||||
{ "<leader>Z", function() Snacks.zen.zoom() end, desc = "Toggle Zoom" },
|
||||
{ "<leader>'", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
|
||||
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
|
||||
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||
{ "<leader>bd", function() Snacks.bufdelete() end, desc = "Delete Buffer" },
|
||||
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File" },
|
||||
{ "<leader>gB", function() Snacks.gitbrowse() end, desc = "Git Browse", mode = { "n", "v" } },
|
||||
{ "<leader>gG", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||
{ "<leader>un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" },
|
||||
{ "<leader>bl", function() Snacks.git.blame_line() end, desc = "Git Blame Line" },
|
||||
{ "<c-/>", function() Snacks.terminal() end, desc = "Toggle Terminal" },
|
||||
{ "<c-_>", function() Snacks.terminal() end, desc = "which_key_ignore" },
|
||||
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
|
||||
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
|
||||
{
|
||||
"<leader>N",
|
||||
desc = "Neovim News",
|
||||
function()
|
||||
Snacks.win({
|
||||
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
wo = {
|
||||
spell = false,
|
||||
wrap = false,
|
||||
signcolumn = "yes",
|
||||
statuscolumn = " ",
|
||||
conceallevel = 3,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map(
|
||||
"<leader>uc")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
|
||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||
Snacks.toggle.indent():map("<leader>ug")
|
||||
Snacks.toggle.dim():map("<leader>uD")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
5
nvim/.config/nvim/lua/plugins/tardis.lua
Normal file
5
nvim/.config/nvim/lua/plugins/tardis.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
'fredeeb/tardis.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = true,
|
||||
}
|
@ -54,48 +54,17 @@ return {
|
||||
pcall(telescope.load_extension, 'ui-select')
|
||||
pcall(telescope.load_extension, 'whaler')
|
||||
pcall(telescope.load_extension, 'git_grep')
|
||||
pcall(telescope.load_extension, 'persisted')
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>sT', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.buffers, { desc = '[ ] Find existing buffers' })
|
||||
vim.keymap.set('n', '<leader>sF', function() builtin.find_files { hidden = true } end,
|
||||
{ desc = '[S]earch [F]iles (with hidden)' })
|
||||
vim.keymap.set('n', '<leader>sl', function() telescope.extensions.whaler.whaler() end,
|
||||
vim.keymap.set('n', '<leader>sL', function() telescope.extensions.whaler.whaler() end,
|
||||
{ desc = '[S]earch with wha[L]er' })
|
||||
vim.keymap.set('n', '<leader>gf', builtin.git_files, { desc = '[G]it [F]iles' })
|
||||
vim.keymap.set('n', '<leader>gs', builtin.git_status, { desc = '[G]it [S]tatus' })
|
||||
vim.keymap.set('n', '<leader>gg', function() telescope.extensions.git_grep.live_grep() end,
|
||||
{ desc = '[G]it [g]rep' })
|
||||
vim.keymap.set('n', '<leader>gw', function() telescope.extensions.git_grep.grep() end,
|
||||
{ desc = '[G]it grep current [W]ord' })
|
||||
|
||||
vim.keymap.set('n', '<leader>/', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s/', function()
|
||||
builtin.live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files',
|
||||
}
|
||||
end, { desc = '[S]earch [/] in Open Files' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
end,
|
||||
}
|
||||
|
||||
|
25
nvim/.config/nvim/lua/plugins/tmux.lua
Normal file
25
nvim/.config/nvim/lua/plugins/tmux.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
'aserowy/tmux.nvim',
|
||||
opts = {
|
||||
navigation = {
|
||||
enable_default_keybindings = false,
|
||||
},
|
||||
resize = {
|
||||
enable_default_keybindings = false,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<M-h>', [[<cmd>lua require("tmux").move_left()<cr>]] },
|
||||
{ '<M-j>', [[<cmd>lua require("tmux").move_bottom()<cr>]] },
|
||||
{ '<M-k>', [[<cmd>lua require("tmux").move_top()<cr>]] },
|
||||
{ '<M-l>', [[<cmd>lua require("tmux").move_right()<cr>]] },
|
||||
{ '<M-n>', [[<cmd>lua require("tmux").next_window()<cr>]] },
|
||||
{ '<M-p>', [[<cmd>lua require("tmux").previous_window()<cr>]] },
|
||||
{ '<M-H>', [[<cmd>lua require("tmux").resize_left()<cr>]] },
|
||||
{ '<M-J>', [[<cmd>lua require("tmux").resize_bottom()<cr>]] },
|
||||
{ '<M-K>', [[<cmd>lua require("tmux").resize_top()<cr>]] },
|
||||
{ '<M-L>', [[<cmd>lua require("tmux").resize_right()<cr>]] },
|
||||
},
|
||||
},
|
||||
}
|
9
nvim/.config/nvim/lua/plugins/toggleterm.lua
Normal file
9
nvim/.config/nvim/lua/plugins/toggleterm.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
'akinsho/toggleterm.nvim',
|
||||
version = '*',
|
||||
config = true,
|
||||
keys = {
|
||||
{ '<F2>', '<cmd>ToggleTerm size=25<CR>', mode = { 'n', 'i', 't', }, },
|
||||
{ '<C-w>', [[<C-\><C-n><C-w>]], mode = 't' },
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ return {
|
||||
|
||||
---@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' },
|
||||
ensure_installed = { 'c', 'commonlisp', 'cpp', 'go', 'haskell', 'lua', 'python', 'rust', 'tsx', 'templ', 'typescript', 'vimdoc', 'vim' },
|
||||
auto_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
@ -46,6 +46,8 @@ return {
|
||||
['il'] = '@call.inner',
|
||||
['ao'] = '@loop.outer',
|
||||
['io'] = '@loop.inner',
|
||||
['ad'] = '@conditional.outer',
|
||||
['id'] = '@conditional.inner',
|
||||
['ar'] = '@return.outer',
|
||||
['ir'] = '@return.inner',
|
||||
['as'] = '@statement.outer',
|
||||
|
12
nvim/.config/nvim/lua/plugins/yankbank.lua
Normal file
12
nvim/.config/nvim/lua/plugins/yankbank.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"ptdewey/yankbank-nvim",
|
||||
dependencies = "kkharji/sqlite.lua",
|
||||
config = function()
|
||||
require('yankbank').setup({
|
||||
persist_type = "sqlite",
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>yb", "<cmd>YankBank<CR>", desc = "Yank[B]ank" },
|
||||
},
|
||||
}
|
3
nvim/.config/nvim/snippets/go/snippets.lua
Normal file
3
nvim/.config/nvim/snippets/go/snippets.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
s("tr", { t "i18n.T(ctx, \"", i(1), t "\")" })
|
||||
}
|
@ -6,7 +6,7 @@ static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "FiraCode Nerd Font Ret:size=10" };
|
||||
static const char dmenufont[] = "FiraCode Nerd Font Ret:size=10";
|
||||
static const char dmenufont[] = "FiraCode Nerd Font Ret:size=10";
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
@ -16,7 +16,7 @@ static const char col_cyan[] = "#7dcfff";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_blue, col_cyan },
|
||||
[SchemeSel] = { col_gray4, col_blue, col_cyan },
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
@ -46,7 +46,7 @@ static const Layout layouts[] = {
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod1Mask
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
@ -58,32 +58,32 @@ static const Layout layouts[] = {
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *lockcmd[] = { "slock", NULL };
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_blue, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *lockcmd[] = { "slock", NULL };
|
||||
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
|
||||
static const char *toggletheme[] = { "lupan-set-theme", "toggle", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY|ControlMask, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||
{ MODKEY|ShiftMask, XK_F6, spawn, {.v = toggletheme } },
|
||||
{ MODKEY|ControlMask, XK_b, togglebar, {0} },
|
||||
{ MODKEY|ControlMask, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY|ControlMask, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY|ControlMask, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY|ControlMask, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY|ControlMask, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY|ControlMask, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY|ControlMask, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
@ -101,7 +101,7 @@ static const Key keys[] = {
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
|
33
river/.config/river/bar
Executable file
33
river/.config/river/bar
Executable file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
FIFO="$XDG_RUNTIME_DIR/sandbar"
|
||||
|
||||
run() {
|
||||
echo run
|
||||
[ -e "$FIFO" ] && rm -f "$FIFO"
|
||||
mkfifo "$FIFO"
|
||||
|
||||
"$HOME/.config/river/status" &
|
||||
|
||||
while cat "$FIFO"; do :; done | sandbar \
|
||||
-font "FiraCode Nerd Font Ret:size=10" \
|
||||
-active-fg-color "#000000" \
|
||||
-active-bg-color "#e8c47d" \
|
||||
-inactive-fg-color "#e8c47d" \
|
||||
-inactive-bg-color "#000000" \
|
||||
-urgent-fg-color "#000000" \
|
||||
-urgent-bg-color "#cc241d" \
|
||||
-title-fg-color "#000000" \
|
||||
-title-bg-color "#e8c47d"
|
||||
}
|
||||
|
||||
while true; do
|
||||
run
|
||||
CODE=$?
|
||||
if [ $CODE -ne 139 && $CODE -ne 134 ]; then
|
||||
echo exit because $CODE
|
||||
exit
|
||||
fi
|
||||
echo sleep and continue
|
||||
sleep 1
|
||||
done
|
20
river/.config/river/init
Executable file
20
river/.config/river/init
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOCK_COMMAND='swaylock -f -c 1f7693'
|
||||
RANDR_COMMAND='${HOME}/.config/river/randr --on'
|
||||
RANDR_OFF_COMMAND='${HOME}/.config/river/randr --off'
|
||||
|
||||
riverctl spawn "${RANDR_COMMAND}"
|
||||
|
||||
"${HOME}/.config/river/keymap"
|
||||
|
||||
# Set the default layout generator to be rivertile and start it.
|
||||
# River will send the process group of the init executable SIGTERM on exit.
|
||||
riverctl default-layout rivertile
|
||||
rivertile -view-padding 1 -outer-padding 0 &
|
||||
|
||||
riverctl spawn "${HOME}/.config/river/bar"
|
||||
|
||||
riverctl spawn "swayidle -w timeout 300 '${LOCK_COMMAND}' \
|
||||
timeout 330 '${RANDR_OFF_COMMAND}' resume '${RANDR_COMMAND}' \
|
||||
before-sleep '${LOCK_COMMAND}' after-resume '${RANDR_COMMAND}'"
|
164
river/.config/river/keymap
Executable file
164
river/.config/river/keymap
Executable file
@ -0,0 +1,164 @@
|
||||
#!/bin/sh
|
||||
|
||||
LOCK_COMMAND='swaylock -f -c 1f7693'
|
||||
|
||||
# Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc.
|
||||
|
||||
# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
|
||||
riverctl map normal Super+Shift Return spawn alacritty
|
||||
riverctl map normal Super+Alt Return spawn alacritty
|
||||
|
||||
riverctl map normal Super P spawn "wofi -S run"
|
||||
|
||||
# Super+Q to close the focused view
|
||||
riverctl map normal Super Q close
|
||||
|
||||
# Super+Shift+E to exit river
|
||||
riverctl map normal Super+Shift E exit
|
||||
|
||||
# Super+J and Super+K to focus the next/previous view in the layout stack
|
||||
riverctl map normal Super J focus-view next
|
||||
riverctl map normal Super K focus-view previous
|
||||
|
||||
# Super+Shift+J and Super+Shift+K to swap the focused view with the next/previous
|
||||
# view in the layout stack
|
||||
riverctl map normal Super+Shift J swap next
|
||||
riverctl map normal Super+Shift K swap previous
|
||||
|
||||
# Super+Period and Super+Comma to focus the next/previous output
|
||||
riverctl map normal Super Period focus-output next
|
||||
riverctl map normal Super Comma focus-output previous
|
||||
|
||||
# Super+Shift+{Period,Comma} to send the focused view to the next/previous output
|
||||
riverctl map normal Super+Shift Period send-to-output next
|
||||
riverctl map normal Super+Shift Comma send-to-output previous
|
||||
|
||||
# Super+Return to bump the focused view to the top of the layout stack
|
||||
riverctl map normal Super Return zoom
|
||||
|
||||
# Super+H and Super+L to decrease/increase the main ratio of rivertile(1)
|
||||
riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05"
|
||||
riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05"
|
||||
|
||||
# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1)
|
||||
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1"
|
||||
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1"
|
||||
|
||||
# Super+Alt+{H,J,K,L} to move views
|
||||
riverctl map normal Super+Alt H move left 100
|
||||
riverctl map normal Super+Alt J move down 100
|
||||
riverctl map normal Super+Alt K move up 100
|
||||
riverctl map normal Super+Alt L move right 100
|
||||
|
||||
# Super+Alt+Control+{H,J,K,L} to snap views to screen edges
|
||||
riverctl map normal Super+Alt+Control H snap left
|
||||
riverctl map normal Super+Alt+Control J snap down
|
||||
riverctl map normal Super+Alt+Control K snap up
|
||||
riverctl map normal Super+Alt+Control L snap right
|
||||
|
||||
# Super+Alt+Shift+{H,J,K,L} to resize views
|
||||
riverctl map normal Super+Alt+Shift H resize horizontal -100
|
||||
riverctl map normal Super+Alt+Shift J resize vertical 100
|
||||
riverctl map normal Super+Alt+Shift K resize vertical -100
|
||||
riverctl map normal Super+Alt+Shift L resize horizontal 100
|
||||
|
||||
# Super + Left Mouse Button to move views
|
||||
riverctl map-pointer normal Super BTN_LEFT move-view
|
||||
|
||||
# Super + Right Mouse Button to resize views
|
||||
riverctl map-pointer normal Super BTN_RIGHT resize-view
|
||||
|
||||
# Super + Middle Mouse Button to toggle float
|
||||
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
|
||||
|
||||
for i in $(seq 1 9)
|
||||
do
|
||||
tags=$((1 << ($i - 1)))
|
||||
|
||||
# Super+[1-9] to focus tag [0-8]
|
||||
riverctl map normal Super $i set-focused-tags $tags
|
||||
|
||||
# Super+Shift+[1-9] to tag focused view with tag [0-8]
|
||||
riverctl map normal Super+Shift $i set-view-tags $tags
|
||||
|
||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||
riverctl map normal Super+Control $i toggle-focused-tags $tags
|
||||
|
||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
|
||||
done
|
||||
|
||||
# Super+0 to focus all tags
|
||||
# Super+Shift+0 to tag focused view with all tags
|
||||
all_tags=$(((1 << 32) - 1))
|
||||
riverctl map normal Super 0 set-focused-tags $all_tags
|
||||
riverctl map normal Super+Shift 0 set-view-tags $all_tags
|
||||
|
||||
# Super+Space to toggle float
|
||||
riverctl map normal Super Space toggle-float
|
||||
|
||||
# Super+F to toggle fullscreen
|
||||
riverctl map normal Super F toggle-fullscreen
|
||||
|
||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
||||
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
|
||||
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
|
||||
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
|
||||
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
|
||||
|
||||
# Declare a passthrough mode. This mode has only a single mapping to return to
|
||||
# normal mode. This makes it useful for testing a nested wayland compositor
|
||||
riverctl declare-mode passthrough
|
||||
|
||||
# Super+F11 to enter passthrough mode
|
||||
riverctl map normal Super F11 enter-mode passthrough
|
||||
|
||||
# Super+F11 to return to normal mode
|
||||
riverctl map passthrough Super F11 enter-mode normal
|
||||
|
||||
# Various media key mapping examples for both normal and locked mode which do
|
||||
# not have a modifier
|
||||
for mode in normal locked
|
||||
do
|
||||
# Eject the optical drive (well if you still have one that is)
|
||||
riverctl map $mode None XF86Eject spawn 'eject -T'
|
||||
|
||||
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
|
||||
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
|
||||
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
|
||||
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
|
||||
|
||||
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
|
||||
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
|
||||
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
|
||||
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
|
||||
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
|
||||
|
||||
# Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl)
|
||||
riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%'
|
||||
riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-'
|
||||
done
|
||||
|
||||
riverctl map normal Super A focus-previous-tags
|
||||
riverctl map normal Super+Control+Shift L spawn "${LOCK_COMMAND}"
|
||||
riverctl map normal Super+Control+Shift S spawn "systemctl suspend"
|
||||
|
||||
riverctl map normal Super+Alt O spawn "${LOCK_COMMAND}"
|
||||
riverctl map normal Super+Alt S spawn "systemctl suspend"
|
||||
|
||||
riverctl map normal Super+Alt T spawn "${HOME}/bin/lupan-set-theme toggle"
|
||||
|
||||
# Set background and border color
|
||||
riverctl background-color 0x002b36
|
||||
riverctl border-color-focused 0xac7853
|
||||
riverctl border-color-unfocused 0x5387ac
|
||||
|
||||
riverctl keyboard-layout -options ctrl:nocaps pl
|
||||
# Set keyboard repeat rate
|
||||
riverctl set-repeat 50 300
|
||||
|
||||
# Make all views with an app-id that starts with "float" and title "foo" start floating.
|
||||
riverctl rule-add -app-id 'float*' -title 'foo' float
|
||||
|
||||
# Make all views with app-id "bar" and any title use client-side decorations
|
||||
riverctl rule-add -app-id "bar" csd
|
21
river/.config/river/randr
Executable file
21
river/.config/river/randr
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
repeat() {
|
||||
for x in {0..10}; do
|
||||
echo "$@"
|
||||
"$@"
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--on)
|
||||
repeat wlr-randr --output DP-1 --on --scale 2 --pos 0,0 &
|
||||
repeat wlr-randr --output DP-2 --on --scale 2 --pos 1920,0 &
|
||||
sleep 10
|
||||
;;
|
||||
--off)
|
||||
wlr-randr --output DP-1 --off
|
||||
wlr-randr --output DP-2 --off
|
||||
;;
|
||||
esac
|
52
river/.config/river/status
Executable file
52
river/.config/river/status
Executable file
@ -0,0 +1,52 @@
|
||||
#!/bin/env sh
|
||||
|
||||
cpu() {
|
||||
cpu="$(grep -o "^[^ ]*" /proc/loadavg)"
|
||||
}
|
||||
|
||||
memory() {
|
||||
memory="$(free -h | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p")"
|
||||
}
|
||||
|
||||
disk() {
|
||||
disk="$(df -h | awk 'NR==2{print $4}')"
|
||||
}
|
||||
|
||||
datetime() {
|
||||
datetime="$(date "+%F %H:%M")"
|
||||
}
|
||||
|
||||
bat() {
|
||||
read -r bat_status </sys/class/power_supply/BAT0/status
|
||||
read -r bat_capacity </sys/class/power_supply/BAT0/capacity
|
||||
bat="$bat_status $bat_capacity%"
|
||||
}
|
||||
|
||||
vol() {
|
||||
vol="$([ "$(pamixer --get-mute)" = "false" ] && printf "%s%%" "$(pamixer --get-volume)" || printf '-')"
|
||||
}
|
||||
|
||||
display() {
|
||||
echo "all status [$memory $cpu $disk] [$bat] [$vol] [$datetime]" >"$FIFO"
|
||||
}
|
||||
|
||||
printf "%s" "$$" > "$XDG_RUNTIME_DIR/status_pid"
|
||||
FIFO="$XDG_RUNTIME_DIR/sandbar"
|
||||
[ -e "$FIFO" ] || mkfifo "$FIFO"
|
||||
sec=0
|
||||
|
||||
while true; do
|
||||
sleep 1 &
|
||||
wait && {
|
||||
[ $((sec % 15)) -eq 0 ] && memory
|
||||
[ $((sec % 15)) -eq 0 ] && cpu
|
||||
[ $((sec % 15)) -eq 0 ] && disk
|
||||
[ $((sec % 60)) -eq 0 ] && bat
|
||||
[ $((sec % 5)) -eq 0 ] && vol
|
||||
[ $((sec % 5)) -eq 0 ] && datetime
|
||||
|
||||
[ $((sec % 5)) -eq 0 ] && display
|
||||
|
||||
sec=$((sec + 1))
|
||||
}
|
||||
done
|
@ -3,6 +3,9 @@ alias ll='ls -l'
|
||||
alias ta='tmux attach -t'
|
||||
alias tl='tmux list-sessions'
|
||||
alias tn='tmux new -s'
|
||||
alias fv='fzf --preview="bat --color=always --theme=Nord {}" --bind="enter:become(nvim {})"'
|
||||
alias rgh='rg -.'
|
||||
alias fdh='fd -H'
|
||||
|
||||
if which exa > /dev/null; then
|
||||
alias ls='exa --icons'
|
||||
|
@ -29,8 +29,10 @@ export PATH
|
||||
|
||||
# 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
|
||||
if which Hyprland > /dev/null && [ -d ~/.config/hypr ]; then
|
||||
exec Hyprland
|
||||
elif which river > /dev/null && [ -d ~/.config/river ]; then
|
||||
exec river
|
||||
elif which /usr/bin/sx > /dev/null; then
|
||||
exec /usr/bin/sx ~/.xsession
|
||||
fi
|
||||
|
16
shell/.zshrc
16
shell/.zshrc
@ -2,9 +2,11 @@
|
||||
# % cd ~/.local/share
|
||||
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1
|
||||
|
||||
export FZF_DEFAULT_OPTS='--color=bw,hl:green,hl+:green'
|
||||
export FZF_DEFAULT_OPTS='--color=bg+:#808080'
|
||||
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS
|
||||
|
||||
export BAT_THEME=ansi
|
||||
|
||||
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
|
||||
plug "jeffreytse/zsh-vi-mode"
|
||||
|
||||
@ -17,13 +19,18 @@ 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
|
||||
if which zoxide > /dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
else
|
||||
plug "agkozak/zsh-z"
|
||||
ZSHZ_ECHO=1
|
||||
setopt autocd
|
||||
fi
|
||||
|
||||
ZSH_HIGHLIGHT_STYLES[comment]=fg=blue
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=magenta,fg=black,bold
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=bg=red,fg=black,bold
|
||||
ZSHZ_ECHO=1
|
||||
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
@ -64,7 +71,6 @@ setopt share_history
|
||||
|
||||
# Convenience.
|
||||
|
||||
setopt autocd
|
||||
bindkey -M vicmd '^[h' run-help
|
||||
bindkey -M viins '^[h' run-help
|
||||
|
||||
|
@ -3,15 +3,6 @@ set -g status-fg colour7
|
||||
|
||||
set -sg escape-time 0
|
||||
|
||||
bind-key -n M-j select-pane -D
|
||||
bind-key -n M-k select-pane -U
|
||||
bind-key -n M-h select-pane -L
|
||||
bind-key -n M-l select-pane -R
|
||||
bind-key -n M-J switch-client -n
|
||||
bind-key -n M-K switch-client -p
|
||||
bind-key -n M-H previous-window
|
||||
bind-key -n M-L next-window
|
||||
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
@ -21,7 +12,7 @@ bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
#bind-key -n M-0 select-window -t 10
|
||||
|
||||
bind-key -n M-! swap-window -t 1
|
||||
bind-key -n M-@ swap-window -t 2
|
||||
@ -37,6 +28,11 @@ bind-key -n M-) swap-window -t 10
|
||||
bind-key S new-session
|
||||
bind-key T switch-client -l
|
||||
|
||||
bind-key Right resize-pane -R 8
|
||||
bind-key Left resize-pane -L 8
|
||||
bind-key Up resize-pane -U 4
|
||||
bind-key Down resize-pane -D 4
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
set -as terminal-features ",*:RGB"
|
||||
|
||||
@ -50,4 +46,42 @@ 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]'
|
||||
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W#F #[fg=green]#[bg=black]'
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
||||
|
||||
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'select-pane -L'
|
||||
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'select-pane -D'
|
||||
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'select-pane -U'
|
||||
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'select-pane -R'
|
||||
bind-key -n 'M-n' if-shell "$is_vim" 'send-keys M-n' 'select-window -n'
|
||||
bind-key -n 'M-p' if-shell "$is_vim" 'send-keys M-p' 'select-window -p'
|
||||
|
||||
bind-key -T copy-mode-vi 'M-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'M-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'M-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'M-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'M-n' select-window -n
|
||||
bind-key -T copy-mode-vi 'M-p' select-window -p
|
||||
|
||||
bind -n 'M-H' if-shell "$is_vim" 'send-keys M-H' 'resize-pane -L 1'
|
||||
bind -n 'M-J' if-shell "$is_vim" 'send-keys M-J' 'resize-pane -D 1'
|
||||
bind -n 'M-K' if-shell "$is_vim" 'send-keys M-K' 'resize-pane -U 1'
|
||||
bind -n 'M-L' if-shell "$is_vim" 'send-keys M-L' 'resize-pane -R 1'
|
||||
|
||||
bind-key -T copy-mode-vi M-H resize-pane -L 1
|
||||
bind-key -T copy-mode-vi M-J resize-pane -D 1
|
||||
bind-key -T copy-mode-vi M-K resize-pane -U 1
|
||||
bind-key -T copy-mode-vi M-L resize-pane -R 1
|
||||
|
||||
bind -n 'C-M-h' if-shell "$is_vim" 'send-keys C-M-h' 'swap-pane -s "{left-of}"'
|
||||
bind -n 'C-M-j' if-shell "$is_vim" 'send-keys C-M-j' 'swap-pane -s "{down-of}"'
|
||||
bind -n 'C-M-k' if-shell "$is_vim" 'send-keys C-M-k' 'swap-pane -s "{up-of}"'
|
||||
bind -n 'C-M-l' if-shell "$is_vim" 'send-keys C-M-l' 'swap-pane -s "{right-of}"'
|
||||
|
||||
bind-key -T copy-mode-vi C-M-h swap-pane -s "{left-of}"
|
||||
bind-key -T copy-mode-vi C-M-j swap-pane -s "{down-of}"
|
||||
bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
|
||||
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
|
||||
|
||||
bind-key -n M-0 run-shell tmux-session-menu
|
||||
|
5
tmux/bin/tmux-session-menu
Executable file
5
tmux/bin/tmux-session-menu
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
tmux list-sessions -F '#S' \
|
||||
| awk 'BEGIN {ORS=" "; print "toggle t \"switch-client -l\""} {print $1, NR, "\"switch-client -t", $1 "\""}' \
|
||||
| xargs tmux display-menu -T "Switch session"
|
@ -7,6 +7,7 @@ fi
|
||||
xset b off
|
||||
xrandr --auto
|
||||
xrandr --output HDMI1 --right-of DP1
|
||||
xrandr --output DP-0 --left-of DP-2
|
||||
xrdb -merge ~/.Xresources
|
||||
setxkbmap pl -option ctrl:nocaps
|
||||
|
||||
|
@ -27,6 +27,12 @@ if [ -f ~/.config/alacritty/alacritty.toml ]; then
|
||||
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml
|
||||
fi
|
||||
|
||||
if [ "$THEME" = dark ]; then
|
||||
kitten themes --reload-in=all Afterglow
|
||||
elif [ "$THEME" = light ]; then
|
||||
kitten themes --reload-in=all One Half Light
|
||||
fi
|
||||
|
||||
# GTK
|
||||
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
|
||||
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
|
||||
|
Reference in New Issue
Block a user