mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-06-12 11:39:51 +00:00
Compare commits
4 Commits
3a0b8f5fc6
...
elnady
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ab87c01b4 | ||
|
|
de7981555e | ||
|
|
dc3f2ada8f | ||
|
|
dcfdf27c64 |
@@ -39,9 +39,83 @@ x = 2
|
||||
y = 2
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
# Dracula theme for Alacritty
|
||||
# https://draculatheme.com/alacritty
|
||||
#
|
||||
# Color palette
|
||||
# https://spec.draculatheme.com
|
||||
#
|
||||
# Instructions
|
||||
# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd
|
||||
|
||||
[colors.primary]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
bright_foreground = "#ffffff"
|
||||
|
||||
[colors.cursor]
|
||||
|
||||
text = "#282a36"
|
||||
cursor = "#f8f8f2"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
|
||||
text = "CellBackground"
|
||||
cursor = "CellForeground"
|
||||
|
||||
[colors.selection]
|
||||
|
||||
text = "CellForeground"
|
||||
background = "#44475a"
|
||||
|
||||
[colors.normal]
|
||||
|
||||
black = "#21222c"
|
||||
red = "#ff5555"
|
||||
green = "#50fa7b"
|
||||
yellow = "#f1fa8c"
|
||||
blue = "#bd93f9"
|
||||
magenta = "#ff79c6"
|
||||
cyan = "#8be9fd"
|
||||
white = "#f8f8f2"
|
||||
|
||||
[colors.bright]
|
||||
|
||||
black = "#6272a4"
|
||||
red = "#ff6e6e"
|
||||
green = "#69ff94"
|
||||
yellow = "#ffffa5"
|
||||
blue = "#d6acff"
|
||||
magenta = "#ff92df"
|
||||
cyan = "#a4ffff"
|
||||
white = "#ffffff"
|
||||
|
||||
[colors.search.matches]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#50fa7b"
|
||||
|
||||
[colors.search.focused_match]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#ffb86c"
|
||||
|
||||
[colors.footer_bar]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
|
||||
[colors.hints.start]
|
||||
|
||||
foreground = "#282a36"
|
||||
background = "#f1fa8c"
|
||||
|
||||
[colors.hints.end]
|
||||
|
||||
foreground = "#f1fa8c"
|
||||
background = "#282a36"
|
||||
|
||||
[general]
|
||||
live_config_reload = true
|
||||
import = [
|
||||
"~/.config/alacritty/themes/gruvbox_material.toml"
|
||||
]
|
||||
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
# Dracula theme for Alacritty
|
||||
# https://draculatheme.com/alacritty
|
||||
#
|
||||
# Color palette
|
||||
# https://spec.draculatheme.com
|
||||
#
|
||||
# Instructions
|
||||
# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd
|
||||
|
||||
[colors.primary]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
bright_foreground = "#ffffff"
|
||||
|
||||
[colors.cursor]
|
||||
|
||||
text = "#282a36"
|
||||
cursor = "#f8f8f2"
|
||||
|
||||
[colors.vi_mode_cursor]
|
||||
|
||||
text = "CellBackground"
|
||||
cursor = "CellForeground"
|
||||
|
||||
[colors.selection]
|
||||
|
||||
text = "CellForeground"
|
||||
background = "#44475a"
|
||||
|
||||
[colors.normal]
|
||||
|
||||
black = "#21222c"
|
||||
red = "#ff5555"
|
||||
green = "#50fa7b"
|
||||
yellow = "#f1fa8c"
|
||||
blue = "#bd93f9"
|
||||
magenta = "#ff79c6"
|
||||
cyan = "#8be9fd"
|
||||
white = "#f8f8f2"
|
||||
|
||||
[colors.bright]
|
||||
|
||||
black = "#6272a4"
|
||||
red = "#ff6e6e"
|
||||
green = "#69ff94"
|
||||
yellow = "#ffffa5"
|
||||
blue = "#d6acff"
|
||||
magenta = "#ff92df"
|
||||
cyan = "#a4ffff"
|
||||
white = "#ffffff"
|
||||
|
||||
[colors.search.matches]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#50fa7b"
|
||||
|
||||
[colors.search.focused_match]
|
||||
|
||||
foreground = "#44475a"
|
||||
background = "#ffb86c"
|
||||
|
||||
[colors.footer_bar]
|
||||
|
||||
background = "#282a36"
|
||||
foreground = "#f8f8f2"
|
||||
|
||||
[colors.hints.start]
|
||||
|
||||
foreground = "#282a36"
|
||||
background = "#f1fa8c"
|
||||
|
||||
[colors.hints.end]
|
||||
|
||||
foreground = "#f1fa8c"
|
||||
background = "#282a36"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# Colors (Gruvbox Material Dark Medium)
|
||||
|
||||
[colors.primary]
|
||||
background = '#282828'
|
||||
foreground = '#dfbf8e'
|
||||
|
||||
[colors.normal]
|
||||
black = '#665c54'
|
||||
red = '#ea6962'
|
||||
green = '#a9b665'
|
||||
yellow = '#e78a4e'
|
||||
blue = '#7daea3'
|
||||
magenta = '#d3869b'
|
||||
cyan = '#89b482'
|
||||
white = '#dfbf8e'
|
||||
|
||||
[colors.bright]
|
||||
black = '#928374'
|
||||
red = '#ea6962'
|
||||
green = '#a9b665'
|
||||
yellow = '#e3a84e'
|
||||
blue = '#7daea3'
|
||||
magenta = '#d3869b'
|
||||
cyan = '#89b482'
|
||||
white = '#dfbf8e'
|
||||
@@ -1,38 +0,0 @@
|
||||
# Colors (Kanagawa Dragon)
|
||||
# Source https//github.com/rebelot/kanagawa.nvim
|
||||
|
||||
[colors.primary]
|
||||
background = '#181616'
|
||||
foreground = '#c5c9c5'
|
||||
|
||||
[colors.normal]
|
||||
black = '#0d0c0c'
|
||||
blue = '#8ba4b0'
|
||||
cyan = '#8ea4a2'
|
||||
green = '#8a9a7b'
|
||||
magenta = '#a292a3'
|
||||
red = '#c4746e'
|
||||
white = '#C8C093'
|
||||
yellow = '#c4b28a'
|
||||
|
||||
[colors.bright]
|
||||
black = '#a6a69c'
|
||||
blue = '#7FB4CA'
|
||||
cyan = '#7AA89F'
|
||||
green = '#87a987'
|
||||
magenta = '#938AA9'
|
||||
red = '#E46876'
|
||||
white = '#c5c9c5'
|
||||
yellow = '#E6C384'
|
||||
|
||||
[colors.selection]
|
||||
background = '#2d4f67'
|
||||
foreground = '#c8c093'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 16
|
||||
color = '#ffa066'
|
||||
|
||||
[[colors.indexed_colors]]
|
||||
index = 17
|
||||
color = '#ff5d62'
|
||||
@@ -1,18 +1,18 @@
|
||||
#? Config file for btop v.1.4.6
|
||||
#? Config file for btop v. 1.4.0
|
||||
|
||||
#* 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"
|
||||
color_theme = "/usr/share/btop/themes/gruvbox_dark_v2.theme"
|
||||
color_theme = "/usr/share/btop/themes/dracula.theme"
|
||||
|
||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||
theme_background = true
|
||||
theme_background = True
|
||||
|
||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||
truecolor = true
|
||||
truecolor = True
|
||||
|
||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||
force_tty = false
|
||||
force_tty = False
|
||||
|
||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||
@@ -22,13 +22,10 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
|
||||
|
||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||
vim_keys = false
|
||||
vim_keys = False
|
||||
|
||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||
rounded_corners = true
|
||||
|
||||
#* Use terminal synchronized output sequences to reduce flickering on supported terminals.
|
||||
terminal_sync = true
|
||||
rounded_corners = True
|
||||
|
||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||
@@ -63,40 +60,37 @@ update_ms = 100
|
||||
proc_sorting = "memory"
|
||||
|
||||
#* Reverse sorting order, True or False.
|
||||
proc_reversed = false
|
||||
proc_reversed = False
|
||||
|
||||
#* Show processes as a tree.
|
||||
proc_tree = true
|
||||
proc_tree = False
|
||||
|
||||
#* Use the cpu graph colors in the process list.
|
||||
proc_colors = true
|
||||
proc_colors = True
|
||||
|
||||
#* Use a darkening gradient in the process list.
|
||||
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.
|
||||
proc_per_core = false
|
||||
proc_per_core = False
|
||||
|
||||
#* Show process memory as bytes instead of percent.
|
||||
proc_mem_bytes = true
|
||||
proc_mem_bytes = True
|
||||
|
||||
#* Show cpu graph for each process.
|
||||
proc_cpu_graphs = true
|
||||
proc_cpu_graphs = True
|
||||
|
||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||
proc_info_smaps = false
|
||||
proc_info_smaps = False
|
||||
|
||||
#* Show proc box on left side of screen instead of right.
|
||||
proc_left = false
|
||||
proc_left = False
|
||||
|
||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||
proc_filter_kernel = false
|
||||
proc_filter_kernel = False
|
||||
|
||||
#* In tree-view, always accumulate child process resources in the parent process.
|
||||
proc_aggregate = false
|
||||
|
||||
#* Should cpu and memory usage display be preserved for dead processes when paused.
|
||||
keep_dead_proc_usage = false
|
||||
proc_aggregate = False
|
||||
|
||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
@@ -110,28 +104,25 @@ cpu_graph_lower = "Auto"
|
||||
show_gpu_info = "Auto"
|
||||
|
||||
#* Toggles if the lower CPU graph should be inverted.
|
||||
cpu_invert_lower = true
|
||||
cpu_invert_lower = True
|
||||
|
||||
#* Set to True to completely disable the lower CPU graph.
|
||||
cpu_single_graph = false
|
||||
cpu_single_graph = False
|
||||
|
||||
#* Show cpu box at bottom of screen instead of top.
|
||||
cpu_bottom = false
|
||||
cpu_bottom = False
|
||||
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = true
|
||||
|
||||
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
||||
show_cpu_watts = true
|
||||
show_uptime = True
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = true
|
||||
check_temp = True
|
||||
|
||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||
cpu_sensor = "Auto"
|
||||
|
||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||
show_coretemp = true
|
||||
show_coretemp = True
|
||||
|
||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||
@@ -143,66 +134,63 @@ cpu_core_map = ""
|
||||
temp_scale = "celsius"
|
||||
|
||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||
base_10_sizes = false
|
||||
base_10_sizes = False
|
||||
|
||||
#* Show CPU frequency.
|
||||
show_cpu_freq = true
|
||||
|
||||
#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average".
|
||||
freq_mode = "first"
|
||||
show_cpu_freq = True
|
||||
|
||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||
clock_format = "%X"
|
||||
|
||||
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
||||
background_update = true
|
||||
background_update = True
|
||||
|
||||
#* Custom cpu model name, empty string to disable.
|
||||
custom_cpu_name = ""
|
||||
|
||||
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
|
||||
disks_filter = ""
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = true
|
||||
mem_graphs = True
|
||||
|
||||
#* Show mem box below net box instead of above.
|
||||
mem_below_net = false
|
||||
mem_below_net = False
|
||||
|
||||
#* Count ZFS ARC in cached and available memory.
|
||||
zfs_arc_cached = true
|
||||
zfs_arc_cached = True
|
||||
|
||||
#* If swap memory should be shown in memory box.
|
||||
show_swap = true
|
||||
show_swap = True
|
||||
|
||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||
swap_disk = true
|
||||
swap_disk = True
|
||||
|
||||
#* If mem box should be split to also show disks info.
|
||||
show_disks = true
|
||||
show_disks = True
|
||||
|
||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||
only_physical = true
|
||||
only_physical = True
|
||||
|
||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||
use_fstab = true
|
||||
use_fstab = True
|
||||
|
||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||
zfs_hide_datasets = false
|
||||
zfs_hide_datasets = False
|
||||
|
||||
#* Set to true to show available disk space for privileged users.
|
||||
disk_free_priv = false
|
||||
disk_free_priv = False
|
||||
|
||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||
show_io_stat = true
|
||||
show_io_stat = True
|
||||
|
||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||
io_mode = false
|
||||
io_mode = False
|
||||
|
||||
#* Set to True to show combined read/write io graphs in io mode.
|
||||
io_graph_combined = false
|
||||
io_graph_combined = False
|
||||
|
||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||
@@ -214,44 +202,32 @@ net_download = 100
|
||||
net_upload = 100
|
||||
|
||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||
net_auto = true
|
||||
net_auto = True
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = true
|
||||
net_sync = True
|
||||
|
||||
#* Starts with the Network Interface specified here.
|
||||
net_iface = ""
|
||||
|
||||
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
|
||||
base_10_bitrate = "Auto"
|
||||
|
||||
#* Show battery stats in top right if battery is present.
|
||||
show_battery = true
|
||||
show_battery = True
|
||||
|
||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||
selected_battery = "Auto"
|
||||
|
||||
#* Show power stats of battery next to charge indicator.
|
||||
show_battery_watts = true
|
||||
show_battery_watts = True
|
||||
|
||||
#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
log_level = "WARNING"
|
||||
|
||||
#* Automatically save current settings to config file on exit.
|
||||
save_config_on_exit = true
|
||||
|
||||
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||
nvml_measure_pcie_speeds = true
|
||||
|
||||
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||
rsmi_measure_pcie_speeds = true
|
||||
nvml_measure_pcie_speeds = True
|
||||
|
||||
#* Horizontally mirror the GPU graph.
|
||||
gpu_mirror_graph = true
|
||||
|
||||
#* Set which GPU vendors to show. Available values are "nvidia amd intel"
|
||||
shown_gpus = "nvidia amd intel"
|
||||
gpu_mirror_graph = True
|
||||
|
||||
#* Custom gpu0 model name, empty string to disable.
|
||||
custom_gpu_name0 = ""
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
theme[main_bg]=#18120b
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]=#ede0d4
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]=#ede0d4
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]=#f3bd6e
|
||||
|
||||
# Background color of selected item in processes box
|
||||
theme[selected_bg]=#251f17
|
||||
|
||||
# Foreground color of selected item in processes box
|
||||
theme[selected_fg]=#f3bd6e
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]=#9b8f80
|
||||
|
||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||
theme[graph_text]=#b7cea2
|
||||
|
||||
# Background color of the percentage meters
|
||||
theme[meter_bg]=#9b8f80
|
||||
|
||||
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||
theme[proc_misc]=#b7cea2
|
||||
|
||||
# CPU, Memory, Network, Proc box outline colors
|
||||
theme[cpu_box]=#ffad7f
|
||||
theme[mem_box]=#ffdc85
|
||||
theme[net_box]=#f0b279
|
||||
theme[proc_box]=#ffa2bd
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]=#4f4539
|
||||
|
||||
# Temperature graph color (Green -> Yellow -> Red)
|
||||
theme[temp_start]=#ffdc85
|
||||
theme[temp_mid]=#ffefdb
|
||||
theme[temp_end]=#f6a14d
|
||||
|
||||
# CPU graph colors (Teal -> Sapphire -> Lavender)
|
||||
theme[cpu_start]=#f5df89
|
||||
theme[cpu_mid]=#b3d27e
|
||||
theme[cpu_end]=#ffbcbb
|
||||
|
||||
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
|
||||
theme[free_start]=#ffad7f
|
||||
theme[free_mid]=#ffbcbb
|
||||
theme[free_end]=#ffa2bd
|
||||
|
||||
# Mem/Disk cached meter (Sapphire -> Blue -> Lavender)
|
||||
theme[cached_start]=#b3d27e
|
||||
theme[cached_mid]=#ffa2bd
|
||||
theme[cached_end]=#ffbcbb
|
||||
|
||||
# Mem/Disk available meter (Peach -> Maroon -> Red)
|
||||
theme[available_start]=#fac482
|
||||
theme[available_mid]=#f0b279
|
||||
theme[available_end]=#f6a14d
|
||||
|
||||
# Mem/Disk used meter (Green -> Teal -> Sky)
|
||||
theme[used_start]=#ffdc85
|
||||
theme[used_mid]=#f5df89
|
||||
theme[used_end]=#e1df87
|
||||
|
||||
# Download graph colors (Peach -> Maroon -> Red)
|
||||
theme[download_start]=#fac482
|
||||
theme[download_mid]=#f0b279
|
||||
theme[download_end]=#f6a14d
|
||||
|
||||
# Upload graph colors (Green -> Teal -> Sky)
|
||||
theme[upload_start]=#ffdc85
|
||||
theme[upload_mid]=#f5df89
|
||||
theme[upload_end]=#e1df87
|
||||
|
||||
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Lavender -> Mauve)
|
||||
theme[process_start]=#b3d27e
|
||||
theme[process_mid]=#ffbcbb
|
||||
theme[process_end]=#ffad7f
|
||||
@@ -16,25 +16,14 @@
|
||||
# You can split this configuration into multiple files
|
||||
# Create your files separately and then link them to this file like this:
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
source = ~/.config/hypr/keymaps.conf
|
||||
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
env = XDG_SCREENSHOTS_DIR,$HOME/Pictures/Screenshots
|
||||
|
||||
# env = LIBVA_DRIVER_NAME,nvidia
|
||||
# env = GBM_BACKEND,nvidia-drm
|
||||
# env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
|
||||
env = AQ_DRM_DEVICES,/dev/dri/card2:/dev/dri/card1
|
||||
|
||||
# Toolkit Backend Variables
|
||||
env = GDK_BACKEND,wayland,x11,*
|
||||
env = QT_QPA_PLATFORM,wayland;xcb
|
||||
env = CLUTTER_BACKEND,wayland
|
||||
|
||||
env = GDK_BACKEND,wayland,x11,*
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
env = QT_QPA_PLATFORM,wayland;xcb
|
||||
@@ -42,13 +31,12 @@ env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
|
||||
###################
|
||||
@@ -59,11 +47,31 @@ monitor=,preferred,auto,auto
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$menu = wofi --show drun
|
||||
$fileManager = thunar
|
||||
$menu = hyprlauncher
|
||||
$browser = zen-browser
|
||||
|
||||
exec-once = ~/.config/hypr/start.sh
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
# exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
# exec-once = waybar & hyprpaper & firefox
|
||||
exec-once = ssh-agent & waybar & hyprpaper & kdeconnect-indicator & hypridle
|
||||
exec-once = systemctl --user start hyprpolkitagent
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
@@ -73,14 +81,14 @@ exec-once = ~/.config/hypr/start.sh
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 3
|
||||
gaps_out = 5
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
border_size = 2
|
||||
col.active_border = 0xffd3869b
|
||||
col.inactive_border = 0xff45475a
|
||||
# col.nogroup_border = rgba(282a36dd)
|
||||
# col.nogroup_border_active = rgb(bd93f9) rgb(44475a) 90deg
|
||||
col.active_border = rgb(44475a) rgb(bd93f9) 90deg
|
||||
col.inactive_border = rgba(44475aaa)
|
||||
col.nogroup_border = rgba(282a36dd)
|
||||
col.nogroup_border_active = rgb(bd93f9) rgb(44475a) 90deg
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
@@ -89,6 +97,7 @@ general {
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
|
||||
}
|
||||
|
||||
cursor {
|
||||
@@ -99,20 +108,19 @@ decoration {
|
||||
rounding = 10
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 0.9
|
||||
inactive_opacity = 0.9
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = 0x33000000
|
||||
color_inactive = 0x22000000
|
||||
}
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = rgba(1E202966)
|
||||
}
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur {
|
||||
enabled = true
|
||||
size = 2
|
||||
passes = 4
|
||||
size = 3
|
||||
passes = 1
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
}
|
||||
@@ -151,8 +159,8 @@ misc {
|
||||
animate_manual_resizes = true
|
||||
animate_mouse_windowdragging = true
|
||||
enable_swallow = true
|
||||
render_ahead_of_time = false
|
||||
disable_hyprland_logo = true
|
||||
vfr = true
|
||||
}
|
||||
|
||||
|
||||
@@ -174,6 +182,11 @@ input {
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device {
|
||||
@@ -181,12 +194,107 @@ device {
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
|
||||
####################
|
||||
### KEYBINDINGSS ###
|
||||
####################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
|
||||
exec-once = wl-paste --type text --watch cliphist store
|
||||
exec-once = wl-paste --type image --watch cliphist store
|
||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Return, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod ALT, Q, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod, T, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Moving windows
|
||||
bind = $mainMod SHIFT, left, swapwindow, l
|
||||
bind = $mainMod SHIFT, right, swapwindow, r
|
||||
bind = $mainMod SHIFT, up, swapwindow, u
|
||||
bind = $mainMod SHIFT, down, swapwindow, d
|
||||
|
||||
# Window resizing X Y
|
||||
bind = $mainMod CTRL, left, resizeactive, -60 0
|
||||
bind = $mainMod CTRL, right, resizeactive, 60 0
|
||||
bind = $mainMod CTRL, up, resizeactive, 0 -60
|
||||
bind = $mainMod CTRL, down, resizeactive, 0 60
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
|
||||
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
|
||||
bind = $mainMod SHIFT, H, exec, $terminal -e sh -c "nvim ~/.config/hypr/hyprland.conf"
|
||||
bind = $mainMod SHIFT, W, exec, $terminal -e sh -c "nvim ~/.config/waybar/config"
|
||||
|
||||
bind = $mainMod SHIFT, S, exec, grimblast copysave area
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
windowrule {
|
||||
name = windowrule-1
|
||||
suppress_event = maximize
|
||||
match:class = .* # You'll probably like this.
|
||||
}
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
-- Hyprland Lua Config
|
||||
-- Migrated from hyprland.conf + keymaps.conf
|
||||
|
||||
-- Environment Variables
|
||||
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SCREENSHOTS_DIR", os.getenv("HOME") .. "/Pictures/Screenshots")
|
||||
|
||||
hl.env("AQ_DRM_DEVICES", "/dev/dri/card2:/dev/dri/card1")
|
||||
hl.env("GDK_BACKEND", "wayland,x11,*")
|
||||
hl.env("CLUTTER_BACKEND", "wayland")
|
||||
hl.env("QT_AUTO_SCREEN_SCALE_FACTOR", "1")
|
||||
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
|
||||
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
|
||||
hl.env("QT_QPA_PLATFORMTHEME", "qt5ct")
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
|
||||
-- Monitor
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
|
||||
require("keymaps")
|
||||
|
||||
-- Autostart
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("~/.config/hypr/start.sh")
|
||||
hl.exec_cmd("wl-paste --type text --watch cliphist store")
|
||||
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
||||
end)
|
||||
|
||||
-- Look and Feel
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 3,
|
||||
gaps_out = 5,
|
||||
border_size = 2,
|
||||
col = {
|
||||
active_border = "0xffd3869b",
|
||||
inactive_border = "0xff45475a",
|
||||
},
|
||||
resize_on_border = false,
|
||||
allow_tearing = false,
|
||||
layout = "dwindle",
|
||||
},
|
||||
cursor = {
|
||||
no_hardware_cursors = true,
|
||||
},
|
||||
decoration = {
|
||||
rounding = 10,
|
||||
active_opacity = 0.9,
|
||||
inactive_opacity = 0.9,
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 4,
|
||||
render_power = 3,
|
||||
color = 0x33000000,
|
||||
color_inactive = 0x22000000,
|
||||
},
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 2,
|
||||
passes = 4,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
animations = {
|
||||
enabled = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Bezier curves
|
||||
hl.curve(
|
||||
"myBezier",
|
||||
{ type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } }
|
||||
)
|
||||
hl.curve(
|
||||
"default",
|
||||
{ type = "bezier", points = { { 0.25, 0.1 }, { 0.25, 1 } } }
|
||||
)
|
||||
|
||||
-- Animations
|
||||
hl.animation({
|
||||
leaf = "windows",
|
||||
enabled = true,
|
||||
speed = 7,
|
||||
bezier = "myBezier",
|
||||
})
|
||||
hl.animation({
|
||||
leaf = "windowsOut",
|
||||
enabled = true,
|
||||
speed = 7,
|
||||
bezier = "default",
|
||||
style = "popin 80%",
|
||||
})
|
||||
hl.animation({
|
||||
leaf = "border",
|
||||
enabled = true,
|
||||
speed = 10,
|
||||
bezier = "default",
|
||||
})
|
||||
hl.animation({
|
||||
leaf = "borderangle",
|
||||
enabled = true,
|
||||
speed = 8,
|
||||
bezier = "default",
|
||||
})
|
||||
hl.animation({
|
||||
leaf = "fade",
|
||||
enabled = true,
|
||||
speed = 7,
|
||||
bezier = "default",
|
||||
})
|
||||
hl.animation({
|
||||
leaf = "workspaces",
|
||||
enabled = true,
|
||||
speed = 6,
|
||||
bezier = "default",
|
||||
})
|
||||
|
||||
-- Dwindle layout
|
||||
hl.config({
|
||||
dwindle = {
|
||||
preserve_split = true,
|
||||
force_split = 2,
|
||||
},
|
||||
})
|
||||
|
||||
-- Master layout
|
||||
hl.config({
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
})
|
||||
|
||||
-- Misc
|
||||
hl.config({
|
||||
misc = {
|
||||
animate_manual_resizes = true,
|
||||
animate_mouse_windowdragging = true,
|
||||
enable_swallow = true,
|
||||
disable_hyprland_logo = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Input
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "us,eg",
|
||||
kb_variant = "",
|
||||
kb_model = "",
|
||||
kb_options = "grp:alt_shift_toggle",
|
||||
kb_rules = "",
|
||||
follow_mouse = 1,
|
||||
sensitivity = 0,
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Per-device config
|
||||
hl.device({
|
||||
name = "epic-mouse-v1",
|
||||
sensitivity = -0.5,
|
||||
})
|
||||
|
||||
-- Window rules
|
||||
hl.window_rule({
|
||||
name = "suppress-maximize",
|
||||
match = { class = ".*" },
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
-- Gestures
|
||||
hl.gesture({
|
||||
fingers = 3,
|
||||
direction = "horizontal",
|
||||
action = "workspace",
|
||||
})
|
||||
@@ -1,6 +1,4 @@
|
||||
$path = ~/Pictures/Wallpapers/gruvroad.png
|
||||
wallpaper {
|
||||
monitor = eDP-1
|
||||
path = $path
|
||||
fit_mode= cover
|
||||
}
|
||||
$path = ~/Pictures/Wallpapers/dracula-mnt-6272a4.png
|
||||
|
||||
preload = $path
|
||||
wallpaper = ,$path
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
$terminal = alacritty
|
||||
$fileManager = dolphin
|
||||
$menu = wofi --show drun
|
||||
$browser = zen-browser
|
||||
|
||||
####################
|
||||
### KEYBINDINGSS ###
|
||||
####################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
|
||||
exec-once = wl-paste --type text --watch cliphist store
|
||||
exec-once = wl-paste --type image --watch cliphist store
|
||||
bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Return, exec, $terminal
|
||||
bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod ALT, Q, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod, T, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
|
||||
# Moving windows
|
||||
bind = $mainMod SHIFT, left, swapwindow, l
|
||||
bind = $mainMod SHIFT, right, swapwindow, r
|
||||
bind = $mainMod SHIFT, up, swapwindow, u
|
||||
bind = $mainMod SHIFT, down, swapwindow, d
|
||||
|
||||
# Window resizing X Y
|
||||
bind = $mainMod CTRL, left, resizeactive, -60 0
|
||||
bind = $mainMod CTRL, right, resizeactive, 60 0
|
||||
bind = $mainMod CTRL, up, resizeactive, 0 -60
|
||||
bind = $mainMod CTRL, down, resizeactive, 0 60
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
|
||||
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
|
||||
bind = $mainMod SHIFT, C, exec, $terminal -e sh -c "nvim ~/.config/"
|
||||
|
||||
bind = $mainMod SHIFT, S, exec, grimblast copysave area
|
||||
@@ -1,105 +0,0 @@
|
||||
-- Keybindings
|
||||
local terminal = "alacritty"
|
||||
local fileManager = "dolphin"
|
||||
local menu = "wofi --show drun"
|
||||
local browser = "zen-browser"
|
||||
local mainMod = "SUPER"
|
||||
|
||||
-- Launch/close
|
||||
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + ALT + Q", hl.dsp.exit())
|
||||
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
||||
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd(browser))
|
||||
hl.bind(mainMod .. " + T", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen())
|
||||
hl.bind(
|
||||
mainMod .. " + V",
|
||||
hl.dsp.exec_cmd("cliphist list | wofi --dmenu | cliphist decode | wl-copy")
|
||||
)
|
||||
hl.bind(mainMod .. " + R", hl.dsp.exec_cmd(menu))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
||||
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
|
||||
|
||||
-- Move focus with mainMod + arrow keys
|
||||
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "d" }))
|
||||
|
||||
-- Swap windows with mainMod + SHIFT + arrow keys
|
||||
hl.bind(mainMod .. " + SHIFT + left", hl.dsp.window.swap({ direction = "l" }))
|
||||
hl.bind(mainMod .. " + SHIFT + right", hl.dsp.window.swap({ direction = "r" }))
|
||||
hl.bind(mainMod .. " + SHIFT + up", hl.dsp.window.swap({ direction = "u" }))
|
||||
hl.bind(mainMod .. " + SHIFT + down", hl.dsp.window.swap({ direction = "d" }))
|
||||
|
||||
-- Resize windows with mainMod + CTRL + arrow keys
|
||||
hl.bind(mainMod .. " + CTRL + left", hl.dsp.window.resize({ x = -60, y = 0 }))
|
||||
hl.bind(mainMod .. " + CTRL + right", hl.dsp.window.resize({ x = 60, y = 0 }))
|
||||
hl.bind(mainMod .. " + CTRL + up", hl.dsp.window.resize({ x = 0, y = -60 }))
|
||||
hl.bind(mainMod .. " + CTRL + down", hl.dsp.window.resize({ x = 0, y = 60 }))
|
||||
|
||||
-- Switch / move workspaces with mainMod + [0-9]
|
||||
for i = 1, 10 do
|
||||
local key = i % 10
|
||||
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||
hl.bind(
|
||||
mainMod .. " + SHIFT + " .. key,
|
||||
hl.dsp.window.move({ workspace = i, silent = true })
|
||||
)
|
||||
end
|
||||
|
||||
-- Scroll through existing workspaces with mainMod + scroll
|
||||
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||
|
||||
-- Move/resize windows with mainMod + LMB/RMB
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Brightness
|
||||
hl.bind(
|
||||
"XF86MonBrightnessDown",
|
||||
hl.dsp.exec_cmd("brightnessctl set 5%-"),
|
||||
{ locked = true, repeating = true }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86MonBrightnessUp",
|
||||
hl.dsp.exec_cmd("brightnessctl set 5%+"),
|
||||
{ locked = true, repeating = true }
|
||||
)
|
||||
|
||||
-- Audio
|
||||
hl.bind(
|
||||
"XF86AudioRaiseVolume",
|
||||
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"),
|
||||
{ locked = true, repeating = true }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioLowerVolume",
|
||||
hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
|
||||
{ locked = true, repeating = true }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioMute",
|
||||
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"),
|
||||
{ locked = true }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioPlay",
|
||||
hl.dsp.exec_cmd("playerctl play-pause"),
|
||||
{ locked = true }
|
||||
)
|
||||
hl.bind(
|
||||
"XF86AudioPrev",
|
||||
hl.dsp.exec_cmd("playerctl previous"),
|
||||
{ locked = true }
|
||||
)
|
||||
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||
|
||||
-- Misc binds
|
||||
hl.bind(
|
||||
mainMod .. " + SHIFT + C",
|
||||
hl.dsp.exec_cmd(terminal .. " -e sh -c 'nvim ~/.config/'")
|
||||
)
|
||||
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.exec_cmd("grimblast copysave area"))
|
||||
@@ -1,110 +0,0 @@
|
||||
$primary_paletteKeyColor = 9b6f28
|
||||
$secondary_paletteKeyColor = 8a7457
|
||||
$tertiary_paletteKeyColor = 697d57
|
||||
$neutral_paletteKeyColor = 7f766c
|
||||
$neutral_variant_paletteKeyColor = 817567
|
||||
$background = 18120b
|
||||
$onBackground = ede0d4
|
||||
$surface = 18120b
|
||||
$surfaceDim = 18120b
|
||||
$surfaceBright = 3f382f
|
||||
$surfaceContainerLowest = 120d07
|
||||
$surfaceContainerLow = 201b13
|
||||
$surfaceContainer = 251f17
|
||||
$surfaceContainerHigh = 2f2921
|
||||
$surfaceContainerHighest = 3b342b
|
||||
$onSurface = ede0d4
|
||||
$surfaceVariant = 4f4539
|
||||
$onSurfaceVariant = d3c4b4
|
||||
$inverseSurface = ede0d4
|
||||
$inverseOnSurface = 362f27
|
||||
$outline = 9b8f80
|
||||
$outlineVariant = 4f4539
|
||||
$shadow = 000000
|
||||
$scrim = 000000
|
||||
$surfaceTint = f3bd6e
|
||||
$primary = f3bd6e
|
||||
$onPrimary = 442b00
|
||||
$primaryContainer = 624000
|
||||
$onPrimaryContainer = ffddb2
|
||||
$inversePrimary = 7f5610
|
||||
$secondary = ddc2a1
|
||||
$onSecondary = 3e2e16
|
||||
$secondaryContainer = 56442a
|
||||
$onSecondaryContainer = fadebc
|
||||
$tertiary = b7cea2
|
||||
$onTertiary = 243516
|
||||
$tertiaryContainer = 82976f
|
||||
$onTertiaryContainer = 000000
|
||||
$error = ffb4ab
|
||||
$onError = 690005
|
||||
$errorContainer = 93000a
|
||||
$onErrorContainer = ffdad6
|
||||
$primaryFixed = ffddb2
|
||||
$primaryFixedDim = f3bd6e
|
||||
$onPrimaryFixed = 291800
|
||||
$onPrimaryFixedVariant = 624000
|
||||
$secondaryFixed = fadebc
|
||||
$secondaryFixedDim = ddc2a1
|
||||
$onSecondaryFixed = 271904
|
||||
$onSecondaryFixedVariant = 56442a
|
||||
$tertiaryFixed = d3eabc
|
||||
$tertiaryFixedDim = b7cea2
|
||||
$onTertiaryFixed = 0f2004
|
||||
$onTertiaryFixedVariant = 3a4c2a
|
||||
$term0 = 353433
|
||||
$term1 = d07d00
|
||||
$term2 = ffc243
|
||||
$term3 = ffe1bb
|
||||
$term4 = b9ab66
|
||||
$term5 = e79953
|
||||
$term6 = e8c66d
|
||||
$term7 = e8d5bf
|
||||
$term8 = afa090
|
||||
$term9 = f19300
|
||||
$term10 = ffd891
|
||||
$term11 = fff2e4
|
||||
$term12 = cfc092
|
||||
$term13 = f6b072
|
||||
$term14 = ffd673
|
||||
$term15 = ffffff
|
||||
$rosewater = ffefe2
|
||||
$flamingo = fbdcc3
|
||||
$pink = ffd5b8
|
||||
$mauve = ffad7f
|
||||
$red = f6a14d
|
||||
$maroon = f0b279
|
||||
$peach = fac482
|
||||
$yellow = ffefdb
|
||||
$green = ffdc85
|
||||
$teal = f5df89
|
||||
$sky = e1df87
|
||||
$sapphire = b3d27e
|
||||
$blue = ffa2bd
|
||||
$lavender = ffbcbb
|
||||
$klink = 559652
|
||||
$klinkSelection = 559652
|
||||
$kvisited = c66716
|
||||
$kvisitedSelection = c66716
|
||||
$knegative = c67400
|
||||
$knegativeSelection = c67400
|
||||
$kneutral = ed9800
|
||||
$kneutralSelection = ed9800
|
||||
$kpositive = cea400
|
||||
$kpositiveSelection = cea400
|
||||
$text = ede0d4
|
||||
$subtext1 = d3c4b4
|
||||
$subtext0 = 9b8f80
|
||||
$overlay2 = 887c6e
|
||||
$overlay1 = 73695c
|
||||
$overlay0 = 61584c
|
||||
$surface2 = 50473c
|
||||
$surface1 = 3e362d
|
||||
$surface0 = 2b241c
|
||||
$base = 18120b
|
||||
$mantle = 18120b
|
||||
$crust = 17110a
|
||||
$success = B5CCBA
|
||||
$onSuccess = 213528
|
||||
$successContainer = 374B3E
|
||||
$onSuccessContainer = D1E9D6
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Redirect all output to start.log (overwriting previous logs)
|
||||
exec > "$HOME/start.log" 2>&1
|
||||
|
||||
# Function to log and time each command
|
||||
run_and_time() {
|
||||
echo "[$(date +'%H:%M:%S')] Starting: $1"
|
||||
# /usr/bin/time -f "Took: %E" $1 &
|
||||
# Note: Since most of these are backgrounded (&),
|
||||
# we use a subshell to capture the duration of the launch itself.
|
||||
start_time=$(date +%s%N)
|
||||
"$@" &
|
||||
end_time=$(date +%s%N)
|
||||
|
||||
# Calculate duration in milliseconds (simple shell math)
|
||||
duration=$(( (end_time - start_time) / 1000000 ))
|
||||
echo " -> Launched in ${duration}ms"
|
||||
}
|
||||
|
||||
echo "--- Hyprland Startup: $(date) ---"
|
||||
|
||||
run_and_time qs -c caelestia
|
||||
# run_and_time systemctl --user start hyprpaper
|
||||
# run_and_time systemctl --user start hypridle
|
||||
# run_and_time systemctl --user start hyprpolkitagent
|
||||
run_and_time systemctl --user start xdg-desktop-portal-hyprland
|
||||
run_and_time ssh-agent
|
||||
run_and_time copyq
|
||||
run_and_time kdeconnect-indicator
|
||||
run_and_time dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
echo "--- All processes dispatched ---"
|
||||
@@ -2,9 +2,11 @@ vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.g.have_nerd_font = true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
-- vim.opt.mouse = 'a'
|
||||
vim.opt.showmode = false
|
||||
vim.schedule(function()
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
end)
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.undofile = true
|
||||
vim.opt.ignorecase = true
|
||||
@@ -19,8 +21,9 @@ vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
vim.opt.inccommand = 'split'
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.scrolloff = 10
|
||||
-- vim.opt.textwidth = 80
|
||||
vim.opt.clipboard:append 'unnamedplus'
|
||||
vim.opt.textwidth = 80
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
@@ -70,150 +73,3 @@ require('lazy').setup({ spec = { import = 'plugins' } }, {
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('blink.cmp').get_lsp_capabilities({}, false))
|
||||
|
||||
vim.lsp.config('*', {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- Diagnostic Config & Keymaps
|
||||
-- See :help vim.diagnostic.Opts
|
||||
vim.diagnostic.config {
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
float = { border = 'rounded', source = 'if_many' },
|
||||
underline = { severity = vim.diagnostic.severity.ERROR },
|
||||
|
||||
-- Can switch between these as you prefer
|
||||
virtual_text = true, -- Text shows up at the end of the line
|
||||
virtual_lines = false, -- Teest shows up underneath the line, with virtual lines
|
||||
|
||||
-- Auto open the float, so you can easily read the errors when jumping with `[d` and `]d`
|
||||
jump = { float = true },
|
||||
}
|
||||
|
||||
-- Brief aside: **What is LSP?**
|
||||
--
|
||||
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
||||
--
|
||||
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
|
||||
-- and language tooling communicate in a standardized fashion.
|
||||
--
|
||||
-- In general, you have a "server" which is some tool built to understand a particular
|
||||
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
|
||||
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
|
||||
-- processes that communicate with some "client" - in this case, Neovim!
|
||||
--
|
||||
-- LSP provides Neovim with features like:
|
||||
-- - Go to definition
|
||||
-- - Find references
|
||||
-- - Autocompletion
|
||||
-- - Symbol Search
|
||||
-- - and more!
|
||||
--
|
||||
-- Thus, Language Servers are external tools that must be installed separately from
|
||||
-- Neovim. This is where `mason` and related plugins come into play.
|
||||
--
|
||||
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
||||
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
||||
|
||||
-- This function gets run when an LSP attaches to a particular buffer.
|
||||
-- That is to say, every time a new file is opened that is associated with
|
||||
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
||||
-- function will be executed to configure the current buffer
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
||||
-- to define small helper and utility functions so you don't have to repeat yourself.
|
||||
--
|
||||
-- In this case, we create a function that lets us more easily define mappings specific
|
||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or 'n'
|
||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
-- Rename the variable under your cursor.
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
||||
|
||||
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
|
||||
---@param client vim.lsp.Client
|
||||
---@param method vim.lsp.protocol.Method
|
||||
---@param bufnr? integer some lsp support methods only in specific files
|
||||
---@return boolean
|
||||
local function client_supports_method(client, method, bufnr)
|
||||
return client:supports_method(method, bufnr)
|
||||
end
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under your cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspDetach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
-- The following code creates a keymap to toggle inlay hints in your
|
||||
-- code, if the language server you are using supports them
|
||||
--
|
||||
-- This may be unwanted, since they displace some of your code
|
||||
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.lsp.enable {
|
||||
'astrols',
|
||||
'bashls',
|
||||
'clangd',
|
||||
'gopls',
|
||||
'luals',
|
||||
-- 'pyright',
|
||||
'ruff',
|
||||
'julials',
|
||||
'svelte-language-server',
|
||||
'rust-analyzer',
|
||||
'emmet-language-server',
|
||||
'tinymist',
|
||||
'tsgo',
|
||||
'tsls',
|
||||
'qmlls',
|
||||
'yamlls',
|
||||
'ty',
|
||||
}
|
||||
|
||||
vim.o.background = 'dark'
|
||||
vim.cmd [[colorscheme gruvbox]]
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/withastro/language-tools/tree/main/packages/language-server
|
||||
---
|
||||
--- `astro-ls` can be installed via `npm`:
|
||||
--- ```sh
|
||||
--- npm install -g @astrojs/language-server
|
||||
--- ```
|
||||
|
||||
return {
|
||||
cmd = { 'astro-ls', '--stdio' },
|
||||
filetypes = { 'astro' },
|
||||
root_markers = { 'package.json', 'tsconfig.json', 'jsconfig.json', '.git' },
|
||||
init_options = {
|
||||
typescript = {},
|
||||
},
|
||||
before_init = function(_, config)
|
||||
if config.init_options and config.init_options.typescript and not config.init_options.typescript.tsdk then
|
||||
config.init_options.typescript.tsdk = 'node_modules/typescript/lib'
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/bash-lsp/bash-language-server
|
||||
---
|
||||
--- `bash-language-server` can be installed via `npm`:
|
||||
--- ```sh
|
||||
--- npm i -g bash-language-server
|
||||
--- ```
|
||||
---
|
||||
--- Language server for bash, written using tree sitter in typescript.
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'bash-language-server', 'start' },
|
||||
settings = {
|
||||
bashIde = {
|
||||
-- Glob pattern for finding and parsing shell script files in the workspace.
|
||||
-- Used by the background analysis features across files.
|
||||
|
||||
-- Prevent recursive scanning which will cause issues when opening a file
|
||||
-- directly in the home directory (e.g. ~/foo.sh).
|
||||
--
|
||||
-- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)".
|
||||
globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
|
||||
},
|
||||
},
|
||||
filetypes = { 'bash', 'sh' },
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
---@brief
|
||||
--- https://biomejs.dev
|
||||
---
|
||||
--- Toolchain of the web. [Successor of Rome](https://biomejs.dev/blog/annoucing-biome).
|
||||
---
|
||||
--- ```sh
|
||||
--- npm install [-g] @biomejs/biome
|
||||
--- ```
|
||||
---
|
||||
--- ### Monorepo support
|
||||
---
|
||||
--- `biome` supports monorepos by default. It will automatically find the `biome.json` corresponding to the package you are working on, as described in the [documentation](https://biomejs.dev/guides/big-projects/#monorepo). This works without the need of spawning multiple instances of `biome`, saving memory.
|
||||
|
||||
local util = require 'lspconfig.util'
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = function(dispatchers, config)
|
||||
local cmd = 'biome'
|
||||
local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/biome'
|
||||
if local_cmd and vim.fn.executable(local_cmd) == 1 then
|
||||
cmd = local_cmd
|
||||
end
|
||||
return vim.lsp.rpc.start({ cmd, 'lsp-proxy' }, dispatchers)
|
||||
end,
|
||||
filetypes = {
|
||||
'astro',
|
||||
'css',
|
||||
'graphql',
|
||||
'html',
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'json',
|
||||
'jsonc',
|
||||
'svelte',
|
||||
'typescript',
|
||||
'typescript.tsx',
|
||||
'typescriptreact',
|
||||
'vue',
|
||||
},
|
||||
workspace_required = true,
|
||||
root_dir = function(bufnr, on_dir)
|
||||
-- The project root is where the LSP can be started from
|
||||
-- As stated in the documentation above, this LSP supports monorepos and simple projects.
|
||||
-- We select then from the project root, which is identified by the presence of a package
|
||||
-- manager lock file.
|
||||
local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' }
|
||||
-- Give the root markers equal priority by wrapping them in a table
|
||||
root_markers = vim.fn.has 'nvim-0.11.3' == 1 and { root_markers, { '.git' } } or vim.list_extend(root_markers, { '.git' })
|
||||
-- We fallback to the current working directory if no project root is found
|
||||
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
|
||||
|
||||
-- We know that the buffer is using Biome if it has a config file
|
||||
-- in its directory tree.
|
||||
local filename = vim.api.nvim_buf_get_name(bufnr)
|
||||
local biome_config_files = { 'biome.json', 'biome.jsonc' }
|
||||
biome_config_files = util.insert_package_json(biome_config_files, 'biome', filename)
|
||||
local is_buffer_using_biome = vim.fs.find(biome_config_files, {
|
||||
path = filename,
|
||||
type = 'file',
|
||||
limit = 1,
|
||||
upward = true,
|
||||
stop = vim.fs.dirname(project_root),
|
||||
})[1]
|
||||
if not is_buffer_using_biome then
|
||||
return
|
||||
end
|
||||
|
||||
on_dir(project_root)
|
||||
end,
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
-- From the clangd configuration in <rtp>/lsp/clangd.lua
|
||||
cmd = { 'clangd' },
|
||||
-- From the clangd configuration in <rtp>/lsp/clangd.lua
|
||||
-- Overrides the "*" configuration in init.lua
|
||||
root_markers = { '.clangd', 'compile_commands.json' },
|
||||
-- From the clangd configuration in init.lua
|
||||
-- Overrides the clangd configuration in <rtp>/lsp/clangd.lua
|
||||
filetypes = { 'c', 'cpp' },
|
||||
-- From the "*" configuration in init.lua
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
semanticTokens = {
|
||||
multilineTokenSupport = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
return {
|
||||
cmd = { 'emmet-language-server', '--stdio' },
|
||||
filetypes = {
|
||||
'astro',
|
||||
'css',
|
||||
'eruby',
|
||||
'html',
|
||||
'htmlangular',
|
||||
'htmldjango',
|
||||
'javascriptreact',
|
||||
'less',
|
||||
'pug',
|
||||
'sass',
|
||||
'scss',
|
||||
'svelte',
|
||||
'templ',
|
||||
'typescriptreact',
|
||||
'vue',
|
||||
},
|
||||
root_markers = { '.git' },
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
return {
|
||||
cmd = { 'gopls' },
|
||||
filetypes = { 'go' },
|
||||
root_markers = {
|
||||
'go.mod',
|
||||
'go.sum',
|
||||
},
|
||||
}
|
||||
@@ -1,125 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/julia-vscode/julia-vscode
|
||||
---
|
||||
--- LanguageServer.jl can be installed with `julia` and `Pkg`:
|
||||
--- ```sh
|
||||
--- julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.add("LanguageServer")'
|
||||
--- ```
|
||||
--- where `~/.julia/environments/nvim-lspconfig` is the location where
|
||||
--- the default configuration expects LanguageServer.jl to be installed.
|
||||
---
|
||||
--- To update an existing install, use the following command:
|
||||
--- ```sh
|
||||
--- julia --project=~/.julia/environments/nvim-lspconfig -e 'using Pkg; Pkg.update()'
|
||||
--- ```
|
||||
---
|
||||
--- Note: In order to have LanguageServer.jl pick up installed packages or dependencies in a
|
||||
--- Julia project, you must make sure that the project is instantiated:
|
||||
--- ```sh
|
||||
--- julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
|
||||
--- ```
|
||||
---
|
||||
--- Note: The julia programming language searches for global environments within the `environments/`
|
||||
--- folder of `$JULIA_DEPOT_PATH` entries. By default this simply `~/.julia/environments`
|
||||
|
||||
local root_files = { 'Project.toml', 'JuliaProject.toml' }
|
||||
|
||||
local function activate_env(path)
|
||||
-- assert(vim.fn.has 'nvim-0.10' == 1, 'requires Nvim 0.10 or newer')
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local julials_clients = vim.lsp.get_clients { bufnr = bufnr, name = 'julials' }
|
||||
assert(#julials_clients > 0, 'method julia/activateenvironment is not supported by any servers active on the current buffer')
|
||||
local function _activate_env(environment)
|
||||
if environment then
|
||||
for _, julials_client in ipairs(julials_clients) do
|
||||
julials_client:notify('julia/activateenvironment', { envPath = environment })
|
||||
end
|
||||
vim.notify('Julia environment activated: \n`' .. environment .. '`', vim.log.levels.INFO)
|
||||
end
|
||||
end
|
||||
if path then
|
||||
path = vim.fs.normalize(vim.fn.fnamemodify(vim.fn.expand(path), ':p'))
|
||||
local found_env = false
|
||||
for _, project_file in ipairs(root_files) do
|
||||
local file = vim.uv.fs_stat(vim.fs.joinpath(path, project_file))
|
||||
if file and file.type then
|
||||
found_env = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not found_env then
|
||||
vim.notify('Path is not a julia environment: \n`' .. path .. '`', vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
_activate_env(path)
|
||||
else
|
||||
local depot_paths = vim.env.JULIA_DEPOT_PATH and vim.split(vim.env.JULIA_DEPOT_PATH, vim.fn.has 'win32' == 1 and ';' or ':') or { vim.fn.expand '~/.julia' }
|
||||
local environments = {}
|
||||
vim.list_extend(environments, vim.fs.find(root_files, { type = 'file', upward = true, limit = math.huge }))
|
||||
for _, depot_path in ipairs(depot_paths) do
|
||||
local depot_env = vim.fs.joinpath(vim.fs.normalize(depot_path), 'environments')
|
||||
vim.list_extend(
|
||||
environments,
|
||||
vim.fs.find(function(name, env_path)
|
||||
return vim.tbl_contains(root_files, name) and string.sub(env_path, #depot_env + 1):match '^/[^/]*$'
|
||||
end, { path = depot_env, type = 'file', limit = math.huge })
|
||||
)
|
||||
end
|
||||
environments = vim.tbl_map(vim.fs.dirname, environments)
|
||||
vim.ui.select(environments, { prompt = 'Select a Julia environment' }, _activate_env)
|
||||
end
|
||||
end
|
||||
|
||||
local cmd = {
|
||||
'julia',
|
||||
'--startup-file=no',
|
||||
'--history-file=no',
|
||||
'-e',
|
||||
[[
|
||||
# Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig
|
||||
# with the regular load path as a fallback
|
||||
ls_install_path = joinpath(
|
||||
get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),
|
||||
"environments", "lsp"
|
||||
)
|
||||
pushfirst!(LOAD_PATH, ls_install_path)
|
||||
using LanguageServer
|
||||
popfirst!(LOAD_PATH)
|
||||
depot_path = get(ENV, "JULIA_DEPOT_PATH", "")
|
||||
project_path = let
|
||||
dirname(something(
|
||||
## 1. Finds an explicitly set project (JULIA_PROJECT)
|
||||
Base.load_path_expand((
|
||||
p = get(ENV, "JULIA_PROJECT", nothing);
|
||||
p === nothing ? nothing : isempty(p) ? nothing : p
|
||||
)),
|
||||
## 2. Look for a Project.toml file in the current working directory,
|
||||
## or parent directories, with $HOME as an upper boundary
|
||||
Base.current_project(),
|
||||
## 3. First entry in the load path
|
||||
get(Base.load_path(), 1, nothing),
|
||||
## 4. Fallback to default global environment,
|
||||
## this is more or less unreachable
|
||||
Base.load_path_expand("@v#.#"),
|
||||
))
|
||||
end
|
||||
@info "Running language server" VERSION pwd() project_path depot_path
|
||||
server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)
|
||||
server.runlinter = true
|
||||
run(server)
|
||||
]],
|
||||
}
|
||||
|
||||
return {
|
||||
cmd = cmd,
|
||||
filetypes = { 'julia' },
|
||||
root_markers = root_files,
|
||||
on_attach = function()
|
||||
vim.api.nvim_buf_create_user_command(0, 'LspJuliaActivateEnv', activate_env, {
|
||||
desc = 'Activate a Julia environment',
|
||||
nargs = '?',
|
||||
complete = 'file',
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
return {
|
||||
cmd = { 'lua-language-server' },
|
||||
-- Filetypes to automatically attach to.
|
||||
filetypes = { 'lua' },
|
||||
-- Sets the "root directory" to the parent directory of the file in the
|
||||
-- current buffer that contains either a ".luarc.json" or a
|
||||
-- ".luarc.jsonc" file. Files that share a root directory will reuse
|
||||
-- the connection to the same LSP server.
|
||||
root_markers = { '.luarc.json', '.luarc.jsonc' },
|
||||
-- Specific settings to send to the server. The schema for this is
|
||||
-- defined by the server. For example the schema for lua-language-server
|
||||
-- can be found here https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { 'vim' }, -- Add 'vim' to the list of global variables
|
||||
},
|
||||
workspace = {
|
||||
checkThirdParty = true,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
'$XDG_DATA_HOME/nvim/lazy',
|
||||
'${3rd}/luv/library',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
local function set_python_path(path)
|
||||
local clients = vim.lsp.get_clients {
|
||||
bufnr = vim.api.nvim_get_current_buf(),
|
||||
name = 'pyright',
|
||||
}
|
||||
for _, client in ipairs(clients) do
|
||||
if client.settings then
|
||||
client.settings.python = vim.tbl_deep_extend('force', client.settings.python, { pythonPath = path })
|
||||
else
|
||||
client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } })
|
||||
end
|
||||
client.notify('workspace/didChangeConfiguration', { settings = nil })
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
cmd = { 'pyright-langserver', '--stdio' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = {
|
||||
'pyproject.toml',
|
||||
'setup.py',
|
||||
'setup.cfg',
|
||||
'requirements.txt',
|
||||
'Pipfile',
|
||||
'pyrightconfig.json',
|
||||
},
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
diagnosticMode = 'openFilesOnly',
|
||||
},
|
||||
},
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightOrganizeImports', function()
|
||||
client:exec_cmd {
|
||||
command = 'pyright.organizeimports',
|
||||
arguments = { vim.uri_from_bufnr(bufnr) },
|
||||
}
|
||||
end, {
|
||||
desc = 'Organize Imports',
|
||||
})
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspPyrightSetPythonPath', set_python_path, {
|
||||
desc = 'Reconfigure pyright with the provided python path',
|
||||
nargs = 1,
|
||||
complete = 'file',
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://doc.qt.io/qt-6/qtqml-tooling-qmlls.html
|
||||
---
|
||||
--- > QML Language Server is a tool shipped with Qt that helps you write code in your favorite (LSP-supporting) editor.
|
||||
---
|
||||
--- Source in the [QtDeclarative repository](https://code.qt.io/cgit/qt/qtdeclarative.git/)
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'qmlls' },
|
||||
filetypes = { 'qml', 'qmljs' },
|
||||
root_markers = { '.git', 'shell.qml' },
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/astral-sh/ruff
|
||||
---
|
||||
--- A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`.
|
||||
---
|
||||
--- ```sh
|
||||
--- pip install ruff
|
||||
--- ```
|
||||
---
|
||||
--- **Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.**
|
||||
---
|
||||
--- This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice.
|
||||
---
|
||||
--- Server settings can be provided via:
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.lsp.config('ruff', {
|
||||
--- init_options = {
|
||||
--- settings = {
|
||||
--- -- Server settings should go here
|
||||
--- }
|
||||
--- }
|
||||
--- })
|
||||
--- ```
|
||||
---
|
||||
--- Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details.
|
||||
return {
|
||||
cmd = { 'ruff', 'server' },
|
||||
filetypes = { 'python' },
|
||||
root_markers = { 'pyproject.toml', 'ruff.toml', '.ruff.toml', '.git' },
|
||||
settings = {},
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/rust-lang/rust-analyzer
|
||||
---
|
||||
--- rust-analyzer (aka rls 2.0), a language server for Rust
|
||||
---
|
||||
---
|
||||
--- See [docs](https://rust-analyzer.github.io/book/configuration.html) for extra settings. The settings can be used like this:
|
||||
--- ```lua
|
||||
--- vim.lsp.config('rust_analyzer', {
|
||||
--- settings = {
|
||||
--- ['rust-analyzer'] = {
|
||||
--- diagnostics = {
|
||||
--- enable = false;
|
||||
--- }
|
||||
--- }
|
||||
--- }
|
||||
--- })
|
||||
--- ```
|
||||
---
|
||||
--- Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per
|
||||
--- https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26.
|
||||
|
||||
local function reload_workspace(bufnr)
|
||||
local clients = vim.lsp.get_clients { bufnr = bufnr, name = 'rust_analyzer' }
|
||||
for _, client in ipairs(clients) do
|
||||
vim.notify 'Reloading Cargo Workspace'
|
||||
client.request('rust-analyzer/reloadWorkspace', nil, function(err)
|
||||
if err then
|
||||
error(tostring(err))
|
||||
end
|
||||
vim.notify 'Cargo workspace reloaded'
|
||||
end, 0)
|
||||
end
|
||||
end
|
||||
|
||||
local function is_library(fname)
|
||||
local user_home = vim.fs.normalize(vim.env.HOME)
|
||||
local cargo_home = os.getenv 'CARGO_HOME' or user_home .. '/.cargo'
|
||||
local registry = cargo_home .. '/registry/src'
|
||||
local git_registry = cargo_home .. '/git/checkouts'
|
||||
|
||||
local rustup_home = os.getenv 'RUSTUP_HOME' or user_home .. '/.rustup'
|
||||
local toolchains = rustup_home .. '/toolchains'
|
||||
|
||||
for _, item in ipairs { toolchains, registry, git_registry } do
|
||||
if vim.fs.relpath(item, fname) then
|
||||
local clients = vim.lsp.get_clients { name = 'rust_analyzer' }
|
||||
return #clients > 0 and clients[#clients].config.root_dir or nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
cmd = { 'rust-analyzer' },
|
||||
filetypes = { 'rust' },
|
||||
root_dir = function(bufnr, on_dir)
|
||||
local fname = vim.api.nvim_buf_get_name(bufnr)
|
||||
local reused_dir = is_library(fname)
|
||||
if reused_dir then
|
||||
on_dir(reused_dir)
|
||||
return
|
||||
end
|
||||
|
||||
local cargo_crate_dir = vim.fs.root(fname, { 'Cargo.toml' })
|
||||
local cargo_workspace_root
|
||||
|
||||
if cargo_crate_dir == nil then
|
||||
on_dir(vim.fs.root(fname, { 'rust-project.json' }) or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1]))
|
||||
return
|
||||
end
|
||||
|
||||
local cmd = {
|
||||
'cargo',
|
||||
'metadata',
|
||||
'--no-deps',
|
||||
'--format-version',
|
||||
'1',
|
||||
'--manifest-path',
|
||||
cargo_crate_dir .. '/Cargo.toml',
|
||||
}
|
||||
|
||||
vim.system(cmd, { text = true }, function(output)
|
||||
if output.code == 0 then
|
||||
if output.stdout then
|
||||
local result = vim.json.decode(output.stdout)
|
||||
if result['workspace_root'] then
|
||||
cargo_workspace_root = vim.fs.normalize(result['workspace_root'])
|
||||
end
|
||||
end
|
||||
|
||||
on_dir(cargo_workspace_root or cargo_crate_dir)
|
||||
else
|
||||
vim.schedule(function()
|
||||
vim.notify(('[rust_analyzer] cmd failed with code %d: %s\n%s'):format(output.code, cmd, output.stderr))
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
capabilities = {
|
||||
experimental = {
|
||||
serverStatusNotification = true,
|
||||
},
|
||||
},
|
||||
before_init = function(init_params, config)
|
||||
-- See https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26
|
||||
if config.settings and config.settings['rust-analyzer'] then
|
||||
init_params.initializationOptions = config.settings['rust-analyzer']
|
||||
end
|
||||
end,
|
||||
on_attach = function()
|
||||
vim.api.nvim_buf_create_user_command(0, 'LspCargoReload', function()
|
||||
reload_workspace(0)
|
||||
end, { desc = 'Reload current cargo workspace' })
|
||||
end,
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/sveltejs/language-tools/tree/master/packages/language-server
|
||||
---
|
||||
--- Note: assuming that [ts_ls](#ts_ls) is setup, full JavaScript/TypeScript support (find references, rename, etc of symbols in Svelte files when working in JS/TS files) requires per-project installation and configuration of [typescript-svelte-plugin](https://github.com/sveltejs/language-tools/tree/master/packages/typescript-plugin#usage).
|
||||
---
|
||||
--- `svelte-language-server` can be installed via `npm`:
|
||||
--- ```sh
|
||||
--- npm install -g svelte-language-server
|
||||
--- ```
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'svelteserver', '--stdio' },
|
||||
filetypes = { 'svelte' },
|
||||
settings = {
|
||||
typescript = {
|
||||
inlayHints = {
|
||||
parameterNames = {
|
||||
enabled = 'literals',
|
||||
suppressWhenArgumentMatchesName = true,
|
||||
},
|
||||
parameterTypes = { enabled = true },
|
||||
variableTypes = { enabled = true },
|
||||
propertyDeclarationTypes = { enabled = true },
|
||||
functionLikeReturnTypes = { enabled = true },
|
||||
enumMemberValues = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
root_dir = function(bufnr, on_dir)
|
||||
local fname = vim.api.nvim_buf_get_name(bufnr)
|
||||
-- Svelte LSP only supports file:// schema. https://github.com/sveltejs/language-tools/issues/2777
|
||||
if vim.uv.fs_stat(fname) ~= nil then
|
||||
local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock', 'deno.lock' }
|
||||
root_markers = vim.fn.has 'nvim-0.11.3' == 1 and { root_markers, { '.git' } } or vim.list_extend(root_markers, { '.git' })
|
||||
-- We fallback to the current working directory if no project root is found
|
||||
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
|
||||
on_dir(project_root)
|
||||
end
|
||||
end,
|
||||
on_attach = function(client, bufnr)
|
||||
-- Workaround to trigger reloading JS/TS files
|
||||
-- See https://github.com/sveltejs/language-tools/issues/2008
|
||||
vim.api.nvim_create_autocmd('BufWritePost', {
|
||||
pattern = { '*.js', '*.ts' },
|
||||
group = vim.api.nvim_create_augroup('lspconfig.svelte', {}),
|
||||
callback = function(ctx)
|
||||
-- internal API to sync changes that have not yet been saved to the file system
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
client:notify('$/onDidChangeTsOrJsFile', { uri = ctx.match })
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspMigrateToSvelte5', function()
|
||||
client:exec_cmd {
|
||||
title = 'Migrate Component to Svelte 5 Syntax',
|
||||
command = 'migrate_to_svelte_5',
|
||||
arguments = { vim.uri_from_bufnr(bufnr) },
|
||||
}
|
||||
end, { desc = 'Migrate Component to Svelte 5 Syntax' })
|
||||
end,
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/Myriad-Dreamin/tinymist
|
||||
--- An integrated language service for Typst [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese.
|
||||
---
|
||||
--- Currently some of Tinymist's workspace commands are supported, namely:
|
||||
--- `LspTinymistExportSvg`, `LspTinymistExportPng`, `LspTinymistExportPdf`,
|
||||
--- `LspTinymistExportMarkdown`, `LspTinymistExportText`, `LspTinymistExportQuery`,
|
||||
--- `LspTinymistExportAnsiHighlight`, `LspTinymistGetServerInfo`,
|
||||
--- `LspTinymistGetDocumentTrace`, `LspTinymistGetWorkspaceLabels`,
|
||||
--- `LspTinymistGetDocumentMetrics`, and `LspTinymistPinMain`.
|
||||
|
||||
---@param command_name string
|
||||
---@param client vim.lsp.Client
|
||||
---@param bufnr integer
|
||||
---@return fun():nil run_tinymist_command, string cmd_name, string cmd_desc
|
||||
local function create_tinymist_command(command_name, client, bufnr)
|
||||
local export_type = command_name:match 'tinymist%.export(%w+)'
|
||||
local info_type = command_name:match 'tinymist%.(%w+)'
|
||||
local cmd_display = export_type or info_type:gsub('^get', 'Get'):gsub('^pin', 'Pin')
|
||||
---@return nil
|
||||
local function run_tinymist_command()
|
||||
local arguments = { vim.api.nvim_buf_get_name(bufnr) }
|
||||
local title_str = export_type and ('Export ' .. cmd_display) or cmd_display
|
||||
---@type lsp.Handler
|
||||
local function handler(err, res)
|
||||
if err then
|
||||
return vim.notify(err.code .. ': ' .. err.message, vim.log.levels.ERROR)
|
||||
end
|
||||
vim.notify(vim.inspect(res), vim.log.levels.INFO)
|
||||
end
|
||||
return client:exec_cmd({
|
||||
title = title_str,
|
||||
command = command_name,
|
||||
arguments = arguments,
|
||||
}, { bufnr = bufnr }, handler)
|
||||
end
|
||||
-- Construct a readable command name/desc
|
||||
local cmd_name = export_type and ('TinymistExport' .. cmd_display) or ('Tinymist' .. cmd_display) ---@type string
|
||||
local cmd_desc = export_type and ('Export to ' .. cmd_display) or ('Get ' .. cmd_display) ---@type string
|
||||
return run_tinymist_command, cmd_name, cmd_desc
|
||||
end
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'tinymist' },
|
||||
filetypes = { 'typst' },
|
||||
root_markers = { '.git' },
|
||||
on_attach = function(client, bufnr)
|
||||
for _, command in ipairs {
|
||||
'tinymist.exportSvg',
|
||||
'tinymist.exportPng',
|
||||
'tinymist.exportPdf',
|
||||
-- 'tinymist.exportHtml', -- Use typst 0.13
|
||||
'tinymist.exportMarkdown',
|
||||
'tinymist.exportText',
|
||||
'tinymist.exportQuery',
|
||||
'tinymist.exportAnsiHighlight',
|
||||
'tinymist.getServerInfo',
|
||||
'tinymist.getDocumentTrace',
|
||||
'tinymist.getWorkspaceLabels',
|
||||
'tinymist.getDocumentMetrics',
|
||||
'tinymist.pinMain',
|
||||
} do
|
||||
local cmd_func, cmd_name, cmd_desc = create_tinymist_command(command, client, bufnr)
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Lsp' .. cmd_name, cmd_func, { nargs = 0, desc = cmd_desc })
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/microsoft/typescript-go
|
||||
---
|
||||
--- `typescript-go` is experimental port of the TypeScript compiler (tsc) and language server (tsserver) to the Go programming language.
|
||||
---
|
||||
--- `tsgo` can be installed via npm `npm install @typescript/native-preview`.
|
||||
---
|
||||
--- ### Monorepo support
|
||||
---
|
||||
--- `tsgo` supports monorepos by default. It will automatically find the `tsconfig.json` or `jsconfig.json` corresponding to the package you are working on.
|
||||
--- This works without the need of spawning multiple instances of `tsgo`, saving memory.
|
||||
---
|
||||
--- It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
|
||||
---
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = function(dispatchers, config)
|
||||
local cmd = 'tsgo'
|
||||
local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/tsgo'
|
||||
if local_cmd and vim.fn.executable(local_cmd) == 1 then
|
||||
cmd = local_cmd
|
||||
end
|
||||
return vim.lsp.rpc.start({ cmd, '--lsp', '--stdio' }, dispatchers)
|
||||
end,
|
||||
filetypes = {
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'javascript.jsx',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'typescript.tsx',
|
||||
},
|
||||
root_dir = function(bufnr, on_dir)
|
||||
-- The project root is where the LSP can be started from
|
||||
-- As stated in the documentation above, this LSP supports monorepos and simple projects.
|
||||
-- We select then from the project root, which is identified by the presence of a package
|
||||
-- manager lock file.
|
||||
local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' }
|
||||
-- Give the root markers equal priority by wrapping them in a table
|
||||
root_markers = vim.fn.has 'nvim-0.11.3' == 1 and { root_markers, { '.git' } } or vim.list_extend(root_markers, { '.git' })
|
||||
|
||||
-- exclude deno
|
||||
if vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' }) then
|
||||
return
|
||||
end
|
||||
|
||||
-- We fallback to the current working directory if no project root is found
|
||||
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
|
||||
|
||||
on_dir(project_root)
|
||||
end,
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/typescript-language-server/typescript-language-server
|
||||
---
|
||||
--- `ts_ls`, aka `typescript-language-server`, is a Language Server Protocol implementation for TypeScript wrapping `tsserver`. Note that `ts_ls` is not `tsserver`.
|
||||
---
|
||||
--- `typescript-language-server` depends on `typescript`. Both packages can be installed via `npm`:
|
||||
--- ```sh
|
||||
--- npm install -g typescript typescript-language-server
|
||||
--- ```
|
||||
---
|
||||
--- To configure typescript language server, add a
|
||||
--- [`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) or
|
||||
--- [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) to the root of your
|
||||
--- project.
|
||||
---
|
||||
--- Here's an example that disables type checking in JavaScript files.
|
||||
---
|
||||
--- ```json
|
||||
--- {
|
||||
--- "compilerOptions": {
|
||||
--- "module": "commonjs",
|
||||
--- "target": "es6",
|
||||
--- "checkJs": false
|
||||
--- },
|
||||
--- "exclude": [
|
||||
--- "node_modules"
|
||||
--- ]
|
||||
--- }
|
||||
--- ```
|
||||
---
|
||||
--- Use the `:LspTypescriptSourceAction` command to see "whole file" ("source") code-actions such as:
|
||||
--- - organize imports
|
||||
--- - remove unused code
|
||||
---
|
||||
--- ### Vue support
|
||||
---
|
||||
--- As of 2.0.0, Volar no longer supports TypeScript itself. Instead, a plugin
|
||||
--- adds Vue support to this language server.
|
||||
---
|
||||
--- *IMPORTANT*: It is crucial to ensure that `@vue/typescript-plugin` and `volar `are of identical versions.
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.lsp.config('ts_ls', {
|
||||
--- init_options = {
|
||||
--- plugins = {
|
||||
--- {
|
||||
--- name = "@vue/typescript-plugin",
|
||||
--- location = "/usr/local/lib/node_modules/@vue/typescript-plugin",
|
||||
--- languages = {"javascript", "typescript", "vue"},
|
||||
--- },
|
||||
--- },
|
||||
--- },
|
||||
--- filetypes = {
|
||||
--- "javascript",
|
||||
--- "typescript",
|
||||
--- "vue",
|
||||
--- },
|
||||
--- })
|
||||
---
|
||||
--- -- You must make sure volar is setup
|
||||
--- -- e.g. vim.lsp.config('volar')
|
||||
--- -- See volar's section for more information
|
||||
--- ```
|
||||
---
|
||||
--- `location` MUST be defined. If the plugin is installed in `node_modules`,
|
||||
--- `location` can have any value.
|
||||
---
|
||||
--- `languages` must include `vue` even if it is listed in `filetypes`.
|
||||
---
|
||||
--- `filetypes` is extended here to include Vue SFC.
|
||||
|
||||
return {
|
||||
init_options = {
|
||||
hostInfo = 'neovim',
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = '@vue/typescript-plugin',
|
||||
location = '/usr/local/lib/node_modules/@vue/typescript-plugin',
|
||||
languages = { 'javascript', 'typescript', 'vue' },
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
'javascript',
|
||||
'typescript',
|
||||
'vue',
|
||||
},
|
||||
},
|
||||
cmd = { 'typescript-language-server', '--stdio' },
|
||||
filetypes = {
|
||||
'vue',
|
||||
},
|
||||
root_markers = { 'tsconfig.json', 'jsconfig.json', 'package.json', '.git' },
|
||||
handlers = {
|
||||
-- handle rename request for certain code actions like extracting functions / types
|
||||
['_typescript.rename'] = function(_, result, ctx)
|
||||
local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
|
||||
vim.lsp.util.show_document({
|
||||
uri = result.textDocument.uri,
|
||||
range = {
|
||||
start = result.position,
|
||||
['end'] = result.position,
|
||||
},
|
||||
}, client.offset_encoding)
|
||||
vim.lsp.buf.rename()
|
||||
return vim.NIL
|
||||
end,
|
||||
},
|
||||
on_attach = function(client)
|
||||
-- ts_ls provides `source.*` code actions that apply to the whole file. These only appear in
|
||||
-- `vim.lsp.buf.code_action()` if specified in `context.only`.
|
||||
vim.api.nvim_buf_create_user_command(0, 'LspTypescriptSourceAction', function()
|
||||
local source_actions = vim.tbl_filter(function(action)
|
||||
return vim.startswith(action, 'source.')
|
||||
end, client.server_capabilities.codeActionProvider.codeActionKinds)
|
||||
|
||||
vim.lsp.buf.code_action {
|
||||
context = {
|
||||
only = source_actions,
|
||||
diagnostics = {},
|
||||
},
|
||||
}
|
||||
end, {})
|
||||
end,
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
return {
|
||||
cmd = { 'ty', 'server' },
|
||||
filetypes = { 'python' },
|
||||
root_dir = vim.fs.root(0, { '.git/', 'pyproject.toml' }),
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
---@brief
|
||||
---
|
||||
--- https://github.com/redhat-developer/yaml-language-server
|
||||
---
|
||||
--- `yaml-language-server` can be installed via `yarn`:
|
||||
--- ```sh
|
||||
--- yarn global add yaml-language-server
|
||||
--- ```
|
||||
---
|
||||
--- To use a schema for validation, there are two options:
|
||||
---
|
||||
--- 1. Add a modeline to the file. A modeline is a comment of the form:
|
||||
---
|
||||
--- ```
|
||||
--- # yaml-language-server: $schema=<urlToTheSchema|relativeFilePath|absoluteFilePath}>
|
||||
--- ```
|
||||
---
|
||||
--- where the relative filepath is the path relative to the open yaml file, and the absolute filepath
|
||||
--- is the filepath relative to the filesystem root ('/' on unix systems)
|
||||
---
|
||||
--- 2. Associated a schema url, relative , or absolute (to root of project, not to filesystem root) path to
|
||||
--- the a glob pattern relative to the detected project root. Check `:checkhealth vim.lsp` to determine the resolved project
|
||||
--- root.
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.lsp.config('yamlls', {
|
||||
--- ...
|
||||
--- settings = {
|
||||
--- yaml = {
|
||||
--- ... -- other settings. note this overrides the lspconfig defaults.
|
||||
--- schemas = {
|
||||
--- ["https://json.schemastore.org/github-workflow.json"] = "/.github/workflows/*",
|
||||
--- ["../path/relative/to/file.yml"] = "/.github/workflows/*",
|
||||
--- ["/path/from/root/of/project"] = "/.github/workflows/*",
|
||||
--- },
|
||||
--- },
|
||||
--- }
|
||||
--- })
|
||||
--- ```
|
||||
---
|
||||
--- Currently, kubernetes is special-cased in yammls, see the following upstream issues:
|
||||
--- * [#211](https://github.com/redhat-developer/yaml-language-server/issues/211).
|
||||
--- * [#307](https://github.com/redhat-developer/yaml-language-server/issues/307).
|
||||
---
|
||||
--- To override a schema to use a specific k8s schema version (for example, to use 1.18):
|
||||
---
|
||||
--- ```lua
|
||||
--- vim.lsp.config('yamlls', {
|
||||
--- ...
|
||||
--- settings = {
|
||||
--- yaml = {
|
||||
--- ... -- other settings. note this overrides the lspconfig defaults.
|
||||
--- schemas = {
|
||||
--- ["https://raw.githubusercontent.com/yannh/kubernetes-json-schema/refs/heads/master/v1.32.1-standalone-strict/all.json"] = "/*.k8s.yaml",
|
||||
--- ... -- other schemas
|
||||
--- },
|
||||
--- },
|
||||
--- }
|
||||
--- })
|
||||
--- ```
|
||||
|
||||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { 'yaml-language-server', '--stdio' },
|
||||
filetypes = { 'yaml', 'yaml.docker-compose', 'yaml.gitlab', 'yaml.helm-values' },
|
||||
root_markers = { '.git' },
|
||||
settings = {
|
||||
-- https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting
|
||||
redhat = { telemetry = { enabled = false } },
|
||||
-- formatting disabled by default in yaml-language-server; enable it
|
||||
yaml = { format = { enable = true } },
|
||||
},
|
||||
on_init = function(client)
|
||||
--- https://github.com/neovim/nvim-lspconfig/pull/4016
|
||||
--- Since formatting is disabled by default if you check `client:supports_method('textDocument/formatting')`
|
||||
--- during `LspAttach` it will return `false`. This hack sets the capability to `true` to facilitate
|
||||
--- autocmd's which check this capability
|
||||
client.server_capabilities.documentFormattingProvider = true
|
||||
end,
|
||||
}
|
||||
5
.config/nvim/lua/custom/plugins/init.lua
Normal file
5
.config/nvim/lua/custom/plugins/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- You can add your own plugins here or in other files in this directory!
|
||||
-- I promise not to create any merge conflicts in this directory :)
|
||||
--
|
||||
-- See the kickstart.nvim README for more information
|
||||
return {}
|
||||
52
.config/nvim/lua/kickstart/health.lua
Normal file
52
.config/nvim/lua/kickstart/health.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
--[[
|
||||
--
|
||||
-- This file is not required for your own configuration,
|
||||
-- but helps people determine if their system is setup correctly.
|
||||
--
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = tostring(vim.version())
|
||||
if not vim.version.ge then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
end
|
||||
end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
else
|
||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
check = function()
|
||||
vim.health.start 'kickstart.nvim'
|
||||
|
||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||
|
||||
Fix only warnings for plugins and languages you intend to use.
|
||||
Mason will give warnings for languages that are not installed.
|
||||
You do not need to install, unless you want to use those languages!]]
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||
|
||||
check_version()
|
||||
check_external_reqs()
|
||||
end,
|
||||
}
|
||||
16
.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
16
.config/nvim/lua/kickstart/plugins/autopairs.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- autopairs
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
-- Optional dependency
|
||||
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||
config = function()
|
||||
require('nvim-autopairs').setup {}
|
||||
-- If you want to automatically add `(` after selecting a function or method
|
||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||
local cmp = require 'cmp'
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
}
|
||||
105
.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
105
.config/nvim/lua/kickstart/plugins/debug.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Required dependency for nvim-dap-ui
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
keys = function(_, keys)
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
return {
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
{ '<F5>', dap.continue, desc = 'Debug: Start/Continue' },
|
||||
{ '<F1>', dap.step_into, desc = 'Debug: Step Into' },
|
||||
{ '<F2>', dap.step_over, desc = 'Debug: Step Over' },
|
||||
{ '<F3>', dap.step_out, desc = 'Debug: Step Out' },
|
||||
{ '<leader>b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' },
|
||||
{
|
||||
'<leader>B',
|
||||
function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end,
|
||||
desc = 'Debug: Set Breakpoint',
|
||||
},
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
{ '<F7>', dapui.toggle, desc = 'Debug: See last session result.' },
|
||||
unpack(keys),
|
||||
}
|
||||
end,
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_installation = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup {
|
||||
delve = {
|
||||
-- On Windows delve must be run attached or it crashes.
|
||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||
detached = vim.fn.has 'win32' == 0,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
61
.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
61
.config/nvim/lua/kickstart/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||
-- config. This will add also the recommended keymaps.
|
||||
|
||||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { ']c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'next'
|
||||
end
|
||||
end, { desc = 'Jump to next git [c]hange' })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { '[c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'prev'
|
||||
end
|
||||
end, { desc = 'Jump to previous git [c]hange' })
|
||||
|
||||
-- Actions
|
||||
-- visual mode
|
||||
map('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'stage git hunk' })
|
||||
map('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'reset git hunk' })
|
||||
-- normal mode
|
||||
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
||||
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
||||
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||
map('n', '<leader>hD', function()
|
||||
gitsigns.diffthis '@'
|
||||
end, { desc = 'git [D]iff against last commit' })
|
||||
-- Toggles
|
||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
9
.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
9
.config/nvim/lua/kickstart/plugins/indent_line.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{ -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
55
.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
55
.config/nvim/lua/kickstart/plugins/lint.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
return {
|
||||
|
||||
{ -- Linting
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
--
|
||||
-- However, note that this will enable a set of default linters,
|
||||
-- which will cause errors unless these tools are available:
|
||||
-- {
|
||||
-- clojure = { "clj-kondo" },
|
||||
-- dockerfile = { "hadolint" },
|
||||
-- inko = { "inko" },
|
||||
-- janet = { "janet" },
|
||||
-- json = { "jsonlint" },
|
||||
-- markdown = { "vale" },
|
||||
-- rst = { "vale" },
|
||||
-- ruby = { "ruby" },
|
||||
-- terraform = { "tflint" },
|
||||
-- text = { "vale" }
|
||||
-- }
|
||||
--
|
||||
-- You can disable the default linters by setting their filetypes to nil:
|
||||
-- lint.linters_by_ft['clojure'] = nil
|
||||
-- lint.linters_by_ft['dockerfile'] = nil
|
||||
-- lint.linters_by_ft['inko'] = nil
|
||||
-- lint.linters_by_ft['janet'] = nil
|
||||
-- lint.linters_by_ft['json'] = nil
|
||||
-- lint.linters_by_ft['markdown'] = nil
|
||||
-- lint.linters_by_ft['rst'] = nil
|
||||
-- lint.linters_by_ft['ruby'] = nil
|
||||
-- lint.linters_by_ft['terraform'] = nil
|
||||
-- lint.linters_by_ft['text'] = nil
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
25
.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
25
.config/nvim/lua/kickstart/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
-- Neo-tree is a Neovim plugin to browse the file system
|
||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||
},
|
||||
opts = {
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
['\\'] = 'close_window',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
51
.config/nvim/lua/plugins/codeium.lua
Normal file
51
.config/nvim/lua/plugins/codeium.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
return {
|
||||
'exafunction/codeium.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'hrsh7th/nvim-cmp',
|
||||
},
|
||||
config = function()
|
||||
require('codeium').setup {
|
||||
-- Optionally disable cmp source if using virtual text only
|
||||
enable_cmp_source = false,
|
||||
virtual_text = {
|
||||
enabled = true,
|
||||
|
||||
-- These are the defaults
|
||||
|
||||
-- Set to true if you never want completions to be shown automatically.
|
||||
manual = false,
|
||||
-- A mapping of filetype to true or false, to enable virtual text.
|
||||
filetypes = {},
|
||||
-- Whether to enable virtual text of not for filetypes not specifically listed above.
|
||||
default_filetype_enabled = true,
|
||||
-- How long to wait (in ms) before requesting completions after typing stops.
|
||||
idle_delay = 75,
|
||||
-- Priority of the virtual text. This usually ensures that the completions appear on top of
|
||||
-- other plugins that also add virtual text, such as LSP inlay hints, but can be modified if
|
||||
-- desired.
|
||||
virtual_text_priority = 65535,
|
||||
-- Set to false to disable all key bindings for managing completions.
|
||||
map_keys = true,
|
||||
-- The key to press when hitting the accept keybinding but no completion is showing.
|
||||
-- Defaults to \t normally or <c-n> when a popup is showing.
|
||||
accept_fallback = nil,
|
||||
-- Key bindings for managing completions in virtual text mode.
|
||||
key_bindings = {
|
||||
-- Accept the current completion.
|
||||
accept = '<Tab>',
|
||||
-- Accept the next word.
|
||||
accept_word = false,
|
||||
-- Accept the next line.
|
||||
accept_line = false,
|
||||
-- Clear the virtual text.
|
||||
clear = false,
|
||||
-- Cycle to the next completion.
|
||||
next = '<M-]>',
|
||||
-- Cycle to the previous completion.
|
||||
prev = '<M-[>',
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
return {
|
||||
'saghen/blink.cmp',
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = 'rafamadriz/friendly-snippets',
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = '*',
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept, C-n/C-p for up/down)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys for up/down)
|
||||
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help
|
||||
--
|
||||
-- See the full "keymap" documentation for information on defining your own keymap.
|
||||
keymap = { preset = 'default', ['<C-h>'] = { 'show', 'show_documentation', 'hide_documentation' } },
|
||||
|
||||
appearance = {
|
||||
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||
-- Useful for when your theme doesn't support blink.cmp
|
||||
-- Will be removed in a future release
|
||||
use_nvim_cmp_as_default = false,
|
||||
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = 'mono',
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
},
|
||||
|
||||
-- Blink.cmp uses a Rust fuzzy matcher by default for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = { implementation = 'prefer_rust_with_warning' },
|
||||
|
||||
completion = {
|
||||
accept = {
|
||||
-- experimental auto-brackets support
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
draw = {
|
||||
treesitter = { 'lsp' },
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 200,
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = vim.g.ai_cmp,
|
||||
},
|
||||
},
|
||||
},
|
||||
opts_extend = { 'sources.default' },
|
||||
}
|
||||
102
.config/nvim/lua/plugins/debugger.lua
Normal file
102
.config/nvim/lua/plugins/debugger.lua
Normal file
@@ -0,0 +1,102 @@
|
||||
local js_based_languages = {
|
||||
'typescript',
|
||||
'javascript',
|
||||
'typescriptreact',
|
||||
'javascriptreact',
|
||||
'vue',
|
||||
}
|
||||
|
||||
return {
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'nvim-neotest/nvim-nio',
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>db',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
},
|
||||
{
|
||||
'<leader>dr',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"<C-'>",
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
},
|
||||
{
|
||||
'<C-;>',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
},
|
||||
{
|
||||
'<C-:>',
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
dap.adapters.firefox = {
|
||||
type = 'executable',
|
||||
command = 'node',
|
||||
args = {
|
||||
require('mason-registry').get_package('firefox-debug-adapter'):get_install_path() .. '/dist/adapter.bundle.js',
|
||||
},
|
||||
}
|
||||
-- Configuration for JavaScript/TypeScript languages
|
||||
for _, language in ipairs(js_based_languages) do
|
||||
dap.configurations[language] = {
|
||||
{
|
||||
type = 'firefox',
|
||||
request = 'launch',
|
||||
name = 'Launch & Debug in Firefox',
|
||||
url = function()
|
||||
local co = coroutine.running()
|
||||
return coroutine.create(function()
|
||||
vim.ui.input({
|
||||
prompt = 'Enter URL: ',
|
||||
default = 'http://localhost:8080',
|
||||
}, function(url)
|
||||
if url == nil or url == '' then
|
||||
return
|
||||
else
|
||||
coroutine.resume(co, url)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end,
|
||||
webRoot = vim.fn.getcwd(),
|
||||
firefoxExecutable = '/usr/bin/firefox', -- Adjust if needed
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
-- Set up dap-ui
|
||||
dapui.setup()
|
||||
dap.listeners.after.event_initialized['dapui_config'] = function()
|
||||
dapui.open { reset = true }
|
||||
end
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
require('nvim-dap-virtual-text').setup {
|
||||
enabled = true,
|
||||
enabled_commands = true,
|
||||
highlight_changed_variables = true,
|
||||
highlight_new_as_changed = false,
|
||||
show_stop_reason = true,
|
||||
commented = false,
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
'vyfor/cord.nvim',
|
||||
build = ':Cord update',
|
||||
priority = 15,
|
||||
-- opts = {}
|
||||
-- }
|
||||
}
|
||||
@@ -4,41 +4,38 @@ return {
|
||||
cmd = { 'ConformInfo' },
|
||||
keys = {
|
||||
{
|
||||
-- Customize or remove this keymap to your liking
|
||||
'<leader>f',
|
||||
'<leader>cf',
|
||||
function()
|
||||
require('conform').format { async = true }
|
||||
require('conform').format { async = true, lsp_format = 'fallback' }
|
||||
end,
|
||||
mode = '',
|
||||
desc = 'Format buffer',
|
||||
desc = '[C]ode [F]ormat',
|
||||
},
|
||||
},
|
||||
-- This will provide type hinting with LuaLS
|
||||
---@module "conform"
|
||||
---@type conform.setupOpts
|
||||
opts = {
|
||||
notify_on_error = true,
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 1000,
|
||||
lsp_format = 'fallback',
|
||||
},
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
|
||||
go = { 'gofmt' },
|
||||
python = { 'ruff', 'black', stop_after_first = true },
|
||||
python = { 'ruff' },
|
||||
javascript = { 'biome', 'prettier', stop_after_first = true },
|
||||
typescript = { 'biome', 'prettier', stop_after_first = true },
|
||||
html = { 'prettier', stop_after_first = true },
|
||||
css = { 'biome', 'prettier', stop_after_first = true },
|
||||
yaml = { 'prettier' },
|
||||
rust = { 'rustfmt', lsp_format = 'fallback' },
|
||||
json = { 'biome', 'prettier', stop_after_first = true },
|
||||
astro = { 'prettier', 'biome', stop_after_first = true },
|
||||
vue = { 'biome', 'prettier' },
|
||||
svelte = { 'prettier', 'biome', stop_after_first = true },
|
||||
yaml = { 'prettier' },
|
||||
php = { 'pint', stop_after_first = true },
|
||||
typst = { 'typstyle', stop_after_first = true },
|
||||
php = { 'pint', 'intelephense', stop_after_first = true },
|
||||
},
|
||||
formatters = {
|
||||
intelephense = {
|
||||
command = 'intelephense',
|
||||
args = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
19
.config/nvim/lua/plugins/git.lua
Normal file
19
.config/nvim/lua/plugins/git.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
lazy = true,
|
||||
cmd = {
|
||||
'LazyGit',
|
||||
'LazyGitConfig',
|
||||
'LazyGitCurrentFile',
|
||||
'LazyGitFilter',
|
||||
'LazyGitFilterCurrentFile',
|
||||
},
|
||||
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
|
||||
keys = {
|
||||
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
|
||||
},
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
return {
|
||||
'm4xshen/hardtime.nvim',
|
||||
lazy = false,
|
||||
dependencies = { 'MunifTanjim/nui.nvim' },
|
||||
opts = {},
|
||||
}
|
||||
@@ -1,31 +1,10 @@
|
||||
return {
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua', -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- See the configuration section for more details
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
|
||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
{ -- optional blink completion source for require statements and module annotations
|
||||
'saghen/blink.cmp',
|
||||
opts = {
|
||||
sources = {
|
||||
-- add lazydev to your completion providers
|
||||
default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' },
|
||||
providers = {
|
||||
lazydev = {
|
||||
name = 'LazyDev',
|
||||
module = 'lazydev.integrations.blink',
|
||||
-- make lazydev completions top priority (see `:h blink.cmp`)
|
||||
score_offset = 100,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim
|
||||
}
|
||||
|
||||
83
.config/nvim/lua/plugins/linter.lua
Normal file
83
.config/nvim/lua/plugins/linter.lua
Normal file
@@ -0,0 +1,83 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
dependencies = {
|
||||
{ 'williamboman/mason.nvim', config = true },
|
||||
},
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
-- Define a custom biome linter
|
||||
local mason_registry = require 'mason-registry'
|
||||
local biome_path = mason_registry.get_package('biome'):get_install_path() .. '/node_modules/@biomejs/biome/bin/biome'
|
||||
lint.linters.biome = {
|
||||
name = 'biome',
|
||||
cmd = biome_path, -- Command to run the linter
|
||||
args = { 'lint' }, -- Arguments for the command
|
||||
stdin = false, -- Send content via stdin
|
||||
append_fname = true, -- Automatically add the current file name to the command arguments
|
||||
stream = 'both', -- Result stream
|
||||
ignore_exitcode = true, -- Treat exit code != 1 as an error
|
||||
parser = function(output)
|
||||
local diagnostics = {}
|
||||
|
||||
-- The diagnostic details we need are spread in the first 3 lines of
|
||||
-- each error report. These variables are declared out of the FOR
|
||||
-- loop because we need to carry their values to parse multiple lines.
|
||||
local fetch_message = false
|
||||
local lnum, col, code, message
|
||||
|
||||
-- When a lnum:col:code line is detected fetch_message is set to true.
|
||||
-- While fetch_message is true we will search for the error message.
|
||||
-- When a error message is detected, we will create the diagnostic and
|
||||
-- set fetch_message to false to restart the process and get the next
|
||||
-- diagnostic.
|
||||
for _, line in ipairs(vim.fn.split(output, '\n')) do
|
||||
if fetch_message then
|
||||
_, _, message = string.find(line, '%s×(.+)')
|
||||
|
||||
if message then
|
||||
message = (message):gsub('^%s+×%s*', '')
|
||||
|
||||
table.insert(diagnostics, {
|
||||
source = 'biomejs',
|
||||
lnum = tonumber(lnum) - 1,
|
||||
col = tonumber(col),
|
||||
message = message,
|
||||
code = code,
|
||||
})
|
||||
|
||||
fetch_message = false
|
||||
end
|
||||
else
|
||||
_, _, lnum, col, code = string.find(line, '[^:]+:(%d+):(%d+)%s([%a%/]+)')
|
||||
|
||||
if lnum then
|
||||
fetch_message = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return diagnostics
|
||||
end, -- Custom parser for output
|
||||
}
|
||||
-- Set up linters by filetype
|
||||
lint.linters_by_ft = {
|
||||
vue = { 'biome' }, -- Lint Vue files using the overridden biome command
|
||||
javascript = { 'biome' },
|
||||
json = { 'biome' },
|
||||
typescript = { 'biome' },
|
||||
javascriptreact = { 'biome' },
|
||||
typescriptreact = { 'biome' },
|
||||
python = { 'ruff', 'mypy' },
|
||||
-- Add more filetypes as needed
|
||||
}
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1 +1,194 @@
|
||||
return {}
|
||||
return {
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
|
||||
{ 'williamboman/mason.nvim', config = true },
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc, mode)
|
||||
mode = mode or 'n'
|
||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||
end
|
||||
|
||||
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
||||
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
||||
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
|
||||
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
|
||||
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||
buffer = event.buf,
|
||||
group = highlight_augroup,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('LspDetach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
||||
callback = function(event2)
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
|
||||
local mason_registry = require 'mason-registry'
|
||||
local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'
|
||||
local servers = {
|
||||
rust_analyzer = {
|
||||
filetypes = { 'rust' },
|
||||
capabilities = capabilities,
|
||||
},
|
||||
vtsls = {
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact' },
|
||||
settings = {
|
||||
vtsls = {
|
||||
-- autoUseWorkspaceTsdk = true,
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
{
|
||||
name = '@vue/typescript-plugin',
|
||||
location = vue_language_server_path,
|
||||
languages = { 'vue' },
|
||||
configNamespace = 'typescript',
|
||||
enableForWorkspaceTypeScriptVersions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
capabilities = capabilities,
|
||||
},
|
||||
biome = {
|
||||
capabilities = capabilities,
|
||||
},
|
||||
phpactor = {
|
||||
filetypes = { 'php' },
|
||||
capabilities = capabilities,
|
||||
},
|
||||
vuels = {
|
||||
filetypes = { 'vue' },
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
config = {
|
||||
css = {},
|
||||
emmet = {},
|
||||
html = {
|
||||
suggest = {},
|
||||
},
|
||||
javascript = {
|
||||
format = {},
|
||||
},
|
||||
stylusSupremacy = {},
|
||||
typescript = {
|
||||
format = {},
|
||||
},
|
||||
vetur = {
|
||||
completion = {
|
||||
autoImport = true,
|
||||
tagCasing = 'kebab',
|
||||
useScaffoldSnippets = true,
|
||||
},
|
||||
format = {
|
||||
defaultFormatter = {
|
||||
js = 'biome',
|
||||
ts = 'biome',
|
||||
},
|
||||
defaultFormatterOptions = {},
|
||||
scriptInitialIndent = false,
|
||||
styleInitialIndent = false,
|
||||
},
|
||||
useWorkspaceDependencies = false,
|
||||
validation = {
|
||||
script = true,
|
||||
style = true,
|
||||
template = true,
|
||||
templateProps = true,
|
||||
interpolation = true,
|
||||
},
|
||||
experimental = {
|
||||
templateInterpolationService = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
pyright = {
|
||||
settings = {
|
||||
pyright = {
|
||||
disableOrganizeImports = true, -- Using Ruff
|
||||
},
|
||||
python = {
|
||||
analysis = {
|
||||
ignore = { '*' }, -- Using Ruff
|
||||
typeCheckingMode = 'off', -- Using mypy
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
gopls = {
|
||||
capabilities = capabilities,
|
||||
},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
completion = {
|
||||
callSnippet = 'Replace',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require('mason').setup()
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = {
|
||||
section_separators = { left = '', right = '' },
|
||||
@@ -16,12 +17,6 @@ return {
|
||||
path = 1,
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{
|
||||
'lsp_status',
|
||||
icon = '',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
1
.config/nvim/lua/plugins/luvit-meta.lua
Normal file
1
.config/nvim/lua/plugins/luvit-meta.lua
Normal file
@@ -0,0 +1 @@
|
||||
return { 'Bilal2453/luvit-meta', lazy = true }
|
||||
@@ -1,12 +1,9 @@
|
||||
return {
|
||||
'mason-org/mason.nvim',
|
||||
'williamboman/mason.nvim',
|
||||
opts = {
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = '✓',
|
||||
package_pending = '➜',
|
||||
package_uninstalled = '✗',
|
||||
},
|
||||
ensure_installed = {
|
||||
'typescript-language-server',
|
||||
'biome',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
return {
|
||||
'nvim-mini/mini.nvim',
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
require('mini.surround').setup {
|
||||
@@ -13,31 +13,7 @@ return {
|
||||
},
|
||||
}
|
||||
require('mini.pairs').setup()
|
||||
require('mini.pick').setup()
|
||||
require('mini.icons').setup()
|
||||
-- require('mini.statusline').setup({
|
||||
-- content = {
|
||||
-- active = function()
|
||||
-- local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
||||
-- local git = MiniStatusline.section_git({ trunc_width = 40 })
|
||||
-- local diff = MiniStatusline.section_diff({ trunc_width = 75 })
|
||||
-- local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
||||
-- local lsp = MiniStatusline.section_lsp({ trunc_width = 75 })
|
||||
-- local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
||||
-- local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
||||
-- local location = MiniStatusline.section_location({ trunc_width = 75 })
|
||||
-- local search = MiniStatusline.section_searchcount({ trunc_width = 75 })
|
||||
--
|
||||
-- return MiniStatusline.combine_groups({
|
||||
-- { hl = mode_hl, strings = { mode } },
|
||||
-- { hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics, diff } },
|
||||
-- '%<', -- Mark truncation point
|
||||
-- { hl = 'MiniStatuslineFilename', strings = { filename } },
|
||||
-- '%=', -- Fill rest of screen
|
||||
-- { hl = 'MiniStatuslineFileinfo', strings = { lsp, fileinfo } },
|
||||
-- { hl = mode_hl, strings = { location } },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
-- })
|
||||
end,
|
||||
}
|
||||
|
||||
59
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
59
.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = 'InsertEnter',
|
||||
dependencies = {
|
||||
{
|
||||
'L3MON4D3/LuaSnip',
|
||||
build = (function()
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||
return
|
||||
end
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
dependencies = {},
|
||||
},
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-path',
|
||||
},
|
||||
config = function()
|
||||
local cmp = require 'cmp'
|
||||
local luasnip = require 'luasnip'
|
||||
luasnip.config.setup {}
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
completion = { completeopt = 'menu,menuone,noinsert' },
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
['<C-Space>'] = cmp.mapping.complete {},
|
||||
['<C-l>'] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
['<C-h>'] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'lazydev', priority = 1001 },
|
||||
{ name = 'nvim_lsp', priority = 1000 },
|
||||
{ name = 'luasnip', priority = 750 },
|
||||
{ name = 'buffer', priority = 500 },
|
||||
{ name = 'path', priority = 250 },
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -4,31 +4,6 @@ return {
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = true,
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
local m = name:match '^%.'
|
||||
return m ~= nil
|
||||
end,
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = 'fast',
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ 'type', 'asc' },
|
||||
{ 'name', 'asc' },
|
||||
},
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
|
||||
}
|
||||
|
||||
@@ -1,540 +0,0 @@
|
||||
return {
|
||||
'folke/snacks.nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
picker = { enabled = true },
|
||||
toggle = { enabled = true },
|
||||
},
|
||||
keys = {
|
||||
-- Top Pickers & Explorer
|
||||
{
|
||||
'<leader><space>',
|
||||
function()
|
||||
Snacks.picker.smart()
|
||||
end,
|
||||
desc = 'Smart Find Files',
|
||||
},
|
||||
{
|
||||
'<leader>,',
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = 'Buffers',
|
||||
},
|
||||
{
|
||||
'<leader>/',
|
||||
function()
|
||||
Snacks.picker.grep()
|
||||
end,
|
||||
desc = 'Grep',
|
||||
},
|
||||
{
|
||||
'<leader>:',
|
||||
function()
|
||||
Snacks.picker.command_history()
|
||||
end,
|
||||
desc = 'Command History',
|
||||
},
|
||||
{
|
||||
'<leader>n',
|
||||
function()
|
||||
Snacks.picker.notifications()
|
||||
end,
|
||||
desc = 'Notification History',
|
||||
},
|
||||
{
|
||||
'<leader>e',
|
||||
function()
|
||||
Snacks.explorer()
|
||||
end,
|
||||
desc = 'File Explorer',
|
||||
},
|
||||
-- find
|
||||
{
|
||||
'<leader>fb',
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = 'Buffers',
|
||||
},
|
||||
{
|
||||
'<leader>fc',
|
||||
function()
|
||||
Snacks.picker.files { cwd = vim.fn.stdpath 'config' }
|
||||
end,
|
||||
desc = 'Find Config File',
|
||||
},
|
||||
{
|
||||
'<leader>ff',
|
||||
function()
|
||||
Snacks.picker.files()
|
||||
end,
|
||||
desc = 'Find Files',
|
||||
},
|
||||
{
|
||||
'<leader>fg',
|
||||
function()
|
||||
Snacks.picker.git_files()
|
||||
end,
|
||||
desc = 'Find Git Files',
|
||||
},
|
||||
{
|
||||
'<leader>fp',
|
||||
function()
|
||||
Snacks.picker.projects()
|
||||
end,
|
||||
desc = 'Projects',
|
||||
},
|
||||
{
|
||||
'<leader>fr',
|
||||
function()
|
||||
Snacks.picker.recent()
|
||||
end,
|
||||
desc = 'Recent',
|
||||
},
|
||||
-- git
|
||||
{
|
||||
'<leader>gb',
|
||||
function()
|
||||
Snacks.picker.git_branches()
|
||||
end,
|
||||
desc = 'Git Branches',
|
||||
},
|
||||
{
|
||||
'<leader>gl',
|
||||
function()
|
||||
Snacks.picker.git_log()
|
||||
end,
|
||||
desc = 'Git Log',
|
||||
},
|
||||
{
|
||||
'<leader>gL',
|
||||
function()
|
||||
Snacks.picker.git_log_line()
|
||||
end,
|
||||
desc = 'Git Log Line',
|
||||
},
|
||||
{
|
||||
'<leader>gs',
|
||||
function()
|
||||
Snacks.picker.git_status()
|
||||
end,
|
||||
desc = 'Git Status',
|
||||
},
|
||||
{
|
||||
'<leader>gS',
|
||||
function()
|
||||
Snacks.picker.git_stash()
|
||||
end,
|
||||
desc = 'Git Stash',
|
||||
},
|
||||
{
|
||||
'<leader>gd',
|
||||
function()
|
||||
Snacks.picker.git_diff()
|
||||
end,
|
||||
desc = 'Git Diff (Hunks)',
|
||||
},
|
||||
{
|
||||
'<leader>gf',
|
||||
function()
|
||||
Snacks.picker.git_log_file()
|
||||
end,
|
||||
desc = 'Git Log File',
|
||||
},
|
||||
-- gh
|
||||
{
|
||||
'<leader>gi',
|
||||
function()
|
||||
Snacks.picker.gh_issue()
|
||||
end,
|
||||
desc = 'GitHub Issues (open)',
|
||||
},
|
||||
{
|
||||
'<leader>gI',
|
||||
function()
|
||||
Snacks.picker.gh_issue { state = 'all' }
|
||||
end,
|
||||
desc = 'GitHub Issues (all)',
|
||||
},
|
||||
{
|
||||
'<leader>gp',
|
||||
function()
|
||||
Snacks.picker.gh_pr()
|
||||
end,
|
||||
desc = 'GitHub Pull Requests (open)',
|
||||
},
|
||||
{
|
||||
'<leader>gP',
|
||||
function()
|
||||
Snacks.picker.gh_pr { state = 'all' }
|
||||
end,
|
||||
desc = 'GitHub Pull Requests (all)',
|
||||
},
|
||||
-- Grep
|
||||
{
|
||||
'<leader>sb',
|
||||
function()
|
||||
Snacks.picker.lines()
|
||||
end,
|
||||
desc = 'Buffer Lines',
|
||||
},
|
||||
{
|
||||
'<leader>sB',
|
||||
function()
|
||||
Snacks.picker.grep_buffers()
|
||||
end,
|
||||
desc = 'Grep Open Buffers',
|
||||
},
|
||||
{
|
||||
'<leader>sg',
|
||||
function()
|
||||
Snacks.picker.grep()
|
||||
end,
|
||||
desc = 'Grep',
|
||||
},
|
||||
{
|
||||
'<leader>sw',
|
||||
function()
|
||||
Snacks.picker.grep_word()
|
||||
end,
|
||||
desc = 'Visual selection or word',
|
||||
mode = { 'n', 'x' },
|
||||
},
|
||||
-- search
|
||||
{
|
||||
'<leader>s"',
|
||||
function()
|
||||
Snacks.picker.registers()
|
||||
end,
|
||||
desc = 'Registers',
|
||||
},
|
||||
{
|
||||
'<leader>s/',
|
||||
function()
|
||||
Snacks.picker.search_history()
|
||||
end,
|
||||
desc = 'Search History',
|
||||
},
|
||||
{
|
||||
'<leader>sa',
|
||||
function()
|
||||
Snacks.picker.autocmds()
|
||||
end,
|
||||
desc = 'Autocmds',
|
||||
},
|
||||
{
|
||||
'<leader>sb',
|
||||
function()
|
||||
Snacks.picker.lines()
|
||||
end,
|
||||
desc = 'Buffer Lines',
|
||||
},
|
||||
{
|
||||
'<leader>sc',
|
||||
function()
|
||||
Snacks.picker.command_history()
|
||||
end,
|
||||
desc = 'Command History',
|
||||
},
|
||||
{
|
||||
'<leader>sC',
|
||||
function()
|
||||
Snacks.picker.commands()
|
||||
end,
|
||||
desc = 'Commands',
|
||||
},
|
||||
{
|
||||
'<leader>sd',
|
||||
function()
|
||||
Snacks.picker.diagnostics()
|
||||
end,
|
||||
desc = 'Diagnostics',
|
||||
},
|
||||
{
|
||||
'<leader>sD',
|
||||
function()
|
||||
Snacks.picker.diagnostics_buffer()
|
||||
end,
|
||||
desc = 'Buffer Diagnostics',
|
||||
},
|
||||
{
|
||||
'<leader>sh',
|
||||
function()
|
||||
Snacks.picker.help()
|
||||
end,
|
||||
desc = 'Help Pages',
|
||||
},
|
||||
{
|
||||
'<leader>sH',
|
||||
function()
|
||||
Snacks.picker.highlights()
|
||||
end,
|
||||
desc = 'Highlights',
|
||||
},
|
||||
{
|
||||
'<leader>si',
|
||||
function()
|
||||
Snacks.picker.icons()
|
||||
end,
|
||||
desc = 'Icons',
|
||||
},
|
||||
{
|
||||
'<leader>sj',
|
||||
function()
|
||||
Snacks.picker.jumps()
|
||||
end,
|
||||
desc = 'Jumps',
|
||||
},
|
||||
{
|
||||
'<leader>sk',
|
||||
function()
|
||||
Snacks.picker.keymaps()
|
||||
end,
|
||||
desc = 'Keymaps',
|
||||
},
|
||||
{
|
||||
'<leader>sl',
|
||||
function()
|
||||
Snacks.picker.loclist()
|
||||
end,
|
||||
desc = 'Location List',
|
||||
},
|
||||
{
|
||||
'<leader>sm',
|
||||
function()
|
||||
Snacks.picker.marks()
|
||||
end,
|
||||
desc = 'Marks',
|
||||
},
|
||||
{
|
||||
'<leader>sM',
|
||||
function()
|
||||
Snacks.picker.man()
|
||||
end,
|
||||
desc = 'Man Pages',
|
||||
},
|
||||
{
|
||||
'<leader>sp',
|
||||
function()
|
||||
Snacks.picker.lazy()
|
||||
end,
|
||||
desc = 'Search for Plugin Spec',
|
||||
},
|
||||
{
|
||||
'<leader>sq',
|
||||
function()
|
||||
Snacks.picker.qflist()
|
||||
end,
|
||||
desc = 'Quickfix List',
|
||||
},
|
||||
{
|
||||
'<leader>sR',
|
||||
function()
|
||||
Snacks.picker.resume()
|
||||
end,
|
||||
desc = 'Resume',
|
||||
},
|
||||
{
|
||||
'<leader>su',
|
||||
function()
|
||||
Snacks.picker.undo()
|
||||
end,
|
||||
desc = 'Undo History',
|
||||
},
|
||||
{
|
||||
'<leader>uC',
|
||||
function()
|
||||
Snacks.picker.colorschemes()
|
||||
end,
|
||||
desc = 'Colorschemes',
|
||||
},
|
||||
-- LSP
|
||||
{
|
||||
'gd',
|
||||
function()
|
||||
Snacks.picker.lsp_definitions()
|
||||
end,
|
||||
desc = 'Goto Definition',
|
||||
},
|
||||
{
|
||||
'gD',
|
||||
function()
|
||||
Snacks.picker.lsp_declarations()
|
||||
end,
|
||||
desc = 'Goto Declaration',
|
||||
},
|
||||
{
|
||||
'gr',
|
||||
function()
|
||||
Snacks.picker.lsp_references()
|
||||
end,
|
||||
nowait = true,
|
||||
desc = 'References',
|
||||
},
|
||||
{
|
||||
'gI',
|
||||
function()
|
||||
Snacks.picker.lsp_implementations()
|
||||
end,
|
||||
desc = 'Goto Implementation',
|
||||
},
|
||||
{
|
||||
'gy',
|
||||
function()
|
||||
Snacks.picker.lsp_type_definitions()
|
||||
end,
|
||||
desc = 'Goto T[y]pe Definition',
|
||||
},
|
||||
{
|
||||
'gai',
|
||||
function()
|
||||
Snacks.picker.lsp_incoming_calls()
|
||||
end,
|
||||
desc = 'C[a]lls Incoming',
|
||||
},
|
||||
{
|
||||
'gao',
|
||||
function()
|
||||
Snacks.picker.lsp_outgoing_calls()
|
||||
end,
|
||||
desc = 'C[a]lls Outgoing',
|
||||
},
|
||||
{
|
||||
'<leader>ss',
|
||||
function()
|
||||
Snacks.picker.lsp_symbols()
|
||||
end,
|
||||
desc = 'LSP Symbols',
|
||||
},
|
||||
{
|
||||
'<leader>sS',
|
||||
function()
|
||||
Snacks.picker.lsp_workspace_symbols()
|
||||
end,
|
||||
desc = 'LSP Workspace Symbols',
|
||||
},
|
||||
-- Other
|
||||
{
|
||||
'<leader>z',
|
||||
function()
|
||||
Snacks.zen()
|
||||
end,
|
||||
desc = 'Toggle Zen Mode',
|
||||
},
|
||||
{
|
||||
'<leader>Z',
|
||||
function()
|
||||
Snacks.zen.zoom()
|
||||
end,
|
||||
desc = 'Toggle Zoom',
|
||||
},
|
||||
{
|
||||
'<leader>.',
|
||||
function()
|
||||
Snacks.scratch()
|
||||
end,
|
||||
desc = 'Toggle Scratch Buffer',
|
||||
},
|
||||
{
|
||||
'<leader>S',
|
||||
function()
|
||||
Snacks.scratch.select()
|
||||
end,
|
||||
desc = 'Select Scratch Buffer',
|
||||
},
|
||||
{
|
||||
'<leader>n',
|
||||
function()
|
||||
Snacks.notifier.show_history()
|
||||
end,
|
||||
desc = 'Notification History',
|
||||
},
|
||||
{
|
||||
'<leader>bd',
|
||||
function()
|
||||
Snacks.bufdelete()
|
||||
end,
|
||||
desc = 'Delete Buffer',
|
||||
},
|
||||
{
|
||||
'<leader>cR',
|
||||
function()
|
||||
Snacks.rename.rename_file()
|
||||
end,
|
||||
desc = 'Rename File',
|
||||
},
|
||||
{
|
||||
'<leader>gB',
|
||||
function()
|
||||
Snacks.gitbrowse()
|
||||
end,
|
||||
desc = 'Git Browse',
|
||||
mode = { 'n', 'v' },
|
||||
},
|
||||
{
|
||||
'<leader>gg',
|
||||
function()
|
||||
Snacks.lazygit()
|
||||
end,
|
||||
desc = 'Lazygit',
|
||||
},
|
||||
{
|
||||
'<leader>un',
|
||||
function()
|
||||
Snacks.notifier.hide()
|
||||
end,
|
||||
desc = 'Dismiss All Notifications',
|
||||
},
|
||||
{
|
||||
'<c-/>',
|
||||
function()
|
||||
Snacks.terminal()
|
||||
end,
|
||||
desc = 'Toggle Terminal',
|
||||
},
|
||||
{
|
||||
'<c-_>',
|
||||
function()
|
||||
Snacks.terminal()
|
||||
end,
|
||||
desc = 'which_key_ignore',
|
||||
},
|
||||
{
|
||||
']]',
|
||||
function()
|
||||
Snacks.words.jump(vim.v.count1)
|
||||
end,
|
||||
desc = 'Next Reference',
|
||||
mode = { 'n', 't' },
|
||||
},
|
||||
{
|
||||
'[[',
|
||||
function()
|
||||
Snacks.words.jump(-vim.v.count1)
|
||||
end,
|
||||
desc = 'Prev Reference',
|
||||
mode = { 'n', 't' },
|
||||
},
|
||||
{
|
||||
'<leader>N',
|
||||
desc = 'Neovim News',
|
||||
function()
|
||||
Snacks.win {
|
||||
file = vim.api.nvim_get_runtime_file('doc/news.txt', false)[1],
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
wo = {
|
||||
spell = false,
|
||||
wrap = false,
|
||||
signcolumn = 'yes',
|
||||
statuscolumn = ' ',
|
||||
conceallevel = 3,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
return {
|
||||
'folke/snacks.nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
git = { enabled = true },
|
||||
---@class snacks.lazygit.Config: snacks.terminal.Opts
|
||||
---@field args? string[]
|
||||
---@field theme? snacks.lazygit.Theme
|
||||
lazygit = {
|
||||
-- automatically configure lazygit to use the current colorscheme
|
||||
-- and integrate edit with the current neovim instance
|
||||
configure = true,
|
||||
-- extra configuration for lazygit that will be merged with the default
|
||||
-- snacks does NOT have a full yaml parser, so if you need `"test"` to appear with the quotes
|
||||
-- you need to double quote it: `"\"test\""`
|
||||
config = {
|
||||
os = { editPreset = "nvim-remote" },
|
||||
gui = {
|
||||
-- set to an empty string "" to disable icons
|
||||
nerdFontsVersion = "3",
|
||||
},
|
||||
},
|
||||
theme_path = vim.fs.normalize(vim.fn.stdpath("cache") .. "/lazygit-theme.yml"),
|
||||
-- Theme for lazygit
|
||||
theme = {
|
||||
[241] = { fg = "Special" },
|
||||
activeBorderColor = { fg = "MatchParen", bold = true },
|
||||
cherryPickedCommitBgColor = { fg = "Identifier" },
|
||||
cherryPickedCommitFgColor = { fg = "Function" },
|
||||
defaultFgColor = { fg = "Normal" },
|
||||
inactiveBorderColor = { fg = "FloatBorder" },
|
||||
optionsTextColor = { fg = "Function" },
|
||||
searchingActiveBorderColor = { fg = "MatchParen", bold = true },
|
||||
selectedLineBgColor = { bg = "Visual" }, -- set to `default` to have no background colour
|
||||
unstagedChangesColor = { fg = "DiagnosticError" },
|
||||
},
|
||||
win = {
|
||||
style = "lazygit",
|
||||
},
|
||||
},
|
||||
quickfile = { enabled = true },
|
||||
words = { enabled = true },
|
||||
styles = {
|
||||
notification = {
|
||||
-- wo = { wrap = true } -- Wrap notifications
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd('User', {
|
||||
pattern = 'VeryLazy',
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
|
||||
-- Override print to use snacks for `:=` command
|
||||
if vim.fn.has 'nvim-0.11' == 1 then
|
||||
vim._print = function(_, ...)
|
||||
dd(...)
|
||||
end
|
||||
else
|
||||
vim.print = _G.dd
|
||||
end
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option('spell', { name = 'Spelling' }):map '<leader>us'
|
||||
Snacks.toggle.option('wrap', { name = 'Wrap' }):map '<leader>uw'
|
||||
Snacks.toggle.option('relativenumber', { name = 'Relative Number' }):map '<leader>uL'
|
||||
Snacks.toggle.diagnostics():map '<leader>ud'
|
||||
Snacks.toggle.line_number():map '<leader>ul'
|
||||
Snacks.toggle.option('conceallevel', { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map '<leader>uc'
|
||||
Snacks.toggle.treesitter():map '<leader>uT'
|
||||
Snacks.toggle.option('background', { off = 'light', on = 'dark', name = 'Dark Background' }):map '<leader>ub'
|
||||
Snacks.toggle.inlay_hints():map '<leader>uh'
|
||||
Snacks.toggle.indent():map '<leader>ug'
|
||||
Snacks.toggle.dim():map '<leader>uD'
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
63
.config/nvim/lua/plugins/telescope.lua
Normal file
63
.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
event = 'VimEnter',
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
|
||||
build = 'make',
|
||||
|
||||
cond = function()
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
},
|
||||
config = function()
|
||||
require('telescope').setup {
|
||||
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
pcall(require('telescope').load_extension, 'fzf')
|
||||
pcall(require('telescope').load_extension, 'ui-select')
|
||||
|
||||
local builtin = require 'telescope.builtin'
|
||||
vim.keymap.set('n', '<leader>sh', builtin.help_tags, { desc = '[S]earch [H]elp' })
|
||||
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
||||
vim.keymap.set('n', '<leader><leader>', builtin.find_files, { desc = '[S]earch [F]iles' })
|
||||
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
||||
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
||||
vim.keymap.set('n', '<leader>/', builtin.live_grep, { desc = '[/] Fuzzy Search the cwd' })
|
||||
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
||||
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = 'Find existing [B]uffers' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sg', function()
|
||||
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
|
||||
winblend = 10,
|
||||
previewer = false,
|
||||
})
|
||||
end, { desc = '[S]earch by [G]rep' })
|
||||
|
||||
vim.keymap.set('n', '<leader>s/', function()
|
||||
builtin.live_grep {
|
||||
grep_open_files = true,
|
||||
prompt_title = 'Live Grep in Open Files',
|
||||
}
|
||||
end, { desc = '[S]earch [/] in Open Files' })
|
||||
|
||||
vim.keymap.set('n', '<leader>sn', function()
|
||||
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
||||
end, { desc = '[S]earch [N]eovim files' })
|
||||
end,
|
||||
}
|
||||
@@ -1,16 +1,10 @@
|
||||
return {
|
||||
{
|
||||
'Mofiqul/dracula.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
},
|
||||
{ 'ellisonleao/gruvbox.nvim', priority = 1000, config = true },
|
||||
{ 'rebelot/kanagawa.nvim', priority = 1000, config = true },
|
||||
{
|
||||
'f4z3r/gruvbox-material.nvim',
|
||||
name = 'gruvbox-material',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {},
|
||||
},
|
||||
'Mofiqul/dracula.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local dracula = require 'dracula'
|
||||
|
||||
vim.cmd.colorscheme 'dracula'
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 120
|
||||
---
|
||||
Language: Cpp
|
||||
DerivePointerAlignment: false
|
||||
PointerAlignment: Left
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
BinPackArguments: true
|
||||
BreakBeforeBraces: Attach
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
Cpp11BracedListStyle: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseLabels: false
|
||||
InsertNewlineAtEOF: true
|
||||
SeparateDefinitionBlocks: Always
|
||||
WrapNamespaceBodyWithEmptyLines: Always
|
||||
...
|
||||
@@ -1,15 +0,0 @@
|
||||
if has nix; then
|
||||
use flake
|
||||
fi
|
||||
|
||||
shopt -s globstar
|
||||
watch_file assets/cpp/**/*.cpp
|
||||
watch_file assets/cpp/**/*.hpp
|
||||
watch_file plugin/**/*.cpp
|
||||
watch_file plugin/**/*.hpp
|
||||
watch_file **/CMakeLists.txt
|
||||
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=clazy -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DDISTRIBUTOR=direnv
|
||||
cmake --build build
|
||||
export CAELESTIA_LIB_DIR="$PWD/build/lib"
|
||||
export QML2_IMPORT_PATH="$PWD/build/qml:${QML2_IMPORT_PATH:-}"
|
||||
@@ -1,21 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
There are only a few rules:
|
||||
- Follow the commit convention as follows:
|
||||
- The name of the commit should be `module: change`
|
||||
- Try to be consistent with the module names; you can look at existing commits for the module names I use
|
||||
- If there is more than one change, the change in the commit name should be the most impactful change
|
||||
- Put other changes in the description
|
||||
- Format your code
|
||||
- I use the vscode qml extension with default arguments to format the code, however you do not have to use it
|
||||
- Just try to follow the code style of the rest of the code and ensure that there is:
|
||||
- no trailing whitespace on any lines
|
||||
- a single space between operators
|
||||
- No AI slop allowed
|
||||
- AI readme/docs slop = instant block
|
||||
- PLEASE TEST YOUR PRS
|
||||
- I can't believe I have to put this here, but please test your PRs before submitting them
|
||||
- Your PR must not break anything currently existing, or specify in the description if it does
|
||||
- PR descriptions should be descriptive
|
||||
- Please explain what the PR does and how to use it in your PR description
|
||||
- Also include any breaking changes and/or side effects of the PR
|
||||
15
.config/quickshell/caelestia/.github/FUNDING.yml
vendored
15
.config/quickshell/caelestia/.github/FUNDING.yml
vendored
@@ -1,15 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: soramanew
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: soramane
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: soramane
|
||||
thanks_dev: # Replace with a single thanks.dev username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -1 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Feature request
|
||||
description: Suggest a new feature
|
||||
labels: ["enhancement"]
|
||||
type: "Feature"
|
||||
title: "[FEATURE] "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "NOTE: Please write in **English**."
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "What would you like to be added?"
|
||||
description: "Can be a suggestion for an existing feature. You can suggest a widget, minor user interaction changes.. whatever."
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "How will it help?"
|
||||
description: "It's helpful to include examples (like in your use case)."
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Extra info"
|
||||
description: "If you want a new widget, a pic of the inspiration (if available) would be awesome."
|
||||
@@ -1,56 +0,0 @@
|
||||
name: Issue
|
||||
description: Report an issue with the dots
|
||||
labels: ["bug"]
|
||||
type: "Bug"
|
||||
title: "[BUG] "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "**Welcome to submit a new issue!**\n- It takes only 3 steps, so please be patient :)\n- Tip: If your issue is not a feature request and is not an issue with the dots (e.g. \"how do I use X feature\"), please use [Discussions](https://github.com/caelestia-dots/shell/discussions) instead."
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: "Step 1. Before you submit"
|
||||
description: "Hint: The 2nd and 3rd checkbox is **not** forcely required as you may have failed to do so."
|
||||
options:
|
||||
- label: I have read the above instructions and am sure that this is supposed to be posted here.
|
||||
required: true
|
||||
- label: I've successfully updated to the latest versions following the [updating guide](https://github.com/caelestia-dots/caelestia?tab=readme-ov-file#updating).
|
||||
required: false # Not required cuz user may have failed to do so
|
||||
- label: I've successfully updated the system packages to the latest.
|
||||
required: false # Not required cuz user may have failed to do so
|
||||
- label: I've ticked the checkboxes without reading their contents
|
||||
required: false # Obviously
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Step 2. Version info"
|
||||
description: "Run `caelestia -v` and paste the result below."
|
||||
value: "<details><summary>Version info</summary>\n\n```\n<!-- Run `caelestia -v` and paste the result here! -->\n```\n\n</details>"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
**Tips for the following Step 3**
|
||||
1. Use `LANG=C LC_ALL=C` to get the output of a command in English, eg. `LANG=C LC_ALL=C date` displays time in English.
|
||||
2. If it throws errors, **PLEASE**, attach logs and describe in detail if possible.
|
||||
- Something happened to the shell (bar, dashboard, etc)? Run `caelestia shell -l` WITHOUT exiting the shell for logs.
|
||||
- Installation failed? Run installation again for logs.
|
||||
- You may use more code blocks when needed.
|
||||
3. In case you are confused, the `<details>`, `<summary>`, `</summary>`, `</details>` are HTML tags for folding the logs (typically very long) inside. Please do not touch them (unless you know what you are doing).
|
||||
4. If the logs are suuuuuuper long, consider using an online pastebin service instead.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "Step 3. Describe the issue"
|
||||
value: "\n<!-- Firstly describe your issue here! -->\n\n<details><summary>Logs</summary>\n\n```\n<!-- Put your log content here!-->\n```\n\n</details>"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Reminder
|
||||
options:
|
||||
- label: I agree that it's usually impossible for others to help me without my logs.
|
||||
required: true
|
||||
@@ -1,37 +0,0 @@
|
||||
name: Create release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Create packages
|
||||
run: |
|
||||
mkdir -p release
|
||||
rsync -av \
|
||||
--exclude='release' \
|
||||
--exclude='.*' \
|
||||
--exclude='nix' \
|
||||
--exclude='flake.lock' \
|
||||
--exclude='flake.nix' \
|
||||
. release
|
||||
tar -czf caelestia-shell-${{ github.ref_name }}.tar.gz release
|
||||
cp caelestia-shell-${{ github.ref_name }}.tar.gz caelestia-shell-latest.tar.gz
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
caelestia-shell-${{ github.ref_name }}.tar.gz
|
||||
caelestia-shell-latest.tar.gz
|
||||
generate_release_notes: true
|
||||
@@ -1,85 +0,0 @@
|
||||
name: Update flake inputs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
|
||||
jobs:
|
||||
update-flake:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: nixbuild/nix-quick-install-action@v31
|
||||
with:
|
||||
nix_conf: |
|
||||
keep-env-derivations = true
|
||||
keep-outputs = true
|
||||
|
||||
- name: Restore and save Nix store
|
||||
uses: nix-community/cache-nix-action@v6
|
||||
with:
|
||||
# restore and save a cache using this key
|
||||
primary-key: nix-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||
# if there's no cache hit, restore a cache by this prefix
|
||||
restore-prefixes-first-match: nix-
|
||||
# collect garbage until the Nix store size (in bytes) is at most this number
|
||||
# before trying to save a new cache
|
||||
# 1G = 1073741824
|
||||
gc-max-store-size-linux: 1G
|
||||
# do purge caches
|
||||
purge: true
|
||||
# purge all versions of the cache
|
||||
purge-prefixes: nix-
|
||||
# created more than this number of seconds ago
|
||||
purge-created: 0
|
||||
# or, last accessed more than this number of seconds ago
|
||||
# relative to the start of the `Post Restore and save Nix store` phase
|
||||
purge-last-accessed: 0
|
||||
# except any version with the key that is the same as the `primary-key`
|
||||
purge-primary-key: never
|
||||
|
||||
- name: Update flake inputs
|
||||
run: nix flake update
|
||||
|
||||
- name: Attempt to build flake
|
||||
run: nix build
|
||||
|
||||
- name: Test on Sway
|
||||
env:
|
||||
XDG_RUNTIME_DIR: /home/runner/runtime
|
||||
WLR_BACKENDS: headless
|
||||
WLR_LIBINPUT_NO_DEVICES: 1
|
||||
WAYLAND_DISPLAY: wayland-1
|
||||
run: |
|
||||
mkdir $XDG_RUNTIME_DIR
|
||||
chown $USER $XDG_RUNTIME_DIR
|
||||
chmod 0700 $XDG_RUNTIME_DIR
|
||||
|
||||
nix profile install 'nixpkgs#sway'
|
||||
sway &
|
||||
sleep 3 # Give Sway some time to start
|
||||
result/bin/caelestia-shell -d
|
||||
sleep 3 # Give the shell some time to start (and die)
|
||||
pgrep .quickshell-wra # Fail job if shell died
|
||||
|
||||
result/bin/caelestia-shell kill
|
||||
killall sway # Screw using IPC
|
||||
|
||||
- name: Check for changes
|
||||
id: check
|
||||
run: echo modified=$(git diff --exit-code flake.lock &>/dev/null && echo 'false' || echo 'true') >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.check.outputs.modified == 'true'
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: flake.lock
|
||||
default_author: github_actions
|
||||
message: "[CI] chore: update flake"
|
||||
6
.config/quickshell/caelestia/.gitignore
vendored
6
.config/quickshell/caelestia/.gitignore
vendored
@@ -1,6 +0,0 @@
|
||||
.direnv
|
||||
/result
|
||||
/.qmlls.ini
|
||||
build/
|
||||
.cache/
|
||||
logs
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"editor.defaultFormatter": "theqtcompany.qt-qml",
|
||||
"[cpp]": {
|
||||
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
if(NOT DEFINED VERSION)
|
||||
execute_process(COMMAND git describe --tags --abbrev=0
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if("${VERSION}" STREQUAL "")
|
||||
message(FATAL_ERROR "VERSION is not set and failed to get from git")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED GIT_REVISION)
|
||||
execute_process(COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_REVISION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if("${GIT_REVISION}" STREQUAL "")
|
||||
message(FATAL_ERROR "GIT_REVISION is not set and failed to get from git")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "^v" "" VERSION "${VERSION}")
|
||||
|
||||
project(caelestia-shell VERSION ${VERSION} LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
set(DISTRIBUTOR "Unset" CACHE STRING "Distributor")
|
||||
set(ENABLE_MODULES "extras;plugin;shell" CACHE STRING "Modules to build/install")
|
||||
set(INSTALL_LIBDIR "usr/lib/caelestia" CACHE STRING "Library install dir")
|
||||
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
|
||||
set(INSTALL_QSCONFDIR "etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")
|
||||
|
||||
add_compile_options(
|
||||
-Wall -Wextra -Wpedantic -Wshadow -Wconversion
|
||||
-Wold-style-cast -Wnull-dereference -Wdouble-promotion
|
||||
-Wformat=2 -Wfloat-equal -Woverloaded-virtual
|
||||
-Wsign-conversion -Wredundant-decls -Wswitch
|
||||
-Wunreachable-code
|
||||
)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
add_compile_options(-Wunused-lambda-capture)
|
||||
endif()
|
||||
|
||||
if("extras" IN_LIST ENABLE_MODULES)
|
||||
add_subdirectory(extras)
|
||||
endif()
|
||||
|
||||
if("plugin" IN_LIST ENABLE_MODULES)
|
||||
add_subdirectory(plugin)
|
||||
endif()
|
||||
|
||||
if("shell" IN_LIST ENABLE_MODULES)
|
||||
foreach(dir assets components config modules services utils)
|
||||
install(DIRECTORY ${dir} DESTINATION "${INSTALL_QSCONFDIR}")
|
||||
endforeach()
|
||||
install(FILES shell.qml LICENSE DESTINATION "${INSTALL_QSCONFDIR}")
|
||||
endif()
|
||||
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -1,763 +0,0 @@
|
||||
<h1 align=center>caelestia-shell</h1>
|
||||
|
||||
<div align=center>
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://ko-fi.com/soramane)
|
||||
[](https://discord.gg/BGDCFCmMBk)
|
||||
|
||||
</div>
|
||||
|
||||
https://github.com/user-attachments/assets/0840f496-575c-4ca6-83a8-87bb01a85c5f
|
||||
|
||||
## Components
|
||||
|
||||
- Widgets: [`Quickshell`](https://quickshell.outfoxxed.me)
|
||||
- Window manager: [`Hyprland`](https://hyprland.org)
|
||||
- Dots: [`caelestia`](https://github.com/caelestia-dots)
|
||||
|
||||
## Installation
|
||||
|
||||
> [!NOTE]
|
||||
> This repo is for the desktop shell of the caelestia dots. If you want installation instructions
|
||||
> for the entire dots, head to [the main repo](https://github.com/caelestia-dots/caelestia) instead.
|
||||
|
||||
### Arch linux
|
||||
|
||||
> [!NOTE]
|
||||
> If you want to make your own changes/tweaks to the shell do NOT edit the files installed by the AUR
|
||||
> package. Instead, follow the instructions in the [manual installation section](#manual-installation).
|
||||
|
||||
The shell is available from the AUR as `caelestia-shell`. You can install it with an AUR helper
|
||||
like [`yay`](https://github.com/Jguer/yay) or manually downloading the PKGBUILD and running `makepkg -si`.
|
||||
|
||||
A package following the latest commit also exists as `caelestia-shell-git`. This is bleeding edge
|
||||
and likely to be unstable/have bugs. Regular users are recommended to use the stable package
|
||||
(`caelestia-shell`).
|
||||
|
||||
### Nix
|
||||
|
||||
You can run the shell directly via `nix run`:
|
||||
|
||||
```sh
|
||||
nix run github:caelestia-dots/shell
|
||||
```
|
||||
|
||||
Or add it to your system configuration:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
caelestia-shell = {
|
||||
url = "github:caelestia-dots/shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
The package is available as `caelestia-shell.packages.<system>.default`, which can be added to your
|
||||
`environment.systemPackages`, `users.users.<username>.packages`, `home.packages` if using home-manager,
|
||||
or a devshell. The shell can then be run via `caelestia-shell`.
|
||||
|
||||
> [!TIP]
|
||||
> The default package does not have the CLI enabled by default, which is required for full funcionality.
|
||||
> To enable the CLI, use the `with-cli` package.
|
||||
|
||||
For home-manager, you can also use the Caelestia's home manager module (explained in [configuring](https://github.com/caelestia-dots/shell?tab=readme-ov-file#home-manager-module)) that installs and configures the shell and the CLI.
|
||||
|
||||
### Manual installation
|
||||
|
||||
Dependencies:
|
||||
|
||||
- [`caelestia-cli`](https://github.com/caelestia-dots/cli)
|
||||
- [`quickshell-git`](https://quickshell.outfoxxed.me) - this has to be the git version, not the latest tagged version
|
||||
- [`ddcutil`](https://github.com/rockowitz/ddcutil)
|
||||
- [`brightnessctl`](https://github.com/Hummer12007/brightnessctl)
|
||||
- [`app2unit`](https://github.com/Vladimir-csp/app2unit)
|
||||
- [`libcava`](https://github.com/LukashonakV/cava)
|
||||
- [`networkmanager`](https://networkmanager.dev)
|
||||
- [`lm-sensors`](https://github.com/lm-sensors/lm-sensors)
|
||||
- [`fish`](https://github.com/fish-shell/fish-shell)
|
||||
- [`aubio`](https://github.com/aubio/aubio)
|
||||
- [`libpipewire`](https://pipewire.org)
|
||||
- `glibc`
|
||||
- `qt6-declarative`
|
||||
- `gcc-libs`
|
||||
- [`material-symbols`](https://fonts.google.com/icons)
|
||||
- [`caskaydia-cove-nerd`](https://www.nerdfonts.com/font-downloads)
|
||||
- [`swappy`](https://github.com/jtheoof/swappy)
|
||||
- [`libqalculate`](https://github.com/Qalculate/libqalculate)
|
||||
- [`bash`](https://www.gnu.org/software/bash)
|
||||
- `qt6-base`
|
||||
- `qt6-declarative`
|
||||
|
||||
Build dependencies:
|
||||
|
||||
- [`cmake`](https://cmake.org)
|
||||
- [`ninja`](https://github.com/ninja-build/ninja)
|
||||
|
||||
To install the shell manually, install all dependencies and clone this repo to `$XDG_CONFIG_HOME/quickshell/caelestia`.
|
||||
Then simply build and install using `cmake`.
|
||||
|
||||
```sh
|
||||
cd $XDG_CONFIG_HOME/quickshell
|
||||
git clone https://github.com/caelestia-dots/shell.git caelestia
|
||||
|
||||
cd caelestia
|
||||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/
|
||||
cmake --build build
|
||||
sudo cmake --install build
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> You can customise the installation location via the `cmake` flags `INSTALL_LIBDIR`, `INSTALL_QMLDIR` and
|
||||
> `INSTALL_QSCONFDIR` for the libraries (the beat detector), QML plugin and Quickshell config directories
|
||||
> respectively. If changing the library directory, remember to set the `CAELESTIA_LIB_DIR` environment
|
||||
> variable to the custom directory when launching the shell.
|
||||
>
|
||||
> e.g. installing to `~/.config/quickshell/caelestia` for easy local changes:
|
||||
>
|
||||
> ```sh
|
||||
> mkdir -p ~/.config/quickshell/caelestia
|
||||
> cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DINSTALL_QSCONFDIR=~/.config/quickshell/caelestia
|
||||
> cmake --build build
|
||||
> sudo cmake --install build
|
||||
> sudo chown -R $USER ~/.config/quickshell/caelestia
|
||||
> ```
|
||||
|
||||
## Usage
|
||||
|
||||
The shell can be started via the `caelestia shell -d` command or `qs -c caelestia`.
|
||||
If the entire caelestia dots are installed, the shell will be autostarted on login
|
||||
via an `exec-once` in the hyprland config.
|
||||
|
||||
### Shortcuts/IPC
|
||||
|
||||
All keybinds are accessible via Hyprland [global shortcuts](https://wiki.hyprland.org/Configuring/Binds/#dbus-global-shortcuts).
|
||||
If using the entire caelestia dots, the keybinds are already configured for you.
|
||||
Otherwise, [this file](https://github.com/caelestia-dots/caelestia/blob/main/hypr/hyprland/keybinds.conf#L1-L39)
|
||||
contains an example on how to use global shortcuts.
|
||||
|
||||
All IPC commands can be accessed via `caelestia shell ...`. For example
|
||||
|
||||
```sh
|
||||
caelestia shell mpris getActive trackTitle
|
||||
```
|
||||
|
||||
The list of IPC commands can be shown via `caelestia shell -s`:
|
||||
|
||||
```
|
||||
$ caelestia shell -s
|
||||
target drawers
|
||||
function toggle(drawer: string): void
|
||||
function list(): string
|
||||
target notifs
|
||||
function clear(): void
|
||||
target lock
|
||||
function lock(): void
|
||||
function unlock(): void
|
||||
function isLocked(): bool
|
||||
target mpris
|
||||
function playPause(): void
|
||||
function getActive(prop: string): string
|
||||
function next(): void
|
||||
function stop(): void
|
||||
function play(): void
|
||||
function list(): string
|
||||
function pause(): void
|
||||
function previous(): void
|
||||
target picker
|
||||
function openFreeze(): void
|
||||
function open(): void
|
||||
target wallpaper
|
||||
function set(path: string): void
|
||||
function get(): string
|
||||
function list(): string
|
||||
```
|
||||
|
||||
### PFP/Wallpapers
|
||||
|
||||
The profile picture for the dashboard is read from the file `~/.face`, so to set
|
||||
it you can copy your image to there or set it via the dashboard.
|
||||
|
||||
The wallpapers for the wallpaper switcher are read from `~/Pictures/Wallpapers`
|
||||
by default. To change it, change the wallpapers path in `~/.config/caelestia/shell.json`.
|
||||
|
||||
To set the wallpaper, you can use the command `caelestia wallpaper`. Use `caelestia wallpaper -h` for more info about
|
||||
the command.
|
||||
|
||||
## Updating
|
||||
|
||||
If installed via the AUR package, simply update your system (e.g. using `yay`).
|
||||
|
||||
If installed manually, you can update by running `git pull` in `$XDG_CONFIG_HOME/quickshell/caelestia`.
|
||||
|
||||
```sh
|
||||
cd $XDG_CONFIG_HOME/quickshell/caelestia
|
||||
git pull
|
||||
```
|
||||
|
||||
## Configuring
|
||||
|
||||
All configuration options should be put in `~/.config/caelestia/shell.json`. This file is _not_ created by
|
||||
default, you must create it manually.
|
||||
|
||||
### Example configuration
|
||||
|
||||
> [!NOTE]
|
||||
> The example configuration only includes recommended configuration options. For more advanced customisation
|
||||
> such as modifying the size of individual items or changing constants in the code, there are some other
|
||||
> options which can be found in the source files in the `config` directory.
|
||||
|
||||
<details><summary>Example</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"appearance": {
|
||||
"mediaGifSpeedAdjustment": 300,
|
||||
"sessionGifSpeed": 0.7,
|
||||
"anim": {
|
||||
"durations": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"font": {
|
||||
"family": {
|
||||
"clock": "Rubik",
|
||||
"material": "Material Symbols Rounded",
|
||||
"mono": "CaskaydiaCove NF",
|
||||
"sans": "Rubik"
|
||||
},
|
||||
"size": {
|
||||
"scale": 1
|
||||
}
|
||||
},
|
||||
"padding": {
|
||||
"scale": 1
|
||||
},
|
||||
"rounding": {
|
||||
"scale": 1
|
||||
},
|
||||
"spacing": {
|
||||
"scale": 1
|
||||
},
|
||||
"transparency": {
|
||||
"enabled": false,
|
||||
"base": 0.85,
|
||||
"layers": 0.4
|
||||
}
|
||||
},
|
||||
"general": {
|
||||
"logo": "caelestia",
|
||||
"apps": {
|
||||
"terminal": ["foot"],
|
||||
"audio": ["pavucontrol"],
|
||||
"playback": ["mpv"],
|
||||
"explorer": ["thunar"]
|
||||
},
|
||||
"battery": {
|
||||
"warnLevels": [
|
||||
{
|
||||
"level": 20,
|
||||
"title": "Low battery",
|
||||
"message": "You might want to plug in a charger",
|
||||
"icon": "battery_android_frame_2"
|
||||
},
|
||||
{
|
||||
"level": 10,
|
||||
"title": "Did you see the previous message?",
|
||||
"message": "You should probably plug in a charger <b>now</b>",
|
||||
"icon": "battery_android_frame_1"
|
||||
},
|
||||
{
|
||||
"level": 5,
|
||||
"title": "Critical battery level",
|
||||
"message": "PLUG THE CHARGER RIGHT NOW!!",
|
||||
"icon": "battery_android_alert",
|
||||
"critical": true
|
||||
}
|
||||
],
|
||||
"criticalLevel": 3
|
||||
},
|
||||
"idle": {
|
||||
"lockBeforeSleep": true,
|
||||
"inhibitWhenAudio": true,
|
||||
"timeouts": [
|
||||
{
|
||||
"timeout": 180,
|
||||
"idleAction": "lock"
|
||||
},
|
||||
{
|
||||
"timeout": 300,
|
||||
"idleAction": "dpms off",
|
||||
"returnAction": "dpms on"
|
||||
},
|
||||
{
|
||||
"timeout": 600,
|
||||
"idleAction": ["systemctl", "suspend-then-hibernate"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"background": {
|
||||
"desktopClock": {
|
||||
"enabled": false,
|
||||
"scale": 1.0,
|
||||
"position": "bottom-right",
|
||||
"shadow": {
|
||||
"enabled": true,
|
||||
"opacity": 0.7,
|
||||
"blur": 0.4
|
||||
},
|
||||
"background": {
|
||||
"enabled": false,
|
||||
"opacity": 0.7,
|
||||
"blur": true
|
||||
},
|
||||
"invertColors": false
|
||||
},
|
||||
"enabled": true,
|
||||
"visualiser": {
|
||||
"blur": false,
|
||||
"enabled": false,
|
||||
"autoHide": true,
|
||||
"rounding": 1,
|
||||
"spacing": 1
|
||||
}
|
||||
},
|
||||
"bar": {
|
||||
"clock": {
|
||||
"showIcon": true
|
||||
},
|
||||
"dragThreshold": 20,
|
||||
"entries": [
|
||||
{
|
||||
"id": "logo",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "workspaces",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "activeWindow",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "spacer",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "tray",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "clock",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "statusIcons",
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"id": "power",
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"persistent": true,
|
||||
"popouts": {
|
||||
"activeWindow": true,
|
||||
"statusIcons": true,
|
||||
"tray": true
|
||||
},
|
||||
"scrollActions": {
|
||||
"brightness": true,
|
||||
"workspaces": true,
|
||||
"volume": true
|
||||
},
|
||||
"showOnHover": true,
|
||||
"status": {
|
||||
"showAudio": false,
|
||||
"showBattery": true,
|
||||
"showBluetooth": true,
|
||||
"showKbLayout": false,
|
||||
"showMicrophone": false,
|
||||
"showNetwork": true,
|
||||
"showWifi": true,
|
||||
"showLockStatus": true
|
||||
},
|
||||
"tray": {
|
||||
"background": false,
|
||||
"compact": false,
|
||||
"iconSubs": [],
|
||||
"recolour": false
|
||||
},
|
||||
"workspaces": {
|
||||
"activeIndicator": true,
|
||||
"activeLabel": "",
|
||||
"activeTrail": false,
|
||||
"label": " ",
|
||||
"occupiedBg": false,
|
||||
"occupiedLabel": "",
|
||||
"perMonitorWorkspaces": true,
|
||||
"showWindows": true,
|
||||
"shown": 5,
|
||||
"specialWorkspaceIcons": [
|
||||
{
|
||||
"name": "steam",
|
||||
"icon": "sports_esports"
|
||||
}
|
||||
]
|
||||
},
|
||||
"excludedScreens": [""],
|
||||
"activeWindow": {
|
||||
"inverted": false
|
||||
}
|
||||
},
|
||||
"border": {
|
||||
"rounding": 25,
|
||||
"thickness": 10
|
||||
},
|
||||
"dashboard": {
|
||||
"enabled": true,
|
||||
"dragThreshold": 50,
|
||||
"mediaUpdateInterval": 500,
|
||||
"showOnHover": true
|
||||
},
|
||||
"launcher": {
|
||||
"actionPrefix": ">",
|
||||
"actions": [
|
||||
{
|
||||
"name": "Calculator",
|
||||
"icon": "calculate",
|
||||
"description": "Do simple math equations (powered by Qalc)",
|
||||
"command": ["autocomplete", "calc"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Scheme",
|
||||
"icon": "palette",
|
||||
"description": "Change the current colour scheme",
|
||||
"command": ["autocomplete", "scheme"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Wallpaper",
|
||||
"icon": "image",
|
||||
"description": "Change the current wallpaper",
|
||||
"command": ["autocomplete", "wallpaper"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Variant",
|
||||
"icon": "colors",
|
||||
"description": "Change the current scheme variant",
|
||||
"command": ["autocomplete", "variant"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Transparency",
|
||||
"icon": "opacity",
|
||||
"description": "Change shell transparency",
|
||||
"command": ["autocomplete", "transparency"],
|
||||
"enabled": false,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Random",
|
||||
"icon": "casino",
|
||||
"description": "Switch to a random wallpaper",
|
||||
"command": ["caelestia", "wallpaper", "-r"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Light",
|
||||
"icon": "light_mode",
|
||||
"description": "Change the scheme to light mode",
|
||||
"command": ["setMode", "light"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Dark",
|
||||
"icon": "dark_mode",
|
||||
"description": "Change the scheme to dark mode",
|
||||
"command": ["setMode", "dark"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Shutdown",
|
||||
"icon": "power_settings_new",
|
||||
"description": "Shutdown the system",
|
||||
"command": ["systemctl", "poweroff"],
|
||||
"enabled": true,
|
||||
"dangerous": true
|
||||
},
|
||||
{
|
||||
"name": "Reboot",
|
||||
"icon": "cached",
|
||||
"description": "Reboot the system",
|
||||
"command": ["systemctl", "reboot"],
|
||||
"enabled": true,
|
||||
"dangerous": true
|
||||
},
|
||||
{
|
||||
"name": "Logout",
|
||||
"icon": "exit_to_app",
|
||||
"description": "Log out of the current session",
|
||||
"command": ["loginctl", "terminate-user", ""],
|
||||
"enabled": true,
|
||||
"dangerous": true
|
||||
},
|
||||
{
|
||||
"name": "Lock",
|
||||
"icon": "lock",
|
||||
"description": "Lock the current session",
|
||||
"command": ["loginctl", "lock-session"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Sleep",
|
||||
"icon": "bedtime",
|
||||
"description": "Suspend then hibernate",
|
||||
"command": ["systemctl", "suspend-then-hibernate"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
},
|
||||
{
|
||||
"name": "Settings",
|
||||
"icon": "settings",
|
||||
"description": "Configure the shell",
|
||||
"command": ["caelestia", "shell", "controlCenter", "open"],
|
||||
"enabled": true,
|
||||
"dangerous": false
|
||||
}
|
||||
],
|
||||
"dragThreshold": 50,
|
||||
"vimKeybinds": false,
|
||||
"enableDangerousActions": false,
|
||||
"maxShown": 7,
|
||||
"maxWallpapers": 9,
|
||||
"specialPrefix": "@",
|
||||
"useFuzzy": {
|
||||
"apps": false,
|
||||
"actions": false,
|
||||
"schemes": false,
|
||||
"variants": false,
|
||||
"wallpapers": false
|
||||
},
|
||||
"showOnHover": false,
|
||||
"favouriteApps": [],
|
||||
"hiddenApps": []
|
||||
},
|
||||
"lock": {
|
||||
"recolourLogo": false
|
||||
},
|
||||
"notifs": {
|
||||
"actionOnClick": false,
|
||||
"clearThreshold": 0.3,
|
||||
"defaultExpireTimeout": 5000,
|
||||
"expandThreshold": 20,
|
||||
"openExpanded": false,
|
||||
"expire": false
|
||||
},
|
||||
"osd": {
|
||||
"enabled": true,
|
||||
"enableBrightness": true,
|
||||
"enableMicrophone": false,
|
||||
"hideDelay": 2000
|
||||
},
|
||||
"paths": {
|
||||
"mediaGif": "root:/assets/bongocat.gif",
|
||||
"sessionGif": "root:/assets/kurukuru.gif",
|
||||
"wallpaperDir": "~/Pictures/Wallpapers"
|
||||
},
|
||||
"services": {
|
||||
"audioIncrement": 0.1,
|
||||
"brightnessIncrement": 0.1,
|
||||
"maxVolume": 1.0,
|
||||
"defaultPlayer": "Spotify",
|
||||
"gpuType": "",
|
||||
"playerAliases": [{ "from": "com.github.th_ch.youtube_music", "to": "YT Music" }],
|
||||
"weatherLocation": "",
|
||||
"useFahrenheit": false,
|
||||
"useFahrenheitPerformance": false,
|
||||
"useTwelveHourClock": false,
|
||||
"smartScheme": true,
|
||||
"visualiserBars": 45
|
||||
},
|
||||
"session": {
|
||||
"dragThreshold": 30,
|
||||
"enabled": true,
|
||||
"vimKeybinds": false,
|
||||
"icons": {
|
||||
"logout": "logout",
|
||||
"shutdown": "power_settings_new",
|
||||
"hibernate": "downloading",
|
||||
"reboot": "cached"
|
||||
},
|
||||
"commands": {
|
||||
"logout": ["loginctl", "terminate-user", ""],
|
||||
"shutdown": ["systemctl", "poweroff"],
|
||||
"hibernate": ["systemctl", "hibernate"],
|
||||
"reboot": ["systemctl", "reboot"]
|
||||
}
|
||||
},
|
||||
"sidebar": {
|
||||
"dragThreshold": 80,
|
||||
"enabled": true
|
||||
},
|
||||
"utilities": {
|
||||
"enabled": true,
|
||||
"maxToasts": 4,
|
||||
"toasts": {
|
||||
"audioInputChanged": true,
|
||||
"audioOutputChanged": true,
|
||||
"capsLockChanged": true,
|
||||
"chargingChanged": true,
|
||||
"configLoaded": true,
|
||||
"dndChanged": true,
|
||||
"gameModeChanged": true,
|
||||
"kbLayoutChanged": true,
|
||||
"kbLimit": true,
|
||||
"numLockChanged": true,
|
||||
"vpnChanged": true,
|
||||
"nowPlaying": false
|
||||
},
|
||||
"vpn": {
|
||||
"enabled": true,
|
||||
"provider": [
|
||||
{
|
||||
"name": "wireguard",
|
||||
"interface": "your-connection-name",
|
||||
"displayName": "Wireguard (Your VPN)",
|
||||
"enabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Home Manager Module
|
||||
|
||||
For NixOS users, a home manager module is also available.
|
||||
|
||||
<details><summary><code>home.nix</code></summary>
|
||||
|
||||
```nix
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = false; # if you prefer starting from your compositor
|
||||
target = "graphical-session.target";
|
||||
environment = [];
|
||||
};
|
||||
settings = {
|
||||
bar.status = {
|
||||
showBattery = false;
|
||||
};
|
||||
paths.wallpaperDir = "~/Images";
|
||||
};
|
||||
cli = {
|
||||
enable = true; # Also add caelestia-cli to path
|
||||
settings = {
|
||||
theme.enableGtk = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
The module automatically adds Caelestia shell to the path with **full functionality**. The CLI is not required, however you have the option to enable and configure it.
|
||||
|
||||
</details>
|
||||
|
||||
## FAQ
|
||||
|
||||
### Need help or support?
|
||||
|
||||
You can join the community Discord server for assistance and discussion:
|
||||
https://discord.gg/BGDCFCmMBk
|
||||
|
||||
### My screen is flickering, help pls!
|
||||
|
||||
Try disabling VRR in the hyprland config. You can do this by adding the following to `~/.config/caelestia/hypr-user.conf`:
|
||||
|
||||
```conf
|
||||
misc {
|
||||
vrr = 0
|
||||
}
|
||||
```
|
||||
|
||||
### I want to make my own changes to the hyprland config!
|
||||
|
||||
You can add your custom hyprland configs to `~/.config/caelestia/hypr-user.conf`.
|
||||
|
||||
### I want to make my own changes to other stuff!
|
||||
|
||||
See the [manual installation](https://github.com/caelestia-dots/shell?tab=readme-ov-file#manual-installation) section
|
||||
for the corresponding repo.
|
||||
|
||||
### I want to disable XXX feature!
|
||||
|
||||
Please read the [configuring](https://github.com/caelestia-dots/shell?tab=readme-ov-file#configuring) section in the readme.
|
||||
If there is no corresponding option, make feature request.
|
||||
|
||||
### How do I make my colour scheme change with my wallpaper?
|
||||
|
||||
Set a wallpaper via the launcher or `caelestia wallpaper` and set the scheme to the dynamic scheme via the launcher
|
||||
or `caelestia scheme set`. e.g.
|
||||
|
||||
```sh
|
||||
caelestia wallpaper -f <path/to/file>
|
||||
caelestia scheme set -n dynamic
|
||||
```
|
||||
|
||||
### My wallpapers aren't showing up in the launcher!
|
||||
|
||||
The launcher pulls wallpapers from `~/Pictures/Wallpapers` by default. You can change this in the config. Additionally,
|
||||
the launcher only shows an odd number of wallpapers at one time. If you only have 2 wallpapers, consider getting more
|
||||
(or just putting one).
|
||||
|
||||
## Credits
|
||||
|
||||
Thanks to the Hyprland discord community (especially the homies in #rice-discussion) for all the help and suggestions
|
||||
for improving these dots!
|
||||
|
||||
A special thanks to [@outfoxxed](https://github.com/outfoxxed) for making Quickshell and the effort put into fixing issues
|
||||
and implementing various feature requests.
|
||||
|
||||
Another special thanks to [@end_4](https://github.com/end-4) for his [config](https://github.com/end-4/dots-hyprland)
|
||||
which helped me a lot with learning how to use Quickshell.
|
||||
|
||||
Finally another thank you to all the configs I took inspiration from (only one for now):
|
||||
|
||||
- [Axenide/Ax-Shell](https://github.com/Axenide/Ax-Shell)
|
||||
|
||||
## Stonks 📈
|
||||
|
||||
<a href="https://www.star-history.com/#caelestia-dots/shell&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 97 KiB |
@@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
id="Layer_2"
|
||||
data-name="Layer 2"
|
||||
viewBox="0 0 128 128"
|
||||
version="1.1"
|
||||
sodipodi:docname="logo.svg"
|
||||
width="128"
|
||||
height="128"
|
||||
inkscape:version="1.4.3 (0d15f75042, 2025-12-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1.28"
|
||||
inkscape:cx="43.359375"
|
||||
inkscape:cy="183.98438"
|
||||
inkscape:window-width="1824"
|
||||
inkscape:window-height="1034"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_2" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<style
|
||||
id="style1">
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: #6ae5e1;
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: #3b4656;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g
|
||||
id="dark-4"
|
||||
transform="matrix(0.08939103,0,0,0.08939103,-3.899948e-4,18.839439)">
|
||||
<path
|
||||
class="cls-2"
|
||||
d="m 475.79,480.32 c -86.73,17.9 -182.84,47.16 -250.83,69.53 -5.5,1.81 -9.8,-4.87 -5.89,-9.13 60.07,-65.44 108.05,-148.67 108.05,-148.67 96.79,-164.04 256.76,-262.84 445.51,-236.29 72.29,10.17 137.85,37.79 192.94,78.01 11.05,8.07 12.75,23.9 3.52,34 -4.45,4.87 -10.63,7.45 -16.89,7.45 -3.82,0 -7.66,-0.96 -11.16,-2.96 C 905.11,251.68 864.76,242.2 821.3,236.08 674.89,215.49 537.25,289.19 474.05,413.1 c -10.51,20.6 -6.82,42.54 5.03,58.29 2.5,3.32 0.78,8.1 -3.29,8.94 z"
|
||||
id="path1"
|
||||
style="fill:#7b7c7d;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-3"
|
||||
d="m 1151.76,579.16 c -7.27,1.28 -14.11,-4.09 -14.33,-11.48 -0.63,-21.91 1.71,-43.51 -2.22,-64.64 -3.08,-16.6 -18.52,-27.99 -35.31,-26.16 l -0.57,0.07 c -73,8.06 -275.36,34.58 -536.62,104.13 -77.07,20.51 -109.86,111.75 -63.34,176.52 51.67,71.96 132.35,122.14 228.17,135.62 132.09,18.58 257.01,-37.58 326.59,-141.44 6.04,-9.03 17.25,-13.06 27.57,-9.65 10.22,3.37 16.47,12.84 16.47,22.82 0,3.66 -0.84,7.38 -2.63,10.9 -80.84,158.87 -256.15,256.54 -442.55,230.31 -87.67,-12.33 -165.46,-50.36 -226.74,-105.39 -0.05,-0.04 -0.11,-0.09 -0.17,-0.13 C 344.72,843.18 261.73,788.92 121.54,766.76 -88.91,733.49 14.95,668.95 126.72,612.74 c 82.29,-35.04 281.44,-88.35 405.1,-120 1.75,-0.29 3.52,-0.67 5.29,-1.13 16.96,-4.44 35.79,-9.29 56.17,-14.41 11.83,-2.95 21.61,-5.37 28.86,-7.16 1.02,-0.25 1.98,-0.49 2.89,-0.71 3.47,-0.85 6.21,-1.52 8.16,-1.99 0.31,-0.08 0.63,-0.16 0.95,-0.24 0.3,-0.07 0.58,-0.14 0.82,-0.2 0.22,-0.05 0.44,-0.1 0.66,-0.16 0.16,-0.04 0.33,-0.08 0.5,-0.12 0.11,-0.03 0.22,-0.05 0.34,-0.08 0.13,-0.03 0.19,-0.05 0.19,-0.05 118.77,-28.85 275.31,-62.84 421.88,-82.11 11.37,-1.49 22.68,-2.86 33.89,-4.16 83.78,-9.75 162.97,-14.06 228.32,-9.08 284.26,21.75 -52.61,187.49 -168.98,208.02 z"
|
||||
id="path2"
|
||||
style="fill:#010203;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="m 1096.96,0.7 c -3.27,23.29 -19.27,94.08 -93.49,102.76 -0.95,0.11 -0.95,1.47 0,1.58 74.22,8.68 90.24,79.48 93.51,102.76 0.13,0.93 1.47,0.93 1.6,0 3.27,-23.29 19.27,-94.08 93.49,-102.76 0.95,-0.11 0.95,-1.47 0,-1.58 -74.22,-8.68 -90.24,-79.48 -93.51,-102.76 -0.13,-0.93 -1.47,-0.93 -1.6,0 z"
|
||||
id="path3"
|
||||
style="fill:#7b7c7d;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="m 1267.37,173.28 c -2.44,14.41 -12.09,48.65 -49,54.42 -0.92,0.14 -0.92,1.43 0,1.57 36.91,5.77 46.57,40.02 49.01,54.42 0.15,0.89 1.44,0.89 1.59,0 2.44,-14.41 12.09,-48.65 49,-54.42 0.92,-0.14 0.92,-1.43 0,-1.57 -36.91,-5.77 -46.57,-40.02 -49.01,-54.42 -0.15,-0.89 -1.44,-0.89 -1.59,0 z"
|
||||
id="path4"
|
||||
style="fill:#7b7c7d;fill-opacity:1" />
|
||||
<path
|
||||
class="cls-2"
|
||||
d="m 1259.85,729.09 c -2.11,11.28 -9.63,35.23 -35.8,39.95 -0.89,0.16 -0.89,1.4 0,1.56 26.17,4.72 33.7,28.66 35.81,39.95 0.16,0.88 1.42,0.88 1.59,0 2.11,-11.28 9.63,-35.23 35.8,-39.95 0.89,-0.16 0.89,-1.4 0,-1.56 -26.17,-4.72 -33.7,-28.66 -35.81,-39.95 -0.16,-0.88 -1.42,-0.88 -1.59,0 z"
|
||||
id="path5"
|
||||
style="fill:#7b7c7d;fill-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
@@ -1,3 +0,0 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth required pam_fprintd.so max-tries=1
|
||||
@@ -1,6 +0,0 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth required pam_faillock.so preauth
|
||||
auth [success=1 default=bad] pam_unix.so nullok
|
||||
auth [default=die] pam_faillock.so authfail
|
||||
auth required pam_faillock.so authsucc
|
||||
@@ -1,19 +0,0 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 qt_TexCoord0;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
// qt_Matrix and qt_Opacity must always be both present
|
||||
// if the built-in vertex shader is used.
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
};
|
||||
|
||||
layout(binding = 1) uniform sampler2D source;
|
||||
layout(binding = 2) uniform sampler2D maskSource;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(source, qt_TexCoord0.st) * (texture(maskSource, qt_TexCoord0.st).a) * qt_Opacity;
|
||||
}
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
cat ~/.local/state/caelestia/sequences.txt 2>/dev/null
|
||||
|
||||
exec "$@"
|
||||
@@ -1,8 +0,0 @@
|
||||
import qs.config
|
||||
import QtQuick
|
||||
|
||||
NumberAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import qs.config
|
||||
import QtQuick
|
||||
|
||||
ColorAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.standard
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property string icon
|
||||
required property string title
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: root.icon
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: root.title
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
import qs.components
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property var deviceDetails
|
||||
|
||||
spacing: Appearance.spacing.small / 2
|
||||
|
||||
StyledText {
|
||||
text: qsTr("IP Address")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.deviceDetails?.ipAddress || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
text: qsTr("Subnet Mask")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.deviceDetails?.subnet || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
text: qsTr("Gateway")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.deviceDetails?.gateway || qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.normal
|
||||
text: qsTr("DNS Servers")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: (root.deviceDetails && root.deviceDetails.dns && root.deviceDetails.dns.length > 0) ? root.deviceDetails.dns.join(", ") : qsTr("Not available")
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: parent.width
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import qs.services
|
||||
|
||||
Item {
|
||||
id: root
|
||||
implicitWidth: designWidth
|
||||
implicitHeight: designHeight
|
||||
|
||||
readonly property real designWidth: 128
|
||||
readonly property real designHeight: 90.38
|
||||
|
||||
property color topColour: Colours.palette.m3primary
|
||||
property color bottomColour: Colours.palette.m3onSurface
|
||||
|
||||
Shape {
|
||||
anchors.centerIn: parent
|
||||
width: root.designWidth
|
||||
height: root.designHeight
|
||||
scale: Math.min(root.width / width, root.height / height)
|
||||
transformOrigin: Item.Center
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
|
||||
ShapePath {
|
||||
fillColor: root.topColour
|
||||
strokeColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "m42.56,42.96c-7.76,1.6-16.36,4.22-22.44,6.22-.49.16-.88-.44-.53-.82,5.37-5.85,9.66-13.3,9.66-13.3,8.66-14.67,22.97-23.51,39.85-21.14,6.47.91,12.33,3.38,17.26,6.98.99.72,1.14,2.14.31,3.04-.4.44-.95.67-1.51.67-.34,0-.69-.09-1-.26-3.21-1.84-6.82-2.69-10.71-3.24-13.1-1.84-25.41,4.75-31.06,15.83-.94,1.84-.61,3.81.45,5.21.22.3.07.72-.29.8Z"
|
||||
}
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: root.bottomColour
|
||||
strokeColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "m103.02,51.8c-.65.11-1.26-.37-1.28-1.03-.06-1.96.15-3.89-.2-5.78-.28-1.48-1.66-2.5-3.16-2.34h-.05c-6.53.73-24.63,3.1-48,9.32-6.89,1.83-9.83,10-5.67,15.79,4.62,6.44,11.84,10.93,20.41,12.13,11.82,1.66,22.99-3.36,29.21-12.65.54-.81,1.54-1.17,2.47-.86.91.3,1.47,1.15,1.47,2.04,0,.33-.08.66-.24.98-7.23,14.21-22.91,22.95-39.59,20.6-7.84-1.1-14.8-4.5-20.28-9.43,0,0,0,0-.02-.01-7.28-5.14-14.7-9.99-27.24-11.98-18.82-2.98-9.53-8.75.46-13.78,7.36-3.13,25.17-7.9,36.24-10.73.16-.03.31-.06.47-.1,1.52-.4,3.2-.83,5.02-1.29,1.06-.26,1.93-.48,2.58-.64.09-.02.18-.04.26-.06.31-.08.56-.14.73-.18.03,0,.06-.01.08-.02.03,0,.05-.01.07-.02.02,0,.04,0,.06-.01.01,0,.03,0,.04-.01,0,0,.02,0,.03,0,.01,0,.02,0,.02,0,10.62-2.58,24.63-5.62,37.74-7.34,1.02-.13,2.03-.26,3.03-.37,7.49-.87,14.58-1.26,20.42-.81,25.43,1.95-4.71,16.77-15.12,18.61Z"
|
||||
}
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: root.topColour
|
||||
strokeColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "m98.12.06c-.29,2.08-1.72,8.42-8.36,9.19-.09,0-.09.13,0,.14,6.64.78,8.07,7.11,8.36,9.19.01.08.13.08.14,0,.29-2.08,1.72-8.42,8.36-9.19.09,0,.09-.13,0-.14-6.64-.78-8.07-7.11-8.36-9.19-.01-.08-.13-.08-.14,0Z"
|
||||
}
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: root.topColour
|
||||
strokeColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "m113.36,15.5c-.22,1.29-1.08,4.35-4.38,4.87-.08.01-.08.13,0,.14,3.3.52,4.17,3.58,4.38,4.87.01.08.13.08.14,0,.22-1.29,1.08-4.35,4.38-4.87.08-.01.08-.13,0-.14-3.3-.52-4.17-3.58-4.38-4.87-.01-.08-.13-.08-.14,0Z"
|
||||
}
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
fillColor: root.topColour
|
||||
strokeColor: "transparent"
|
||||
|
||||
PathSvg {
|
||||
path: "m112.69,65.22c-.19,1.01-.86,3.15-3.2,3.57-.08.01-.08.13,0,.14,2.34.42,3.01,2.56,3.2,3.57.01.08.13.08.14,0,.19-1.01.86-3.15,3.2-3.57.08-.01.08-.13,0-.14-2.34-.42-3.01-2.56-3.2-3.57-.01-.08-.13-.08-.14,0Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import qs.services
|
||||
import qs.config
|
||||
|
||||
StyledText {
|
||||
property real fill
|
||||
property int grade: Colours.light ? 0 : -25
|
||||
|
||||
font.family: Appearance.font.family.material
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.variableAxes: ({
|
||||
FILL: fill.toFixed(1),
|
||||
GRAD: grade,
|
||||
opsz: fontInfo.pixelSize,
|
||||
wght: fontInfo.weight
|
||||
})
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property string label
|
||||
required property string value
|
||||
property bool showTopMargin: false
|
||||
|
||||
spacing: Appearance.spacing.small / 2
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: root.showTopMargin ? Appearance.spacing.normal : 0
|
||||
text: root.label
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.value
|
||||
color: Colours.palette.m3outline
|
||||
font.pointSize: Appearance.font.size.small
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
import qs.components
|
||||
import qs.components.effects
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
StyledRect {
|
||||
id: root
|
||||
|
||||
default property alias content: contentColumn.data
|
||||
property real contentSpacing: Appearance.spacing.larger
|
||||
property bool alignTop: false
|
||||
|
||||
Layout.fillWidth: true
|
||||
implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2
|
||||
|
||||
radius: Appearance.rounding.normal
|
||||
color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : Colours.palette.m3surfaceContainerHigh
|
||||
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: root.alignTop ? parent.top : undefined
|
||||
anchors.verticalCenter: root.alignTop ? undefined : parent.verticalCenter
|
||||
anchors.margins: Appearance.padding.large
|
||||
|
||||
spacing: root.contentSpacing
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import qs.components
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
required property string title
|
||||
property string description: ""
|
||||
|
||||
spacing: 0
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
text: root.title
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
StyledText {
|
||||
visible: root.description !== ""
|
||||
text: root.description
|
||||
color: Colours.palette.m3outline
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
|
||||
MouseArea {
|
||||
id: root
|
||||
|
||||
property bool disabled
|
||||
property bool showHoverBackground: true
|
||||
property color color: Colours.palette.m3onSurface
|
||||
property real radius: parent?.radius ?? 0
|
||||
property alias rect: hoverLayer
|
||||
|
||||
function onClicked(): void {
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
enabled: !disabled
|
||||
cursorShape: disabled ? undefined : Qt.PointingHandCursor
|
||||
hoverEnabled: true
|
||||
|
||||
onPressed: event => {
|
||||
if (disabled)
|
||||
return;
|
||||
|
||||
rippleAnim.x = event.x;
|
||||
rippleAnim.y = event.y;
|
||||
|
||||
const dist = (ox, oy) => ox * ox + oy * oy;
|
||||
rippleAnim.radius = Math.sqrt(Math.max(dist(event.x, event.y), dist(event.x, height - event.y), dist(width - event.x, event.y), dist(width - event.x, height - event.y)));
|
||||
|
||||
rippleAnim.restart();
|
||||
}
|
||||
|
||||
onClicked: event => !disabled && onClicked(event)
|
||||
|
||||
SequentialAnimation {
|
||||
id: rippleAnim
|
||||
|
||||
property real x
|
||||
property real y
|
||||
property real radius
|
||||
|
||||
PropertyAction {
|
||||
target: ripple
|
||||
property: "x"
|
||||
value: rippleAnim.x
|
||||
}
|
||||
PropertyAction {
|
||||
target: ripple
|
||||
property: "y"
|
||||
value: rippleAnim.y
|
||||
}
|
||||
PropertyAction {
|
||||
target: ripple
|
||||
property: "opacity"
|
||||
value: 0.08
|
||||
}
|
||||
Anim {
|
||||
target: ripple
|
||||
properties: "implicitWidth,implicitHeight"
|
||||
from: 0
|
||||
to: rippleAnim.radius * 2
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
Anim {
|
||||
target: ripple
|
||||
property: "opacity"
|
||||
to: 0
|
||||
}
|
||||
}
|
||||
|
||||
StyledClippingRect {
|
||||
id: hoverLayer
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
color: Qt.alpha(root.color, root.disabled ? 0 : root.pressed ? 0.12 : (root.showHoverBackground && root.containsMouse) ? 0.08 : 0)
|
||||
radius: root.radius
|
||||
|
||||
StyledRect {
|
||||
id: ripple
|
||||
|
||||
radius: Appearance.rounding.full
|
||||
color: root.color
|
||||
opacity: 0
|
||||
|
||||
transform: Translate {
|
||||
x: -ripple.width / 2
|
||||
y: -ripple.height / 2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
|
||||
ClippingRectangle {
|
||||
id: root
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import QtQuick
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.services
|
||||
import qs.config
|
||||
import QtQuick
|
||||
|
||||
Text {
|
||||
id: root
|
||||
|
||||
property bool animate: false
|
||||
property string animateProp: "scale"
|
||||
property real animateFrom: 0
|
||||
property real animateTo: 1
|
||||
property int animateDuration: Appearance.anim.durations.normal
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
textFormat: Text.PlainText
|
||||
color: Colours.palette.m3onSurface
|
||||
font.family: Appearance.font.family.sans
|
||||
font.pointSize: Appearance.font.size.smaller
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
|
||||
Behavior on text {
|
||||
enabled: root.animate
|
||||
|
||||
SequentialAnimation {
|
||||
Anim {
|
||||
to: root.animateFrom
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
}
|
||||
PropertyAction {}
|
||||
Anim {
|
||||
to: root.animateTo
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
target: root
|
||||
property: root.animateProp
|
||||
duration: root.animateDuration / 2
|
||||
easing.type: Easing.BezierSpline
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import ".."
|
||||
import QtQuick
|
||||
|
||||
Flickable {
|
||||
id: root
|
||||
|
||||
maximumFlickVelocity: 3000
|
||||
|
||||
rebound: Transition {
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import ".."
|
||||
import QtQuick
|
||||
|
||||
ListView {
|
||||
id: root
|
||||
|
||||
maximumFlickVelocity: 3000
|
||||
|
||||
rebound: Transition {
|
||||
Anim {
|
||||
properties: "x,y"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
|
||||
PanelWindow {
|
||||
required property string name
|
||||
|
||||
WlrLayershell.namespace: `caelestia-${name}`
|
||||
color: "transparent"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user