Compare commits
121 Commits
60cd08c395
...
master
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
1f040c70ab | |||
e03d46c3ab | |||
d9f7f0961f | |||
b73ebaf338 | |||
da18d28504 | |||
e50284111b | |||
faaf5807d5 | |||
7d4b8f4f7a | |||
98e69defac | |||
9062aeb17a | |||
e1610e3874 | |||
8c303ca0d1 | |||
b032608fd9 | |||
1dfb8e7e7b | |||
4d7bd1a487 | |||
ad79dc5bbf | |||
d522104407 | |||
01f6327e9e | |||
ad9aacbbcb | |||
7373c7b653 | |||
a1736b33e0 | |||
f10efa6808 | |||
3810c83e14 | |||
e08245989a | |||
492adae580 | |||
09ffb3b2d9 | |||
a8bf055a0b | |||
a22b7125a5 | |||
72f2a053c0 | |||
7111817d6f | |||
0c0a1a9f9c | |||
e1ba513fa6 | |||
1ce7cac540 | |||
ec7153193b | |||
a2a13c901a | |||
afc7829f1f | |||
bfe74b7499 | |||
fa84b139af | |||
557bb04d71 | |||
55e747eec2 | |||
d3b783cb55 | |||
f6e3c9acb4 | |||
c68109aa92 | |||
f87bdec4eb | |||
1d77cf6c1e | |||
85e31b13c1 | |||
ac26cef63a | |||
f72f18f5c7 | |||
ccf3dcc500 | |||
a987843e95 | |||
fef6cbc6bb | |||
118211652b | |||
c9ccef2f8a | |||
3c34d8942e | |||
7dbe42b087 |
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,15 +5,13 @@ draw_bold_text_with_bright_colors = false
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[font]
|
||||
size = 10.5
|
||||
size = 10
|
||||
|
||||
[font.bold]
|
||||
family = "GoMono Nerd Font"
|
||||
family = "Fira Code Nerd Font"
|
||||
|
||||
[font.normal]
|
||||
family = "GoMono Nerd Font"
|
||||
family = "Fira Code Nerd Font"
|
||||
|
||||
[keyboard]
|
||||
bindings = [
|
||||
{ key = ";", mods = "Control", chars = "\u001bOR" }
|
||||
]
|
||||
[general]
|
||||
import = ["~/.config/alacritty/dark.toml"]
|
||||
|
@ -1,306 +0,0 @@
|
||||
# See: /usr/share/doc/alacritty/example/alacritty.yml
|
||||
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
|
||||
# From https://gist.github.com/sainnhe/6432f83181c4520ea87b5211fed27950
|
||||
# Changed only to &dark and YAML &light labels
|
||||
schemes:
|
||||
dark: &dark
|
||||
# Default colors
|
||||
primary:
|
||||
background: '#2E3440'
|
||||
foreground: '#C8D0E0'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '#3B4252'
|
||||
red: '#BF616A'
|
||||
green: '#A3BE8C'
|
||||
yellow: '#EBCB8B'
|
||||
blue: '#81A1C1'
|
||||
magenta: '#B988B0'
|
||||
cyan: '#88C0D0'
|
||||
white: '#E5E9F0'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '#4C566A'
|
||||
red: '#BF616A'
|
||||
green: '#A3BE8C'
|
||||
yellow: '#EBCB8B'
|
||||
blue: '#81A1C1'
|
||||
magenta: '#B988B0'
|
||||
cyan: '#8FBCBB'
|
||||
white: '#ECEFF4'
|
||||
|
||||
search:
|
||||
matches:
|
||||
foreground: '#81A1C1'
|
||||
background: '#4C566A'
|
||||
focused_match:
|
||||
foreground: '#EBCB8B'
|
||||
background: '#4C566A'
|
||||
|
||||
footer_bar:
|
||||
background: '#434C5E'
|
||||
foreground: '#88C0D0'
|
||||
|
||||
hints:
|
||||
start:
|
||||
foreground: '#B988B0'
|
||||
background: '#4C566A'
|
||||
|
||||
end:
|
||||
foreground: '#81A1C1'
|
||||
background: '#4C566A'
|
||||
|
||||
selection:
|
||||
text: CellForeground
|
||||
background: '#3F4758'
|
||||
|
||||
light: &light
|
||||
# Default colors
|
||||
primary:
|
||||
background: '#F7F8FA'
|
||||
foreground: '#2E3440'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '#2E3440'
|
||||
red: '#CB4F53'
|
||||
green: '#48A53D'
|
||||
yellow: '#EE5E25'
|
||||
blue: '#3879C5'
|
||||
magenta: '#9F4ACA'
|
||||
cyan: '#3EA1AD'
|
||||
white: '#E5E9F0'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '#646A76'
|
||||
red: '#D16366'
|
||||
green: '#5F9E9D'
|
||||
yellow: '#BA793E'
|
||||
blue: '#1B40A6'
|
||||
magenta: '#9665AF'
|
||||
cyan: '#8FBCBB'
|
||||
white: '#ECEFF4'
|
||||
|
||||
search:
|
||||
matches:
|
||||
foreground: '#3879C5'
|
||||
background: '#646A76'
|
||||
focused_match:
|
||||
foreground: '#EE5E25'
|
||||
background: '#646A76'
|
||||
|
||||
footer_bar:
|
||||
background: '#DFE1E4'
|
||||
foreground: '#3EA1AD'
|
||||
|
||||
hints:
|
||||
start:
|
||||
foreground: '#9665AF'
|
||||
background: '#646A76'
|
||||
|
||||
end:
|
||||
foreground: '#3879C5'
|
||||
background: '#646A76'
|
||||
|
||||
selection:
|
||||
text: CellForeground
|
||||
background: '#EAEBED'
|
||||
|
||||
lupan-dark: &lupan-dark
|
||||
primary:
|
||||
background: '#2c393c'
|
||||
foreground: '#b1babd'
|
||||
normal:
|
||||
black: '#232e31'
|
||||
red: '#d8aeb5'
|
||||
green: '#9bc48e'
|
||||
yellow: '#ceb58e'
|
||||
blue: '#94c0ca'
|
||||
magenta: '#ceaed6'
|
||||
cyan: '#93c2bb'
|
||||
white: '#9ea7aa'
|
||||
bright:
|
||||
black: '#597177'
|
||||
red: '#dcb8be'
|
||||
green: '#a2cd94'
|
||||
yellow: '#d7bd95'
|
||||
blue: '#9bc8d3'
|
||||
magenta: '#d4b8da'
|
||||
cyan: '#99cac4'
|
||||
white: '#b9c3c5'
|
||||
lupan-light: &lupan-light
|
||||
primary:
|
||||
background: '#e9f2f5'
|
||||
foreground: '#6d797c'
|
||||
normal:
|
||||
black: '#1b1c1c'
|
||||
red: '#d0426a'
|
||||
green: '#52833e'
|
||||
yellow: '#8e733f'
|
||||
blue: '#44808b'
|
||||
magenta: '#b14cc1'
|
||||
cyan: '#42827a'
|
||||
white: '#c2c7c9'
|
||||
bright:
|
||||
black: '#454748'
|
||||
red: '#e34d76'
|
||||
green: '#5b9146'
|
||||
yellow: '#9d8046'
|
||||
blue: '#4c8d99'
|
||||
magenta: '#c455d5'
|
||||
cyan: '#4a8f87'
|
||||
white: '#eff1f1'
|
||||
everforest_dark_hard: &everforest_dark_hard
|
||||
primary:
|
||||
background: '#272e33'
|
||||
foreground: '#d3c6aa'
|
||||
normal:
|
||||
black: '#414b50'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
bright:
|
||||
black: '#475258'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
everforest_dark_medium: &everforest_dark_medium
|
||||
primary:
|
||||
background: '#2d353b'
|
||||
foreground: '#d3c6aa'
|
||||
normal:
|
||||
black: '#475258'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
bright:
|
||||
black: '#475258'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
everforest_dark_soft: &everforest_dark_soft
|
||||
primary:
|
||||
background: '#333c43'
|
||||
foreground: '#d3c6aa'
|
||||
normal:
|
||||
black: '#4d5960'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
bright:
|
||||
black: '#4d5960'
|
||||
red: '#e67e80'
|
||||
green: '#a7c080'
|
||||
yellow: '#dbbc7f'
|
||||
blue: '#7fbbb3'
|
||||
magenta: '#d699b6'
|
||||
cyan: '#83c092'
|
||||
white: '#d3c6aa'
|
||||
everforest_light_hard: &everforest_light_hard
|
||||
primary:
|
||||
background: '#fffbef'
|
||||
foreground: '#5c6a72'
|
||||
normal:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#e8e5d5'
|
||||
bright:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#e8e5d5'
|
||||
everforest_light_medium: &everforest_light_medium
|
||||
primary:
|
||||
background: '#fdf6e3'
|
||||
foreground: '#5c6a72'
|
||||
normal:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#e0dcc7'
|
||||
bright:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#e0dcc7'
|
||||
everforest_light_soft: &everforest_light_soft
|
||||
primary:
|
||||
background: '#f3ead3'
|
||||
foreground: '#5c6a72'
|
||||
normal:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#d8d3ba'
|
||||
bright:
|
||||
black: '#5c6a72'
|
||||
red: '#f85552'
|
||||
green: '#8da101'
|
||||
yellow: '#dfa000'
|
||||
blue: '#3a94c5'
|
||||
magenta: '#df69ba'
|
||||
cyan: '#35a77c'
|
||||
white: '#d8d3ba'
|
||||
|
||||
draw_bold_text_with_bright_colors: false
|
||||
|
||||
colors: *dark
|
||||
|
||||
font:
|
||||
size: 10.5
|
||||
normal:
|
||||
family: GoMono Nerd Font
|
||||
bold:
|
||||
family: GoMono Nerd Font
|
||||
|
||||
key_bindings:
|
||||
- key: F6
|
||||
mods: Control|Shift
|
||||
command: { program: "/bin/sh", args: ["-c", "~/.config/alacritty/set_theme.sh --next"] }
|
@ -1,3 +1,71 @@
|
||||
import = [
|
||||
"~/.config/alacritty/themes/themes/nord.toml"
|
||||
]
|
||||
# Nightfox Alacritty Colors
|
||||
## name: nightfox
|
||||
## upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/nightfox/alacritty.toml
|
||||
|
||||
[colors.primary]
|
||||
background = "#2e3440" # changed
|
||||
foreground = "#eceff4" # changed
|
||||
dim_foreground = "#aeafb0"
|
||||
bright_foreground = "#d6d6d7"
|
||||
|
||||
[colors.cursor]
|
||||
text = "#cdcecf"
|
||||
cursor = "#aeafb0"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
text = "#cdcecf"
|
||||
cursor = "#63cdcf"
|
||||
|
||||
[colors.search.matches]
|
||||
foreground = "#cdcecf"
|
||||
background = "#3c5372"
|
||||
|
||||
[colors.search.focused_match]
|
||||
foreground = "#cdcecf"
|
||||
background = "#81b29a"
|
||||
|
||||
[colors.footer_bar]
|
||||
foreground = "#cdcecf"
|
||||
background = "#29394f"
|
||||
|
||||
[colors.hints.start]
|
||||
foreground = "#cdcecf"
|
||||
background = "#f4a261"
|
||||
|
||||
[colors.hints.end]
|
||||
foreground = "#cdcecf"
|
||||
background = "#29394f"
|
||||
|
||||
[colors.selection]
|
||||
text = "#cdcecf"
|
||||
background = "#2b3b51"
|
||||
|
||||
[colors.normal]
|
||||
black = "#393b44"
|
||||
red = "#c94f6d"
|
||||
green = "#81b29a"
|
||||
yellow = "#dbc074"
|
||||
blue = "#719cd6"
|
||||
magenta = "#9d79d6"
|
||||
cyan = "#63cdcf"
|
||||
white = "#dfdfe0"
|
||||
|
||||
[colors.bright]
|
||||
black = "#575860"
|
||||
red = "#d16983"
|
||||
green = "#8ebaa4"
|
||||
yellow = "#e0c989"
|
||||
blue = "#86abdc"
|
||||
magenta = "#baa1e2"
|
||||
cyan = "#7ad5d6"
|
||||
white = "#e4e4e5"
|
||||
|
||||
[colors.dim]
|
||||
black = "#30323a"
|
||||
red = "#ab435d"
|
||||
green = "#6e9783"
|
||||
yellow = "#baa363"
|
||||
blue = "#6085b6"
|
||||
magenta = "#8567b6"
|
||||
cyan = "#54aeb0"
|
||||
white = "#bebebe"
|
||||
|
@ -1,3 +1,30 @@
|
||||
import = [
|
||||
"~/.config/alacritty/themes/themes/ayu_light.toml"
|
||||
]
|
||||
# Colors (Alabaster)
|
||||
# author tonsky
|
||||
|
||||
[colors.primary]
|
||||
background = '#FFFFFF' # changed
|
||||
foreground = '#434343'
|
||||
|
||||
[colors.cursor]
|
||||
text = '#F7F7F7'
|
||||
cursor = '#434343'
|
||||
|
||||
[colors.normal]
|
||||
black = '#000000'
|
||||
red = '#AA3731'
|
||||
green = '#448C27'
|
||||
yellow = '#CB9000'
|
||||
blue = '#325CC0'
|
||||
magenta = '#7A3E9D'
|
||||
cyan = '#0083B2'
|
||||
white = '#BBBBBB'
|
||||
|
||||
[colors.bright]
|
||||
black = '#777777'
|
||||
red = '#F05050'
|
||||
green = '#60CB00'
|
||||
yellow = '#FFBC5D'
|
||||
blue = '#007ACC'
|
||||
magenta = '#E64CE6'
|
||||
cyan = '#00AACB'
|
||||
white = '#FFFFFF'
|
||||
|
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
lupan-dark|lupan-dark-blue|lupan-dark-gray|lupan-light|lupan-material-dark|lupan-material-light)
|
||||
sed -i "s/^colors: [*].*/colors: *$1/" ~/.config/alacritty/alacritty.yml
|
||||
;;
|
||||
--next)
|
||||
case $(grep colors: ~/.config/alacritty/alacritty.yml) in
|
||||
'colors: *lupan-dark')
|
||||
THEME=lupan-dark-blue
|
||||
;;
|
||||
'colors: *lupan-dark-blue')
|
||||
THEME=lupan-dark-gray
|
||||
;;
|
||||
'colors: *lupan-dark-gray')
|
||||
THEME=lupan-light
|
||||
;;
|
||||
'colors: *lupan-light')
|
||||
THEME=lupan-material-dark
|
||||
;;
|
||||
'colors: *lupan-material-dark')
|
||||
THEME=lupan-material-light
|
||||
;;
|
||||
*)
|
||||
THEME=lupan-dark
|
||||
;;
|
||||
esac
|
||||
sed -i "s/^colors: [*].*/colors: *$THEME/" ~/.config/alacritty/alacritty.yml
|
||||
;;
|
||||
esac
|
@ -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)
|
||||
|
@ -1,51 +1,56 @@
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
local themes_path = require("gears.filesystem").get_themes_dir()
|
||||
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
local xresources = require("beautiful.xresources")
|
||||
local dpi = xresources.apply_dpi
|
||||
|
||||
local theme = {}
|
||||
local theme = {}
|
||||
|
||||
theme.font = "GoMono Nerd Font 10.5"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
|
||||
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 = "GoMono Nerd Font 10.5"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
theme.font = "Fira Code Nerd Font 10"
|
||||
theme.tasklist_disable_icon = true
|
||||
theme.wibar_height = 40
|
||||
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
[main]
|
||||
font = GoMono Nerd Font:size=11
|
||||
font = Fira Code Nerd Font:size=11
|
||||
|
||||
include = /usr/share/foot/themes/nord
|
||||
|
4
hyprland/.config/hypr/five-rotated.conf
Normal file
4
hyprland/.config/hypr/five-rotated.conf
Normal file
@ -0,0 +1,4 @@
|
||||
monitor=DP-1,highres,0x0,2,transform,1
|
||||
monitor=HDMI-A-2,highres,1080x0,2
|
||||
|
||||
# vim: ft=hyprlang
|
@ -1,2 +1,4 @@
|
||||
monitor=DP-1,highres,0x0,2,transform,1
|
||||
monitor=HDMI-A-2,highres,1080x0,2
|
||||
monitor=DP-1,highres,0x0,2
|
||||
monitor=HDMI-A-2,highres,1920x0,2
|
||||
|
||||
# vim: ft=hyprlang
|
||||
|
@ -1,4 +1,4 @@
|
||||
#source = ~/.config/hypr/white.conf
|
||||
source = ~/.config/hypr/white.conf
|
||||
|
||||
input {
|
||||
kb_layout = pl
|
||||
@ -6,12 +6,12 @@ input {
|
||||
}
|
||||
|
||||
general {
|
||||
gaps_in = 1
|
||||
gaps_out = 3
|
||||
layout = dwindle
|
||||
border_size = 2
|
||||
col.inactive_border = 0xff808080
|
||||
col.active_border = 0xffbf6a40
|
||||
gaps_in = 3
|
||||
gaps_out = 4
|
||||
layout = master
|
||||
border_size = 3
|
||||
col.inactive_border = 0xff5387ac
|
||||
col.active_border = 0xffac7853
|
||||
}
|
||||
|
||||
dwindle {
|
||||
@ -19,7 +19,7 @@ dwindle {
|
||||
}
|
||||
|
||||
decoration {
|
||||
drop_shadow = false
|
||||
rounding = 4
|
||||
}
|
||||
|
||||
animations {
|
||||
@ -30,27 +30,37 @@ misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
disable_autoreload = true
|
||||
background_color = rgb(404040)
|
||||
background_color = 0xff808080
|
||||
}
|
||||
|
||||
binds {
|
||||
workspace_back_and_forth = true
|
||||
}
|
||||
|
||||
$menu = wofi -S run
|
||||
$terminal = alacritty
|
||||
$terminal = alacritty || kitty
|
||||
|
||||
$mainMod = SUPER
|
||||
|
||||
bind = $mainMod, P, exec, $menu
|
||||
bind = $mainMod SHIFT, Return, exec, $terminal
|
||||
bind = $mainMod ALT, Return, exec, $terminal
|
||||
bind = $mainMod, Return, layoutmsg,swapwithmaster master
|
||||
bind = $mainMod CONTROL SHIFT, Q, exit
|
||||
bind = $mainMod, Q, exec, hyprctl reload
|
||||
bind = $mainMod CONTROL SHIFT, C, killactive
|
||||
bind = $mainMod CONTROL SHIFT, L, exec, swaylock -c 263c59
|
||||
bind = $mainMod ALT, O, exec, swaylock -c 263c59
|
||||
bind = $mainMod CONTROL SHIFT, S, exec, swaylock -c 263c59
|
||||
bind = $mainMod CONTROL SHIFT, S, exec, systemctl suspend
|
||||
bind = $mainMod ALT, S, exec, swaylock -c 263c59
|
||||
bind = $mainMod ALT, S, exec, systemctl suspend
|
||||
bind = $mainMod CONTROL, Space, togglefloating
|
||||
bind = $mainMod, D, exec, hyprctl keyword general:layout "dwindle"
|
||||
bind = $mainMod, M, exec, hyprctl keyword general:layout "master"
|
||||
bind = $mainMod, F, fullscreen, 0
|
||||
bind = $mainMod SHIFT, F, fullscreen, 1
|
||||
bind = $mainMod ALT, F, fullscreen, 1
|
||||
bind = $mainMod, U, layoutmsg, togglesplit
|
||||
bind = $mainMod, I, layoutmsg, cycleprev
|
||||
bind = $mainMod, O, layoutmsg, cyclenext
|
||||
@ -60,6 +70,7 @@ bind = $mainMod SHIFT, O, layoutmsg, swapnext
|
||||
bind = $mainMod CONTROL, I, layoutmsg, removemaster
|
||||
bind = $mainMod CONTROL, O, layoutmsg, addmaster
|
||||
bind = $mainMod SHIFT, F6, exec, ~/bin/lupan-set-theme toggle
|
||||
bind = $mainMod ALT, T, exec, ~/bin/lupan-set-theme toggle
|
||||
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, j, movefocus, d
|
||||
@ -71,6 +82,11 @@ bind = $mainMod SHIFT, j, swapwindow, d
|
||||
bind = $mainMod SHIFT, k, swapwindow, u
|
||||
bind = $mainMod SHIFT, l, swapwindow, r
|
||||
|
||||
bind = $mainMod ALT, h, swapwindow, l
|
||||
bind = $mainMod ALT, j, swapwindow, d
|
||||
bind = $mainMod ALT, k, swapwindow, u
|
||||
bind = $mainMod ALT, l, swapwindow, r
|
||||
|
||||
bind = $mainMod CONTROL, h, layoutmsg, orientationleft
|
||||
bind = $mainMod CONTROL, j, layoutmsg, orientationbottom
|
||||
bind = $mainMod CONTROL, k, layoutmsg, orientationtop
|
||||
@ -100,10 +116,21 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mainMod ALT, 1, movetoworkspace, 1
|
||||
bind = $mainMod ALT, 2, movetoworkspace, 2
|
||||
bind = $mainMod ALT, 3, movetoworkspace, 3
|
||||
bind = $mainMod ALT, 4, movetoworkspace, 4
|
||||
bind = $mainMod ALT, 5, movetoworkspace, 5
|
||||
bind = $mainMod ALT, 6, movetoworkspace, 6
|
||||
bind = $mainMod ALT, 7, movetoworkspace, 7
|
||||
bind = $mainMod ALT, 8, movetoworkspace, 8
|
||||
bind = $mainMod ALT, 9, movetoworkspace, 9
|
||||
bind = $mainMod ALT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mainMod, right, workspace, m+1
|
||||
bind = $mainMod, left, workspace, m-1
|
||||
|
||||
# Switch workspaces on current monitor with mainMod CONTROL + Control + [0-9]
|
||||
# Switch workspaces on current monitor with mainMod + Control + [0-9]
|
||||
bind = $mainMod CONTROL, 1, focusworkspaceoncurrentmonitor, 1
|
||||
bind = $mainMod CONTROL, 2, focusworkspaceoncurrentmonitor, 2
|
||||
bind = $mainMod CONTROL, 3, focusworkspaceoncurrentmonitor, 3
|
||||
@ -120,3 +147,5 @@ bindm = $mainMod,mouse:273,resizewindow
|
||||
|
||||
exec-once = waybar
|
||||
exec-once = swayidle -w timeout 300 'swaylock -f -c 263c59' before-sleep 'swaylock -f -c 263c59'
|
||||
|
||||
# vim: ft=hyprlang
|
||||
|
5
hyprland/.config/hypr/seven.conf
Normal file
5
hyprland/.config/hypr/seven.conf
Normal file
@ -0,0 +1,5 @@
|
||||
monitor=eDP-1,prefered,0x0,1.5
|
||||
monitor=DP-1,highres,1280x0,2
|
||||
monitor=HDMI-A-1,highres,3200x0,2
|
||||
|
||||
# vim: ft=hyprlang
|
@ -4,5 +4,7 @@ env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
|
||||
monitor=DP-2,highres,0x0,2
|
||||
monitor=DP-1,highres,1920x0,2
|
||||
monitor=DP-1,highres,0x0,2
|
||||
monitor=DP-2,highres,1920x0,2
|
||||
|
||||
# vim: ft=hyprlang
|
||||
|
@ -9,4 +9,5 @@
|
||||
"tray",
|
||||
"clock"
|
||||
],
|
||||
"reload_style_on_change": true,
|
||||
}
|
||||
|
12
hyprland/.config/waybar/dark.css
Normal file
12
hyprland/.config/waybar/dark.css
Normal file
@ -0,0 +1,12 @@
|
||||
* {
|
||||
background-color: #3f4947;
|
||||
color: #9bafac;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid #9bafac;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 3px solid #a65959;
|
||||
}
|
13
hyprland/.config/waybar/light.css
Normal file
13
hyprland/.config/waybar/light.css
Normal file
@ -0,0 +1,13 @@
|
||||
* {
|
||||
background-color: #dde4e3;
|
||||
color: #2c3131;
|
||||
}
|
||||
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid #2c3131;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 3px solid #9e412e;
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
@import url("file:///home/lupan/.config/waybar/dark.css");
|
||||
|
||||
* {
|
||||
font-family: GoMono Nerd Font;
|
||||
font-size: 14;
|
||||
background-color: #263c59;
|
||||
color: #7b899d;
|
||||
font-family: Fira Code Nerd Font;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
padding: 0 1rem;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
@ -15,19 +15,11 @@
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
border-bottom: 3px solid #7b899d;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
border-bottom: 3px solid #a65959;
|
||||
}
|
||||
|
||||
#window {
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding: 0 1rem;
|
||||
padding: 0 0.5rem;
|
||||
border-bottom: 3px solid transparent;
|
||||
}
|
||||
|
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,47 +1,80 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||
"LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" },
|
||||
"blame.nvim": { "branch": "main", "commit": "290efdb0fc8ba7bbe5cc8d1314cf593eb2d436b0" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
|
||||
"blame.nvim": { "branch": "main", "commit": "39bb4cda9e658d053a43919b10ca52c0a4d738e1" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "b57cbaf8db3ac43c56c9e2c7f3812944638260ed" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "fa052c20aa7cc62ce6a328c7f3bd556c93b5370e" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "da326d0438ac68dee9b6b62a734be940a8bd8405" },
|
||||
"hierarchy-tree-go.nvim": { "branch": "main", "commit": "9fab9ddefe81edab4a144824955d2d085db3f49a" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
|
||||
"leap.nvim": { "branch": "main", "commit": "7a9407d17fab3a1c3cfe201965d680a408776152" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" },
|
||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
||||
"neogit": { "branch": "master", "commit": "c0b1d4dfc8ba6371857868ca7c4d33954cf002fd" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
|
||||
"nvim-surround": { "branch": "main", "commit": "d47001f8ddf9646c24f16d2732d4d0255acd2121" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "1b050206e490a4146cdf25c7b38969c1711b5620" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "f5183cea0fda26126e22e789382c208e7b1120f4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
|
||||
"onenord.nvim": { "branch": "main", "commit": "ce4aacbaa50b6b44a3e69eee6a3f380e96ccdbd0" },
|
||||
"orgmode": { "branch": "master", "commit": "edbcbfb7f156e0e4468d20e092e88a8127d6c12c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||
"telescope-git-grep.nvim": { "branch": "main", "commit": "814217cb30c076bc5edebe36e525b05a7c9eb4b2" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
|
||||
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
|
||||
"go.nvim": { "branch": "master", "commit": "0d426e87227dd14584881ecc595c173121456111" },
|
||||
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
|
||||
"guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" },
|
||||
"hardtime.nvim": { "branch": "main", "commit": "f87c86d1aa1e05dcf3c6ecd97fbfd237e2de0bf5" },
|
||||
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
|
||||
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
|
||||
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"leap.nvim": { "branch": "main", "commit": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "b58cca003d1d3311213d6db0352f58d8e57bfff0" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" },
|
||||
"marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" },
|
||||
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||
"melange-nvim": { "branch": "master", "commit": "2db5407f2f6d6d6286f50f2f7365728d66f6f3ae" },
|
||||
"mellifluous.nvim": { "branch": "v1", "commit": "1637e46585435ebda7963248e0e65422effad8d9" },
|
||||
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
|
||||
"nano-theme.nvim": { "branch": "main", "commit": "0b1158c4911f4bd9d5a1e2e7669ebff893435b64" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"neogit": { "branch": "master", "commit": "6d1bd94f7fca92a50a892f494920696b5defa8c8" },
|
||||
"nordic.nvim": { "branch": "main", "commit": "8627750ece357e9670f9e69853091f7fbb8d6523" },
|
||||
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "0a1ac55d7d4ec2b2ed9616dfc5406791234d1d2b" },
|
||||
"nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "aece1062335a9e856636f5da12d8a06c7615ce8a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
|
||||
"oil.nvim": { "branch": "master", "commit": "ab887d926c2665a708fbe9e6c4654042cc5f4c60" },
|
||||
"onenord.nvim": { "branch": "main", "commit": "babdcc3da92f0c90703bb612a13a58e5f7669287" },
|
||||
"orgmode": { "branch": "master", "commit": "145dce4d2f1bbaed5ff9e353822981b783627b32" },
|
||||
"persisted.nvim": { "branch": "main", "commit": "b4b7a281307f8b52d47b0fd5b6798a453681d44e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"quicker.nvim": { "branch": "master", "commit": "1798be71cdcb15fb84fa8054148a56e17fd391dc" },
|
||||
"rabbit.nvim": { "branch": "master", "commit": "3a4ce048b8ecc48811d061220d0e86111adda20d" },
|
||||
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
|
||||
"slimline.nvim": { "branch": "main", "commit": "326514876f6e5c051a7a2bf1e926659a74500016" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-git-grep.nvim": { "branch": "main", "commit": "cdd8215f15843a420b5c8e792395c403136626b6" },
|
||||
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
"tree-sitter-nu": { "branch": "main", "commit": "c5b7816043992b1cdc1462a889bc74dc08576fa6" },
|
||||
"tree-sitter-templ": { "branch": "master", "commit": "044ad200092170727650fa6d368df66a8da98f9d" },
|
||||
"treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
|
||||
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
|
||||
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"tree-sitter-nu": { "branch": "main", "commit": "d5c71a10b4d1b02e38967b05f8de70e847448dd1" },
|
||||
"tree-sitter-templ": { "branch": "master", "commit": "7f7f06b3931ca00e8ddfbeab3fc08ad00d297fad" },
|
||||
"treesj": { "branch": "main", "commit": "6c616638e3aa0087f2c267bb5990115b67105976" },
|
||||
"treewalker.nvim": { "branch": "main", "commit": "43d3250007d2c5a2ed693c1edebf66d66af33407" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
|
||||
"vim-ReplaceWithRegister": { "branch": "master", "commit": "b82bf59e5387b57d0125afb94fd7984061031136" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" },
|
||||
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"yankbank-nvim": { "branch": "main", "commit": "ded8f01bd6a7887310e14d463c8aa55eb79ec281" },
|
||||
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -10,11 +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>Explore<CR>", { desc = "[D]isplay [d]irectory" })
|
||||
key("n", "<leader>dv", "<cmd>Vexplore<CR>", { desc = "[D]isplay directory ([v]ertical split)" })
|
||||
key("n", "<leader>dh", "<cmd>Sexplore<CR>", { desc = "[D]isplay [d]irectory ([h]orizontal split)" })
|
||||
key("n", "<leader>dt", "<cmd>Lexplore 30<CR>", { desc = "[D]isplay directory [t]oggle" })
|
||||
key("n", "<leader>ct", "<cmd>ColorizerToggle<CR>", { desc = "[C]olorizer [t]oggle" })
|
||||
key("n", "<leader>ut", "<cmd>UndotreeToggle<CR>", { desc = "[U]undotree [t]oggle" })
|
||||
|
||||
-- tabs
|
||||
@ -39,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' })
|
||||
@ -110,16 +111,6 @@ end, { silent = true })
|
||||
vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasnip.lua<CR>",
|
||||
{ desc = "[S]nippets [s]ource" })
|
||||
|
||||
-- terminal
|
||||
|
||||
key('t', '<C-_>', '<C-\\><C-n>')
|
||||
|
||||
-- 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
|
||||
|
53
nvim/.config/nvim/lua/lupan/utils.lua
Normal file
53
nvim/.config/nvim/lua/lupan/utils.lua
Normal file
@ -0,0 +1,53 @@
|
||||
local M = {}
|
||||
|
||||
local filename = os.getenv('HOME') .. '/.config/alacritty/alacritty.toml'
|
||||
|
||||
local colorschemes = nil
|
||||
|
||||
function M.set_color_schemes(dark, light)
|
||||
colorschemes = { dark = dark, light = light }
|
||||
end
|
||||
|
||||
function M.terminalbg()
|
||||
local ok, lines = pcall(io.lines, filename)
|
||||
if ok then
|
||||
for line in lines do
|
||||
if string.find(line, 'light.toml') then
|
||||
return "light"
|
||||
end
|
||||
end
|
||||
end
|
||||
return "dark"
|
||||
end
|
||||
|
||||
function M.update_color_scheme()
|
||||
vim.o.background = M.terminalbg()
|
||||
if colorschemes then
|
||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||
end
|
||||
end
|
||||
|
||||
function M.toggle_color_scheme()
|
||||
if vim.o.background == "dark" then
|
||||
vim.o.background = "light"
|
||||
else
|
||||
vim.o.background = "dark"
|
||||
end
|
||||
if colorschemes then
|
||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||
end
|
||||
end
|
||||
|
||||
local w = vim.uv.new_fs_event()
|
||||
|
||||
local function watch(fname)
|
||||
w:start(filename, {}, vim.schedule_wrap(function(...)
|
||||
M.update_color_scheme()
|
||||
w:stop()
|
||||
watch(fname)
|
||||
end))
|
||||
end
|
||||
|
||||
watch(filename)
|
||||
|
||||
return M
|
@ -1,32 +1,35 @@
|
||||
local function cwd()
|
||||
return vim.fn.getcwd()
|
||||
end
|
||||
|
||||
return {
|
||||
-- Colorscheme
|
||||
{
|
||||
"ramojus/mellifluous.nvim",
|
||||
branch = "v1",
|
||||
},
|
||||
{
|
||||
'rmehri01/onenord.nvim',
|
||||
},
|
||||
{
|
||||
'AlexvZyl/nordic.nvim',
|
||||
},
|
||||
{
|
||||
"savq/melange-nvim",
|
||||
},
|
||||
{
|
||||
'ronisbr/nano-theme.nvim',
|
||||
config = function()
|
||||
vim.cmd.colorscheme("onenord")
|
||||
local nano = require('nano-theme.colors')
|
||||
local nano_get = nano.get
|
||||
function nano.get()
|
||||
local t = nano_get()
|
||||
local light = vim.o.background == 'light'
|
||||
if not light then
|
||||
t.nano_strong.fg = '#ECEFF4'
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
require('lupan.utils').set_color_schemes('nano-theme', 'nano-theme')
|
||||
require('lupan.utils').update_color_scheme()
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
-- Statusline (see `:help lualine.txt`)
|
||||
'nvim-lualine/lualine.nvim',
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
theme = 'auto',
|
||||
component_separators = '|',
|
||||
section_separators = '',
|
||||
},
|
||||
sections = {
|
||||
lualine_x = { cwd, 'encoding', 'fileformat', 'filetype' }
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
-- Indentation guides (see `:help indent_blankline.txt`)
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
@ -35,7 +38,15 @@ return {
|
||||
},
|
||||
|
||||
{
|
||||
'norcalli/nvim-colorizer.lua',
|
||||
cmd = 'ColorizerToggle'
|
||||
--- Create Color Code
|
||||
'uga-rosa/ccc.nvim',
|
||||
config = function(_, opts)
|
||||
require('ccc').setup(opts)
|
||||
end,
|
||||
cmd = { 'CccPick', 'CccHighlighterToggle' },
|
||||
keys = {
|
||||
{ "<leader>ct", "<cmd>CccHighlighterToggle<cr>", desc = "[C]olorizer [T]oggle" },
|
||||
{ "<leader>cp", "<cmd>CccPick<cr>", desc = "[C]olor [P]ick" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ return {
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
require('luasnip.loaders.from_lua').lazy_load({ paths = '~/.config/nvim/snippets' })
|
||||
luasnip.config.setup {}
|
||||
luasnip.filetype_extend('templ', { "html" })
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
@ -67,5 +68,11 @@ return {
|
||||
{ name = 'path' },
|
||||
},
|
||||
}
|
||||
cmp.setup.filetype('sql', {
|
||||
sources = {
|
||||
{ name = 'vim-dadbod-completion' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
12
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
12
nvim/.config/nvim/lua/plugins/bookmarks.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
{
|
||||
"chentoast/marks.nvim",
|
||||
event = "VeryLazy",
|
||||
config = true,
|
||||
keys = {
|
||||
{ '<leader>ma', '<cmd>MarksListAll<CR>' },
|
||||
{ '<leader>mb', '<cmd>MarksListBuf<CR>' },
|
||||
{ '<leader>mg', '<cmd>MarksListGlobal<CR>' },
|
||||
},
|
||||
},
|
||||
}
|
@ -2,18 +2,50 @@ return {
|
||||
{
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter',
|
||||
config = function()
|
||||
require('which-key').setup()
|
||||
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,
|
||||
},
|
||||
{
|
||||
"folke/zen-mode.nvim",
|
||||
opts = {
|
||||
window = { width = 180 },
|
||||
plugins = {
|
||||
tmux = { enabled = true },
|
||||
},
|
||||
on_open = function()
|
||||
vim.opt.laststatus = 1
|
||||
require('incline').disable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = true' })
|
||||
end,
|
||||
on_close = function()
|
||||
vim.opt.laststatus = 3
|
||||
require('incline').enable()
|
||||
vim.system({ 'hyprctl', 'dispatch', 'fullscreen' })
|
||||
vim.system({ 'awesome-client', 'client.focus.fullscreen = false' })
|
||||
end
|
||||
},
|
||||
keys = { { "<leader>z", "<cmd>ZenMode<CR>" } },
|
||||
},
|
||||
}
|
||||
|
@ -13,10 +13,82 @@ 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 = true,
|
||||
},
|
||||
|
||||
{
|
||||
'inkarkat/vim-ReplaceWithRegister',
|
||||
keys = {
|
||||
{ 'gp', '<Plug>ReplaceWithRegisterOperator' },
|
||||
{ 'gpp', '<Plug>ReplaceWithRegisterLine' },
|
||||
{ 'gp', '<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' },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
version = '*',
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
require('mini.ai').setup()
|
||||
end
|
||||
},
|
||||
}
|
||||
|
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" },
|
||||
},
|
||||
},
|
||||
}
|
@ -7,25 +7,41 @@ return {
|
||||
'sindrets/diffview.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
config = function()
|
||||
local neogit = require('neogit')
|
||||
neogit.setup()
|
||||
vim.keymap.set('n', '<leader>go', neogit.open, { desc = 'Neo[g]it [O]pen' })
|
||||
vim.keymap.set('n', '<leader>g.', function() neogit.open({ cwd = '%:p:h' }) end,
|
||||
{ desc = 'Neo[g]it open in current file repository' })
|
||||
local diffview = require('diffview')
|
||||
vim.keymap.set('n', '<leader>gh', diffview.file_history, { desc = '[G]it [H]istory' })
|
||||
vim.keymap.set('n', '<leader>g%', function() diffview.file_history(nil, { '%' }) end,
|
||||
{ desc = '[G]it history for [%] current file' })
|
||||
end
|
||||
opts = {
|
||||
graph_style = 'unicode',
|
||||
use_per_project_settings = false,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>go',
|
||||
function() require('neogit').open() end,
|
||||
desc = 'Neo[g]it [O]pen'
|
||||
},
|
||||
{
|
||||
'<leader>g.',
|
||||
function() require('neogit').open({ cwd = '%:p:h' }) end,
|
||||
desc = 'Neo[g]it open in current file repository'
|
||||
},
|
||||
{
|
||||
'<leader>gh',
|
||||
function() require('diffview').file_history() end,
|
||||
desc = '[G]it [H]istory',
|
||||
},
|
||||
{
|
||||
'<leader>g%',
|
||||
function() require('diffview').file_history(nil, { '%' }) end,
|
||||
desc = '[G]it history for [%] current file'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
'FabijanZulj/blame.nvim',
|
||||
config = function()
|
||||
local blame = require('blame')
|
||||
vim.keymap.set('n', '<leader>gb', function() blame.toggle({ args = 'window' }) end)
|
||||
end
|
||||
config = true,
|
||||
cmd = 'BlameToggle',
|
||||
keys = {
|
||||
{ '<leader>gb', '<cmd>BlameToggle<cr>', desc = '[G]it [B]lame toggle' },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
12
nvim/.config/nvim/lua/plugins/global-note.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
'backdround/global-note.nvim',
|
||||
keys = {
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
require('global-note').toggle_note()
|
||||
end,
|
||||
desc = 'Toggle global [N]ote',
|
||||
},
|
||||
},
|
||||
}
|
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
13
nvim/.config/nvim/lua/plugins/go.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
"ray-x/go.nvim",
|
||||
dependencies = {
|
||||
"ray-x/guihua.lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("go").setup(opts)
|
||||
end,
|
||||
event = { "CmdlineEnter" },
|
||||
ft = { "go", 'gomod' },
|
||||
}
|
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' },
|
||||
},
|
||||
},
|
||||
}
|
7
nvim/.config/nvim/lua/plugins/hardtime.lua
Normal file
7
nvim/.config/nvim/lua/plugins/hardtime.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
{
|
||||
"m4xshen/hardtime.nvim",
|
||||
dependencies = { "MunifTanjim/nui.nvim" },
|
||||
opts = {}
|
||||
},
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local harpoon = require "harpoon"
|
||||
harpoon:setup()
|
||||
vim.keymap.set('n', '<leader>i', function() harpoon:list():add() end, { desc = "Harpoon add new [I]tem" })
|
||||
vim.keymap.set('n', '<leader>m', function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
|
||||
{ desc = "Harpoon [M]enu" })
|
||||
for i = 1, 9, 1 do
|
||||
vim.keymap.set('n', '<M-' .. i .. '>', function() harpoon:list():select(i) end)
|
||||
end
|
||||
end
|
||||
},
|
||||
}
|
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,41 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'crusj/hierarchy-tree-go.nvim',
|
||||
dependencies = 'neovim/nvim-lspconfig',
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
{
|
||||
'ggandor/leap.nvim',
|
||||
opts = {
|
||||
safe_labels = {},
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set({ 'n', 'x', 'o' }, 'gs', '<Plug>(leap)')
|
||||
vim.keymap.set({ 'n', 'x', 'o' }, 'gS', '<Plug>(leap-from-window)')
|
||||
end,
|
||||
dependencies = {
|
||||
"tpope/vim-repeat",
|
||||
},
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
},
|
||||
|
||||
{
|
||||
'Wansmer/treesj',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
||||
config = function()
|
||||
local tsj = require('treesj')
|
||||
tsj.setup({
|
||||
use_default_keymaps = false,
|
||||
})
|
||||
vim.keymap.set('n', '<leader>tg', tsj.toggle, { desc = "[T]ree to[g]gle one-line" })
|
||||
vim.keymap.set('n', '<leader>tj', tsj.join, { desc = "[T]ree [J]oin one-line" })
|
||||
vim.keymap.set('n', '<leader>ts', tsj.split, { desc = "[T]ree [S]plit one-line" })
|
||||
end,
|
||||
},
|
||||
}
|
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',
|
||||
},
|
||||
}
|
@ -25,9 +25,9 @@ return {
|
||||
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', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
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', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
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')
|
||||
|
||||
@ -36,7 +36,15 @@ return {
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
callback = function()
|
||||
local clients = vim.lsp.get_clients({ bufnr = event.buf })
|
||||
for _, cl in ipairs(clients) do
|
||||
if cl.name == 'unocss' then
|
||||
return -- skip highlight if unocss is attached (workaround)
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.document_highlight()
|
||||
end
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
@ -55,7 +63,7 @@ return {
|
||||
gopls = {},
|
||||
-- pyright = {},
|
||||
rust_analyzer = {},
|
||||
tsserver = {},
|
||||
ts_ls = {},
|
||||
|
||||
lua_ls = {
|
||||
settings = {
|
||||
@ -112,4 +120,54 @@ return {
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
'nvimdev/lspsaga.nvim',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
opts = {
|
||||
lightbulb = { enable = false }
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('lspsaga').setup(opts)
|
||||
vim.keymap.set('n', '<leader>la', '<cmd>Lspsaga code_action<CR>', { desc = "[L]spsaga code [A]ction" })
|
||||
vim.keymap.set('n', '<leader>lb', '<cmd>Lspsaga show_buf_diagnostics<CR>',
|
||||
{ desc = "[L]spsaga [B]uffer diagnostics" })
|
||||
vim.keymap.set('n', '<leader>lc', '<cmd>Lspsaga show_cursor_diagnostics<CR>',
|
||||
{ desc = "[L]spsaga [C]ursor diagnostics" })
|
||||
vim.keymap.set('n', '<leader>ld', '<cmd>Lspsaga goto_definition<CR>', { desc = "[L]spsaga goto [D]efinition" })
|
||||
vim.keymap.set('n', '<leader>lD', '<cmd>Lspsaga goto_type_definition<CR>',
|
||||
{ desc = "[L]spsaga goto type [D]efinition" })
|
||||
vim.keymap.set('n', '<leader>lf', '<cmd>Lspsaga finder<CR>', { desc = "[L]spsaga [F]inder" })
|
||||
vim.keymap.set('n', '<leader>lI', '<cmd>Lspsaga finder imp<CR>', { desc = "[L]spsaga finder [I]mplementations" })
|
||||
vim.keymap.set('n', '<leader>li', '<cmd>Lspsaga incoming_calls<CR>', { desc = "[L]spsaga [I]ncomping calls" })
|
||||
vim.keymap.set('n', '<leader>ll', '<cmd>Lspsaga show_line_diagnostics<CR>',
|
||||
{ desc = "[L]spsaga [L]ine diagnostics" })
|
||||
vim.keymap.set('n', '<leader>lo', '<cmd>Lspsaga outgoing_calls<CR>', { desc = "[L]spsaga [O]utgoing calls" })
|
||||
vim.keymap.set('n', '<leader>lO', '<cmd>Lspsaga outline<CR>', { desc = "[L]spsaga [O]utline" })
|
||||
vim.keymap.set('n', '<leader>lp', '<cmd>Lspsaga peek_definition<CR>', { desc = "[L]spsaga [P]eek definition" })
|
||||
vim.keymap.set('n', '<leader>lP', '<cmd>Lspsaga peek_type_definition<CR>',
|
||||
{ desc = "[L]spsaga [P]eek type definition" })
|
||||
vim.keymap.set('n', '<leader>lw', '<cmd>Lspsaga show_workspace_diagnostics<CR>',
|
||||
{ desc = "[L]spsaga [W]orkspace diagnostics" })
|
||||
vim.keymap.set({ 'n', 't' }, '<C-_>', '<cmd>Lspsaga term_toggle<CR>', { desc = "[L]spsaga [T]erm toggle" })
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
cmd = 'Trouble'
|
||||
},
|
||||
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
-- cfg options
|
||||
},
|
||||
}
|
||||
}
|
||||
|
17
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
17
nvim/.config/nvim/lua/plugins/persisted.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
"olimorris/persisted.nvim",
|
||||
lazy = false, -- make sure the plugin is always loaded at startup
|
||||
opts = {
|
||||
autoload = true,
|
||||
ignored_dirs = {
|
||||
"~/.config",
|
||||
"~/tmp",
|
||||
"/tmp",
|
||||
{ "~", exact = true },
|
||||
{ "/", exact = true },
|
||||
},
|
||||
},
|
||||
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 = {},
|
||||
}
|
36
nvim/.config/nvim/lua/plugins/rabbit.lua
Normal file
36
nvim/.config/nvim/lua/plugins/rabbit.lua
Normal file
@ -0,0 +1,36 @@
|
||||
local function rabbit_select(n)
|
||||
require('rabbit').Switch('harpoon').func.select(n)
|
||||
end
|
||||
|
||||
return {
|
||||
'VoxelPrismatic/rabbit.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
window = {
|
||||
float = 'center',
|
||||
plugin_name_position = 'title',
|
||||
},
|
||||
default_keys = {
|
||||
open = { '-', '<leader>;' },
|
||||
},
|
||||
plugin_opts = {
|
||||
history = { switch = ';' },
|
||||
harpoon = { switch = 'f' },
|
||||
},
|
||||
colors = {
|
||||
file = '#EBCB8B',
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ '<leader>1', function() rabbit_select(1) end },
|
||||
{ '<leader>2', function() rabbit_select(2) end },
|
||||
{ '<leader>3', function() rabbit_select(3) end },
|
||||
{ '<leader>4', function() rabbit_select(4) end },
|
||||
{ '<leader>5', function() rabbit_select(5) end },
|
||||
{ '<leader>6', function() rabbit_select(6) end },
|
||||
{ '<leader>7', function() rabbit_select(7) end },
|
||||
{ '<leader>8', function() rabbit_select(8) end },
|
||||
{ '<leader>9', function() rabbit_select(9) end },
|
||||
{ '<leader>0', function() rabbit_select(10) end },
|
||||
},
|
||||
}
|
17
nvim/.config/nvim/lua/plugins/sql.lua
Normal file
17
nvim/.config/nvim/lua/plugins/sql.lua
Normal file
@ -0,0 +1,17 @@
|
||||
return {
|
||||
'kristijanhusak/vim-dadbod-ui',
|
||||
dependencies = {
|
||||
{ 'tpope/vim-dadbod', lazy = true },
|
||||
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
|
||||
},
|
||||
cmd = {
|
||||
'DBUI',
|
||||
'DBUIToggle',
|
||||
'DBUIAddConnection',
|
||||
'DBUIFindBuffer',
|
||||
},
|
||||
init = function()
|
||||
-- Your DBUI configuration
|
||||
vim.g.db_ui_use_nerd_fonts = 1
|
||||
end,
|
||||
}
|
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,6 +54,7 @@ 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'
|
||||
|
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', '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>b", "<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 "\")" })
|
||||
}
|
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
|
@ -5,7 +5,12 @@
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
which nu >/dev/null && exec nu
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
PS1='[\u@\h \W]\$ '
|
||||
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
|
||||
|
||||
function before_command() { echo -ne '\e[2 q'; }
|
||||
trap before_command DEBUG
|
||||
|
||||
if [[ -f /usr/share/bash-completion/bash_completion ]]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
fi
|
||||
|
@ -3,6 +3,7 @@ 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 {})"'
|
||||
|
||||
if which exa > /dev/null; then
|
||||
alias ls='exa --icons'
|
||||
|
@ -3,3 +3,9 @@ set show-mode-in-prompt on
|
||||
set vi-ins-mode-string \1\e[6 q\2
|
||||
set vi-cmd-mode-string \1\e[2 q\2
|
||||
|
||||
set keymap vi-command
|
||||
"k": history-substring-search-backward
|
||||
"j": history-substring-search-forward
|
||||
|
||||
set keymap vi-insert
|
||||
"\C-l": clear-screen
|
||||
|
@ -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
|
||||
|
47
shell/.zshrc
47
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"
|
||||
|
||||
@ -15,21 +17,43 @@ plug "Aloxaf/fzf-tab"
|
||||
plug "zap-zsh/fzf"
|
||||
plug "zsh-users/zsh-autosuggestions"
|
||||
plug "zsh-users/zsh-syntax-highlighting"
|
||||
plug "MichaelAquilina/zsh-you-should-use"
|
||||
plug "zsh-users/zsh-history-substring-search"
|
||||
|
||||
if which zoxide > /dev/null; then
|
||||
eval "$(zoxide init zsh)"
|
||||
else
|
||||
plug "agkozak/zsh-z"
|
||||
ZSHZ_ECHO=1
|
||||
setopt autocd
|
||||
fi
|
||||
|
||||
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
|
||||
ZSH_HIGHLIGHT_STYLES[comment]=fg=blue
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND=bg=magenta,fg=black,bold
|
||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND=bg=red,fg=black,bold
|
||||
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
bindkey -M vicmd 'k' history-substring-search-up
|
||||
bindkey -M vicmd 'j' history-substring-search-down
|
||||
|
||||
# Prompt.
|
||||
|
||||
autoload -Uz vcs_info
|
||||
precmd () { vcs_info }
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:git:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f '
|
||||
zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f '
|
||||
zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b '
|
||||
zstyle ':vcs_info:*' enable git
|
||||
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
|
||||
RPROMPT='%(?..%B%F{red}%?%f%b)'
|
||||
if which starship > /dev/null; then
|
||||
eval "$(starship init zsh)"
|
||||
else
|
||||
autoload -Uz vcs_info
|
||||
precmd () { vcs_info }
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:git:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' formats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b)%u%c%f '
|
||||
zstyle ':vcs_info:git:*' actionformats '%F{green}%r%f/%F{yellow}%S%f %F{magenta}(%b|%a)%u%c%f '
|
||||
zstyle ':vcs_info:*' nvcsformats '%F{green}%~%f%b '
|
||||
zstyle ':vcs_info:*' enable git
|
||||
PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b '
|
||||
RPROMPT='%(?..%B%F{red}%?%f%b)'
|
||||
fi
|
||||
|
||||
# History.
|
||||
|
||||
@ -48,7 +72,6 @@ setopt share_history
|
||||
|
||||
# Convenience.
|
||||
|
||||
setopt autocd
|
||||
bindkey -M vicmd '^[h' run-help
|
||||
bindkey -M viins '^[h' run-help
|
||||
|
||||
|
@ -3,19 +3,35 @@ set -g status-fg colour7
|
||||
|
||||
set -sg escape-time 0
|
||||
|
||||
bind-key -n M-j select-pane -D
|
||||
bind-key -n M-k select-pane -U
|
||||
bind-key -n M-h select-pane -L
|
||||
bind-key -n M-l select-pane -R
|
||||
bind-key -n M-J switch-client -n
|
||||
bind-key -n M-K switch-client -p
|
||||
bind-key -n M-H previous-window
|
||||
bind-key -n M-L next-window
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
|
||||
bind-key -n M-! swap-window -t 1
|
||||
bind-key -n M-@ swap-window -t 2
|
||||
bind-key -n M-# swap-window -t 3
|
||||
bind-key -n M-$ swap-window -t 4
|
||||
bind-key -n M-% swap-window -t 5
|
||||
bind-key -n M-^ swap-window -t 6
|
||||
bind-key -n M-& swap-window -t 7
|
||||
bind-key -n M-* swap-window -t 8
|
||||
bind-key -n M-( swap-window -t 9
|
||||
bind-key -n M-) swap-window -t 10
|
||||
|
||||
bind-key S new-session
|
||||
bind-key T switch-client -l
|
||||
|
||||
bind -n C-S-Left swap-window -t -1
|
||||
bind -n C-S-Right swap-window -t 1
|
||||
bind-key Right resize-pane -R 8
|
||||
bind-key Left resize-pane -L 8
|
||||
bind-key Up resize-pane -U 4
|
||||
bind-key Down resize-pane -D 4
|
||||
|
||||
set -g default-terminal "screen-256color"
|
||||
set -as terminal-features ",*:RGB"
|
||||
@ -27,9 +43,43 @@ set -g set-titles on
|
||||
set -g set-titles-string "#H [#S]"
|
||||
|
||||
set -g status-justify centre
|
||||
set -g status-left "#[bg=green]#[fg=black] #H #[bg=default]#[fg=default] #S"
|
||||
set -g status-left " #[fg=green]#[bg=green]#[fg=black] #H #[bg=default]#[fg=green]#[fg=default] #S"
|
||||
set -g status-left-length 50
|
||||
set -g status-right "#[bg=green]#[fg=black] %H:%M "
|
||||
set -g status-right "#[fg=green]#[bg=green]#[fg=black] %H:%M #[bg=default]#[fg=green] "
|
||||
set-window-option -g window-status-current-format '#[fg=green]#[bg=green]#[fg=black] #I:#W#F #[fg=green]#[bg=black]'
|
||||
|
||||
set-window-option -g window-status-current-style bg=green
|
||||
set-window-option -ga window-status-current-style fg=black
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?\.?(view|n?vim?x?)(-wrapped)?(diff)?$'"
|
||||
|
||||
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'select-pane -L'
|
||||
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'select-pane -D'
|
||||
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'select-pane -U'
|
||||
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'select-pane -R'
|
||||
bind-key -n 'M-n' if-shell "$is_vim" 'send-keys M-n' 'select-window -n'
|
||||
bind-key -n 'M-p' if-shell "$is_vim" 'send-keys M-p' 'select-window -p'
|
||||
|
||||
bind-key -T copy-mode-vi 'M-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'M-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'M-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'M-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'M-n' select-window -n
|
||||
bind-key -T copy-mode-vi 'M-p' select-window -p
|
||||
|
||||
bind -n 'M-H' if-shell "$is_vim" 'send-keys M-H' 'resize-pane -L 1'
|
||||
bind -n 'M-J' if-shell "$is_vim" 'send-keys M-J' 'resize-pane -D 1'
|
||||
bind -n 'M-K' if-shell "$is_vim" 'send-keys M-K' 'resize-pane -U 1'
|
||||
bind -n 'M-L' if-shell "$is_vim" 'send-keys M-L' 'resize-pane -R 1'
|
||||
|
||||
bind-key -T copy-mode-vi M-H resize-pane -L 1
|
||||
bind-key -T copy-mode-vi M-J resize-pane -D 1
|
||||
bind-key -T copy-mode-vi M-K resize-pane -U 1
|
||||
bind-key -T copy-mode-vi M-L resize-pane -R 1
|
||||
|
||||
bind -n 'C-M-h' if-shell "$is_vim" 'send-keys C-M-h' 'swap-pane -s "{left-of}"'
|
||||
bind -n 'C-M-j' if-shell "$is_vim" 'send-keys C-M-j' 'swap-pane -s "{down-of}"'
|
||||
bind -n 'C-M-k' if-shell "$is_vim" 'send-keys C-M-k' 'swap-pane -s "{up-of}"'
|
||||
bind -n 'C-M-l' if-shell "$is_vim" 'send-keys C-M-l' 'swap-pane -s "{right-of}"'
|
||||
|
||||
bind-key -T copy-mode-vi C-M-h swap-pane -s "{left-of}"
|
||||
bind-key -T copy-mode-vi C-M-j swap-pane -s "{down-of}"
|
||||
bind-key -T copy-mode-vi C-M-k swap-pane -s "{up-of}"
|
||||
bind-key -T copy-mode-vi C-M-l swap-pane -s "{right-of}"
|
||||
|
@ -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,9 +27,20 @@ if [ -f ~/.config/alacritty/alacritty.toml ]; then
|
||||
sed -i "s#^import =.*#import = [\"~/.config/alacritty/$THEME.toml\"]#" ~/.config/alacritty/alacritty.toml
|
||||
fi
|
||||
|
||||
if [ "$THEME" = dark ]; then
|
||||
kitten themes --reload-in=all Afterglow
|
||||
elif [ "$THEME" = light ]; then
|
||||
kitten themes --reload-in=all One Half Light
|
||||
fi
|
||||
|
||||
# GTK
|
||||
if [ -f ~/.config/xsettingsd/xsettingsd.conf ]; then
|
||||
sed -i -E "s#(Net/ThemeName) .*#\\1 \"${GTK_THEME}\"#" ~/.config/xsettingsd/xsettingsd.conf
|
||||
pkill -HUP -x xsettingsd
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "${GTK_THEME}"
|
||||
fi
|
||||
|
||||
# waybar
|
||||
if [ -f ~/.config/waybar/style.css ]; then
|
||||
sed -i -E "s#file:///.*/(light|dark)[.]css#file://$HOME/.config/waybar/$THEME.css#" ~/.config/waybar/style.css
|
||||
fi
|
||||
|
17
yazi/.config/yazi/yazi.toml
Normal file
17
yazi/.config/yazi/yazi.toml
Normal file
@ -0,0 +1,17 @@
|
||||
[opener]
|
||||
imv = [
|
||||
{ run = 'imv "$@"', orphan = true },
|
||||
]
|
||||
zathura = [
|
||||
{ run = 'zathura "$@"', orphan = true },
|
||||
]
|
||||
nvim_cd = [
|
||||
{ run = 'nvim -c "cd $@"', block = true }
|
||||
]
|
||||
|
||||
[open]
|
||||
prepend_rules = [
|
||||
{ mime = "image/*", use = "imv" },
|
||||
{ mime = "application/pdf", use = "zathura" },
|
||||
{ mime = "inode/directory", use = "nvim_cd" }
|
||||
]
|
Reference in New Issue
Block a user