Compare commits
23 Commits
e52f913172
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d17a5d9421 | |||
| 7de93a72ee | |||
| a4100d24ba | |||
| 28e8914c8e | |||
| c2b5cce8ef | |||
| e4519ef5b3 | |||
| b0d548024d | |||
| d472603dbf | |||
| eb8ae6f118 | |||
| 9ade674964 | |||
| 376d017d40 | |||
| 61f923da47 | |||
| 9fe47c4807 | |||
| c9d3b514fe | |||
| b923a8a071 | |||
| d5767a1caf | |||
| 4b56e3c494 | |||
| 304cb8ef5f | |||
| a6ce7128d3 | |||
| 6c21d8c1c3 | |||
| 01b7c4e280 | |||
| a6c2687a8f | |||
| 26f9ad46d3 |
BIN
.bg/bg_4.png
Normal file
BIN
.bg/bg_4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 MiB |
BIN
.bg/bg_5.png
Normal file
BIN
.bg/bg_5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 139 KiB |
4
.zshrc
4
.zshrc
@@ -75,7 +75,6 @@
|
|||||||
alias du="ncdu"
|
alias du="ncdu"
|
||||||
alias cat="bat"
|
alias cat="bat"
|
||||||
alias ls="lsd"
|
alias ls="lsd"
|
||||||
alias vi="~/.local/bin/lvim"
|
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
@@ -95,3 +94,6 @@ source ~/.zsh/zsh-fzf-tab/fzf-tab.plugin.zsh
|
|||||||
|
|
||||||
SAVEHIST=1000
|
SAVEHIST=1000
|
||||||
HISTFILE=~/.zsh_history
|
HISTFILE=~/.zsh_history
|
||||||
|
|
||||||
|
# Created by `pipx` on 2024-10-24 13:49:13
|
||||||
|
export PATH="$PATH:/home/doryan/.local/bin"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
pgrep -x sxhkd > /dev/null || sxhkd &
|
|
||||||
|
|
||||||
bspc monitor DVI-I-1 -d I II III IV V
|
bspc monitor DVI-I-1 -d I II III IV V
|
||||||
bspc monitor HDMI-1 -d VI VII VIII IX X
|
bspc monitor HDMI-1 -d VI VII VIII IX X
|
||||||
|
|
||||||
@@ -20,18 +18,16 @@ bspc config pointer_action3 resize_corner
|
|||||||
bspc rule -a scratch sticky=on state=floating focus=on
|
bspc rule -a scratch sticky=on state=floating focus=on
|
||||||
|
|
||||||
bspc config split_ratio 0.52
|
bspc config split_ratio 0.52
|
||||||
bspc config borderless_monocle true
|
|
||||||
bspc config gapless_monocle true
|
|
||||||
|
|
||||||
bspc config active_border_color "#E0A3B6"
|
bspc config active_border_color "#E0A3B6"
|
||||||
bspc config normal_border_color "#8393A1"
|
bspc config normal_border_color "#8393A1"
|
||||||
bspc config focused_border_color "#93D4C5"
|
bspc config focused_border_color "#93D4C5"
|
||||||
|
|
||||||
sxhkd &
|
|
||||||
picom &
|
picom &
|
||||||
feh --bg-fill ~/.bg/bg_3.jpg ~/.bg/bg_3.jpg &
|
feh --bg-fill ~/.bg/bg_5.png ~/.bg/bg_5.png &
|
||||||
|
pipewire -v 2>/home/doryan/.config/bspwm/log&
|
||||||
dunst &
|
dunst &
|
||||||
|
xmousepasteblock &
|
||||||
xsetroot -cursor_name left_ptr &
|
xsetroot -cursor_name left_ptr &
|
||||||
pgrep -x polybar > /dev/null || polybar &
|
pgrep -x sxhkd > /dev/null || sxhkd &
|
||||||
pgrep -x pipewire > /dev/null || pipewire &
|
pgrep -x polybar > /dev/null || polybar 2>/home/doryan/.config/bspwm/log&
|
||||||
pgrep -x pipewire-pulse > /dev/null || pipewire-pulse &
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#? Config file for btop v. 1.3.2
|
#? Config file for btop v. 1.4.0
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
@@ -50,20 +50,20 @@ graph_symbol_net = "default"
|
|||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
shown_boxes = "cpu mem net proc"
|
shown_boxes = "cpu net proc mem"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
update_ms = 500
|
update_ms = 500
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "command"
|
proc_sorting = "name"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = True
|
||||||
|
|
||||||
#* Show processes as a tree.
|
#* Show processes as a tree.
|
||||||
proc_tree = False
|
proc_tree = True
|
||||||
|
|
||||||
#* Use the cpu graph colors in the process list.
|
#* Use the cpu graph colors in the process list.
|
||||||
proc_colors = True
|
proc_colors = True
|
||||||
@@ -72,7 +72,7 @@ proc_colors = True
|
|||||||
proc_gradient = True
|
proc_gradient = True
|
||||||
|
|
||||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||||
proc_per_core = True
|
proc_per_core = False
|
||||||
|
|
||||||
#* Show process memory as bytes instead of percent.
|
#* Show process memory as bytes instead of percent.
|
||||||
proc_mem_bytes = True
|
proc_mem_bytes = True
|
||||||
@@ -187,7 +187,7 @@ disk_free_priv = False
|
|||||||
show_io_stat = True
|
show_io_stat = True
|
||||||
|
|
||||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||||
io_mode = True
|
io_mode = False
|
||||||
|
|
||||||
#* Set to True to show combined read/write io graphs in io mode.
|
#* Set to True to show combined read/write io graphs in io mode.
|
||||||
io_graph_combined = False
|
io_graph_combined = False
|
||||||
|
|||||||
277
cava/config
277
cava/config
@@ -1,277 +0,0 @@
|
|||||||
## Configuration file for CAVA.
|
|
||||||
# Remove the ; to change parameters.
|
|
||||||
|
|
||||||
|
|
||||||
[general]
|
|
||||||
|
|
||||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
|
|
||||||
mode = waves
|
|
||||||
|
|
||||||
# Accepts only non-negative values.
|
|
||||||
framerate = 60
|
|
||||||
|
|
||||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
|
||||||
# new as of 0.6.0 autosens of low values (dynamic range)
|
|
||||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
|
|
||||||
; autosens = 1
|
|
||||||
; overshoot = 20
|
|
||||||
|
|
||||||
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
|
|
||||||
# 200 means double height. Accepts only non-negative values.
|
|
||||||
; sensitivity = 100
|
|
||||||
|
|
||||||
# The number of bars (0-512). 0 sets it to auto (fill up console).
|
|
||||||
# Bars' width and space between bars in number of characters.
|
|
||||||
; bars = 0
|
|
||||||
; bar_width = 2
|
|
||||||
; bar_spacing = 1
|
|
||||||
# bar_height is only used for output in "noritake" format
|
|
||||||
; bar_height = 32
|
|
||||||
|
|
||||||
# For SDL width and space between bars is in pixels, defaults are:
|
|
||||||
; bar_width = 20
|
|
||||||
; bar_spacing = 5
|
|
||||||
|
|
||||||
# sdl_glsl have these default values, they are only used to calulate max number of bars.
|
|
||||||
; bar_width = 1
|
|
||||||
; bar_spacing = 0
|
|
||||||
|
|
||||||
|
|
||||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
|
||||||
# the bandwidth of the visualizer.
|
|
||||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
|
||||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
|
||||||
; lower_cutoff_freq = 50
|
|
||||||
; higher_cutoff_freq = 10000
|
|
||||||
|
|
||||||
|
|
||||||
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
|
|
||||||
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
|
|
||||||
; sleep_timer = 0
|
|
||||||
|
|
||||||
|
|
||||||
[input]
|
|
||||||
|
|
||||||
# Audio capturing method. Possible methods are: 'fifo', 'portaudio', 'pipewire', 'alsa', 'pulse', 'sndio', 'oss', 'jack' or 'shmem'
|
|
||||||
# Defaults to 'oss', 'pipewire', 'sndio', 'jack', 'pulse', 'alsa', 'portaudio' or 'fifo', in that order, dependent on what support cava was built with.
|
|
||||||
# On Mac it defaults to 'portaudio' or 'fifo'
|
|
||||||
# On windows this is automatic and no input settings are needed.
|
|
||||||
#
|
|
||||||
# All input methods uses the same config variable 'source'
|
|
||||||
# to define where it should get the audio.
|
|
||||||
#
|
|
||||||
# For pulseaudio and pipewire 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
|
||||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
|
||||||
#
|
|
||||||
# For pipewire 'source' will be the object name or object.serial of the device to capture from.
|
|
||||||
# Both input and output devices are supported.
|
|
||||||
#
|
|
||||||
# For alsa 'source' will be the capture device.
|
|
||||||
# For fifo 'source' will be the path to fifo-file.
|
|
||||||
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
|
|
||||||
#
|
|
||||||
# For sndio 'source' will be a raw recording audio descriptor or a monitoring sub-device, e.g. 'rsnd/2' or 'snd/1'. Default: 'default'.
|
|
||||||
# README.md contains further information on how to setup CAVA for sndio.
|
|
||||||
#
|
|
||||||
# For oss 'source' will be the path to a audio device, e.g. '/dev/dsp2'. Default: '/dev/dsp', i.e. the default audio device.
|
|
||||||
# README.md contains further information on how to setup CAVA for OSS on FreeBSD.
|
|
||||||
#
|
|
||||||
# For jack 'source' will be the name of the JACK server to connect to, e.g. 'foobar'. Default: 'default'.
|
|
||||||
# README.md contains further information on how to setup CAVA for JACK.
|
|
||||||
#
|
|
||||||
; method = pulse
|
|
||||||
; source = auto
|
|
||||||
|
|
||||||
; method = pipewire
|
|
||||||
; source = auto
|
|
||||||
|
|
||||||
; method = alsa
|
|
||||||
; source = hw:Loopback,1
|
|
||||||
|
|
||||||
; method = fifo
|
|
||||||
; source = /tmp/mpd.fifo
|
|
||||||
|
|
||||||
; method = shmem
|
|
||||||
; source = /squeezelite-AA:BB:CC:DD:EE:FF
|
|
||||||
|
|
||||||
; method = portaudio
|
|
||||||
; source = auto
|
|
||||||
|
|
||||||
; method = sndio
|
|
||||||
; source = default
|
|
||||||
|
|
||||||
; method = oss
|
|
||||||
; source = /dev/dsp
|
|
||||||
|
|
||||||
; method = jack
|
|
||||||
; source = default
|
|
||||||
|
|
||||||
# The options 'sample_rate', 'sample_bits', 'channels' and 'autoconnect' can be configured for some input methods:
|
|
||||||
# sample_rate: fifo, pipewire, sndio, oss
|
|
||||||
# sample_bits: fifo, pipewire, sndio, oss
|
|
||||||
# channels: sndio, oss, jack
|
|
||||||
# autoconnect: jack
|
|
||||||
# Other methods ignore these settings.
|
|
||||||
#
|
|
||||||
# For 'sndio' and 'oss' they are only preferred values, i.e. if the values are not supported
|
|
||||||
# by the chosen audio device, the device will use other supported values instead.
|
|
||||||
# Example: 48000, 32 and 2, but the device only supports 44100, 16 and 1, then it
|
|
||||||
# will use 44100, 16 and 1.
|
|
||||||
#
|
|
||||||
; sample_rate = 44100
|
|
||||||
; sample_bits = 16
|
|
||||||
; channels = 2
|
|
||||||
; autoconnect = 2
|
|
||||||
|
|
||||||
|
|
||||||
[output]
|
|
||||||
|
|
||||||
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake', 'sdl'
|
|
||||||
# or 'sdl_glsl'.
|
|
||||||
# 'noncurses' (default) uses a buffer and cursor movements to only print
|
|
||||||
# changes from frame to frame in the terminal. Uses less resources and is less
|
|
||||||
# prone to tearing (vsync issues) than 'ncurses'.
|
|
||||||
#
|
|
||||||
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
|
|
||||||
# stream of the bar heights that can be used to send to other applications.
|
|
||||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
|
||||||
#
|
|
||||||
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
|
|
||||||
# in graphic mode. It only support the 3000 series graphical VFDs for now.
|
|
||||||
#
|
|
||||||
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
|
|
||||||
# 'sdl_glsl' uses SDL to create an OpenGL context. Write your own shaders or
|
|
||||||
# use one of the predefined ones.
|
|
||||||
; method = noncurses
|
|
||||||
|
|
||||||
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
|
|
||||||
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
|
|
||||||
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
|
|
||||||
# which can make ncurses not look right.
|
|
||||||
; orientation = bottom
|
|
||||||
|
|
||||||
# Visual channels. Can be 'stereo' or 'mono'.
|
|
||||||
# 'stereo' mirrors both channels with low frequencies in center.
|
|
||||||
# 'mono' outputs left to right lowest to highest frequencies.
|
|
||||||
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
|
|
||||||
# set 'reverse' to 1 to display frequencies the other way around.
|
|
||||||
; channels = stereo
|
|
||||||
; mono_option = average
|
|
||||||
; reverse = 0
|
|
||||||
|
|
||||||
# Raw output target. A fifo will be created if target does not exist.
|
|
||||||
; raw_target = /dev/stdout
|
|
||||||
|
|
||||||
# Raw data format. Can be 'binary' or 'ascii'.
|
|
||||||
; data_format = binary
|
|
||||||
|
|
||||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
|
||||||
; bit_format = 16bit
|
|
||||||
|
|
||||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
|
||||||
; ascii_max_range = 1000
|
|
||||||
|
|
||||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
|
||||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
|
||||||
; bar_delimiter = 59
|
|
||||||
; frame_delimiter = 10
|
|
||||||
|
|
||||||
# sdl window size and position. -1,-1 is centered.
|
|
||||||
; sdl_width = 1000
|
|
||||||
; sdl_height = 500
|
|
||||||
; sdl_x = -1
|
|
||||||
; sdl_y= -1
|
|
||||||
; sdl_full_screen = 0
|
|
||||||
|
|
||||||
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
|
|
||||||
# 'frequency' displays the lower cut off frequency of the bar above.
|
|
||||||
# Only supported on ncurses and noncurses output.
|
|
||||||
; xaxis = none
|
|
||||||
|
|
||||||
# enable alacritty synchronized updates. 1 = on, 0 = off
|
|
||||||
# removes flickering in alacritty terminal emulator.
|
|
||||||
# defaults to off since the behaviour in other terminal emulators is unknown
|
|
||||||
; alacritty_sync = 0
|
|
||||||
|
|
||||||
# Shaders for sdl_glsl, located in $HOME/.config/cava/shaders
|
|
||||||
; vertex_shader = pass_through.vert
|
|
||||||
; fragment_shader = bar_spectrum.frag
|
|
||||||
|
|
||||||
; for glsl output mode, keep rendering even if no audio
|
|
||||||
; continuous_rendering = 0
|
|
||||||
|
|
||||||
# disable console blank (screen saver) in tty
|
|
||||||
# (Not supported on FreeBSD)
|
|
||||||
; disable_blanking = 0
|
|
||||||
|
|
||||||
# show a flat bar at the bottom of the screen when idle, 1 = on, 0 = off
|
|
||||||
; show_idle_bar_heads = 1
|
|
||||||
|
|
||||||
# show waveform instead of frequency spectrum, 1 = on, 0 = off
|
|
||||||
; waveform = 0
|
|
||||||
|
|
||||||
[color]
|
|
||||||
|
|
||||||
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
|
||||||
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
|
|
||||||
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
|
|
||||||
# default is to keep current terminal color
|
|
||||||
; background = default
|
|
||||||
; foreground = default
|
|
||||||
|
|
||||||
# SDL and sdl_glsl only support hex code colors, these are the default:
|
|
||||||
; background = '#111111'
|
|
||||||
; foreground = '#33ffff'
|
|
||||||
|
|
||||||
|
|
||||||
# Gradient mode, only hex defined colors are supported,
|
|
||||||
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
|
|
||||||
# You can define as many as 8 different colors. They range from bottom to top of screen
|
|
||||||
gradient = 1
|
|
||||||
|
|
||||||
gradient_color_1 = '#478061'
|
|
||||||
gradient_color_2 = '#598C6E'
|
|
||||||
gradient_color_3 = '#6C987C'
|
|
||||||
gradient_color_4 = '#7EA489'
|
|
||||||
gradient_color_5 = '#8DAD94'
|
|
||||||
gradient_color_6 = '#9CB79F'
|
|
||||||
gradient_color_7 = '#ABC2AB'
|
|
||||||
gradient_color_8 = '#ABC2AB'
|
|
||||||
|
|
||||||
[smoothing]
|
|
||||||
|
|
||||||
# Percentage value for integral smoothing. Takes values from 0 - 100.
|
|
||||||
# Higher values means smoother, but less precise. 0 to disable.
|
|
||||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
|
||||||
; integral = 77
|
|
||||||
|
|
||||||
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
|
|
||||||
; monstercat = 0
|
|
||||||
; waves = 0
|
|
||||||
|
|
||||||
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
|
|
||||||
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
|
|
||||||
# DEPRECATED as of 0.8.0, use noise_reduction instead
|
|
||||||
; gravity = 100
|
|
||||||
|
|
||||||
|
|
||||||
# In bar height, bars that would have been lower that this will not be drawn.
|
|
||||||
# DEPRECATED as of 0.8.0
|
|
||||||
; ignore = 0
|
|
||||||
|
|
||||||
# Noise reduction, int 0 - 100. default 77
|
|
||||||
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
|
|
||||||
# 100 will be very slow and smooth, 0 will be fast but noisy.
|
|
||||||
; noise_reduction = 77
|
|
||||||
|
|
||||||
|
|
||||||
[eq]
|
|
||||||
|
|
||||||
# This one is tricky. You can have as much keys as you want.
|
|
||||||
# Remember to uncomment more than one key! More keys = more precision.
|
|
||||||
# Look at readme.md on github for further explanations and examples.
|
|
||||||
; 1 = 1 # bass
|
|
||||||
; 2 = 1
|
|
||||||
; 3 = 1 # midtone
|
|
||||||
; 4 = 1
|
|
||||||
; 5 = 1 # treble
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
#version 330
|
|
||||||
|
|
||||||
in vec2 fragCoord;
|
|
||||||
out vec4 fragColor;
|
|
||||||
|
|
||||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
|
||||||
uniform float bars[512];
|
|
||||||
|
|
||||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
|
||||||
uniform int bar_width; // bar width (configurable), not used here
|
|
||||||
uniform int bar_spacing; // space bewteen bars (configurable)
|
|
||||||
|
|
||||||
uniform vec3 u_resolution; // window resolution
|
|
||||||
|
|
||||||
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
|
||||||
uniform vec3 bg_color; // background color
|
|
||||||
uniform vec3 fg_color; // foreground color
|
|
||||||
|
|
||||||
uniform int gradient_count;
|
|
||||||
uniform vec3 gradient_colors[8]; // gradient colors
|
|
||||||
|
|
||||||
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
|
|
||||||
{
|
|
||||||
//create color based on fraction of this color and next color
|
|
||||||
float yr = (y - y_min) / (y_max - y_min);
|
|
||||||
return col_1 * (1.0 - yr) + col_2 * yr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
// find which bar to use based on where we are on the x axis
|
|
||||||
float x = u_resolution.x * fragCoord.x;
|
|
||||||
int bar = int(bars_count * fragCoord.x);
|
|
||||||
|
|
||||||
//calculate a bar size
|
|
||||||
float bar_size = u_resolution.x / bars_count;
|
|
||||||
|
|
||||||
//the y coordinate and bar values are the same
|
|
||||||
float y = bars[bar];
|
|
||||||
|
|
||||||
// make sure there is a thin line at bottom
|
|
||||||
if (y * u_resolution.y < 1.0)
|
|
||||||
{
|
|
||||||
y = 1.0 / u_resolution.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
//draw the bar up to current height
|
|
||||||
if (y > fragCoord.y)
|
|
||||||
{
|
|
||||||
//make some space between bars basen on settings
|
|
||||||
if (x > (bar + 1) * (bar_size) - bar_spacing)
|
|
||||||
{
|
|
||||||
fragColor = vec4(bg_color,1.0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (gradient_count == 0)
|
|
||||||
{
|
|
||||||
fragColor = vec4(fg_color,1.0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//find which color in the configured gradient we are at
|
|
||||||
int color = int((gradient_count - 1) * fragCoord.y);
|
|
||||||
|
|
||||||
//find where on y this and next color is supposed to be
|
|
||||||
float y_min = color / (gradient_count - 1.0);
|
|
||||||
float y_max = (color + 1.0) / (gradient_count - 1.0);
|
|
||||||
|
|
||||||
//make color
|
|
||||||
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fragColor = vec4(bg_color,1.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#version 330
|
|
||||||
|
|
||||||
in vec2 fragCoord;
|
|
||||||
out vec4 fragColor;
|
|
||||||
|
|
||||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
|
||||||
uniform float bars[512];
|
|
||||||
|
|
||||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
|
||||||
|
|
||||||
uniform vec3 u_resolution; // window resolution, not used here
|
|
||||||
|
|
||||||
//colors, configurable in cava config file
|
|
||||||
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
|
||||||
uniform vec3 fg_color; // foreground color, not used here
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
// find which bar to use based on where we are on the x axis
|
|
||||||
int bar = int(bars_count * fragCoord.x);
|
|
||||||
|
|
||||||
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
|
|
||||||
float y = (bars[bar]) * bar_y;
|
|
||||||
|
|
||||||
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
|
|
||||||
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
|
|
||||||
|
|
||||||
bar_r = bar_r * bar_r * 2;
|
|
||||||
|
|
||||||
// set color
|
|
||||||
fragColor.r = fg_color.x * y * bar_r;
|
|
||||||
fragColor.g = fg_color.y * y * bar_r;
|
|
||||||
fragColor.b = fg_color.z * y * bar_r;
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#version 330
|
|
||||||
|
|
||||||
|
|
||||||
// Input vertex data, different for all executions of this shader.
|
|
||||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
|
||||||
|
|
||||||
// Output data ; will be interpolated for each fragment.
|
|
||||||
out vec2 fragCoord;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_Position = vec4(vertexPosition_modelspace,1);
|
|
||||||
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
configs=("bspwm" "btop" "cava" "lvim" "picom" "polybar" "rofi" "yazi" "sxhkd" "dunst" "mimeapps.list" "starship.toml")
|
configs=("betterlockscreen" "bspwm" "btop" "picom" "polybar" "zathura" "rofi" "yazi" "sxhkd" "dunst" "mimeapps.list" "starship.toml")rlockscreen -u ~/.bg/bg_5.jpg
|
||||||
|
|
||||||
betterlockscreen -u ~/.bg/bg_3.jpg
|
|
||||||
|
|
||||||
for config in ${configs[@]}; do
|
for config in ${configs[@]}; do
|
||||||
cp -vr ./$config ~/.config/
|
cp -vr ./$config ~/.config/
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
-- Read the docs: https://www.lunarvim.org/docs/configuration
|
|
||||||
-- Example configs: https://github.com/LunarVim/starter.lvim
|
|
||||||
-- Video Tutorials: https://www.youtube.com/watch?v=sFA9kX-Ud_c&list=PLhoH5vyxr6QqGu0i7tt_XoVK9v-KvZ3m6
|
|
||||||
-- Forum: https://www.reddit.com/r/lunarvim/
|
|
||||||
-- Discord: https://discord.com/invite/Xb9B4Ny
|
|
||||||
|
|
||||||
lvim.colorscheme = "melange"
|
|
||||||
lvim.builtin.breadcrumbs.active = false
|
|
||||||
|
|
||||||
lvim.builtin.gitsigns.opts.signs = {
|
|
||||||
add = {
|
|
||||||
hl = "GitSignsAdd",
|
|
||||||
text = " ┃",
|
|
||||||
numhl = "GitSignsAddNr",
|
|
||||||
linehl = "GitSignsAddLn",
|
|
||||||
},
|
|
||||||
change = {
|
|
||||||
hl = "GitSignsChange",
|
|
||||||
text = " ┃",
|
|
||||||
numhl = "GitSignsChangeNr",
|
|
||||||
linehl = "GitSignsChangeLn",
|
|
||||||
},
|
|
||||||
delete = {
|
|
||||||
hl = "GitSignsDelete",
|
|
||||||
text = " ",
|
|
||||||
numhl = "GitSignsDeleteNr",
|
|
||||||
linehl = "GitSignsDeleteLn",
|
|
||||||
},
|
|
||||||
topdelete = {
|
|
||||||
hl = "GitSignsDelete",
|
|
||||||
text = " ",
|
|
||||||
numhl = "GitSignsDeleteNr",
|
|
||||||
linehl = "GitSignsDeleteLn",
|
|
||||||
},
|
|
||||||
changedelete = {
|
|
||||||
hl = "GitSignsChange",
|
|
||||||
text = " ┃",
|
|
||||||
numhl = "GitSignsChangeNr",
|
|
||||||
linehl = "GitSignsChangeLn",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
lvim.lsp.automatic_servers_installation = false
|
|
||||||
lvim.lsp.automatic_configuration.skipped_servers = { "rust_analyzer" }
|
|
||||||
|
|
||||||
require "plugins.init"
|
|
||||||
require "mappings"
|
|
||||||
require "configs.nvimtree"
|
|
||||||
require "configs.bufferline"
|
|
||||||
require "configs.dropbar"
|
|
||||||
require "configs.dap"
|
|
||||||
require "configs.acmp"
|
|
||||||
require "configs.colorizer"
|
|
||||||
require "configs.autotag"
|
|
||||||
require "configs.prettier"
|
|
||||||
require "configs.nvimufo"
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
{
|
|
||||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" },
|
|
||||||
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
|
|
||||||
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "73edc1f2732678e7a681e3d3be49782610914f6b" },
|
|
||||||
"catppuccin": { "branch": "main", "commit": "9e6ec281f58038e5b30ce9a8828e6f9f9d744a27" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
|
||||||
"dropbar.nvim": { "branch": "master", "commit": "669e325489202ae4da5a951314bbf8dbb20e7cff" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
|
|
||||||
"fzf-lua": { "branch": "main", "commit": "ace9968be267b034e450be4feaf6e9107bc34fbd" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
|
|
||||||
"huez.nvim": { "branch": "main", "commit": "3a4c75fa3ad5e5461749b886f262c82a4a239133" },
|
|
||||||
"hybrid.nvim": { "branch": "master", "commit": "8838621a2e299582a0af5b8b96d5515f27b5d058" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" },
|
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
|
|
||||||
"lir.nvim": { "branch": "master", "commit": "7a9d45de08fecd23a04aca1f96688d744830029e" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
|
||||||
"lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
|
||||||
"material.nvim": { "branch": "main", "commit": "ac8f02e97e359b7d258c0a00ec0949fe880790ad" },
|
|
||||||
"melange-nvim": { "branch": "master", "commit": "706a33f0a883fae9ec00ad648586792248a0575e" },
|
|
||||||
"monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" },
|
|
||||||
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
|
||||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
|
||||||
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
|
|
||||||
"neogit": { "branch": "master", "commit": "d55bf6114c6cfba013e4c0e817e29e7752554ab7" },
|
|
||||||
"nlsp-settings.nvim": { "branch": "main", "commit": "d92035e6c05cded5f1a7458b57506adbf29a5c9c" },
|
|
||||||
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
|
|
||||||
"none-ls.nvim": { "branch": "main", "commit": "3a4826687da4310af379515086d71faca4d21288" },
|
|
||||||
"nord.nvim": { "branch": "main", "commit": "33a928133fd031b9714cb390645b5b01a900d9f9" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
|
||||||
"nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
|
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "52638640ae309cacdaff785fdbb854437bd1ee5c" },
|
|
||||||
"nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" },
|
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
|
||||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
|
|
||||||
"nvim-ufo": { "branch": "main", "commit": "203c9f434feec57909ab4b1e028abeb3349b7847" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
|
|
||||||
"onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
|
||||||
"prettier.nvim": { "branch": "main", "commit": "d98e732cb73690b07c00c839c924be1d1d9ac5c2" },
|
|
||||||
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
|
|
||||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
|
||||||
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
|
||||||
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
|
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "9a5992a881583d886bfbb46631a09f736f0fae50" },
|
|
||||||
"structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" },
|
|
||||||
"tailwind-tools.nvim": { "branch": "master", "commit": "89e560705ecd49607c63c277935c5264bb770d57" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d829aa64059001ee7b2c8c8aa9c4e6df0b17d893" },
|
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
|
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "b9b494fa7f7bbf2fe0747b47fa290fb7a4eddcc7" },
|
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
|
|
||||||
"typst.vim": { "branch": "main", "commit": "4d18ced62599ffe5b3c0e5e49566d5456121bc02" },
|
|
||||||
"vim": { "branch": "legacy", "commit": "99d4b7bf1a0a12f2d78f35a159384b1eb8aa9c15" },
|
|
||||||
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
|
|
||||||
"vim-react-snippets": { "branch": "main", "commit": "755e288bd0db1052be4195fcc82a25e28b609e0b" },
|
|
||||||
"vim-rustfmt": { "branch": "master", "commit": "6bb517be12908926a4f5f516aa510c517c85260e" },
|
|
||||||
"vscode-js-debug": { "branch": "main", "commit": "e620efe1841742402a332b532df2aa2ec95361f6" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
|
|
||||||
"winbar.nvim": { "branch": "main", "commit": "13739fdb31be51a1000486189662596f07a59a31" }
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
require'cmp'.setup {
|
|
||||||
sources = {
|
|
||||||
{ name = 'nvim_lsp' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
|
||||||
-- Add any additional autocmds here
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd(
|
|
||||||
{
|
|
||||||
"BufNewFile",
|
|
||||||
"BufRead",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern = "*.typ",
|
|
||||||
callback = function()
|
|
||||||
local buf = vim.api.nvim_get_current_buf()
|
|
||||||
vim.api.nvim_buf_set_option(buf, "filetype", "typst")
|
|
||||||
end
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
require('nvim-ts-autotag').setup({
|
|
||||||
opts = {
|
|
||||||
-- Defaults
|
|
||||||
enable_close = true, -- Auto close tags
|
|
||||||
enable_rename = true, -- Auto rename pairs of tags
|
|
||||||
enable_close_on_slash = false -- Auto close on trailing </
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
lvim.builtin.bufferline = {
|
|
||||||
options = {
|
|
||||||
mode = "buffers",
|
|
||||||
separator_style = "slant",
|
|
||||||
offsets = {
|
|
||||||
{
|
|
||||||
filetype = "NeoTree",
|
|
||||||
text = "File Explorer",
|
|
||||||
highlight = "Directory",
|
|
||||||
separator = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
require("colorizer").setup {
|
|
||||||
filetypes = { "scss", "sass", "css", "html", "jsx", "tsx" },
|
|
||||||
user_default_options = {
|
|
||||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
|
||||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
|
||||||
-- Available modes for `mode`: foreground, background, virtualtext
|
|
||||||
mode = "background", -- Set the display mode.
|
|
||||||
-- Available methods are false / true / "normal" / "lsp" / "both"
|
|
||||||
-- True is same as normal
|
|
||||||
tailwind = true, -- Enable tailwind colors
|
|
||||||
-- parsers can contain values used in |user_default_options|
|
|
||||||
sass = { enable = true, parsers = { "css" }, }, -- Enable sass colors
|
|
||||||
-- update color values even if buffer is not focused
|
|
||||||
-- example use: cmp_menu, cmp_docs
|
|
||||||
always_update = false
|
|
||||||
},
|
|
||||||
-- all the sub-options of filetypes apply to buftypes
|
|
||||||
buftypes = {},
|
|
||||||
}
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
local dap = require('dap')
|
|
||||||
|
|
||||||
require("dap-vscode-js").setup({
|
|
||||||
-- node_path = "node", -- Path of node executable. Defaults to $NODE_PATH, and then "node"
|
|
||||||
debugger_path = "/.local/share/lunarvim/site/pack/lazy/opt/vscode-js-debug", -- Path to vscode-js-debug installation.
|
|
||||||
debugger_cmd = { "js-debug-adapter" }, -- Command to use to launch the debug server. Takes precedence over `node_path` and `debugger_path`.
|
|
||||||
adapters = { 'node-terminal' }, -- which adapters to register in nvim-dap
|
|
||||||
-- log_file_path = "(stdpath cache)/dap_vscode_js.log", -- Path for file logging
|
|
||||||
-- log_file_level = false, -- Logging level for output to file. Set to false to disable file logging.
|
|
||||||
-- log_console_level = vim.log.levels.ERROR -- Logging level for output to console. Set to false to disable console output.
|
|
||||||
})
|
|
||||||
|
|
||||||
dap.configurations.cpp = {
|
|
||||||
{
|
|
||||||
name = "Launch file",
|
|
||||||
type = "codelldb",
|
|
||||||
request = "launch",
|
|
||||||
program = function()
|
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
|
||||||
end,
|
|
||||||
cwd = '${workspaceFolder}',
|
|
||||||
stopOnEntry = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.c = dap.configurations.cpp
|
|
||||||
dap.configurations.rust = dap.configurations.cpp
|
|
||||||
|
|
||||||
dap.adapters["pwa-node"] = {
|
|
||||||
type = "server",
|
|
||||||
host = "localhost",
|
|
||||||
port = "${port}",
|
|
||||||
executable = {
|
|
||||||
command = "node",
|
|
||||||
-- 💀 make sure to update this path to point to your installation
|
|
||||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/js-debug-adapter/js-debug/src/dapDebugServer.js", "${port}"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.javascript = {
|
|
||||||
{
|
|
||||||
type = "pwa-node",
|
|
||||||
request = "launch",
|
|
||||||
name = "Launch file",
|
|
||||||
program = "${file}",
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.adapters.chrome = {
|
|
||||||
type = "executable",
|
|
||||||
command = "node",
|
|
||||||
args = {os.getenv("HOME") .. "/.local/share/lvim/mason/packages/chrome-debug-adapter/out/src/chromeDebug.js"},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.adapters.firefox = {
|
|
||||||
type = 'executable',
|
|
||||||
command = 'node',
|
|
||||||
args = {os.getenv('HOME') .. '/.local/share/lvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js'},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.typescriptreact = { -- change to typescript if needed
|
|
||||||
{
|
|
||||||
name = 'Next.js: debug server-side',
|
|
||||||
type = "pwa-node",
|
|
||||||
request = "launch",
|
|
||||||
runtimeExecutable = "npm",
|
|
||||||
runtimeArgs = { "run", "dev" },
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "Next.js: debug client-side with chrome",
|
|
||||||
type = "chrome",
|
|
||||||
request = "launch",
|
|
||||||
url = "http://localhost:3000"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = "Next.js: debug client-side with firefox",
|
|
||||||
type = "firefox",
|
|
||||||
request = "launch",
|
|
||||||
url = 'http://localhost:3000',
|
|
||||||
webRoot = '${workspaceFolder}',
|
|
||||||
firefoxExecutable = '/usr/bin/waterfox',
|
|
||||||
pathMappings = {
|
|
||||||
{
|
|
||||||
url = "webpack://_n_e/",
|
|
||||||
path = "${workspaceFolder}/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
dap.configurations.javascriptreact = dap.configurations.typescriptreact;
|
|
||||||
|
|
||||||
require("dapui").setup()
|
|
||||||
|
|
||||||
local dap, dapui = require("dap"), require("dapui")
|
|
||||||
|
|
||||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
|
||||||
dapui.open({})
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>ui', require 'dapui'.toggle)
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
local sources = require("dropbar.sources")
|
|
||||||
|
|
||||||
local function get_hl_color(group, attr)
|
|
||||||
return vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID(group)), attr)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd [[hi WinBar guisp=#665c54 guibg=#313131]]
|
|
||||||
vim.cmd [[hi WinBarNC guisp=#665c54 guibg=#313131]]
|
|
||||||
|
|
||||||
require("dropbar").setup(
|
|
||||||
{
|
|
||||||
bar = {
|
|
||||||
sources = {
|
|
||||||
{
|
|
||||||
get_symbols = function(buf, win, cursor)
|
|
||||||
local symbols = sources.path.get_symbols(buf, win, cursor)
|
|
||||||
for _, symbol in ipairs(symbols) do
|
|
||||||
-- get correct icon color
|
|
||||||
local icon_fg = get_hl_color(symbol.icon_hl, "fg#")
|
|
||||||
-- symbol.icon_hl = "DropbarSymbol" .. symbol
|
|
||||||
|
|
||||||
local icon_string = ""
|
|
||||||
-- if icon_fg == "" then
|
|
||||||
-- icon_string = "hi " .. symbol.icon_hl .. " guisp=#665c54 guibg=#313131"
|
|
||||||
-- else
|
|
||||||
-- icon_string = "hi " .. symbol.icon_hl .. " guisp=#665c54 guibg=#313131 guifg=" .. icon_fg
|
|
||||||
-- end
|
|
||||||
|
|
||||||
vim.cmd(icon_string)
|
|
||||||
end
|
|
||||||
return symbols
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
-- vscode format
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load { exclude = vim.g.vscode_snippets_exclude or {} }
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load { paths = vim.g.vscode_snippets_path or "" }
|
|
||||||
|
|
||||||
-- snipmate format
|
|
||||||
require("luasnip.loaders.from_snipmate").load()
|
|
||||||
require("luasnip.loaders.from_snipmate").lazy_load { paths = vim.g.snipmate_snippets_path or "" }
|
|
||||||
|
|
||||||
-- lua format
|
|
||||||
require("luasnip.loaders.from_lua").load()
|
|
||||||
require("luasnip.loaders.from_lua").lazy_load { paths = vim.g.lua_snippets_path or "" }
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
|
||||||
callback = function()
|
|
||||||
if
|
|
||||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
|
||||||
and not require("luasnip").session.jump_active
|
|
||||||
then
|
|
||||||
require("luasnip").unlink_current()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
require("noice").setup({
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- you can enable a preset for easier configuration
|
|
||||||
presets = {
|
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
lvim.builtin.nvimtree.active = false
|
|
||||||
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignError",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignError"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignWarning",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignWarning"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignInformation",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignInformation"})
|
|
||||||
vim.fn.sign_define("LspDiagnosticsSignHint",
|
|
||||||
{text = " ", texthl = "LspDiagnosticsSignHint"})
|
|
||||||
|
|
||||||
require("neo-tree").setup({
|
|
||||||
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
|
|
||||||
popup_border_style = "rounded",
|
|
||||||
enable_git_status = true,
|
|
||||||
enable_diagnostics = true,
|
|
||||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
|
||||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
|
||||||
sort_function = nil , -- use a custom function for sorting files and directories in the tree
|
|
||||||
-- sort_function = function (a,b)
|
|
||||||
-- if a.type == b.type then
|
|
||||||
-- return a.path > b.path
|
|
||||||
-- else
|
|
||||||
-- return a.type > b.type
|
|
||||||
-- end
|
|
||||||
-- end , -- this sorts files and directories descendantly
|
|
||||||
default_component_configs = {
|
|
||||||
indent = {
|
|
||||||
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
|
||||||
},
|
|
||||||
icon = {
|
|
||||||
folder_closed = "",
|
|
||||||
folder_open = "",
|
|
||||||
folder_empty = "",
|
|
||||||
default = "*",
|
|
||||||
highlight = "NeoTreeFileIcon"
|
|
||||||
},
|
|
||||||
modified = {
|
|
||||||
symbol = "",
|
|
||||||
highlight = "NeoTreeModified",
|
|
||||||
},
|
|
||||||
name = {
|
|
||||||
trailing_slash = false,
|
|
||||||
use_git_status_colors = true,
|
|
||||||
highlight = "NeoTreeFileName",
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
symbols = {
|
|
||||||
-- Change type
|
|
||||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
|
||||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
|
||||||
deleted = "",-- this can only be used in the git_status source
|
|
||||||
renamed = "",-- this can only be used in the git_status source
|
|
||||||
-- Status type
|
|
||||||
untracked = "",
|
|
||||||
ignored = "",
|
|
||||||
unstaged = "",
|
|
||||||
staged = "",
|
|
||||||
conflict = "",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
vim.o.foldcolumn = "auto:9" -- '0' is not bad
|
|
||||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.foldenable = true
|
|
||||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep:│,foldclose:]]
|
|
||||||
|
|
||||||
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
|
|
||||||
vim.keymap.set('n', 'zR', require('ufo').openAllFolds)
|
|
||||||
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds)
|
|
||||||
|
|
||||||
-- Option 3: treesitter as a main provider instead
|
|
||||||
-- (Note: the `nvim-treesitter` plugin is *not* needed.)
|
|
||||||
-- ufo uses the same query files for folding (queries/<lang>/folds.scm)
|
|
||||||
-- performance and stability are better than `foldmethod=nvim_treesitter#foldexpr()`
|
|
||||||
require('ufo').setup({
|
|
||||||
provider_selector = function(bufnr, filetype, buftype)
|
|
||||||
return {'treesitter', 'indent'}
|
|
||||||
end
|
|
||||||
})
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
local prettier = require("prettier")
|
|
||||||
|
|
||||||
prettier.setup({
|
|
||||||
bin = 'prettier', -- or `'prettierd'` (v0.23.3+)
|
|
||||||
filetypes = {
|
|
||||||
"css",
|
|
||||||
"graphql",
|
|
||||||
"html",
|
|
||||||
"javascript",
|
|
||||||
"javascriptreact",
|
|
||||||
"json",
|
|
||||||
"less",
|
|
||||||
"markdown",
|
|
||||||
"scss",
|
|
||||||
"typescript",
|
|
||||||
"typescriptreact",
|
|
||||||
"yaml",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
|
||||||
|
|
||||||
map("i", "<C-h>", "<Left>", { desc = "move left" })
|
|
||||||
map("i", "<C-l>", "<Right>", { desc = "move right" })
|
|
||||||
map("i", "<C-j>", "<Down>", { desc = "move down" })
|
|
||||||
map("i", "<C-k>", "<Up>", { desc = "move up" })
|
|
||||||
|
|
||||||
map("n", "<C-h>", "<C-w>h", { desc = "switch window left" })
|
|
||||||
map("n", "<C-l>", "<C-w>l", { desc = "switch window right" })
|
|
||||||
map("n", "<C-j>", "<C-w>j", { desc = "switch window down" })
|
|
||||||
map("n", "<C-k>", "<C-w>k", { desc = "switch window up" })
|
|
||||||
|
|
||||||
map("n", "<C-n>", "<cmd>NeoTreeShowToggle<CR>", { desc = "nvimtree toggle window" })
|
|
||||||
|
|
||||||
map("n", "<C-A-l>", "<cmd>BufferLineMoveNext<cr>", { desc = "move buffer to right" })
|
|
||||||
map("n", "<C-A-J>", "<cmd>BufferLineMovePrev<cr>", { desc = "move buffer to left" })
|
|
||||||
map("n", "<Tab>", "<cmd>BufferLineCycleNext<cr>", { desc = "switch to next buffer" })
|
|
||||||
map("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<cr>", { desc = "switch to prev buffer" })
|
|
||||||
|
|
||||||
lvim.builtin.which_key.mappings["ln"] = { "<cmd>set norelativenumber<CR>", "Toggle line number" }
|
|
||||||
lvim.builtin.which_key.mappings["e"] = { "<cmd>NeoTreeFocus<CR>", "Nvimtree focus window" }
|
|
||||||
lvim.builtin.which_key.mappings["rn"] = { "<cmd>set relativenumber<CR>", "Toggle relative number" }
|
|
||||||
lvim.builtin.which_key.mappings["ns"] = { "<Cmd>split<cr>", "Horizontal split" }
|
|
||||||
lvim.builtin.which_key.mappings["vs"] = { "<Cmd>vsplit<cr>", "Vertical split" }
|
|
||||||
|
|
||||||
map("n", "<F9>", "<cmd>DapContinue<cr>")
|
|
||||||
map("n", "<F5>", "<cmd>DapToggleBreakpoint<cr>")
|
|
||||||
|
|
||||||
map("n", "mk", "<cmd>RustLsp moveItem up<cr>")
|
|
||||||
map("n", "m,", "<cmd>RustLsp moveItem down<cr>")
|
|
||||||
map("n", "rs", "<cmd>RustLsp run<cr>")
|
|
||||||
map("n", "hh", "<cmd>RustLsp hover actions<cr>")
|
|
||||||
map("n", "ca", "<cmd>RustLsp codeAction<cr>")
|
|
||||||
map("n", "<C-s>", "<cmd>w!<cr>")
|
|
||||||
map("i", "<C-s>", "<cmd>w!<cr>")
|
|
||||||
|
|
||||||
map("n", "<leader>dr", "<cmd> DapContinue <cr>", { desc = "Continue debug" } )
|
|
||||||
|
|
||||||
map("n", "do", function()
|
|
||||||
require("dapui").open()
|
|
||||||
end, { desc = "Open DAP ui" })
|
|
||||||
map("n", "dc", function()
|
|
||||||
require("dapui").close()
|
|
||||||
end, { desc = "Start or continue debug" })
|
|
||||||
map("n", "dt", function()
|
|
||||||
require("dapui").toggle()
|
|
||||||
end, { desc = "Toggle DAP ui" })
|
|
||||||
|
|
||||||
map("n", "+", "<cmd>vertical resize +5<cr>", { desc = "Increase vertical buffer" }) -- make the window biger vertically
|
|
||||||
map("n", "-", "<cmd>vertical resize -5<cr>", { desc = "Decrease vertical buffer" }) -- make the window smaller vertically
|
|
||||||
map("n", "=", "<cmd>horizontal resize -2<cr>", { desc = "Decrease horizontal buffer" }) -- make the window smaller horizontally by pressing shift and -
|
|
||||||
map("n", "_", "<cmd>horizontal resize +2<cr>", { desc = "Increase horizontal buffer" }) -- make the window bigger horizontally by pressing shift and =
|
|
||||||
map("n", "<C-{>", "<cmd>foldopen<cr>")
|
|
||||||
map("n", "<C-}>", "<cmd>foldclose<cr>")
|
|
||||||
@@ -1,278 +0,0 @@
|
|||||||
lvim.plugins = {
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"eslint-lsp",
|
|
||||||
"js-debug-adapter",
|
|
||||||
"prettier",
|
|
||||||
"tinymist",
|
|
||||||
"typescript-language-server",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kaarmu/typst.vim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
dependencies = {
|
|
||||||
"mason.nvim",
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'kevinhwang91/nvim-ufo',
|
|
||||||
opts = {
|
|
||||||
open_fold_hl_timeout = 400,
|
|
||||||
close_fold_kinds = { "imports", "comment" },
|
|
||||||
preview = {
|
|
||||||
win_config = {
|
|
||||||
border = { "", "─", "", "", "", "─", "", "" },
|
|
||||||
-- winhighlight = "Normal:Folded",
|
|
||||||
winblend = 0,
|
|
||||||
},
|
|
||||||
mappings = {
|
|
||||||
scrollU = "<C-u>",
|
|
||||||
scrollD = "<C-d>",
|
|
||||||
jumpTop = "[",
|
|
||||||
jumpBot = "]",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
|
||||||
local newVirtText = {}
|
|
||||||
local totalLines = vim.api.nvim_buf_line_count(0)
|
|
||||||
local foldedLines = endLnum - lnum
|
|
||||||
local suffix = (" %d %d%%"):format(foldedLines, foldedLines / totalLines * 100)
|
|
||||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
|
||||||
local targetWidth = width - sufWidth
|
|
||||||
local curWidth = 0
|
|
||||||
for _, chunk in ipairs(virtText) do
|
|
||||||
local chunkText = chunk[1]
|
|
||||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
|
||||||
if targetWidth > curWidth + chunkWidth then
|
|
||||||
table.insert(newVirtText, chunk)
|
|
||||||
else
|
|
||||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
|
||||||
local hlGroup = chunk[2]
|
|
||||||
table.insert(newVirtText, { chunkText, hlGroup })
|
|
||||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
|
||||||
-- str width returned from truncate() may less than 2nd argument, need padding
|
|
||||||
if curWidth + chunkWidth < targetWidth then
|
|
||||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
|
||||||
end
|
|
||||||
break
|
|
||||||
end
|
|
||||||
curWidth = curWidth + chunkWidth
|
|
||||||
end
|
|
||||||
local rAlignAppndx =
|
|
||||||
math.max(math.min(vim.opt.textwidth["_value"], width - 1) - curWidth - sufWidth, 0)
|
|
||||||
suffix = (" "):rep(rAlignAppndx) .. suffix
|
|
||||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
|
||||||
return newVirtText
|
|
||||||
end
|
|
||||||
opts["fold_virt_text_handler"] = handler
|
|
||||||
require("ufo").setup(opts)
|
|
||||||
vim.keymap.set("n", "K", function()
|
|
||||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
|
||||||
if not winid then
|
|
||||||
-- vim.lsp.buf.hover()
|
|
||||||
vim.cmd [[ Lspsaga hover_doc ]]
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'kevinhwang91/promise-async',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'rust-lang/rust.vim',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'kevinhwang91/nvim-bqf'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'MunifTanjim/prettier.nvim'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'alx741/vim-rustfmt',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"savq/melange-nvim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"HoNamDuong/hybrid.nvim",
|
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'marko-cerovac/material.nvim'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rebelot/kanagawa.nvim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'mountain-theme/vim'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'fgheng/winbar.nvim'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gbprod/nord.nvim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"vague2k/huez.nvim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Bekaboo/dropbar.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
|
||||||
branch = "v2.x",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- load luasnips + cmp related in insert mode only
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
event = "InsertEnter",
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
dependencies = "rafamadriz/friendly-snippets",
|
|
||||||
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
|
|
||||||
config = function(_, opts)
|
|
||||||
require("luasnip").config.set_config(opts)
|
|
||||||
require "configs.luasnip"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"hrsh7th/cmp-nvim-lua",
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"luckasRanarison/tailwind-tools.nvim",
|
|
||||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"kyazdani42/nvim-web-devicons"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
event = "VeryLazy",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-dap-ui",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-neotest/nvim-nio",
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
},
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("dapui").setup()
|
|
||||||
end
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mxsdev/nvim-dap-vscode-js"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"microsoft/vscode-js-debug",
|
|
||||||
lazy = true,
|
|
||||||
build = "npm install --legacy-peer-deps && npx gulp vsDebugServerBundle && mv dist out"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'NvChad/nvim-colorizer.lua',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/neodev.nvim", opts = {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mlaursen/vim-react-snippets",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"windwp/nvim-ts-autotag",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/ts-comments.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
enabled = vim.fn.has("nvim-0.10.0") == 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"windwp/nvim-autopairs",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = true
|
|
||||||
-- use opts = {} for passing setup options
|
|
||||||
-- this is equalent to setup({}) function
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mrcjkb/rustaceanvim",
|
|
||||||
version = '^4', -- Recommended
|
|
||||||
lazy = false, -- This plugin is already lazy
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"NeogitOrg/neogit",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim", -- required
|
|
||||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
|
||||||
|
|
||||||
-- Only one of these is needed, not both.
|
|
||||||
"nvim-telescope/telescope.nvim", -- optional
|
|
||||||
"ibhagwan/fzf-lua", -- optional
|
|
||||||
},
|
|
||||||
config = true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"catppuccin/nvim",
|
|
||||||
name = "catppuccin",
|
|
||||||
priority = 1000
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"loctvl842/monokai-pro.nvim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"tanvirtin/monokai.nvim"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
routes = {
|
|
||||||
{
|
|
||||||
filter = { event = "notify", find = "No information available" },
|
|
||||||
opts = { skip = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
lsp_doc_border = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ fade-delta = 10
|
|||||||
# Sets the radius of rounded window corners. When > 0, the compositor will
|
# Sets the radius of rounded window corners. When > 0, the compositor will
|
||||||
# round the corners of windows. Does not interact well with
|
# round the corners of windows. Does not interact well with
|
||||||
# `transparent-clipping`.
|
# `transparent-clipping`.
|
||||||
corner-radius = 5;
|
corner-radius = 2;
|
||||||
|
|
||||||
# Exclude conditions for rounded corners.
|
# Exclude conditions for rounded corners.
|
||||||
#rounded-corners-exclude = [
|
#rounded-corners-exclude = [
|
||||||
@@ -142,16 +142,17 @@ corner-radius = 5;
|
|||||||
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
|
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
|
||||||
# `xrender` is the default one.
|
# `xrender` is the default one.
|
||||||
#
|
#
|
||||||
|
# Available backends "xrender" "glx" "egl"
|
||||||
backend = "glx"
|
backend = "glx"
|
||||||
dithered-present = false;
|
|
||||||
|
dithered-present = true;
|
||||||
|
vsync = true;
|
||||||
|
|
||||||
|
detect-rounded-corners = true;
|
||||||
detect-client-opacity = true;
|
detect-client-opacity = true;
|
||||||
detect-transient = true;
|
detect-transient = true;
|
||||||
detect-client-leader = true
|
|
||||||
glx-no-stencil = true
|
|
||||||
glx-no-rebind-pixmap = false
|
|
||||||
use-damage = true;
|
use-damage = true;
|
||||||
xrender-sync-fence = false
|
|
||||||
log-level = "warn";
|
|
||||||
|
|
||||||
rules = ({
|
rules = ({
|
||||||
match = "WM_TRANSIENT_FOR@";
|
match = "WM_TRANSIENT_FOR@";
|
||||||
@@ -192,7 +193,7 @@ rules = ({
|
|||||||
blur-opacity = 0;
|
blur-opacity = 0;
|
||||||
shadow-opacity = "opacity";
|
shadow-opacity = "opacity";
|
||||||
scale-y = {
|
scale-y = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.15;
|
duration = 0.15;
|
||||||
start = 1;
|
start = 1;
|
||||||
end = 0.7;
|
end = 0.7;
|
||||||
@@ -240,7 +241,7 @@ rules = ({
|
|||||||
blur-opacity = 0;
|
blur-opacity = 0;
|
||||||
shadow-opacity = "opacity";
|
shadow-opacity = "opacity";
|
||||||
scale-y = {
|
scale-y = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.15;
|
duration = 0.15;
|
||||||
start = 1;
|
start = 1;
|
||||||
end = 0.7;
|
end = 0.7;
|
||||||
@@ -305,7 +306,7 @@ animations = ({
|
|||||||
offset-x = "(1 - scale-x) / 2 * window-width";
|
offset-x = "(1 - scale-x) / 2 * window-width";
|
||||||
offset-y = "(1 - scale-y) / 2 * window-height";
|
offset-y = "(1 - scale-y) / 2 * window-height";
|
||||||
scale-x = {
|
scale-x = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.15;
|
duration = 0.15;
|
||||||
start = 1;
|
start = 1;
|
||||||
end = 0.9;
|
end = 0.9;
|
||||||
@@ -350,13 +351,13 @@ animations = ({
|
|||||||
{
|
{
|
||||||
triggers = ["workspace-out"];
|
triggers = ["workspace-out"];
|
||||||
offset-y = {
|
offset-y = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.15;
|
duration = 0.15;
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "- window-height / 2";
|
end = "- window-height / 2";
|
||||||
};
|
};
|
||||||
scale-x = {
|
scale-x = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.10;
|
duration = 0.10;
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "- window-height / 2";
|
end = "- window-height / 2";
|
||||||
@@ -374,7 +375,7 @@ animations = ({
|
|||||||
}, {
|
}, {
|
||||||
triggers = ["workspace-out-inverse"];
|
triggers = ["workspace-out-inverse"];
|
||||||
offset-y = {
|
offset-y = {
|
||||||
curve = "cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
duration = 0.15;
|
duration = 0.15;
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "window-height / 2";
|
end = "window-height / 2";
|
||||||
@@ -434,13 +435,72 @@ animations = ({
|
|||||||
end = "window-raw-opacity";
|
end = "window-raw-opacity";
|
||||||
};
|
};
|
||||||
shadow-opacity = "opacity";
|
shadow-opacity = "opacity";
|
||||||
}
|
},{
|
||||||
|
triggers = ["geometry"]
|
||||||
|
scale-x = {
|
||||||
|
curve = "cubic-bezier(0.16, 1, 0.3, 1)";
|
||||||
|
duration = 0.2;
|
||||||
|
start = "window-width-before / window-width";
|
||||||
|
end = 1;
|
||||||
|
}
|
||||||
|
scale-y = {
|
||||||
|
curve = "cubic-bezier(0.16, 1, 0.3, 1)";
|
||||||
|
duration = 0.2;
|
||||||
|
start = "window-height-before / window-height";
|
||||||
|
end = 1;
|
||||||
|
}
|
||||||
|
offset-x = {
|
||||||
|
curve = "cubic-bezier(0.16, 1, 0.3, 1)";
|
||||||
|
duration = 0.2;
|
||||||
|
start = "window-x-before - window-x";
|
||||||
|
end = 0;
|
||||||
|
}
|
||||||
|
offset-y = {
|
||||||
|
curve = "cubic-bezier(0.16, 1, 0.3, 1)";
|
||||||
|
duration = 0.2;
|
||||||
|
start = "window-y-before - window-y";
|
||||||
|
end = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
saved-image-blend = 0;
|
||||||
|
shadow-scale-x = "scale-x";
|
||||||
|
shadow-scale-y = "scale-y";
|
||||||
|
shadow-offset-x = "offset-x";
|
||||||
|
shadow-offset-y = "offset-y";
|
||||||
|
}
|
||||||
|
|
||||||
|
# {
|
||||||
|
# triggers = [ "geometry" ];
|
||||||
|
# scale-x = {
|
||||||
|
# curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
|
# duration = 0.25;
|
||||||
|
# start = "window-width-before / window-width";
|
||||||
|
# end = 1;
|
||||||
|
# }
|
||||||
|
# scale-y = {
|
||||||
|
# curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
|
# duration = 0.25;
|
||||||
|
# start = "window-height-before / window-height";
|
||||||
|
# end = 1;
|
||||||
|
# }
|
||||||
|
# offset-x = {
|
||||||
|
# curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
|
# duration = 0.25;
|
||||||
|
# start = "window-x-before - window-x";
|
||||||
|
# end = "0";
|
||||||
|
# }
|
||||||
|
# offset-y = {
|
||||||
|
# curve = "cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
|
# duration = 0.25;
|
||||||
|
# start = "window-y-before - window-y";
|
||||||
|
# end = "0";
|
||||||
|
# }
|
||||||
|
# }
|
||||||
# Full Opaque Desktop Switch
|
# Full Opaque Desktop Switch
|
||||||
#{
|
#{
|
||||||
# triggers = ["workspace-out"];
|
# triggers = ["workspace-out"];
|
||||||
# offset-y = {
|
# offset-y = {
|
||||||
# timing = "0.15s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
# timing = "0.15s cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
# start = "0";
|
# start = "0";
|
||||||
# end = "-window-monitor-height";
|
# end = "-window-monitor-height";
|
||||||
# };
|
# };
|
||||||
@@ -455,7 +515,7 @@ animations = ({
|
|||||||
#}, {
|
#}, {
|
||||||
# triggers = ["workspace-out-inverse"];
|
# triggers = ["workspace-out-inverse"];
|
||||||
# offset-y = {
|
# offset-y = {
|
||||||
# timing = "0.15s cubic-bezier(0.21, 0.02, 0.76, 0.36)";
|
# timing = "0.15s cubic-bezier(0.25, 0.05, 0.28, 1)";
|
||||||
# start = "0";
|
# start = "0";
|
||||||
# end = "window-monitor-height";
|
# end = "window-monitor-height";
|
||||||
# };
|
# };
|
||||||
|
|||||||
@@ -41,13 +41,11 @@ padding-right = 1
|
|||||||
|
|
||||||
module-margin = 1
|
module-margin = 1
|
||||||
|
|
||||||
separator-foreground = ${colors.disabled}
|
|
||||||
|
|
||||||
font-0 = "FiraCode Nerd Font Propo:size=10;2"
|
font-0 = "FiraCode Nerd Font Propo:size=10;2"
|
||||||
|
|
||||||
modules-left = xworkspaces
|
modules-left = xworkspaces
|
||||||
modules-center = xwindow
|
modules-center = xwindow
|
||||||
modules-right = memory cpu pulseaudio xkeyboard wlan eth date calendar battery powermenu
|
modules-right = pulseaudio xkeyboard wlan eth date calendar battery powermenu
|
||||||
|
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
@@ -55,7 +53,7 @@ cursor-scroll = ns-resize
|
|||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
|
|
||||||
; wm-restack = generic
|
; wm-restack = generic
|
||||||
; wm-restack = bspwm
|
wm-restack = bspwm
|
||||||
; wm-restack = i3
|
; wm-restack = i3
|
||||||
|
|
||||||
; override-redirect = true
|
; override-redirect = true
|
||||||
@@ -68,6 +66,7 @@ enable-ipc = true
|
|||||||
; be quite random.
|
; be quite random.
|
||||||
; For more information, see the documentation page for this module:
|
; For more information, see the documentation page for this module:
|
||||||
; https://polybar.readthedocs.io/en/stable/user/modules/tray.html
|
; https://polybar.readthedocs.io/en/stable/user/modules/tray.html
|
||||||
|
|
||||||
[module/systray]
|
[module/systray]
|
||||||
type = internal/tray
|
type = internal/tray
|
||||||
|
|
||||||
@@ -156,7 +155,6 @@ label = %percentage:2%%
|
|||||||
type = internal/network
|
type = internal/network
|
||||||
interval = 5
|
interval = 5
|
||||||
|
|
||||||
|
|
||||||
format-disconnected = <label-disconnected>
|
format-disconnected = <label-disconnected>
|
||||||
label-disconnected = disconnected
|
label-disconnected = disconnected
|
||||||
|
|
||||||
@@ -183,7 +181,7 @@ interface-type = wired
|
|||||||
|
|
||||||
format-connected = <label-connected>
|
format-connected = <label-connected>
|
||||||
|
|
||||||
format-connected-prefix = " "
|
format-connected-prefix = " "
|
||||||
format-connected-prefix-foreground = ${colors.primary}
|
format-connected-prefix-foreground = ${colors.primary}
|
||||||
|
|
||||||
label-connected = %local_ip%
|
label-connected = %local_ip%
|
||||||
@@ -302,30 +300,30 @@ label-full = Fully charged
|
|||||||
label-low = BATTERY LOW
|
label-low = BATTERY LOW
|
||||||
|
|
||||||
; Only applies if <ramp-capacity> is used
|
; Only applies if <ramp-capacity> is used
|
||||||
ramp-capacity-0 =
|
ramp-capacity-0 =
|
||||||
ramp-capacity-1 =
|
ramp-capacity-1 =
|
||||||
ramp-capacity-2 =
|
ramp-capacity-2 =
|
||||||
ramp-capacity-3 =
|
ramp-capacity-3 =
|
||||||
ramp-capacity-4 =
|
ramp-capacity-4 =
|
||||||
|
|
||||||
; Only applies if <bar-capacity> is used
|
; Only applies if <bar-capacity> is used
|
||||||
bar-capacity-width = 10
|
bar-capacity-width = 10
|
||||||
|
|
||||||
; Only applies if <animation-charging> is used
|
; Only applies if <animation-charging> is used
|
||||||
animation-charging-0 =
|
animation-charging-0 =
|
||||||
animation-charging-1 =
|
animation-charging-1 =
|
||||||
animation-charging-2 =
|
animation-charging-2 =
|
||||||
animation-charging-3 =
|
animation-charging-3 =
|
||||||
animation-charging-4 =
|
animation-charging-4 =
|
||||||
; Framerate in milliseconds
|
; Framerate in milliseconds
|
||||||
animation-charging-framerate = 750
|
animation-charging-framerate = 750
|
||||||
|
|
||||||
; Only applies if <animation-discharging> is used
|
; Only applies if <animation-discharging> is used
|
||||||
animation-discharging-0 =
|
animation-discharging-0 =
|
||||||
animation-discharging-1 =
|
animation-discharging-1 =
|
||||||
animation-discharging-2 =
|
animation-discharging-2 =
|
||||||
animation-discharging-3 =
|
animation-discharging-3 =
|
||||||
animation-discharging-4 =
|
animation-discharging-4 =
|
||||||
; Framerate in milliseconds
|
; Framerate in milliseconds
|
||||||
animation-discharging-framerate = 500
|
animation-discharging-framerate = 500
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ Print
|
|||||||
# terminal emulator
|
# terminal emulator
|
||||||
super + Return
|
super + Return
|
||||||
tabbed -r 2 st -w ''
|
tabbed -r 2 st -w ''
|
||||||
# program launcher
|
|
||||||
|
# program launcher
|
||||||
super + d
|
super + d
|
||||||
~/.config/rofi/launcher/launch.sh
|
~/.config/rofi/launcher/launch.sh
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ super + Escape
|
|||||||
|
|
||||||
# quit/restart bspwm
|
# quit/restart bspwm
|
||||||
super + alt + {q,r}
|
super + alt + {q,r}
|
||||||
bspc {quit & pkill pipewire & pkill pipewire-pulse,wm -r}
|
bspc {quit & pkill pipewire & pkill pipewire-pulse,wm -r}
|
||||||
|
|
||||||
alt + shift + l
|
alt + shift + l
|
||||||
betterlockscreen -l dim
|
betterlockscreen -l dim
|
||||||
@@ -44,6 +45,7 @@ super + y
|
|||||||
# swap the current node and the biggest window
|
# swap the current node and the biggest window
|
||||||
super + g
|
super + g
|
||||||
bspc node -s biggest.window
|
bspc node -s biggest.window
|
||||||
|
|
||||||
#
|
#
|
||||||
# state/flags
|
# state/flags
|
||||||
#
|
#
|
||||||
@@ -125,3 +127,10 @@ super + alt + shift + {h,j,k,l}
|
|||||||
# move a floating window
|
# move a floating window
|
||||||
super + {Left,Down,Up,Right}
|
super + {Left,Down,Up,Right}
|
||||||
bspc node -v {-20 0,0 20,0 -20,20 0}
|
bspc node -v {-20 0,0 20,0 -20,20 0}
|
||||||
|
|
||||||
|
#
|
||||||
|
# rofi applets
|
||||||
|
#
|
||||||
|
|
||||||
|
super + P
|
||||||
|
~/.config/rofi/power/launch.sh
|
||||||
|
|||||||
22
yazi/flavors/gruvbox-dark.yazi/LICENSE
Normal file
22
yazi/flavors/gruvbox-dark.yazi/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Ben Yip
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
21
yazi/flavors/gruvbox-dark.yazi/LICENSE-tmtheme
Normal file
21
yazi/flavors/gruvbox-dark.yazi/LICENSE-tmtheme
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Subhaditya Nath
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
32
yazi/flavors/gruvbox-dark.yazi/README.md
Normal file
32
yazi/flavors/gruvbox-dark.yazi/README.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<div align="center">
|
||||||
|
<img src="https://github.com/sxyazi/yazi/blob/main/assets/logo.png?raw=true" alt="Yazi logo" width="20%">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3 align="center">
|
||||||
|
Gruvbox Dark Flavor for <a href="https://github.com/sxyazi/yazi">Yazi</a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
## 👀 Preview
|
||||||
|
|
||||||
|
<img src="preview.png" width="600" />
|
||||||
|
|
||||||
|
## 🎨 Installation
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ya pack -a bennyyip/gruvbox-dark
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚙️ Usage
|
||||||
|
|
||||||
|
Add the these lines to your `theme.toml` configuration file to use it:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[flavor]
|
||||||
|
dark = "gruvbox-dark"
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📜 License
|
||||||
|
|
||||||
|
The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed.
|
||||||
|
|
||||||
|
Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details.
|
||||||
146
yazi/flavors/gruvbox-dark.yazi/flavor.toml
Normal file
146
yazi/flavors/gruvbox-dark.yazi/flavor.toml
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# vim:fileencoding=utf-8:foldmethod=marker
|
||||||
|
|
||||||
|
# : Manager {{{
|
||||||
|
|
||||||
|
[manager]
|
||||||
|
cwd = { fg = "#83a598" }
|
||||||
|
|
||||||
|
# Hovered
|
||||||
|
hovered = { reversed = true, bold = true }
|
||||||
|
# hovered = { bg = "#3c3836", bold = true }
|
||||||
|
preview_hovered = { underline = true }
|
||||||
|
|
||||||
|
# Find
|
||||||
|
find_keyword = { fg = "#b8bb26", italic = true }
|
||||||
|
find_position = { fg = "#fe8019", bg = "reset", italic = true }
|
||||||
|
|
||||||
|
# Marker
|
||||||
|
marker_copied = { fg = "#8ec07c", bg = "#8ec07c" }
|
||||||
|
marker_cut = { fg = "#d3869b", bg = "#d3869b" }
|
||||||
|
marker_marked = { fg = "#83a598", bg = "#83a598" }
|
||||||
|
marker_selected = { fg = "#fbf1c7", bg = "#fbf1c7" }
|
||||||
|
|
||||||
|
# Tab
|
||||||
|
tab_active = { fg = "#282828", bg = "#a89984" }
|
||||||
|
tab_inactive = { fg = "#a89984", bg = "#504945" }
|
||||||
|
tab_width = 1
|
||||||
|
|
||||||
|
# Count
|
||||||
|
count_copied = { fg = "#282828", bg = "#8ec07c" }
|
||||||
|
count_cut = { fg = "#282828", bg = "#d3869b" }
|
||||||
|
count_selected = { fg = "#282828", bg = "#fbf1c7" }
|
||||||
|
|
||||||
|
# Border
|
||||||
|
border_symbol = "│"
|
||||||
|
border_style = { fg = "#665c54" }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Status {{{
|
||||||
|
|
||||||
|
[status]
|
||||||
|
separator_open = "\ue0be"
|
||||||
|
separator_close = "\ue0b8"
|
||||||
|
separator_style = { fg = "#3c3836", bg = "#3c3836" }
|
||||||
|
|
||||||
|
# Mode
|
||||||
|
mode_normal = { fg = "#282828", bg = "#a89984", bold = true }
|
||||||
|
mode_select = { fg = "#282828", bg = "#fe8019", bold = true }
|
||||||
|
mode_unset = { fg = "#282828", bg = "#b8bb26", bold = true }
|
||||||
|
|
||||||
|
# Progress
|
||||||
|
progress_label = { fg = "#ebdbb2", bold = true }
|
||||||
|
progress_normal = { fg = "#504945", bg = "#3c3836" }
|
||||||
|
progress_error = { fg = "#fb4934", bg = "#3c3836" }
|
||||||
|
|
||||||
|
# Permissions
|
||||||
|
permissions_t = { fg = "#504945" }
|
||||||
|
permissions_r = { fg = "#b8bb26" }
|
||||||
|
permissions_w = { fg = "#fb4934" }
|
||||||
|
permissions_x = { fg = "#b8bb26" }
|
||||||
|
permissions_s = { fg = "#665c54" }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Select {{{
|
||||||
|
|
||||||
|
[select]
|
||||||
|
border = { fg = "#458588" }
|
||||||
|
active = { fg = "#d3869b", bold = true }
|
||||||
|
inactive = {}
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Input {{{
|
||||||
|
|
||||||
|
[input]
|
||||||
|
border = { fg = "#ebdbb2" }
|
||||||
|
title = {}
|
||||||
|
value = {}
|
||||||
|
selected = { reversed = true }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Tasks {{{
|
||||||
|
|
||||||
|
[tasks]
|
||||||
|
border = { fg = "#504945" }
|
||||||
|
title = {}
|
||||||
|
hovered = { underline = true }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Which {{{
|
||||||
|
|
||||||
|
[which]
|
||||||
|
mask = { bg = "#3c3836" }
|
||||||
|
cand = { fg = "#83a598" }
|
||||||
|
rest = { fg = "#928374" }
|
||||||
|
desc = { fg = "#fe8019" }
|
||||||
|
separator = " "
|
||||||
|
separator_style = { fg = "#504945" }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Help {{{
|
||||||
|
|
||||||
|
[help]
|
||||||
|
on = { fg = "#83a598" }
|
||||||
|
run = { fg = "#d3869b" }
|
||||||
|
hovered = { reversed = true, bold = true }
|
||||||
|
footer = { fg = "#3c3836", bg = "#a89984" }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : Notify {{{
|
||||||
|
|
||||||
|
[notify]
|
||||||
|
title_info = { fg = "#8ec07c" }
|
||||||
|
title_warn = { fg = "#fbf1c7" }
|
||||||
|
title_error = { fg = "#d3869b" }
|
||||||
|
|
||||||
|
# : }}}
|
||||||
|
|
||||||
|
# : File-specific styles {{{
|
||||||
|
|
||||||
|
[filetype]
|
||||||
|
rules = [
|
||||||
|
# Images
|
||||||
|
{ mime = "image/*", fg = "#d3869b" },
|
||||||
|
|
||||||
|
# Media
|
||||||
|
{ mime = "{audio,video}/*", fg = "#fabd2f" },
|
||||||
|
|
||||||
|
# Archives
|
||||||
|
{ mime = "application/*zip", fg = "#fb4934" },
|
||||||
|
{ mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#fb4934" },
|
||||||
|
|
||||||
|
# Documents
|
||||||
|
{ mime = "application/{pdf,doc,rtf,vnd.*}", fg = "#689d6a" },
|
||||||
|
|
||||||
|
# Fallback
|
||||||
|
{ name = "*", fg = "#ebdbb2" },
|
||||||
|
{ name = "*/", fg = "#83a598" },
|
||||||
|
]
|
||||||
|
|
||||||
|
# : }}}
|
||||||
BIN
yazi/flavors/gruvbox-dark.yazi/preview.png
Normal file
BIN
yazi/flavors/gruvbox-dark.yazi/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 MiB |
1509
yazi/flavors/gruvbox-dark.yazi/tmtheme.xml
Normal file
1509
yazi/flavors/gruvbox-dark.yazi/tmtheme.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,54 +1,8 @@
|
|||||||
-- local function setup(_, opts)
|
|
||||||
-- local type = opts and opts.type or ui.Border.ROUNDED
|
|
||||||
-- local old_build = Tab.build
|
|
||||||
|
|
||||||
-- Tab.build = function(self, ...)
|
|
||||||
-- local bar = function(c, x, y)
|
|
||||||
-- if x <= 0 or x == self._area.w - 1 then
|
|
||||||
-- return ui.Bar(ui.Rect.default, ui.Bar.TOP)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- return ui.Bar(
|
|
||||||
-- ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) },
|
|
||||||
-- ui.Bar.TOP
|
|
||||||
-- ):symbol(c)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- local c = self._chunks
|
|
||||||
-- self._chunks = {
|
|
||||||
-- c[1]:padding(ui.Padding.y(1)),
|
|
||||||
-- c[2]:padding(ui.Padding(c[1].w > 0 and 0 or 1, c[3].w > 0 and 0 or 1, 1, 1)),
|
|
||||||
-- c[3]:padding(ui.Padding.y(1)),
|
|
||||||
-- }
|
|
||||||
|
|
||||||
-- local style = THEME.manager.border_style
|
|
||||||
-- self._base = ya.list_merge(self._base or {}, {
|
|
||||||
-- ui.Border(self._area, ui.Border.ALL):type(type):style(style),
|
|
||||||
-- ui.Bar(self._chunks[1], ui.Bar.RIGHT):style(style),
|
|
||||||
-- ui.Bar(self._chunks[3], ui.Bar.LEFT):style(style),
|
|
||||||
|
|
||||||
-- bar("┬", c[1].right - 1, c[1].y),
|
|
||||||
-- bar("┴", c[1].right - 1, c[1].bottom - 1),
|
|
||||||
-- bar("┬", c[2].right, c[2].y),
|
|
||||||
-- bar("┴", c[2].right, c[2].bottom - 1),
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- old_build(self, ...)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- setup {
|
|
||||||
-- -- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
|
|
||||||
-- type = ui.Border.ROUNDED,
|
|
||||||
-- }
|
|
||||||
|
|
||||||
require("full-border"):setup {
|
require("full-border"):setup {
|
||||||
-- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
|
-- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
|
||||||
type = ui.Border.ROUNDED,
|
type = ui.Border.ROUNDED,
|
||||||
}
|
}
|
||||||
|
|
||||||
require("archivemount"):setup()
|
require("archivemount"):setup()
|
||||||
require("chmod")
|
require("chmod")
|
||||||
require("diff")
|
require("diff")
|
||||||
require("sudo")
|
|
||||||
require("starship"):setup()
|
require("starship"):setup()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[[manager.prependd_keymap]]
|
[[manager.prepend_keymap]]
|
||||||
on = "<C-n>"
|
on = "<C-n>"
|
||||||
run = '''
|
run = '''
|
||||||
shell 'dragon -x -i -T "$1"' --confirm
|
shell 'dragon -x -i -T "$1"' --confirm
|
||||||
@@ -7,62 +7,9 @@ run = '''
|
|||||||
[[manager.prepend_keymap]]
|
[[manager.prepend_keymap]]
|
||||||
on = "y"
|
on = "y"
|
||||||
run = [ '''
|
run = [ '''
|
||||||
shell 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' --confirm
|
shell 'echo "$@" | xclip -i -selection clipboard -t text/uri-list'
|
||||||
''', "yank" ]
|
''', "yank" ]
|
||||||
|
|
||||||
[[manager.prepend_keymap]]
|
[[manager.prepend_keymap]]
|
||||||
on = [ "m", "a" ]
|
on = "<C-y>"
|
||||||
run = "plugin archivemount --args=mount"
|
run = ["plugin system-clipboard"]
|
||||||
desc = "Mount selected archive"
|
|
||||||
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = [ "m", "u" ]
|
|
||||||
run = "plugin archivemount --args=unmount"
|
|
||||||
desc = "Unmount and save changes to original archive"
|
|
||||||
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "p", "p"]
|
|
||||||
run = "plugin sudo --args='paste'"
|
|
||||||
desc = "sudo paste"
|
|
||||||
|
|
||||||
# sudo cp/mv --force
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "P"]
|
|
||||||
run = "plugin sudo --args='paste -f'"
|
|
||||||
desc = "sudo paste"
|
|
||||||
|
|
||||||
# sudo mv
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "r"]
|
|
||||||
run = "plugin sudo --args='rename'"
|
|
||||||
desc = "sudo rename"
|
|
||||||
|
|
||||||
# sudo ln -s (absolute-path)
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "p", "l"]
|
|
||||||
run = "plugin sudo --args='link'"
|
|
||||||
desc = "sudo link"
|
|
||||||
|
|
||||||
# sudo ln -s (relative-path)
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "p", "L"]
|
|
||||||
run = "plugin sudo --args='link -r'"
|
|
||||||
desc = "sudo link relative path"
|
|
||||||
|
|
||||||
# sudo touch/mkdir
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "a"]
|
|
||||||
run = "plugin sudo --args='create'"
|
|
||||||
desc = "sudo create"
|
|
||||||
|
|
||||||
# sudo trash
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "d"]
|
|
||||||
run = "plugin sudo --args='remove'"
|
|
||||||
desc = "sudo trash"
|
|
||||||
|
|
||||||
# sudo delete
|
|
||||||
[[manager.prepend_keymap]]
|
|
||||||
on = ["R", "D"]
|
|
||||||
run = "plugin sudo --args='remove -P'"
|
|
||||||
desc = "sudo delete"
|
|
||||||
|
|||||||
5
yazi/package.toml
Normal file
5
yazi/package.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
[plugin]
|
||||||
|
deps = [{ use = "yazi-rs/plugins:full-border", rev = "4f1d0ae" }, { use = "Lil-Dank/lazygit", rev = "c82794f" }, { use = "TD-Sky/sudo", rev = "a8287ea" }]
|
||||||
|
|
||||||
|
[flavor]
|
||||||
|
deps = [{ use = "bennyyip/gruvbox-dark", rev = "b4cc9f2" }]
|
||||||
21
yazi/plugins/lazygit.yazi/LICENSE
Normal file
21
yazi/plugins/lazygit.yazi/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Darius
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
29
yazi/plugins/lazygit.yazi/README.md
Normal file
29
yazi/plugins/lazygit.yazi/README.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# lazygit.yazi
|
||||||
|
Plugin for [Yazi](https://github.com/sxyazi/yazi) to manage git repos with [lazygit](https://github.com/jesseduffield/lazygit)
|
||||||
|
## Dependencies
|
||||||
|
Make sure [lazygit](https://github.com/jesseduffield/lazygit) is installed and in your `PATH`.
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Using `ya pack`
|
||||||
|
```
|
||||||
|
ya pack -a Lil-Dank/lazygit
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual
|
||||||
|
**Linux/macOS**
|
||||||
|
```
|
||||||
|
git clone https://github.com/Lil-Dank/lazygit.yazi.git ~/.config/yazi/plugins/lazygit.yazi
|
||||||
|
```
|
||||||
|
**Windows**
|
||||||
|
```
|
||||||
|
git clone https://github.com/Lil-Dank/lazygit.yazi.git %AppData%\yazi\config\plugins\lazygit.yazi
|
||||||
|
```
|
||||||
|
## Configuration
|
||||||
|
add this to your **keymap.toml** file
|
||||||
|
```toml
|
||||||
|
[[manager.prepend_keymap]]
|
||||||
|
on = [ "g", "i" ]
|
||||||
|
run = "plugin lazygit"
|
||||||
|
desc = "run lazygit"
|
||||||
|
```
|
||||||
|
you can customize the keybinding however you like. Please refer to the [keymap.toml](https://yazi-rs.github.io/docs/configuration/keymap) documentation
|
||||||
31
yazi/plugins/lazygit.yazi/init.lua
Normal file
31
yazi/plugins/lazygit.yazi/init.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
return {
|
||||||
|
entry = function()
|
||||||
|
local output = Command("git"):arg("status"):stderr(Command.PIPED):output()
|
||||||
|
if output.stderr ~= "" then
|
||||||
|
ya.notify({
|
||||||
|
title = "lazygit",
|
||||||
|
content = "Not in a git directory",
|
||||||
|
level = "warn",
|
||||||
|
timeout = 5,
|
||||||
|
})
|
||||||
|
else
|
||||||
|
permit = ya.hide()
|
||||||
|
local output, err_code = Command("lazygit"):stderr(Command.PIPED):output()
|
||||||
|
if err_code ~= nil then
|
||||||
|
ya.notify({
|
||||||
|
title = "Failed to run lazygit command",
|
||||||
|
content = "Status: " .. err_code,
|
||||||
|
level = "error",
|
||||||
|
timeout = 5,
|
||||||
|
})
|
||||||
|
elseif not output.status.success then
|
||||||
|
ya.notify({
|
||||||
|
title = "lazygit in" .. cwd .. "failed, exit code " .. output.status.code,
|
||||||
|
content = output.stderr,
|
||||||
|
level = "error",
|
||||||
|
timeout = 5,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -1,196 +0,0 @@
|
|||||||
local fs = os.getenv("HOME") .. "/.config/yazi/plugins/sudo.yazi/fs.nu"
|
|
||||||
|
|
||||||
function string:ends_with_char(suffix)
|
|
||||||
return self:sub(-#suffix) == suffix
|
|
||||||
end
|
|
||||||
|
|
||||||
function string:is_path()
|
|
||||||
local i = self:find("/")
|
|
||||||
return self == "." or self == ".." or i and i ~= #self
|
|
||||||
end
|
|
||||||
|
|
||||||
local function list_map(self, f)
|
|
||||||
local i = nil
|
|
||||||
return function()
|
|
||||||
local v
|
|
||||||
i, v = next(self, i)
|
|
||||||
if v then
|
|
||||||
return f(v)
|
|
||||||
else
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local get_state = ya.sync(function(_, cmd)
|
|
||||||
if cmd == "paste" or cmd == "link" then
|
|
||||||
local yanked = {}
|
|
||||||
for _, url in pairs(cx.yanked) do
|
|
||||||
table.insert(yanked, tostring(url))
|
|
||||||
end
|
|
||||||
|
|
||||||
if #yanked == 0 then
|
|
||||||
return {}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
kind = cmd,
|
|
||||||
value = {
|
|
||||||
is_cut = cx.yanked.is_cut,
|
|
||||||
yanked = yanked,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
elseif cmd == "create" then
|
|
||||||
return { kind = cmd }
|
|
||||||
elseif cmd == "remove" then
|
|
||||||
local selected = {}
|
|
||||||
|
|
||||||
if #cx.active.selected ~= 0 then
|
|
||||||
for _, url in pairs(cx.active.selected) do
|
|
||||||
table.insert(selected, tostring(url))
|
|
||||||
end
|
|
||||||
else
|
|
||||||
table.insert(selected, tostring(cx.active.current.hovered.url))
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
kind = cmd,
|
|
||||||
value = {
|
|
||||||
selected = selected,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
elseif cmd == "rename" and #cx.active.selected == 0 then
|
|
||||||
return {
|
|
||||||
kind = cmd,
|
|
||||||
value = {
|
|
||||||
hovered = tostring(cx.active.current.hovered.url),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {}
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
local function sudo_cmd()
|
|
||||||
return { "sudo", "-k", "--" }
|
|
||||||
end
|
|
||||||
|
|
||||||
local function extend_list(self, list)
|
|
||||||
for _, value in ipairs(list) do
|
|
||||||
table.insert(self, value)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function extend_iter(self, iter)
|
|
||||||
for item in iter do
|
|
||||||
table.insert(self, item)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function execute(command)
|
|
||||||
ya.manager_emit("shell", {
|
|
||||||
table.concat(command, " "),
|
|
||||||
block = true,
|
|
||||||
confirm = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sudo_paste(value)
|
|
||||||
local args = sudo_cmd()
|
|
||||||
|
|
||||||
table.insert(args, fs)
|
|
||||||
if value.is_cut then
|
|
||||||
table.insert(args, "mv")
|
|
||||||
else
|
|
||||||
table.insert(args, "cp")
|
|
||||||
end
|
|
||||||
if value.force then
|
|
||||||
table.insert(args, "--force")
|
|
||||||
end
|
|
||||||
extend_iter(args, list_map(value.yanked, ya.quote))
|
|
||||||
|
|
||||||
execute(args)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sudo_link(value)
|
|
||||||
local args = sudo_cmd()
|
|
||||||
|
|
||||||
extend_list(args, { fs, "ln" })
|
|
||||||
if value.relative then
|
|
||||||
table.insert(args, "--relative")
|
|
||||||
end
|
|
||||||
extend_iter(args, list_map(value.yanked, ya.quote))
|
|
||||||
|
|
||||||
execute(args)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sudo_create()
|
|
||||||
local name, event = ya.input({
|
|
||||||
title = "sudo create:",
|
|
||||||
position = { "top-center", y = 2, w = 40 },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Input and confirm
|
|
||||||
if event == 1 and not name:is_path() then
|
|
||||||
local args = sudo_cmd()
|
|
||||||
|
|
||||||
if name:ends_with_char("/") then
|
|
||||||
extend_list(args, { "mkdir", "-p" })
|
|
||||||
else
|
|
||||||
table.insert(args, "touch")
|
|
||||||
end
|
|
||||||
table.insert(args, ya.quote(name))
|
|
||||||
|
|
||||||
execute(args)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sudo_rename(value)
|
|
||||||
local new_name, event = ya.input({
|
|
||||||
title = "sudo rename:",
|
|
||||||
position = { "top-center", y = 2, w = 40 },
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Input and confirm
|
|
||||||
if event == 1 and not new_name:is_path() then
|
|
||||||
local args = sudo_cmd()
|
|
||||||
extend_list(args, { "mv", ya.quote(value.hovered), ya.quote(new_name) })
|
|
||||||
execute(args)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function sudo_remove(value)
|
|
||||||
local args = sudo_cmd()
|
|
||||||
|
|
||||||
extend_list(args, { fs, "rm" })
|
|
||||||
if value.is_permanent then
|
|
||||||
table.insert(args, "--permanent")
|
|
||||||
end
|
|
||||||
extend_iter(args, list_map(value.selected, ya.quote))
|
|
||||||
|
|
||||||
execute(args)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
entry = function(_, args)
|
|
||||||
-- https://github.com/sxyazi/yazi/issues/1553#issuecomment-2309119135
|
|
||||||
ya.manager_emit("escape", { visual = true })
|
|
||||||
|
|
||||||
local state = get_state(args[1])
|
|
||||||
|
|
||||||
if state.kind == "paste" then
|
|
||||||
state.value.force = args[2] == "-f"
|
|
||||||
sudo_paste(state.value)
|
|
||||||
elseif state.kind == "link" then
|
|
||||||
state.value.relative = args[2] == "-r"
|
|
||||||
sudo_link(state.value)
|
|
||||||
elseif state.kind == "create" then
|
|
||||||
sudo_create()
|
|
||||||
elseif state.kind == "remove" then
|
|
||||||
state.value.is_permanent = args[2] == "-P"
|
|
||||||
sudo_remove(state.value)
|
|
||||||
elseif state.kind == "rename" then
|
|
||||||
sudo_rename(state.value)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
54
yazi/plugins/system-clipboard.yazi/init.lua
Normal file
54
yazi/plugins/system-clipboard.yazi/init.lua
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
-- Meant to run at async context. (yazi system-clipboard)
|
||||||
|
|
||||||
|
local selected_or_hovered = ya.sync(function()
|
||||||
|
local tab, paths = cx.active, {}
|
||||||
|
for _, u in pairs(tab.selected) do
|
||||||
|
paths[#paths + 1] = tostring(u)
|
||||||
|
end
|
||||||
|
if #paths == 0 and tab.current.hovered then
|
||||||
|
paths[1] = tostring(tab.current.hovered.url)
|
||||||
|
end
|
||||||
|
return paths
|
||||||
|
end)
|
||||||
|
|
||||||
|
return {
|
||||||
|
entry = function()
|
||||||
|
ya.manager_emit("escape", { visual = true })
|
||||||
|
|
||||||
|
local urls = selected_or_hovered()
|
||||||
|
|
||||||
|
if #urls == 0 then
|
||||||
|
return ya.notify({ title = "System Clipboard", content = "No file selected", level = "warn", timeout = 5 })
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ya.notify({ title = #urls, content = table.concat(urls, " "), level = "info", timeout = 5 })
|
||||||
|
|
||||||
|
local status, err =
|
||||||
|
Command("cb")
|
||||||
|
:arg("copy")
|
||||||
|
:args(urls)
|
||||||
|
:spawn()
|
||||||
|
:wait()
|
||||||
|
|
||||||
|
if status or status.succes then
|
||||||
|
ya.notify({
|
||||||
|
title = "System Clipboard",
|
||||||
|
content = "Succesfully copied the file(s) to system clipboard",
|
||||||
|
level = "info",
|
||||||
|
timeout = 5,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
if not status or not status.success then
|
||||||
|
ya.notify({
|
||||||
|
title = "System Clipboard",
|
||||||
|
content = string.format(
|
||||||
|
"Could not copy selected file(s) %s",
|
||||||
|
status and status.code or err
|
||||||
|
),
|
||||||
|
level = "error",
|
||||||
|
timeout = 5,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
@@ -4,3 +4,6 @@ separator_close = ""
|
|||||||
|
|
||||||
[manager]
|
[manager]
|
||||||
border_style = { bold = true }
|
border_style = { bold = true }
|
||||||
|
|
||||||
|
[flavor]
|
||||||
|
dark = "gruvbox-dark"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
[preview]
|
||||||
|
tab_size = 2
|
||||||
|
image_quality = 90
|
||||||
|
ueberzug_scale = 1
|
||||||
|
ueberzug_offset = [ 0, 0, 0, 0 ]
|
||||||
|
|
||||||
[manager]
|
[manager]
|
||||||
show_hidden = true
|
show_hidden = true
|
||||||
|
|
||||||
[preview]
|
|
||||||
image_quality = 70
|
|
||||||
|
|||||||
Reference in New Issue
Block a user