Major Update: created v4, new configs: alacritty, polybar, i3, and more.

This commit is contained in:
Keyitdev
2025-07-23 16:32:36 +02:00
parent fa1bbd4502
commit 7dcd9a13ad
451 changed files with 1380 additions and 7802 deletions
-52
View File
@@ -1,52 +0,0 @@
ZSH="/usr/share/oh-my-zsh/"
export ZSH="/usr/share/oh-my-zsh/"
ZSH_THEME="keyitdev"
plugins=(git)
ZSH_CACHE_DIR="$HOME/.cache/oh-my-zsh"
if [[ ! -d "$ZSH_CACHE_DIR" ]]; then
mkdir "$ZSH_CACHE_DIR"
fi
source "$ZSH"/oh-my-zsh.sh
alias yeet="yay -Rn"
alias yeeet="yay -Rns"
alias yeet_useless="yay -Rns $(yay -Qtdq)"
# git
alias g="git"
alias gad="git add --all"
alias gcm="git commit -m"
alias gcms="git commit -S -m"
alias gph="git push"
alias gpl="git pull"
alias gcl="git clone"
alias gin="git init"
alias gst="git status"
alias glg="git log -n 5"
alias glgr="git reflog"
alias gdf="git diff"
alias gbr="git branch"
alias gsw="git switch"
alias gch="git checkout"
alias gra="git remote add origin git@github.com:"
alias grs="git remote set-url origin git@github.com:"
# other
alias nv="nvim"
alias la="ls -alF"
alias h="history|grep"
alias c="clear" # I know about ctrl l etc.
alias logout="killall -KILL -u $USER"
alias files="nemo"
alias files.="nemo ."
alias help="cat ~/.zshrc | less"
# cd
alias ..="cd .."
alias ....="cd ../.."
alias ......="cd ../../.."
alias ........="cd ../../../.."
Executable → Regular
+1 -266
View File
@@ -1,266 +1 @@
# Keyitdev Dotfiles # WIP
## [Watch on Youtube](https://youtu.be/tSreyGcCMB4) <img alt="" align="right" src="https://img.shields.io/github/forks/keyitdev/dotfiles?color=bf616a&labelColor=1b1b25&style=for-the-badge"/> <img alt="" align="right" src="https://img.shields.io/github/stars/keyitdev/dotfiles?color=dd864a&labelColor=1b1b25&style=for-the-badge"/>
### [Showcase](#showcase) · [Manual installation](#manual-installation) · [Detailed info](#detailed-information) · [Troubleshooting](#troubleshooting) · [Contributions](#contributions)
The **Arch Linux** & **i3wm** dotfiles!
This is the third version of my dotfiles, as I gain more experience I am able to create more profesional dotfiles.
**However, if you want to check older version see [v2 branch](https://github.com/Keyitdev/dotfiles/tree/v2).**
## Information
<img src="https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/1.png?raw=true" alt="Rice Showcase" align="right" width="400px">
- **OS:** [Arch Linux](https://archlinux.org)
- **WM:** [i3-gaps](https://github.com/Airblader/i3)
- **Terminal:** [alacritty](https://github.com/alacritty/alacritty)
- **Bar:** [polybar](https://github.com/polybar/polybar)
- **Shell:** [zsh](https://www.zsh.org/)
- **Compositor:** [picom](https://github.com/yshui/picom)
- **Application Launcher:** [rofi](https://github.com/davatorium/rofi)
- **Notification Deamon:** [dunst](https://github.com/dunst-project/dunst)
## Automatic installation
```sh
git clone -b v3 --depth 1 https://www.github.com/keyitdev/dotfiles.git
cd dotfiles
chmod +x install-on-arch.sh
./install-on-arch.sh
```
> Warning: Remember to always read the scripts you run from the internet first.
> Note: Last time I tested the installation script on 31 July 2023, Everything worked fine.
## Showcase
### neofetch
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/1.png?raw=true)
### vsc & ncmpcpp & cava
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/2.png?raw=true)
### rofi & dunst
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/3.png?raw=true)
<details>
<summary><h3>More screenshots</h3></summary>
### nemo & nvim & ranger
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/4.png?raw=true)
### i3lock-color
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/5.png?raw=true)
### sddm
![](https://github.com/Keyitdev/screenshots/blob/master/dotfiles/v3/screenshots/6.png?raw=true)
</details>
## Manual Installation
1. Clone this repository.
```sh
git clone -b v3 --depth 1 https://www.github.com/keyitdev/dotfiles.git
```
2. Install an AUR helper (for example, `yay` in `"$HOME"/.srcs`).
```sh
git clone https://aur.archlinux.org/yay.git "$HOME"/.srcs/yay
cd "$HOME"/.srcs/yay/ && makepkg -si
```
3. Install dependencies.
```sh
yay -S --needed acpi alsa-utils base-devel curl git pulseaudio pulseaudio-alsa xorg xorg-xinit alacritty btop code dunst feh ffcast firefox i3-gaps i3lock-color i3-resurrect libnotify light mpc mpd ncmpcpp nemo neofetch neovim oh-my-zsh-git pacman-contrib papirus-icon-theme picom polybar ranger rofi scrot slop xclip zathura zathura-pdf-mupdf zsh
```
4. Create default directories.
```sh
mkdir -p "$HOME"/.config
mkdir -p /usr/local/bin
mkdir -p /usr/share/themes
mkdir -p "$HOME"/Pictures/wallpapers
```
5. Copy configs, scripts, fonts, wallpaper, vsc configs, zsh config.
```sh
cp -r ./config/* "$HOME"/.config
sudo cp -r ./scripts/* /usr/local/bin
sudo cp -r ./fonts/* /usr/share/fonts
cp -r ./wallpapers/* "$HOME"/Pictures/wallpapers
sudo cp ./keyitdev.zsh-theme /usr/share/oh-my-zsh/custom/themes
cp ./.zshrc "$HOME"
```
6. Make Light executable, set zsh as default shell, update nvim extensions, refresh font cache.
```sh
sudo chmod +s /usr/bin/light
chsh -s /bin/zsh
sudo chsh -s /bin/zsh
nvim +PackerSync
fc-cache -fv
```
7. Install vsc theme.
```sh
code --install-extension zhuangtongfa.Material-theme
cp ./vsc/settings.json "$HOME"/.config/Code\ -\ OSS/User
```
8. Install gtk theme.
```sh
mkdir -p "$HOME"/.config/gtk-4.0
git clone https://github.com/Fausto-Korpsvart/Rose-Pine-GTK-Theme
sudo cp -r ./Rose-Pine-GTK-Theme/themes/RosePine-Main-BL /usr/share/themes/RosePine-Main
sudo cp -r ./Rose-Pine-GTK-Theme/themes/RosePine-Main-BL/gtk-4.0/* "$HOME"/.config/gtk-4.0
```
9. Install sddm and sddm flower theme.
```sh
yay -S --needed qt5-graphicaleffects qt5-quickcontrols2 qt5-svg sddm
sudo git clone https://github.com/keyitdev/sddm-flower-theme.git /usr/share/sddm/themes/sddm-flower-theme
sudo cp /usr/share/sddm/themes/sddm-flower-theme/Fonts/* /usr/share/fonts/
echo "[Theme]
Current=sddm-flower-theme" | sudo tee /etc/sddm.conf
```
## Detailed information
### Dependencies
**Base:** acpi alsa-utils base-devel curl git pulseaudio pulseaudio-alsa xorg xorg-xinit
**Required:** alacritty btop code dunst feh ffcast firefox i3-gaps i3lock-color i3-resurrect libnotify light mpc mpd ncmpcpp nemo neofetch neovim oh-my-zsh-git pacman-contrib papirus-icon-theme picom polybar ranger rofi scrot slop xclip zathura zathura-pdf-mupdf zsh
**Sddm:** qt5-graphicaleffects qt5-quickcontrols2 qt5-svg sddm
**Emoji fonts::** noto-fonts noto-fonts-cjk noto-fonts-emoji noto-fonts-extra
### Used programs
- **Music Player:** [mpd](https://github.com/MusicPlayerDaemon/MPD) & [ncmpcpp](https://github.com/ncmpcpp/ncmpcpp)
- **Editor:** [neovim](https://github.com/neovim/neovim) / [vscode](https://github.com/microsoft/vscode)
- **Lockscreen:** [i3lock-color](https://github.com/Raymo111/i3lock-color)
- **Display Manager:** [sddm](https://github.com/sddm/sddm)
- **File manager:** [ranger](https://github.com/ranger/ranger) / [nemo](https://github.com/linuxmint/nemo)
- **Pdf reader:** [zathura](https://github.com/pwmt/zathura)
- **Monitor of Resources:** [btop](https://github.com/aristocratos/btop)
### Used themes
- **Shell Framework:** [Oh-My-Zsh](https://github.com/ohmyzsh/ohmyzsh)
- **Vscode Theme:** [One dark pro](https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme)
- **Neovim Theme:** [AstroNvim](https://github.com/kabinspace/AstroVim)
- **Icons:** [Papirus dark](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme)
- **GTK Theme:** [Rose Pine](https://github.com/Fausto-Korpsvart/Rose-Pine-GTK-Theme)
- **Display Manager Theme:** [Sddm-flower-theme](https://github.com/Keyitdev/sddm-flower-theme)
### Fonts
- **Icons:** [Feather](https://github.com/AT-UI/feather-font/blob/master/src/fonts/feather.ttf)
- **Interface Font:** [Open sans](https://fonts.google.com/specimen/Open+Sans#standard-styles)
- **Monospace Font:** [Roboto mono](https://fonts.google.com/specimen/Roboto+Mono#standard-styles)
- **Polybar Font:** [Iosevka nerd font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Iosevka)
### Keybinds
These are the basic keybinds. Read through the [i3](./config/i3/config) config for more keybinds.
Note: `Win` refers to the `Super/Mod` key.
| Keybind | Function |
| ---------------------- | ---------------------------------------- |
| `Win + Enter` | Launch terminal (alacritty) |
| `Win + Shift + Q` | Close window |
| `Win + Q` | Stacking layout |
| `Win + W` | Tabbed layout |
| `Win + E` | Default layout |
| `Win + R` | Resize mode |
| `Win + T` | Restore layout |
| `Win + Y` | Save layout |
| `Win + A` | Rofi open windows menu |
| `Win + S` | Rofi full menu |
| `Win + D` | Rofi menu |
| `Win + Z` | Rofi bookmarks |
| `Win + X` | Rofi powermenu |
| `Win + C` | Rofi screenshot script |
| `Win + G` | Gaps settings |
| `Win + V` | Set vertical orientation |
| `Win + H` | Set horizontal orientation |
| `Win + I` | Lock screen |
| `Win + O` | Show polybar |
| `Win + P` | Hide polybar |
| `Win + B` | Move workspace to another monitor |
| `Win + N` | Dual monitor mode |
| `Win + M` | Single monitor mode |
| `Win + arrows (jkl;)` | Resizing, moving windows |
| `Win + Shift + E` | Exit i3 |
| `Win + Shift + R` | Restart i3 |
### Colors
| Color | Hex code |PNG | Color | Hex code |PNG|
| ---------------------- | -------- |- | ---------------------- | -------- |-|
| background | #1b1b25 |![#1b1b25](https://placehold.co/15x15/1b1b25/1b1b25.png) | red | #cb5760 |![#cb5760](https://placehold.co/15x15/cb5760/cb5760.png)|
| background 2 | #282A36 |![#282A36](https://placehold.co/15x15/282A36/282A36.png) | green | #999f63 |![#999f63](https://placehold.co/15x15/999f63/999f63.png)|
| background 3 | #16161e |![#16161e](https://placehold.co/15x15/16161e/16161e.png) | yellow | #d4a067 |![#d4a067](https://placehold.co/15x15/d4a067/d4a067.png)|
| border | #343746 |![#343746](https://placehold.co/15x15/343746/343746.png) | blue | #6c90a8 |![#6c90a8](https://placehold.co/15x15/6c90a8/6c90a8.png)|
| foreground | #dedede |![#dedede](https://placehold.co/15x15/dedede/dedede.png) | purple | #776690 |![#776690](https://placehold.co/15x15/776690/776690.png)|
| white | #eeffff |![#eeffff](https://placehold.co/15x15/eeffff/eeffff.png) | cyan | #528a9b |![#528a9b](https://placehold.co/15x15/528a9b/528a9b.png)|
| gray | #727480 |![#727480](https://placehold.co/15x15/727480/727480.png) | pink | #ffa8c5 |![#ffa8c5](https://placehold.co/15x15/ffa8c5/ffa8c5.png)|
| black | #15121c |![#15121c](https://placehold.co/15x15/15121c/15121c.png) | orange | #c87c3e |![#c87c3e](https://placehold.co/15x15/c87c3e/c87c3e.png)|
## Troubleshooting
1. Some polybar modules are not working?
- Try changing the variables.
- Open the polybar configuration `"$HOME"/.config/polybar/config.ini`.
- Found `; Change it for yourself` line.
- Follow the commands that are written below the `; Change it for yourself` line.
2. MPD not working?
- Check if any other program is using port 6600 (http://127.0.0.1:6600/).
3. Everything is lagging? Screen is tearing?
- Edit picom config.
- This can be hard to solve, because if picom does not work, the whole screen may be frozen or even dark. So first try to kill the picom process.
- (Blindly) click `Win+Enter`.
- (Blindly) type `killall picom`.
- (Blindly) press `Enter`.
- Open picom configuration `"$HOME"/.config/picom/picom.conf`.
- Change picom backend from `backend = "glx";` to `backend = "xrender";`.
- Click `Win+Shift+R`.
## Support and Thankies
You can support me simply by dropping a **star** on **[github](https://github.com/Keyitdev/dotfiles/tree/v3)** or giving a **subscription** on **[YouTube](http://www.youtube.com/channel/UCVoGVyAP2sHPQyegwBMJKyQ?sub_confirmation=1)**.
<!-- If you enjoyed it and would like to show your appreciation, you can **tip** using **[kofi]()** or **[paypal]()**. -->
**Big thanks to:**
[adi1090x](https://github.com/adi1090x),
[Totoro](https://github.com/totoro-ghost).
Thanks to all contributors! :D
## Contributions
Feel free to create issue or pull request.
If you need any help, you can ask questions here on **[discussions](https://github.com/Keyitdev/dotfiles/discussions/categories/q-a)** or contact me on **[discord](https://discord.com/users/908702082578665474)** / **[reddit](https://www.reddit.com/user/Keyitdev)**.
Distributed under the **[GPLv3+](https://www.gnu.org/licenses/gpl-3.0.html) License**.
Copyright (C) 2022 Keyitdev.
-37
View File
@@ -1,37 +0,0 @@
window:
padding:
x: 8
y: 8
opacity: 0.9
font:
size: 7.5
normal:
family: Roboto mono
# style: medium
colors:
primary:
background: '#1b1b25'
foreground: '#dedede'
normal:
black: '#15121c'
red: '#cb5760'
green: '#999f63'
yellow: '#d4a067'
blue: '#6c90a8'
magenta: '#776690'
cyan: '#528a9b'
white: '#eeffff'
bright:
black: '#727480'
red: '#cb5760'
green: '#999f63'
yellow: '#d4a067'
blue: '#6c90a8'
magenta: '#776690'
cyan: '#528a9b'
white: '#eeffff'
-74
View File
@@ -1,74 +0,0 @@
# Documentation: https://dunst-project.org/documentation/
# Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
# Copyright (C) 2022 Keyitdev
[global]
monitor = 0
follow = mouse
width = (300,400)
height = 250
origin = top-right
offset = 8x47
indicate_hidden = yes
shrink = no
transparency = 0
notification_height = 0
separator_height = 2
padding = 12
horizontal_padding = 12
frame_width = 2
frame_color = "#343746"
separator_color = frame
sort = yes
idle_threshold = 120
font = Roboto mono 12
line_height = 0
markup = full
format = "<b>%s</b>\n%b"
alignment = left
vertical_alignment = center
show_age_threshold = 60
word_wrap = yes
ellipsize = middle
ignore_newline = no
stack_duplicates = true
hide_duplicate_count = false
show_indicators = no
icon_position = left
min_icon_size = 50
max_icon_size = 50
icon_path = /usr/share/icons/Papirus/16x16/
sticky_history = no
history_length = 50
dmenu = /usr/bin/dmenu -p dunst:
browser = /usr/bin/sensible-browser
always_run_script = true
title = Dunst
class = Dunst
startup_notification = false
verbosity = mesg
corner_radius = 20
ignore_dbusclose = false
force_xinerama = false
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
[experimental]
per_monitor_dpi = false
[shortcuts]
close = ctrl+space
close_all = ctrl+shift+space
history = ctrl+grave
context = ctrl+shift+period
[urgency_low]
background = "#1b1b25"
foreground = "#dedede"
timeout = 5
[urgency_normal]
background = "#1b1b25"
foreground = "#dedede"
timeout = 5
[urgency_critical]
background = "#1b1b25"
foreground = "#dedede"
frame_color = "#f07178"
timeout = 0
-5
View File
@@ -1,5 +0,0 @@
[Settings]
gtk-icon-theme-name = Papirus
gtk-theme-name = RosePine-Main
gtk-font-name = Open sans 12
gtk-application-prefer-dark-theme = true
-18
View File
@@ -1,18 +0,0 @@
# Documentation: https://mpd.readthedocs.io/en/stable/user.html
# Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
# Copyright (C) 2022 Keyitdev
music_directory "~/Music"
db_file "~/.config/mpd/database"
playlist_directory "~/.config/mpd/playlists"
auto_update "yes"
bind_to_address "127.0.0.1"
restore_paused "yes"
max_output_buffer_size "16384"
audio_output {
type "pulse"
name "pulse"
}
-67
View File
@@ -1,67 +0,0 @@
; Documentation: https://wiki.archlinux.org/title/ncmpcpp
; Config created by Aditya Shakya https://github.com/Alexander-Miller
; Config modified by Keyitdev https://www.github.com/keyitdev/dotfiles
; Copyright (C) 2022 Keyitdev, Aditya Shakya
### Directories ###
ncmpcpp_directory = ~/.config/ncmpcpp
lyrics_directory = ~/.config/ncmpcpp/lyrics
mpd_music_dir = ~/Music
mpd_host = "localhost"
mpd_port = "6600"
mpd_crossfade_time = "2"
### Behaviour ###
message_delay_time = 1
autocenter_mode = "yes"
centered_cursor = "yes"
ignore_leading_the = "yes"
playlist_disable_highlight_delay = 2
allow_for_physical_item_deletion = "no"
### Visualizer ###
visualizer_data_source = /tmp/mpd.fifo
visualizer_output_name = "mpd_visualizer"
visualizer_in_stereo = "yes"
visualizer_look = ●●
visualizer_type = "ellipse"
### Appearance ###
playlist_display_mode = "columns"
browser_display_mode = "columns"
colors_enabled = "yes"
#user_interface = classic
user_interface = alternative
volume_color = "white"
### Window ###
song_window_title_format = "{%a - }{%t}|{%f}"
statusbar_visibility = "no"
header_visibility = "no"
titles_visibility = "no"
### Progress bar ###
progressbar_look = "▂▂▂"
progressbar_color = "black"
progressbar_elapsed_color = "red"
### Alternative UI ###
alternative_ui_separator_color = "black"
alternative_header_first_line_format = $b$5$/b $b$8{%t}|{%f}$/b $/b
alternative_header_second_line_format = {$b{$2 %a$9}{ - $7 %b$9}}
### Song list ###
song_status_format = "$7%t"
song_list_format = "$(blue){%a}$(end) $(red){%t}$(end)$(red)({%l})$(end)
song_library_format = {{%a - %t} (%b)}|{%f}
song_columns_list_format = "(49)[white]{tr}$C(5f)[red]{l}(50)[blue]{a}"
### Colors ###
main_window_color = "white"
current_item_prefix = >>
current_item_suffix = $(end)
current_item_inactive_column_prefix = red
current_item_inactive_column_suffix = red
color1 = "white"
color2 = "red"
-865
View File
@@ -1,865 +0,0 @@
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
info title
info underline
info "OS" distro
#info "Host" model
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "WM" wm
info "WM Theme" wm_theme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" term_font
#info "CPU" cpu
#info "GPU" gpu
info "Memory" memory
# info "GPU Driver" gpu_driver # Linux/macOS only
# info "CPU Usage" cpu_usage
# info "Disk" disk
#info "Battery" battery
# info "Font" font
# info "Song" song
# [[ "$player" ]] && prin "Music Player" "$player"
# info "Local IP" local_ip
# info "Public IP" public_ip
# info "Users" users
# info "Locale" locale # This only works on glibc systems.
info cols
}
# Title
# Hide/Show Fully qualified domain name.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
# Kernel
# Shorten the output of the kernel function.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
#
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
# Distro
# Shorten the output of the distro function
#
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="off"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
#
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
# Uptime
# Shorten the output of the uptime function
#
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
#
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="on"
# Memory
# Show memory pecentage in output.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
#
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="off"
# Change memory output unit.
#
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
#
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="mib"
# Packages
# Show/Hide Package Manager names.
#
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
#
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
# Shell
# Show the path to $SHELL
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
#
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
#
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
# CPU
# CPU speed type
#
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
#
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="auto"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=":"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
# Ascii Options
# Ascii distro
# Which distro's ascii art to display.
#
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="auto"
# Ascii Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
#
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
# Image Options
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
#
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
#
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
#
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
#
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
#
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
#
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
#
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
#
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color
background_color=
# Misc Options
# Stdout mode
# Turn off all colors and disables image backend (ASCII/Image).
# Useful for piping into another command.
# Default: 'off'
# Values: 'on', 'off'
stdout="off"
-20
View File
@@ -1,20 +0,0 @@
-- Global objects
globals = {
"PACKER_BOOTSTRAP",
"astronvim",
"astronvim_installation",
"vim",
"C",
"packer_plugins",
}
-- Rerun tests only if their modification time changed
cache = true
-- Don't report unused self arguments of methods
self = false
ignore = {
"631", -- max_line_length
"212/_.*", -- unused argument, for vars with "_" prefix
}
-6
View File
@@ -1,6 +0,0 @@
column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = true
-9
View File
@@ -1,9 +0,0 @@
vim.g.colors_name = "default_theme"
package.loaded["default_theme"] = nil
package.loaded["default_theme.base"] = nil
package.loaded["default_theme.treesitter"] = nil
package.loaded["default_theme.lsp"] = nil
package.loaded["default_theme.others"] = nil
require "default_theme"
-21
View File
@@ -1,21 +0,0 @@
local impatient_ok, impatient = pcall(require, "impatient")
if impatient_ok then
impatient.enable_profile()
end
for _, source in ipairs {
"core.utils",
"core.options",
"core.plugins",
"core.autocmds",
"core.mappings",
"core.ui",
"configs.which-key-register",
} do
local status_ok, fault = pcall(require, source)
if not status_ok then
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
end
end
astronvim.conditional_func(astronvim.user_plugin_opts("polish", nil, false))
-19
View File
@@ -1,19 +0,0 @@
local status_ok, Comment = pcall(require, "Comment")
if status_ok then
local utils = require "Comment.utils"
Comment.setup(astronvim.user_plugin_opts("plugins.Comment", {
pre_hook = function(ctx)
local location = nil
if ctx.ctype == utils.ctype.block then
location = require("ts_context_commentstring.utils").get_cursor_location()
elseif ctx.cmotion == utils.cmotion.v or ctx.cmotion == utils.cmotion.V then
location = require("ts_context_commentstring.utils").get_visual_start_location()
end
return require("ts_context_commentstring.internal").calculate_commentstring {
key = ctx.ctype == utils.ctype.line and "__default" or "__multiline",
location = location,
}
end,
}))
end
-52
View File
@@ -1,52 +0,0 @@
local status_ok, aerial = pcall(require, "aerial")
if status_ok then
aerial.setup(astronvim.user_plugin_opts("plugins.aerial", {
close_behavior = "global",
backends = { "lsp", "treesitter", "markdown" },
min_width = 28,
show_guides = true,
filter_kind = false,
icons = {
Array = "",
Boolean = "",
Class = "",
Constant = "",
Constructor = "",
Key = "",
Function = "",
Method = "ƒ",
Namespace = "",
Null = "NULL",
Number = "#",
Object = "⦿",
Property = "",
TypeParameter = "𝙏",
Variable = "",
Enum = "",
Package = "",
EnumMember = "",
File = "",
Module = "",
Field = "",
Interface = "",
String = "𝓐",
Struct = "𝓢",
Event = "",
Operator = "+",
},
guides = {
mid_item = "",
last_item = "",
nested_top = "",
whitespace = " ",
},
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set("n", "{", "<cmd>AerialPrev<cr>", { buffer = bufnr, desc = "Jump backwards in Aerial" })
vim.keymap.set("n", "}", "<cmd>AerialNext<cr>", { buffer = bufnr, desc = "Jump forwards in Aerial" })
-- Jump up the tree with '[[' or ']]'
vim.keymap.set("n", "[[", "<cmd>AerialPrevUp<cr>", { buffer = bufnr, desc = "Jump up and backwards in Aerial" })
vim.keymap.set("n", "]]", "<cmd>AerialNextUp<cr>", { buffer = bufnr, desc = "Jump up and forwards in Aerial" })
end,
}))
end
-40
View File
@@ -1,40 +0,0 @@
local status_ok, alpha = pcall(require, "alpha")
if status_ok then
local alpha_button = astronvim.alpha_button
alpha.setup(astronvim.user_plugin_opts("plugins.alpha", {
layout = {
{ type = "padding", val = vim.fn.max { 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) } },
{
type = "text",
val = astronvim.user_plugin_opts("header", {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
" ████  ██ ██  ██ ██ ████  ████",
" ██ ██  ██ ██  ██ ██ ██ ████ ██",
" ██  ██ ██  ██  ██  ██ ██  ██  ██",
" ██   ████   ████   ██ ██      ██",
}, false),
opts = { position = "center", hl = "DashboardHeader" },
},
{ type = "padding", val = 5 },
{
type = "group",
val = {
alpha_button("LDR f f", " Find File "),
alpha_button("LDR f o", " Recents "),
alpha_button("LDR f w", " Find Word "),
alpha_button("LDR f n", " New File "),
alpha_button("LDR f m", " Bookmarks "),
alpha_button("LDR S l", " Last Session "),
},
opts = { spacing = 1 },
},
},
opts = {},
}))
end
-33
View File
@@ -1,33 +0,0 @@
local status_ok, npairs = pcall(require, "nvim-autopairs")
if status_ok then
npairs.setup(astronvim.user_plugin_opts("plugins.nvim-autopairs", {
check_ts = true,
ts_config = {
lua = { "string", "source" },
javascript = { "string", "template_string" },
java = false,
},
disable_filetype = { "TelescopePrompt", "spectre_panel" },
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
offset = 0,
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
}))
local rules = astronvim.user_plugin_opts("nvim-autopairs").add_rules
if vim.tbl_contains({ "function", "table" }, type(rules)) then
npairs.add_rules(type(rules) == "function" and rules(npairs) or rules)
end
local cmp_status_ok, cmp = pcall(require, "cmp")
if cmp_status_ok then
cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done { map_char = { tex = "" } })
end
end
@@ -1,4 +0,0 @@
local status_ok, better_escape = pcall(require, "better_escape")
if status_ok then
better_escape.setup(astronvim.user_plugin_opts "plugins.better_escape")
end
-19
View File
@@ -1,19 +0,0 @@
local status_ok, bufferline = pcall(require, "bufferline")
if status_ok then
bufferline.setup(astronvim.user_plugin_opts("plugins.bufferline", {
options = {
offsets = {
{ filetype = "NvimTree", text = "", padding = 1 },
{ filetype = "neo-tree", text = "", padding = 1 },
{ filetype = "Outline", text = "", padding = 1 },
},
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
max_name_length = 14,
max_prefix_length = 13,
tab_size = 20,
separator_style = "thin",
},
}))
end
-4
View File
@@ -1,4 +0,0 @@
local status_ok, cinnamon = pcall(require, "cinnamon")
if status_ok then
cinnamon.setup(astronvim.user_plugin_opts("plugins.cinnamon", {}))
end
-119
View File
@@ -1,119 +0,0 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
local snip_status_ok, luasnip = pcall(require, "luasnip")
if cmp_status_ok and snip_status_ok then
local setup = cmp.setup
local kind_icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
local function has_words_before()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil
end
setup(astronvim.user_plugin_opts("plugins.cmp", {
preselect = cmp.PreselectMode.None,
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(_, vim_item)
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
return vim_item
end,
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
duplicates = {
nvim_lsp = 1,
luasnip = 1,
cmp_tabnine = 1,
buffer = 1,
path = 1,
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
window = {
documentation = {
border = { "", "", "", "", "", "", "", "" },
},
},
mapping = {
["<Up>"] = cmp.mapping.select_prev_item(),
["<Down>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-d>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-y>"] = cmp.config.disable,
["<C-e>"] = cmp.mapping {
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
},
["<CR>"] = cmp.mapping.confirm { select = false },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
},
}))
for setup_opt, setup_table in pairs(astronvim.user_plugin_opts("cmp.setup", {})) do
for pattern, options in pairs(setup_table) do
setup[setup_opt](pattern, options)
end
end
end
-18
View File
@@ -1,18 +0,0 @@
local status_ok, colorizer = pcall(require, "colorizer")
if status_ok then
local colorizer_opts = astronvim.user_plugin_opts("plugins.colorizer", {
{ "*" },
{
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = false, -- "Name" codes like Blue
RRGGBBAA = false, -- #RRGGBBAA hex codes
rgb_fn = false, -- CSS rgb() and rgba() functions
hsl_fn = false, -- CSS hsl() and hsla() functions
css = false, -- Enable all css features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
mode = "background", -- Set the display mode
},
})
colorizer.setup(colorizer_opts[1], colorizer_opts[2])
end
-46
View File
@@ -1,46 +0,0 @@
local status_ok, feline = pcall(require, "feline")
if status_ok then
local C = require "default_theme.colors"
local hl = require("core.status").hl
local provider = require("core.status").provider
local conditional = require("core.status").conditional
-- stylua: ignore
feline.setup(astronvim.user_plugin_opts("plugins.feline", {
disable = { filetypes = { "^NvimTree$", "^neo%-tree$", "^dashboard$", "^Outline$", "^aerial$" } },
theme = hl.group("StatusLine", { fg = C.fg, bg = C.bg_1 }),
components = {
active = {
{
{ provider = provider.spacer(), hl = hl.mode() },
{ provider = provider.spacer(2) },
{ provider = "git_branch", hl = hl.fg("Conditional", { fg = C.purple_1, style = "bold" }), icon = "" },
{ provider = provider.spacer(3), enabled = conditional.git_available },
{ provider = { name = "file_type", opts = { filetype_icon = true, case = "lowercase" } }, enabled = conditional.has_filetype },
{ provider = provider.spacer(2), enabled = conditional.has_filetype },
{ provider = "git_diff_added", hl = hl.fg("GitSignsAdd", { fg = C.green }), icon = "" },
{ provider = "git_diff_changed", hl = hl.fg("GitSignsChange", { fg = C.orange_1 }), icon = "" },
{ provider = "git_diff_removed", hl = hl.fg("GitSignsDelete", { fg = C.red_1 }), icon = "" },
{ provider = provider.spacer(2), enabled = conditional.git_changed },
{ provider = "diagnostic_errors", hl = hl.fg("DiagnosticError", { fg = C.red_1 }), icon = "" },
{ provider = "diagnostic_warnings", hl = hl.fg("DiagnosticWarn", { fg = C.orange_1 }), icon = "" },
{ provider = "diagnostic_info", hl = hl.fg("DiagnosticInfo", { fg = C.white_2 }), icon = "" },
{ provider = "diagnostic_hints", hl = hl.fg("DiagnosticHint", { fg = C.yellow_1 }), icon = "" },
},
{
{ provider = provider.lsp_progress, enabled = conditional.bar_width() },
{ provider = provider.lsp_client_names(true), short_provider = provider.lsp_client_names(), enabled = conditional.bar_width(), icon = "" },
{ provider = provider.spacer(2), enabled = conditional.bar_width() },
{ provider = provider.treesitter_status, enabled = conditional.bar_width(), hl = hl.fg("GitSignsAdd", { fg = C.green }) },
{ provider = provider.spacer(2) },
{ provider = "position" },
{ provider = provider.spacer(2) },
{ provider = "line_percentage" },
{ provider = provider.spacer() },
{ provider = "scroll_bar", hl = hl.fg("TypeDef", { fg = C.yellow }) },
{ provider = provider.spacer(2) },
{ provider = provider.spacer(), hl = hl.mode() },
},
},
},
}))
end
-12
View File
@@ -1,12 +0,0 @@
local status_ok, gitsigns = pcall(require, "gitsigns")
if status_ok then
gitsigns.setup(astronvim.user_plugin_opts("plugins.gitsigns", {
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
},
}))
end
-17
View File
@@ -1,17 +0,0 @@
local status_ok, icons = pcall(require, "nvim-web-devicons")
if status_ok then
icons.set_icon(astronvim.user_plugin_opts("plugins.nvim-web-devicons", {
deb = { icon = "", name = "Deb" },
lock = { icon = "", name = "Lock" },
mp3 = { icon = "", name = "Mp3" },
mp4 = { icon = "", name = "Mp4" },
out = { icon = "", name = "Out" },
["robots.txt"] = { icon = "", name = "Robots" },
ttf = { icon = "", name = "TrueTypeFont" },
rpm = { icon = "", name = "Rpm" },
woff = { icon = "", name = "WebOpenFontFormat" },
woff2 = { icon = "", name = "WebOpenFontFormat2" },
xz = { icon = "", name = "Xz" },
zip = { icon = "", name = "Zip" },
}))
end
-50
View File
@@ -1,50 +0,0 @@
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if status_ok then
indent_blankline.setup(astronvim.user_plugin_opts("plugins.indent_blankline", {
buftype_exclude = {
"nofile",
"terminal",
"lsp-installer",
"lspinfo",
},
filetype_exclude = {
"help",
"startify",
"aerial",
"alpha",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"neo-tree",
"Trouble",
},
context_patterns = {
"class",
"return",
"function",
"method",
"^if",
"^while",
"jsx_element",
"^for",
"^object",
"^table",
"block",
"arguments",
"if_statement",
"else_clause",
"jsx_element",
"jsx_self_closing_element",
"try_statement",
"catch_clause",
"import_statement",
"operation_type",
},
show_trailing_blankline_indent = false,
use_treesitter = true,
char = "",
context_char = "",
show_current_context = true,
}))
end
@@ -1,4 +0,0 @@
local status_ok, indent_o_matic = pcall(require, "indent-o-matic")
if status_ok then
indent_o_matic.setup(astronvim.user_plugin_opts "plugins.indent-o-matic")
end
-167
View File
@@ -1,167 +0,0 @@
astronvim.lsp = {}
local user_plugin_opts = astronvim.user_plugin_opts
local conditional_func = astronvim.conditional_func
local function lsp_highlight_document(client)
if client.resolved_capabilities.document_highlight then
vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true })
vim.api.nvim_create_autocmd("CursorHold", {
group = "lsp_document_highlight",
pattern = "<buffer>",
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd("CursorMoved", {
group = "lsp_document_highlight",
pattern = "<buffer>",
callback = vim.lsp.buf.clear_references,
})
end
end
astronvim.lsp.on_attach = function(client, bufnr)
astronvim.set_mappings(
user_plugin_opts("lsp.mappings", {
n = {
["K"] = {
function()
vim.lsp.buf.hover()
end,
desc = "Hover symbol details",
buffer = bufnr,
},
["<leader>la"] = {
function()
vim.lsp.buf.code_action()
end,
desc = "LSP code action",
buffer = bufnr,
},
["<leader>lf"] = {
function()
vim.lsp.buf.formatting_sync()
end,
desc = "Format code",
buffer = bufnr,
},
["<leader>lh"] = {
function()
vim.lsp.buf.signature_help()
end,
desc = "Signature help",
buffer = bufnr,
},
["<leader>lr"] = {
function()
vim.lsp.buf.rename()
end,
desc = "Rename current symbol",
buffer = bufnr,
},
["gD"] = {
function()
vim.lsp.buf.declaration()
end,
desc = "Declaration of current symbol",
buffer = bufnr,
},
["gI"] = {
function()
vim.lsp.buf.implementation()
end,
desc = "Implementation of current symbol",
buffer = bufnr,
},
["gd"] = {
function()
vim.lsp.buf.definition()
end,
desc = "Show the definition of current symbol",
buffer = bufnr,
},
["gr"] = {
function()
vim.lsp.buf.references()
end,
desc = "References of current symbol",
buffer = bufnr,
},
["<leader>ld"] = {
function()
vim.diagnostic.open_float()
end,
desc = "Hover diagnostics",
buffer = bufnr,
},
["[d"] = {
function()
vim.diagnostic.goto_prev()
end,
desc = "Previous diagnostic",
buffer = bufnr,
},
["]d"] = {
function()
vim.diagnostic.goto_next()
end,
desc = "Next diagnostic",
buffer = bufnr,
},
["gl"] = {
function()
vim.diagnostic.open_float()
end,
desc = "Hover diagnostics",
buffer = bufnr,
},
},
}),
{ buffer = bufnr }
)
vim.api.nvim_buf_create_user_command(bufnr, "Format", function()
vim.lsp.buf.formatting()
end, { desc = "Format file with LSP" })
local on_attach_override = user_plugin_opts("lsp.on_attach", nil, false)
local aerial_avail, aerial = pcall(require, "aerial")
conditional_func(on_attach_override, true, client, bufnr)
conditional_func(aerial.on_attach, aerial_avail, client, bufnr)
lsp_highlight_document(client)
end
astronvim.lsp.capabilities = vim.lsp.protocol.make_client_capabilities()
astronvim.lsp.capabilities.textDocument.completion.completionItem.documentationFormat = { "markdown", "plaintext" }
astronvim.lsp.capabilities.textDocument.completion.completionItem.snippetSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.preselectSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.deprecatedSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
astronvim.lsp.capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
astronvim.lsp.capabilities.textDocument.completion.completionItem.resolveSupport = {
properties = { "documentation", "detail", "additionalTextEdits" },
}
function astronvim.lsp.server_settings(server_name)
local server = require("lspconfig")[server_name]
local opts = user_plugin_opts(
"lsp.server-settings." .. server_name,
user_plugin_opts("lsp.server-settings." .. server_name, {
capabilities = vim.tbl_deep_extend("force", astronvim.lsp.capabilities, server.capabilities or {}),
}, true, "configs")
)
local old_on_attach = server.on_attach
local user_on_attach = opts.on_attach
opts.on_attach = function(client, bufnr)
conditional_func(old_on_attach, true, client, bufnr)
astronvim.lsp.on_attach(client, bufnr)
conditional_func(user_on_attach, true, client, bufnr)
end
return opts
end
function astronvim.lsp.disable_formatting(client)
client.resolved_capabilities.document_formatting = false
end
return astronvim.lsp
-55
View File
@@ -1,55 +0,0 @@
local status_ok, lspconfig = pcall(require, "lspconfig")
if status_ok then
require "configs.lsp.handlers"
local insert = table.insert
local tbl_contains = vim.tbl_contains
local sign_define = vim.fn.sign_define
local user_plugin_opts = astronvim.user_plugin_opts
local user_registration = user_plugin_opts("lsp.server_registration", nil, false)
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in ipairs(signs) do
sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
vim.diagnostic.config(user_plugin_opts("diagnostics", {
virtual_text = true,
signs = { active = signs },
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
}))
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
local servers = user_plugin_opts "lsp.servers"
local skip_setup = user_plugin_opts "lsp.skip_setup"
local installer_avail, lsp_installer = pcall(require, "nvim-lsp-installer")
if installer_avail then
for _, server in ipairs(lsp_installer.get_installed_servers()) do
insert(servers, server.name)
end
end
for _, server in ipairs(servers) do
if not tbl_contains(skip_setup, server) then
local opts = astronvim.lsp.server_settings(server)
if type(user_registration) == "function" then
user_registration(server, opts)
else
lspconfig[server].setup(opts)
end
end
end
end
@@ -1 +0,0 @@
return { on_attach = astronvim.lsp.disable_formatting }
@@ -1,17 +0,0 @@
return {
on_attach = astronvim.lsp.disable_formatting,
settings = {
json = {
schemas = require("schemastore").json.schemas(),
},
},
setup = {
commands = {
Format = {
function()
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
end,
},
},
},
}
@@ -1,9 +0,0 @@
return {
settings = {
python = {
analysis = {
typeCheckingMode = "off",
},
},
},
}
@@ -1,15 +0,0 @@
return {
settings = {
["rust-analyzer"] = {
cargo = {
loadOutDirsFromCheck = true,
},
checkOnSave = {
command = "clippy",
},
experimental = {
procAttrMacros = true,
},
},
},
}
@@ -1,16 +0,0 @@
return {
on_attach = astronvim.lsp.disable_formatting,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
[astronvim.install.home .. "/lua"] = true,
},
},
},
},
}
@@ -1 +0,0 @@
return { on_attach = astronvim.lsp.disable_formatting }
-16
View File
@@ -1,16 +0,0 @@
local user_settings = astronvim.user_plugin_opts "luasnip"
local loader_avail, loader = pcall(require, "luasnip/loaders/from_vscode")
if loader_avail then
if user_settings.vscode_snippet_paths ~= nil then
loader.lazy_load { paths = user_settings.vscode_snippet_paths }
end
loader.lazy_load()
end
local luasnip_avail, luasnip = pcall(require, "luasnip")
if luasnip_avail then
if type(user_settings.filetype_extend) == "table" then
for filetype, snippets in pairs(user_settings.filetype_extend) do
luasnip.filetype_extend(filetype, snippets)
end
end
end
-70
View File
@@ -1,70 +0,0 @@
local status_ok, neotree = pcall(require, "neo-tree")
if status_ok then
neotree.setup(astronvim.user_plugin_opts("plugins.neo-tree", {
close_if_last_window = true,
popup_border_style = "rounded",
enable_diagnostics = false,
default_component_configs = {
indent = {
padding = 0,
with_expanders = false,
},
icon = {
folder_closed = "",
folder_open = "",
folder_empty = "",
default = "",
},
git_status = {
symbols = {
added = "",
deleted = "",
modified = "",
renamed = "",
untracked = "",
ignored = "",
unstaged = "",
staged = "",
conflict = "",
},
},
},
window = {
width = 25,
mappings = {
["o"] = "open",
},
},
filesystem = {
filtered_items = {
visible = false,
hide_dotfiles = true,
hide_gitignored = false,
hide_by_name = {
".DS_Store",
"thumbs.db",
"node_modules",
"__pycache__",
},
},
follow_current_file = true,
hijack_netrw_behavior = "open_current",
use_libuv_file_watcher = true,
},
git_status = {
window = {
position = "float",
},
},
event_handlers = {
{
event = "vim_buffer_enter",
handler = function(_)
if vim.bo.filetype == "neo-tree" then
vim.wo.signcolumn = "auto"
end
end,
},
},
}))
end
-6
View File
@@ -1,6 +0,0 @@
local status_ok, notify = pcall(require, "notify")
if status_ok then
notify.setup(astronvim.user_plugin_opts("plugins.notify", { stages = "fade" }))
vim.notify = notify
end
-4
View File
@@ -1,4 +0,0 @@
local status_ok, null_ls = pcall(require, "null-ls")
if status_ok then
null_ls.setup(astronvim.user_plugin_opts "plugins.null-ls")
end
@@ -1,12 +0,0 @@
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
if status_ok then
lsp_installer.setup(astronvim.user_plugin_opts("plugins.nvim-lsp-installer", {
ui = {
icons = {
server_installed = "",
server_uninstalled = "",
server_pending = "",
},
},
}))
end
@@ -1,4 +0,0 @@
local status_ok, session_manager = pcall(require, "session_manager")
if status_ok then
session_manager.setup(astronvim.user_plugin_opts("plugins.session_manager", { autosave_last_session = false }))
end
-12
View File
@@ -1,12 +0,0 @@
local status_ok, smart_splits = pcall(require, "smart-splits")
if status_ok then
smart_splits.setup(astronvim.user_plugin_opts("plugins.smart-splits", {
ignored_filetypes = {
"nofile",
"quickfix",
"qf",
"prompt",
},
ignored_buftypes = { "nofile" },
}))
end
-96
View File
@@ -1,96 +0,0 @@
local status_ok, telescope = pcall(require, "telescope")
if status_ok then
local actions = require "telescope.actions"
astronvim.conditional_func(telescope.load_extension, pcall(require, "notify"), "notify")
astronvim.conditional_func(telescope.load_extension, pcall(require, "aerial"), "aerial")
telescope.setup(astronvim.user_plugin_opts("plugins.telescope", {
defaults = {
prompt_prefix = "",
selection_caret = " ",
path_display = { "truncate" },
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8,
},
vertical = {
mirror = false,
},
width = 0.87,
height = 0.80,
preview_cutoff = 120,
},
mappings = {
i = {
["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-c>"] = actions.close,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["<C-l>"] = actions.complete_tag,
},
n = {
["<esc>"] = actions.close,
["<CR>"] = actions.select_default,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-t>"] = actions.select_tab,
["<Tab>"] = actions.toggle_selection + actions.move_selection_worse,
["<S-Tab>"] = actions.toggle_selection + actions.move_selection_better,
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["H"] = actions.move_to_top,
["M"] = actions.move_to_middle,
["L"] = actions.move_to_bottom,
["<Down>"] = actions.move_selection_next,
["<Up>"] = actions.move_selection_previous,
["gg"] = actions.move_to_top,
["G"] = actions.move_to_bottom,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
["<PageUp>"] = actions.results_scrolling_up,
["<PageDown>"] = actions.results_scrolling_down,
},
},
},
pickers = {},
extensions = {},
}))
end
-16
View File
@@ -1,16 +0,0 @@
local status_ok, toggleterm = pcall(require, "toggleterm")
if status_ok then
toggleterm.setup(astronvim.user_plugin_opts("plugins.toggleterm", {
size = 10,
open_mapping = [[<c-\>]],
shading_factor = 2,
direction = "float",
float_opts = {
border = "curved",
highlights = {
border = "Normal",
background = "Normal",
},
},
}))
end
-26
View File
@@ -1,26 +0,0 @@
local status_ok, treesitter = pcall(require, "nvim-treesitter.configs")
if status_ok then
treesitter.setup(astronvim.user_plugin_opts("plugins.treesitter", {
ensure_installed = {},
sync_install = false,
ignore_install = {},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
rainbow = {
enable = true,
disable = { "html" },
extended_mode = false,
max_file_lines = nil,
},
autopairs = { enable = true },
autotag = { enable = true },
incremental_selection = { enable = true },
indent = { enable = false },
}))
end
@@ -1,61 +0,0 @@
local status_ok, which_key = pcall(require, "which-key")
if status_ok then
local is_available = astronvim.is_available
local user_plugin_opts = astronvim.user_plugin_opts
local mappings = {
n = {
["<leader>"] = {
f = { name = "File" },
p = { name = "Packer" },
l = { name = "LSP" },
},
},
}
local extra_sections = {
g = "Git",
s = "Search",
S = "Session",
t = "Terminal",
}
local function init_table(mode, prefix, idx)
if not mappings[mode][prefix][idx] then
mappings[mode][prefix][idx] = { name = extra_sections[idx] }
end
end
if is_available "neovim-session-manager" then
init_table("n", "<leader>", "S")
end
if is_available "gitsigns.nvim" then
init_table("n", "<leader>", "g")
end
if is_available "toggleterm.nvim" then
init_table("n", "<leader>", "g")
init_table("n", "<leader>", "t")
end
if is_available "telescope.nvim" then
init_table("n", "<leader>", "s")
init_table("n", "<leader>", "g")
end
mappings = user_plugin_opts("which-key.register_mappings", mappings)
-- support previous legacy notation, deprecate at some point
mappings.n["<leader>"] = user_plugin_opts("which-key.register_n_leader", mappings.n["<leader>"])
for mode, prefixes in pairs(mappings) do
for prefix, mapping_table in pairs(prefixes) do
which_key.register(mapping_table, {
mode = mode,
prefix = prefix,
buffer = nil,
silent = true,
noremap = true,
nowait = true,
})
end
end
end
-21
View File
@@ -1,21 +0,0 @@
local status_ok, which_key = pcall(require, "which-key")
if status_ok then
local show = which_key.show
local show_override = astronvim.user_plugin_opts("which-key.show", nil, false)
which_key.show = type(show_override) == "function" and show_override(show)
or function(keys, opts)
if vim.bo.filetype ~= "TelescopePrompt" then
show(keys, opts)
end
end
which_key.setup(astronvim.user_plugin_opts("plugins.which-key", {
plugins = {
spelling = { enabled = true },
presets = { operators = false },
},
window = {
border = "rounded",
padding = { 2, 2, 2, 2 },
},
}))
end
-104
View File
@@ -1,104 +0,0 @@
local is_available = astronvim.is_available
local cmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
local create_command = vim.api.nvim_create_user_command
augroup("highlighturl", { clear = true })
cmd({ "VimEnter", "FileType", "BufEnter", "WinEnter" }, {
desc = "URL Highlighting",
group = "highlighturl",
pattern = "*",
callback = function()
astronvim.set_url_match()
end,
})
if is_available "alpha-nvim" then
augroup("alpha_settings", { clear = true })
if is_available "bufferline.nvim" then
cmd("FileType", {
desc = "Disable tabline for alpha",
group = "alpha_settings",
pattern = "alpha",
callback = function()
local prev_showtabline = vim.opt.showtabline
vim.opt.showtabline = 0
cmd("BufUnload", {
pattern = "<buffer>",
callback = function()
vim.opt.showtabline = prev_showtabline
end,
})
end,
})
end
cmd("FileType", {
desc = "Disable statusline for alpha",
group = "alpha_settings",
pattern = "alpha",
callback = function()
local prev_status = vim.opt.laststatus
vim.opt.laststatus = 0
cmd("BufUnload", {
pattern = "<buffer>",
callback = function()
vim.opt.laststatus = prev_status
end,
})
end,
})
cmd("VimEnter", {
desc = "Start Alpha when vim is opened with no arguments",
group = "alpha_settings",
callback = function()
-- optimized start check from https://github.com/goolord/alpha-nvim
local alpha_avail, alpha = pcall(require, "alpha")
if alpha_avail then
local should_skip = false
if vim.fn.argc() > 0 or vim.fn.line2byte "$" ~= -1 or not vim.o.modifiable then
should_skip = true
else
for _, arg in pairs(vim.v.argv) do
if arg == "-b" or arg == "-c" or vim.startswith(arg, "+") or arg == "-S" then
should_skip = true
break
end
end
end
if not should_skip then
alpha.start(true)
end
end
end,
})
end
if is_available "neo-tree.nvim" then
augroup("neotree_start", { clear = true })
cmd("BufEnter", {
desc = "Open Neo-Tree on startup with directory",
group = "neotree_start",
callback = function()
local stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(0))
if stats and stats.type == "directory" then
require("neo-tree.setup.netrw").hijack()
end
end,
})
end
if is_available "feline.nvim" then
augroup("feline_setup", { clear = true })
cmd("ColorScheme", {
desc = "Reload feline on colorscheme change",
group = "feline_setup",
callback = function()
package.loaded["configs.feline"] = nil
require "configs.feline"
end,
})
end
create_command("AstroUpdate", astronvim.updater.update, { desc = "Update AstroNvim" })
create_command("AstroVersion", astronvim.updater.version, { desc = "Check AstroNvim Version" })
create_command("ToggleHighlightURL", astronvim.toggle_url_match, { desc = "Toggle URL Highlights" })
-420
View File
@@ -1,420 +0,0 @@
local is_available = astronvim.is_available
local maps = { n = {}, v = {}, t = {}, [""] = {} }
maps[""]["<Space>"] = "<Nop>"
-- Normal --
-- Standard Operations
maps.n["<leader>w"] = { "<cmd>w<cr>", desc = "Save" }
maps.n["<leader>q"] = { "<cmd>q<cr>", desc = "Quit" }
maps.n["<leader>h"] = { "<cmd>nohlsearch<cr>", desc = "No Highlight" }
maps.n["<leader>u"] = {
function()
astronvim.toggle_url_match()
end,
desc = "Toggle URL Highlights",
}
maps.n["<leader>fn"] = { "<cmd>enew<cr>", desc = "New File" }
maps.n["gx"] = {
function()
astronvim.url_opener()
end,
desc = "Open the file under cursor with system app",
}
maps.n["<C-s>"] = { "<cmd>w!<cr>", desc = "Force write" }
maps.n["<C-q>"] = { "<cmd>q!<cr>", desc = "Force quit" }
maps.n["Q"] = "<Nop>"
-- Packer
maps.n["<leader>pc"] = { "<cmd>PackerCompile<cr>", desc = "Packer Compile" }
maps.n["<leader>pi"] = { "<cmd>PackerInstall<cr>", desc = "Packer Install" }
maps.n["<leader>ps"] = { "<cmd>PackerSync<cr>", desc = "Packer Sync" }
maps.n["<leader>pS"] = { "<cmd>PackerStatus<cr>", desc = "Packer Status" }
maps.n["<leader>pu"] = { "<cmd>PackerUpdate<cr>", desc = "Packer Update" }
-- Alpha
if is_available "alpha-nvim" then
maps.n["<leader>d"] = { "<cmd>Alpha<cr>", desc = "Alpha Dashboard" }
end
-- Bufdelete
if is_available "bufdelete.nvim" then
maps.n["<leader>c"] = { "<cmd>Bdelete<cr>", desc = "Close buffer" }
else
maps.n["<leader>c"] = { "<cmd>bdelete<cr>", desc = "Close buffer" }
end
-- Navigate buffers
if is_available "bufferline.nvim" then
maps.n["<S-l>"] = { "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer tab" }
maps.n["<S-h>"] = { "<cmd>BufferLineCyclePrev<cr>", desc = "Previous buffer tab" }
maps.n[">b"] = { "<cmd>BufferLineMoveNext<cr>", desc = "Move buffer tab right" }
maps.n["<b"] = { "<cmd>BufferLineMovePrev<cr>", desc = "Move buffer tab left" }
else
maps.n["<S-l>"] = { "<cmd>bnext<cr>", desc = "Next buffer" }
maps.n["<S-h>"] = { "<cmd>bprevious<cr>", desc = "Previous buffer" }
end
-- Comment
if is_available "Comment.nvim" then
maps.n["<leader>/"] = {
function()
require("Comment.api").toggle_current_linewise()
end,
desc = "Comment line",
}
maps.v["<leader>/"] = {
"<esc><cmd>lua require('Comment.api').toggle_linewise_op(vim.fn.visualmode())<cr>",
desc = "Toggle comment line",
}
end
-- GitSigns
if is_available "gitsigns.nvim" then
maps.n["<leader>gj"] = {
function()
require("gitsigns").next_hunk()
end,
desc = "Next git hunk",
}
maps.n["<leader>gk"] = {
function()
require("gitsigns").prev_hunk()
end,
desc = "Previous git hunk",
}
maps.n["<leader>gl"] = {
function()
require("gitsigns").blame_line()
end,
desc = "View git blame",
}
maps.n["<leader>gp"] = {
function()
require("gitsigns").preview_hunk()
end,
desc = "Preview git hunk",
}
maps.n["<leader>gh"] = {
function()
require("gitsigns").reset_hunk()
end,
desc = "Reset git hunk",
}
maps.n["<leader>gr"] = {
function()
require("gitsigns").reset_buffer()
end,
desc = "Reset git buffer",
}
maps.n["<leader>gs"] = {
function()
require("gitsigns").stage_hunk()
end,
desc = "Stage git hunk",
}
maps.n["<leader>gu"] = {
function()
require("gitsigns").undo_stage_hunk()
end,
desc = "Unstage git hunk",
}
maps.n["<leader>gd"] = {
function()
require("gitsigns").diffthis()
end,
desc = "View git diff",
}
end
-- NeoTree
if is_available "neo-tree.nvim" then
maps.n["<leader>e"] = { "<cmd>Neotree toggle<cr>", desc = "Toggle Explorer" }
maps.n["<leader>o"] = { "<cmd>Neotree focus<cr>", desc = "Focus Explorer" }
end
-- Session Manager
if is_available "neovim-session-manager" then
maps.n["<leader>Sl"] = { "<cmd>SessionManager! load_last_session<cr>", desc = "Load last session" }
maps.n["<leader>Ss"] = { "<cmd>SessionManager! save_current_session<cr>", desc = "Save this session" }
maps.n["<leader>Sd"] = { "<cmd>SessionManager! delete_session<cr>", desc = "Delete session" }
maps.n["<leader>Sf"] = { "<cmd>SessionManager! load_session<cr>", desc = "Search sessions" }
maps.n["<leader>S."] = {
"<cmd>SessionManager! load_current_dir_session<cr>",
desc = "Load current directory session",
}
end
-- LSP Installer
if is_available "nvim-lsp-installer" then
maps.n["<leader>li"] = { "<cmd>LspInfo<cr>", desc = "LSP information" }
maps.n["<leader>lI"] = { "<cmd>LspInstallInfo<cr>", desc = "LSP installer" }
end
-- Smart Splits
if is_available "smart-splits.nvim" then
-- Better window navigation
maps.n["<C-h>"] = {
function()
require("smart-splits").move_cursor_left()
end,
desc = "Move to left split",
}
maps.n["<C-j>"] = {
function()
require("smart-splits").move_cursor_down()
end,
desc = "Move to below split",
}
maps.n["<C-k>"] = {
function()
require("smart-splits").move_cursor_up()
end,
desc = "Move to above split",
}
maps.n["<C-l>"] = {
function()
require("smart-splits").move_cursor_right()
end,
desc = "Move to right split",
}
-- Resize with arrows
maps.n["<C-Up>"] = {
function()
require("smart-splits").resize_up()
end,
desc = "Resize split up",
}
maps.n["<C-Down>"] = {
function()
require("smart-splits").resize_down()
end,
desc = "Resize split down",
}
maps.n["<C-Left>"] = {
function()
require("smart-splits").resize_left()
end,
desc = "Resize split left",
}
maps.n["<C-Right>"] = {
function()
require("smart-splits").resize_right()
end,
desc = "Resize split right",
}
else
maps.n["<C-h>"] = { "<C-w>h", desc = "Move to left split" }
maps.n["<C-j>"] = { "<C-w>j", desc = "Move to below split" }
maps.n["<C-k>"] = { "<C-w>k", desc = "Move to above split" }
maps.n["<C-l>"] = { "<C-w>l", desc = "Move to right split" }
maps.n["<C-Up>"] = { "<cmd>resize -2<CR>", desc = "Resize split up" }
maps.n["<C-Down>"] = { "<cmd>resize +2<CR>", desc = "Resize split down" }
maps.n["<C-Left>"] = { "<cmd>vertical resize -2<CR>", desc = "Resize split left" }
maps.n["<C-Right>"] = { "<cmd>vertical resize +2<CR>", desc = "Resize split right" }
end
-- SymbolsOutline
if is_available "aerial.nvim" then
maps.n["<leader>lS"] = { "<cmd>AerialToggle<cr>", desc = "Symbols outline" }
end
-- Telescope
if is_available "telescope.nvim" then
maps.n["<leader>fw"] = {
function()
require("telescope.builtin").live_grep()
end,
desc = "Search words",
}
maps.n["<leader>fW"] = {
function()
require("telescope.builtin").live_grep {
additional_args = function(args)
return vim.list_extend(args, { "--hidden", "--no-ignore" })
end,
}
end,
desc = "Search words in all files",
}
maps.n["<leader>gt"] = {
function()
require("telescope.builtin").git_status()
end,
desc = "Git status",
}
maps.n["<leader>gb"] = {
function()
require("telescope.builtin").git_branches()
end,
desc = "Git branches",
}
maps.n["<leader>gc"] = {
function()
require("telescope.builtin").git_commits()
end,
desc = "Git commits",
}
maps.n["<leader>ff"] = {
function()
require("telescope.builtin").find_files()
end,
desc = "Search files",
}
maps.n["<leader>fF"] = {
function()
require("telescope.builtin").find_files { hidden = true, no_ignore = true }
end,
desc = "Search all files",
}
maps.n["<leader>fb"] = {
function()
require("telescope.builtin").buffers()
end,
desc = "Search buffers",
}
maps.n["<leader>fh"] = {
function()
require("telescope.builtin").help_tags()
end,
desc = "Search help",
}
maps.n["<leader>fm"] = {
function()
require("telescope.builtin").marks()
end,
desc = "Search marks",
}
maps.n["<leader>fo"] = {
function()
require("telescope.builtin").oldfiles()
end,
desc = "Search history",
}
maps.n["<leader>sb"] = {
function()
require("telescope.builtin").git_branches()
end,
desc = "Git branches",
}
maps.n["<leader>sh"] = {
function()
require("telescope.builtin").help_tags()
end,
desc = "Search help",
}
maps.n["<leader>sm"] = {
function()
require("telescope.builtin").man_pages()
end,
desc = "Search man",
}
maps.n["<leader>sn"] = {
function()
require("telescope").extensions.notify.notify()
end,
desc = "Search notifications",
}
maps.n["<leader>sr"] = {
function()
require("telescope.builtin").registers()
end,
desc = "Search registers",
}
maps.n["<leader>sk"] = {
function()
require("telescope.builtin").keymaps()
end,
desc = "Search keymaps",
}
maps.n["<leader>sc"] = {
function()
require("telescope.builtin").commands()
end,
desc = "Search commands",
}
maps.n["<leader>ls"] = {
function()
local aerial_avail, _ = pcall(require, "aerial")
if aerial_avail then
require("telescope").extensions.aerial.aerial()
else
require("telescope.builtin").lsp_document_symbols()
end
end,
desc = "Search symbols",
}
maps.n["<leader>lR"] = {
function()
require("telescope.builtin").lsp_references()
end,
desc = "Search references",
}
maps.n["<leader>lD"] = {
function()
require("telescope.builtin").diagnostics()
end,
desc = "Search diagnostics",
}
end
-- Terminal
if is_available "toggleterm.nvim" then
local toggle_term_cmd = astronvim.toggle_term_cmd
maps.n["<C-\\>"] = { "<cmd>ToggleTerm<cr>", desc = "Toggle terminal" }
maps.n["<leader>gg"] = {
function()
toggle_term_cmd "lazygit"
end,
desc = "ToggleTerm lazygit",
}
maps.n["<leader>tn"] = {
function()
toggle_term_cmd "node"
end,
desc = "ToggleTerm node",
}
maps.n["<leader>tu"] = {
function()
toggle_term_cmd "ncdu"
end,
desc = "ToggleTerm NCDU",
}
maps.n["<leader>tt"] = {
function()
toggle_term_cmd "htop"
end,
desc = "ToggleTerm htop",
}
maps.n["<leader>tp"] = {
function()
toggle_term_cmd "python"
end,
desc = "ToggleTerm python",
}
maps.n["<leader>tl"] = {
function()
toggle_term_cmd "lazygit"
end,
desc = "ToggleTerm lazygit",
}
maps.n["<leader>tf"] = { "<cmd>ToggleTerm direction=float<cr>", desc = "ToggleTerm float" }
maps.n["<leader>th"] = { "<cmd>ToggleTerm size=10 direction=horizontal<cr>", desc = "ToggleTerm horizontal split" }
maps.n["<leader>tv"] = { "<cmd>ToggleTerm size=80 direction=vertical<cr>", desc = "ToggleTerm vertical split" }
end
-- Stay in indent mode
maps.v["<"] = { "<gv", desc = "unindent line" }
maps.v[">"] = { ">gv", desc = "indent line" }
-- Improved Terminal Mappings
maps.t["<esc>"] = { "<C-\\><C-n>", desc = "Terminal normal mode" }
maps.t["jk"] = { "<C-\\><C-n>", desc = "Terminal normal mode" }
maps.t["<C-h>"] = { "<c-\\><c-n><c-w>h", desc = "Terminal left window navigation" }
maps.t["<C-j>"] = { "<c-\\><c-n><c-w>j", desc = "Terminal down window navigation" }
maps.t["<C-k>"] = { "<c-\\><c-n><c-w>k", desc = "Terminal up window navigation" }
maps.t["<C-l>"] = { "<c-\\><c-n><c-w>l", desc = "Terminal right window naviation" }
astronvim.set_mappings(astronvim.user_plugin_opts("mappings", maps))
-67
View File
@@ -1,67 +0,0 @@
astronvim.vim_opts(astronvim.user_plugin_opts("options", {
opt = {
backspace = vim.opt.backspace + { "nostop" }, -- Don't stop backspace at insert
clipboard = "unnamedplus", -- Connection to the system clipboard
completeopt = { "menuone", "noselect" }, -- Options for insert mode completion
copyindent = true, -- Copy the previous indentation on autoindenting
cursorline = true, -- Highlight the text line of the cursor
expandtab = true, -- Enable the use of space in tab
fileencoding = "utf-8", -- File content encoding for the buffer
fillchars = { eob = " " }, -- Disable `~` on nonexistent lines
history = 100, -- Number of commands to remember in a history table
ignorecase = true, -- Case insensitive searching
laststatus = 3, -- globalstatus
lazyredraw = true, -- lazily redraw screen
mouse = "a", -- Enable mouse support
number = true, -- Show numberline
preserveindent = true, -- Preserve indent structure as much as possible
pumheight = 10, -- Height of the pop up menu
relativenumber = true, -- Show relative numberline
scrolloff = 8, -- Number of lines to keep above and below the cursor
shiftwidth = 2, -- Number of space inserted for indentation
showmode = false, -- Disable showing modes in command line
sidescrolloff = 8, -- Number of columns to keep at the sides of the cursor
signcolumn = "yes", -- Always show the sign column
smartcase = true, -- Case sensitivie searching
splitbelow = true, -- Splitting a new window below the current one
splitright = true, -- Splitting a new window at the right of the current one
swapfile = false, -- Disable use of swapfile for the buffer
tabstop = 2, -- Number of space in a tab
termguicolors = true, -- Enable 24-bit RGB color in the TUI
timeoutlen = 300, -- Length of time to wait for a mapped sequence
undofile = true, -- Enable persistent undo
updatetime = 300, -- Length of time to wait before triggering the plugin
wrap = false, -- Disable wrapping of lines longer than the width of window
writebackup = false, -- Disable making a backup before overwriting a file
},
g = {
do_filetype_lua = 1, -- use filetype.lua
did_load_filetypes = 0, -- don't use filetype.vim
highlighturl_enabled = true, -- highlight URLs by default
mapleader = " ", -- set leader key
zipPlugin = false, -- disable zip
load_black = false, -- disable black
loaded_2html_plugin = true, -- disable 2html
loaded_getscript = true, -- disable getscript
loaded_getscriptPlugin = true, -- disable getscript
loaded_gzip = true, -- disable gzip
loaded_logipat = true, -- disable logipat
loaded_matchit = true, -- disable matchit
loaded_netrwFileHandlers = true, -- disable netrw
loaded_netrwPlugin = true, -- disable netrw
loaded_netrwSettngs = true, -- disable netrw
loaded_remote_plugins = true, -- disable remote plugins
loaded_tar = true, -- disable tar
loaded_tarPlugin = true, -- disable tar
loaded_zip = true, -- disable zip
loaded_zipPlugin = true, -- disable zip
loaded_vimball = true, -- disable vimball
loaded_vimballPlugin = true, -- disable vimball
},
}))
local colorscheme = astronvim.user_plugin_opts("colorscheme", nil, false)
vim.api.nvim_command(
"colorscheme "
.. (vim.tbl_contains(vim.fn.getcompletion("", "color"), colorscheme) and colorscheme or "default_theme")
)
-354
View File
@@ -1,354 +0,0 @@
local astro_plugins = {
-- Plugin manager
["wbthomason/packer.nvim"] = {},
-- Optimiser
["lewis6991/impatient.nvim"] = {},
-- Lua functions
["nvim-lua/plenary.nvim"] = { module = "plenary" },
-- Popup API
["nvim-lua/popup.nvim"] = {},
-- Indent detection
["Darazaki/indent-o-matic"] = {
event = "BufReadPost",
config = function()
require "configs.indent-o-matic"
end,
},
-- Notification Enhancer
["rcarriga/nvim-notify"] = {
event = "VimEnter",
config = function()
require "configs.notify"
end,
},
-- Neovim UI Enhancer
["MunifTanjim/nui.nvim"] = { module = "nui" },
-- Cursorhold fix
["antoinemadec/FixCursorHold.nvim"] = {
event = { "BufRead", "BufNewFile" },
config = function()
vim.g.cursorhold_updatetime = 100
end,
},
-- Smarter Splits
["mrjones2014/smart-splits.nvim"] = {
module = "smart-splits",
config = function()
require "configs.smart-splits"
end,
},
-- Icons
["kyazdani42/nvim-web-devicons"] = {
event = "VimEnter",
config = function()
require "configs.icons"
end,
},
-- Bufferline
["akinsho/bufferline.nvim"] = {
after = "nvim-web-devicons",
config = function()
require "configs.bufferline"
end,
},
-- Better buffer closing
["famiu/bufdelete.nvim"] = { cmd = { "Bdelete", "Bwipeout" } },
-- File explorer
["nvim-neo-tree/neo-tree.nvim"] = {
branch = "v2.x",
module = "neo-tree",
cmd = "Neotree",
requires = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
setup = function()
vim.g.neo_tree_remove_legacy_commands = true
end,
config = function()
require "configs.neo-tree"
end,
},
-- Statusline
["feline-nvim/feline.nvim"] = {
after = "nvim-web-devicons",
config = function()
require "configs.feline"
end,
},
-- Parenthesis highlighting
["p00f/nvim-ts-rainbow"] = { after = "nvim-treesitter" },
-- Autoclose tags
["windwp/nvim-ts-autotag"] = { after = "nvim-treesitter" },
-- Context based commenting
["JoosepAlviste/nvim-ts-context-commentstring"] = { after = "nvim-treesitter" },
-- Syntax highlighting
["nvim-treesitter/nvim-treesitter"] = {
run = ":TSUpdate",
event = { "BufRead", "BufNewFile" },
cmd = {
"TSInstall",
"TSInstallInfo",
"TSInstallSync",
"TSUninstall",
"TSUpdate",
"TSUpdateSync",
"TSDisableAll",
"TSEnableAll",
},
config = function()
require "configs.treesitter"
end,
},
-- Snippet collection
["rafamadriz/friendly-snippets"] = { opt = true },
-- Snippet engine
["L3MON4D3/LuaSnip"] = {
module = "luasnip",
wants = "friendly-snippets",
config = function()
require "configs.luasnip"
end,
},
-- Completion engine
["hrsh7th/nvim-cmp"] = {
event = "InsertEnter",
config = function()
require "configs.cmp"
end,
},
-- Snippet completion source
["saadparwaiz1/cmp_luasnip"] = {
after = "nvim-cmp",
config = function()
astronvim.add_user_cmp_source "luasnip"
end,
},
-- Buffer completion source
["hrsh7th/cmp-buffer"] = {
after = "nvim-cmp",
config = function()
astronvim.add_user_cmp_source "buffer"
end,
},
-- Path completion source
["hrsh7th/cmp-path"] = {
after = "nvim-cmp",
config = function()
astronvim.add_user_cmp_source "path"
end,
},
-- LSP completion source
["hrsh7th/cmp-nvim-lsp"] = {
after = "nvim-cmp",
config = function()
astronvim.add_user_cmp_source "nvim_lsp"
end,
},
-- Built-in LSP
["neovim/nvim-lspconfig"] = { event = "VimEnter" },
-- LSP manager
["williamboman/nvim-lsp-installer"] = {
after = "nvim-lspconfig",
config = function()
require "configs.nvim-lsp-installer"
require "configs.lsp"
end,
},
-- LSP symbols
["stevearc/aerial.nvim"] = {
module = "aerial",
cmd = { "AerialToggle", "AerialOpen", "AerialInfo" },
config = function()
require "configs.aerial"
end,
},
-- Formatting and linting
["jose-elias-alvarez/null-ls.nvim"] = {
event = { "BufRead", "BufNewFile" },
config = function()
require "configs.null-ls"
end,
},
-- Fuzzy finder
["nvim-telescope/telescope.nvim"] = {
cmd = "Telescope",
module = "telescope",
config = function()
require "configs.telescope"
end,
},
-- Fuzzy finder syntax support
[("nvim-telescope/telescope-%s-native.nvim"):format(vim.fn.has "win32" == 1 and "fzy" or "fzf")] = {
after = "telescope.nvim",
run = vim.fn.has "win32" ~= 1 and "make" or nil,
config = function()
require("telescope").load_extension(vim.fn.has "win32" == 1 and "fzy_native" or "fzf")
end,
},
-- Git integration
["lewis6991/gitsigns.nvim"] = {
event = "BufEnter",
config = function()
require "configs.gitsigns"
end,
},
-- Start screen
["goolord/alpha-nvim"] = {
cmd = "Alpha",
module = "alpha",
config = function()
require "configs.alpha"
end,
},
-- Color highlighting
["norcalli/nvim-colorizer.lua"] = {
event = { "BufRead", "BufNewFile" },
config = function()
require "configs.colorizer"
end,
},
-- Autopairs
["windwp/nvim-autopairs"] = {
event = "InsertEnter",
config = function()
require "configs.autopairs"
end,
},
-- Terminal
["akinsho/toggleterm.nvim"] = {
cmd = "ToggleTerm",
module = { "toggleterm", "toggleterm.terminal" },
config = function()
require "configs.toggleterm"
end,
},
-- Commenting
["numToStr/Comment.nvim"] = {
module = { "Comment", "Comment.api" },
keys = { "gc", "gb", "g<", "g>" },
config = function()
require "configs.Comment"
end,
},
-- Indentation
["lukas-reineke/indent-blankline.nvim"] = {
event = "BufRead",
config = function()
require "configs.indent-line"
end,
},
-- Keymaps popup
["folke/which-key.nvim"] = {
module = "which-key",
config = function()
require "configs.which-key"
end,
},
-- Smooth scrolling
["declancm/cinnamon.nvim"] = {
event = { "BufRead", "BufNewFile" },
config = function()
require "configs.cinnamon"
end,
},
-- Smooth escaping
["max397574/better-escape.nvim"] = {
event = "InsertCharPre",
config = function()
require "configs.better_escape"
end,
},
-- Get extra JSON schemas
["b0o/SchemaStore.nvim"] = { module = "schemastore" },
-- Session manager
["Shatur/neovim-session-manager"] = {
module = "session_manager",
cmd = "SessionManager",
event = "BufWritePost",
config = function()
require "configs.session_manager"
end,
},
}
if astronvim.updater.snapshot then
for plugin, options in pairs(astro_plugins) do
local pin = astronvim.updater.snapshot[plugin:match "/([^/]*)$"]
options.commit = pin and pin.commit or options.commit
end
end
local user_plugin_opts = astronvim.user_plugin_opts
local packer = astronvim.initialize_packer()
packer.startup {
function(use)
for key, plugin in pairs(user_plugin_opts("plugins.init", astro_plugins)) do
if type(key) == "string" and not plugin[1] then
plugin[1] = key
end
use(plugin)
end
end,
config = user_plugin_opts("plugins.packer", {
compile_path = astronvim.default_compile_path,
display = {
open_fn = function()
return require("packer.util").float { border = "rounded" }
end,
},
profile = {
enable = true,
threshold = 0.0001,
},
git = {
clone_timeout = 300,
subcommands = {
update = "pull --rebase",
},
},
auto_clean = true,
compile_on_sync = true,
}),
}
astronvim.compiled()
-122
View File
@@ -1,122 +0,0 @@
local M = { hl = {}, provider = {}, conditional = {} }
local C = require "default_theme.colors"
local function hl_by_name(name)
return string.format("#%06x", vim.api.nvim_get_hl_by_name(name.group, true)[name.prop])
end
local function hl_prop(group, prop)
local status_ok, color = pcall(hl_by_name, { group = group, prop = prop })
return status_ok and color or nil
end
M.modes = {
["n"] = { "NORMAL", "Normal", C.blue },
["no"] = { "N-PENDING", "Normal", C.blue },
["i"] = { "INSERT", "Insert", C.green },
["ic"] = { "INSERT", "Insert", C.green },
["t"] = { "TERMINAL", "Insert", C.green },
["v"] = { "VISUAL", "Visual", C.purple },
["V"] = { "V-LINE", "Visual", C.purple },
[""] = { "V-BLOCK", "Visual", C.purple },
["R"] = { "REPLACE", "Replace", C.red_1 },
["Rv"] = { "V-REPLACE", "Replace", C.red_1 },
["s"] = { "SELECT", "Visual", C.orange_1 },
["S"] = { "S-LINE", "Visual", C.orange_1 },
[""] = { "S-BLOCK", "Visual", C.orange_1 },
["c"] = { "COMMAND", "Command", C.yellow_1 },
["cv"] = { "COMMAND", "Command", C.yellow_1 },
["ce"] = { "COMMAND", "Command", C.yellow_1 },
["r"] = { "PROMPT", "Inactive", C.grey_7 },
["rm"] = { "MORE", "Inactive", C.grey_7 },
["r?"] = { "CONFIRM", "Inactive", C.grey_7 },
["!"] = { "SHELL", "Inactive", C.grey_7 },
}
function M.hl.group(hlgroup, base)
return vim.tbl_deep_extend(
"force",
base or {},
{ fg = hl_prop(hlgroup, "foreground"), bg = hl_prop(hlgroup, "background") }
)
end
function M.hl.fg(hlgroup, base)
return vim.tbl_deep_extend("force", base or {}, { fg = hl_prop(hlgroup, "foreground") })
end
function M.hl.mode(base)
local lualine_avail, lualine = pcall(require, "lualine.themes." .. (vim.g.colors_name or "default_theme"))
return function()
local lualine_opts = lualine_avail and lualine[M.modes[vim.fn.mode()][2]:lower()]
return M.hl.group(
"Feline" .. M.modes[vim.fn.mode()][2],
vim.tbl_deep_extend(
"force",
lualine_opts and type(lualine_opts.a) == "table" and lualine_opts.a
or { fg = C.bg_1, bg = M.modes[vim.fn.mode()][3] },
base or {}
)
)
end
end
function M.provider.lsp_progress()
local Lsp = vim.lsp.util.get_progress_messages()[1]
return Lsp
and string.format(
" %%<%s %s %s (%s%%%%) ",
((Lsp.percentage or 0) >= 70 and { "", "", "" } or { "", "", "" })[math.floor(
vim.loop.hrtime() / 12e7
) % 3 + 1],
Lsp.title or "",
Lsp.message or "",
Lsp.percentage or 0
)
or ""
end
function M.provider.lsp_client_names(expand_null_ls)
return function()
local buf_client_names = {}
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
if client.name == "null-ls" and expand_null_ls then
vim.list_extend(buf_client_names, astronvim.null_ls_sources(vim.bo.filetype, "FORMATTING"))
vim.list_extend(buf_client_names, astronvim.null_ls_sources(vim.bo.filetype, "DIAGNOSTICS"))
else
table.insert(buf_client_names, client.name)
end
end
return table.concat(buf_client_names, ", ")
end
end
function M.provider.treesitter_status()
local ts = vim.treesitter.highlighter.active[vim.api.nvim_get_current_buf()]
return (ts and next(ts)) and " 綠TS" or ""
end
function M.provider.spacer(n)
return string.rep(" ", n or 1)
end
function M.conditional.git_available()
return vim.b.gitsigns_head ~= nil
end
function M.conditional.git_changed()
local git_status = vim.b.gitsigns_status_dict
return git_status and (git_status.added or 0) + (git_status.removed or 0) + (git_status.changed or 0) > 0
end
function M.conditional.has_filetype()
return vim.fn.empty(vim.fn.expand "%:t") ~= 1 and vim.bo.filetype and vim.bo.filetype ~= ""
end
function M.conditional.bar_width(n)
return function()
return (vim.opt.laststatus:get() == 3 and vim.opt.columns:get() or vim.fn.winwidth(0)) > (n or 80)
end
end
return M
-143
View File
@@ -1,143 +0,0 @@
local ui = {}
function ui.nui_input()
-- Set up NUI for UI Input
-- From: https://github.com/MunifTanjim/nui.nvim/wiki/vim.ui#vimuiinput
local input_ui
vim.ui.input = function(opts, on_confirm)
local Input = require "nui.input"
local event = require("nui.utils.autocmd").event
if input_ui then
-- ensure single ui.input operation
vim.api.nvim_err_writeln "busy: another input is pending!"
return
end
local function on_done(value)
if input_ui then
-- if it's still mounted, unmount it
input_ui:unmount()
end
-- pass the input value
on_confirm(value)
-- indicate the operation is done
input_ui = nil
end
local border_top_text = opts.prompt or "[Input]"
local default_value = opts.default
input_ui = Input({
relative = "cursor",
position = {
row = 1,
col = 0,
},
size = {
-- minimum width 20
width = math.max(20, type(default_value) == "string" and #default_value or 0),
},
border = {
style = "rounded",
highlight = "Normal",
text = {
top = border_top_text,
top_align = "left",
},
},
win_options = {
winhighlight = "Normal:Normal",
},
}, {
default_value = default_value,
on_close = function()
on_done(nil)
end,
on_submit = function(value)
on_done(value)
end,
})
input_ui:mount()
-- cancel operation if cursor leaves input
input_ui:on(event.BufLeave, function()
on_done(nil)
end, { once = true })
-- cancel operation if <Esc> is pressed
input_ui:map("n", "<Esc>", function()
on_done(nil)
end, { noremap = true, nowait = true })
end
end
function ui.telescope_select()
-- Telescope UI selection
-- From: https://github.com/stevearc/dressing.nvim/blob/master/lua/dressing/select/telescope.lua
vim.ui.select = vim.schedule_wrap(function(items, opts, on_choice)
local themes = require "telescope.themes"
local actions = require "telescope.actions"
local state = require "telescope.actions.state"
local pickers = require "telescope.pickers"
local finders = require "telescope.finders"
local conf = require("telescope.config").values
if opts.format_item then
local format_item = opts.format_item
opts.format_item = function(item)
return tostring(format_item(item))
end
else
opts.format_item = tostring
end
local entry_maker = function(item)
local formatted = opts.format_item(item)
return {
display = formatted,
ordinal = formatted,
value = item,
}
end
local picker_opts = themes.get_dropdown()
pickers.new(picker_opts, {
prompt_title = opts.prompt,
previewer = false,
finder = finders.new_table {
results = items,
entry_maker = entry_maker,
},
sorter = conf.generic_sorter(opts),
attach_mappings = function(prompt_bufnr)
actions.select_default:replace(function()
local selection = state.get_selected_entry()
actions.close(prompt_bufnr)
if not selection then
-- User did not select anything.
on_choice(nil, nil)
return
end
local idx = nil
for i, item in ipairs(items) do
if item == selection.value then
idx = i
break
end
end
on_choice(selection.value, idx)
end)
actions.close:enhance { post = function() end }
return true
end,
}):find()
end)
end
for ui_addition, enabled in pairs(astronvim.user_plugin_opts("ui", { nui_input = true, telescope_select = true })) do
astronvim.conditional_func(ui[ui_addition], enabled)
end
-101
View File
@@ -1,101 +0,0 @@
local git = { url = "https://github.com/" }
function git.cmd(args, ...)
return astronvim.cmd("git -C " .. astronvim.install.home .. " " .. args, ...)
end
function git.is_repo()
return git.cmd("rev-parse --is-inside-work-tree", false)
end
function git.fetch(remote, ...)
return git.cmd("fetch " .. remote, ...)
end
function git.pull(...)
return git.cmd("pull --rebase", ...)
end
function git.checkout(dest, ...)
return git.cmd("checkout " .. dest, ...)
end
function git.hard_reset(dest, ...)
return git.cmd("reset --hard " .. dest, ...)
end
function git.branch_contains(remote, branch, commit, ...)
return git.cmd("merge-base --is-ancestor " .. commit .. " " .. remote .. "/" .. branch, ...) ~= nil
end
function git.remote_add(remote, url, ...)
return git.cmd("remote add " .. remote .. " " .. url, ...)
end
function git.remote_update(remote, url, ...)
return git.cmd("remote set-url " .. remote .. " " .. url, ...)
end
function git.remote_url(remote, ...)
return astronvim.trim_or_nil(git.cmd("remote get-url " .. remote, ...))
end
function git.current_version(...)
return astronvim.trim_or_nil(git.cmd("describe --tags", ...))
end
function git.current_branch(...)
return astronvim.trim_or_nil(git.cmd("rev-parse --abbrev-ref HEAD", ...))
end
function git.local_head(...)
return astronvim.trim_or_nil(git.cmd("rev-parse HEAD", ...))
end
function git.remote_head(remote, branch, ...)
return astronvim.trim_or_nil(git.cmd("rev-list -n 1 " .. remote .. "/" .. branch, ...))
end
function git.tag_commit(tag, ...)
return astronvim.trim_or_nil(git.cmd("rev-list -n 1 " .. tag, ...))
end
function git.get_commit_range(start_hash, end_hash, ...)
local log = git.cmd("log --no-merges --pretty='format:[%h] %s' " .. start_hash .. ".." .. end_hash, ...)
return log and vim.fn.split(log, "\n") or {}
end
function git.get_versions(search, ...)
local tags = git.cmd("tag -l --sort=version:refname '" .. (search == "latest" and "v*" or search) .. "'", ...)
return tags and vim.fn.split(tags, "\n") or {}
end
function git.latest_version(versions, ...)
versions = versions and versions or git.get_versions(...)
return versions[#versions]
end
function git.parse_remote_url(str)
return vim.fn.match(str, astronvim.url_matcher) == -1
and git.url .. str .. (vim.fn.match(str, "/") == -1 and "/AstroNvim.git" or ".git")
or str
end
function git.breaking_changes(commits)
return vim.tbl_filter(function(v)
return vim.fn.match(v, "\\[.*\\]\\s\\+\\w\\+\\((\\w\\+)\\)\\?!:") ~= -1
end, commits)
end
function git.pretty_changelog(commits)
local changelog = {}
for _, commit in ipairs(commits) do
local hash, type, msg = commit:match "(%[.*%])(.*:)(.*)"
if hash and type and msg then
vim.list_extend(changelog, { { hash, "DiffText" }, { type, "Typedef" }, { msg }, { "\n" } })
end
end
return changelog
end
return git
-299
View File
@@ -1,299 +0,0 @@
_G.astronvim = {}
local stdpath = vim.fn.stdpath
local tbl_insert = table.insert
local map = vim.keymap.set
astronvim.install = astronvim_installation or { home = stdpath "config" }
local astronvim_config = stdpath("config"):gsub("nvim$", "astronvim")
vim.opt.rtp:append(astronvim_config)
local supported_configs = { astronvim.install.home, astronvim_config }
local function load_module_file(module)
local found_module = nil
for _, config_path in ipairs(supported_configs) do
local module_path = config_path .. "/lua/" .. module:gsub("%.", "/") .. ".lua"
if vim.fn.filereadable(module_path) == 1 then
found_module = module_path
end
end
if found_module then
local status_ok, loaded_module = pcall(require, module)
if status_ok then
found_module = loaded_module
else
astronvim.notify("Error loading " .. found_module, "error")
end
end
return found_module
end
astronvim.user_settings = load_module_file "user.init"
astronvim.default_compile_path = stdpath "data" .. "/packer_compiled.lua"
astronvim.user_terminals = {}
astronvim.url_matcher =
"\\v\\c%(%(h?ttps?|ftp|file|ssh|git)://|[a-z]+[@][a-z]+[.][a-z]+:)%([&:#*@~%_\\-=?!+;/0-9a-z]+%(%([.;/?]|[.][.]+)[&:#*@~%_\\-=?!+/0-9a-z]+|:\\d+|,%(%(%(h?ttps?|ftp|file|ssh|git)://|[a-z]+[@][a-z]+[.][a-z]+:)@![0-9a-z]+))*|\\([&:#*@~%_\\-=?!+;/.0-9a-z]*\\)|\\[[&:#*@~%_\\-=?!+;/.0-9a-z]*\\]|\\{%([&:#*@~%_\\-=?!+;/.0-9a-z]*|\\{[&:#*@~%_\\-=?!+;/.0-9a-z]*})\\})+"
local function func_or_extend(overrides, default, extend)
if extend then
if type(overrides) == "table" then
default = vim.tbl_deep_extend("force", default, overrides)
elseif type(overrides) == "function" then
default = overrides(default)
end
elseif overrides ~= nil then
default = overrides
end
return default
end
function astronvim.conditional_func(func, condition, ...)
if (condition == nil and true or condition) and type(func) == "function" then
return func(...)
end
end
function astronvim.trim_or_nil(str)
return type(str) == "string" and vim.trim(str) or nil
end
function astronvim.notify(msg, type, opts)
vim.notify(msg, type, vim.tbl_deep_extend("force", { title = "AstroNvim" }, opts or {}))
end
function astronvim.echo(messages)
messages = messages or { { "\n" } }
if type(messages) == "table" then
vim.api.nvim_echo(messages, false, {})
end
end
function astronvim.confirm_prompt(messages)
if messages then
astronvim.echo(messages)
end
local confirmed = string.lower(vim.fn.input "(y/n) ") == "y"
astronvim.echo()
astronvim.echo()
return confirmed
end
local function user_setting_table(module)
local settings = astronvim.user_settings or {}
for tbl in string.gmatch(module, "([^%.]+)") do
settings = settings[tbl]
if settings == nil then
break
end
end
return settings
end
function astronvim.initialize_packer()
local packer_avail, packer = pcall(require, "packer")
if not packer_avail then
local packer_path = stdpath "data" .. "/site/pack/packer/start/packer.nvim"
vim.fn.delete(packer_path, "rf")
vim.fn.system {
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
packer_path,
}
astronvim.echo { { "Initializing Packer...\n\n" } }
vim.cmd "packadd packer.nvim"
packer_avail, packer = pcall(require, "packer")
if not packer_avail then
vim.api.nvim_err_writeln("Failed to load packer at:" .. packer_path .. "\n\n" .. packer)
end
end
return packer
end
function astronvim.vim_opts(options)
for scope, table in pairs(options) do
for setting, value in pairs(table) do
vim[scope][setting] = value
end
end
end
function astronvim.user_plugin_opts(module, default, extend, prefix)
if extend == nil then
extend = true
end
default = default or {}
local user_settings = load_module_file((prefix or "user") .. "." .. module)
if user_settings == nil and prefix == nil then
user_settings = user_setting_table(module)
end
if user_settings ~= nil then
default = func_or_extend(user_settings, default, extend)
end
return default
end
function astronvim.compiled()
local run_me, _ = loadfile(
astronvim.user_plugin_opts("plugins.packer", { compile_path = astronvim.default_compile_path }).compile_path
)
if run_me then
run_me()
else
astronvim.echo { { "Please run " }, { ":PackerSync", "Title" } }
end
end
function astronvim.url_opener()
if vim.fn.has "mac" == 1 then
vim.fn.jobstart({ "open", vim.fn.expand "<cfile>" }, { detach = true })
elseif vim.fn.has "unix" == 1 then
vim.fn.jobstart({ "xdg-open", vim.fn.expand "<cfile>" }, { detach = true })
else
astronvim.notify("gx is not supported on this OS!", "error")
end
end
-- term_details can be either a string for just a command or
-- a complete table to provide full access to configuration when calling Terminal:new()
function astronvim.toggle_term_cmd(term_details)
if type(term_details) == "string" then
term_details = { cmd = term_details, hidden = true }
end
local term_key = term_details.cmd
if vim.v.count > 0 and term_details.count == nil then
term_details.count = vim.v.count
term_key = term_key .. vim.v.count
end
if astronvim.user_terminals[term_key] == nil then
astronvim.user_terminals[term_key] = require("toggleterm.terminal").Terminal:new(term_details)
end
astronvim.user_terminals[term_key]:toggle()
end
function astronvim.add_cmp_source(source)
local cmp_avail, cmp = pcall(require, "cmp")
if cmp_avail then
local config = cmp.get_config()
tbl_insert(config.sources, source)
cmp.setup(config)
end
end
function astronvim.get_user_cmp_source(source)
source = type(source) == "string" and { name = source } or source
local priority = astronvim.user_plugin_opts("cmp.source_priority", {
nvim_lsp = 1000,
luasnip = 750,
buffer = 500,
path = 250,
})[source.name]
if priority then
source.priority = priority
end
return source
end
function astronvim.add_user_cmp_source(source)
astronvim.add_cmp_source(astronvim.get_user_cmp_source(source))
end
function astronvim.null_ls_providers(filetype)
local registered = {}
local sources_avail, sources = pcall(require, "null-ls.sources")
if sources_avail then
for _, source in ipairs(sources.get_available(filetype)) do
for method in pairs(source.methods) do
registered[method] = registered[method] or {}
tbl_insert(registered[method], source.name)
end
end
end
return registered
end
function astronvim.null_ls_sources(filetype, source)
local methods_avail, methods = pcall(require, "null-ls.methods")
return methods_avail and astronvim.null_ls_providers(filetype)[methods.internal[source]] or {}
end
function astronvim.alpha_button(sc, txt)
local sc_ = sc:gsub("%s", ""):gsub("LDR", "<leader>")
if vim.g.mapleader then
sc = sc:gsub("LDR", vim.g.mapleader == " " and "SPC" or vim.g.mapleader)
end
return {
type = "button",
val = txt,
on_press = function()
local key = vim.api.nvim_replace_termcodes(sc_, true, false, true)
vim.api.nvim_feedkeys(key, "normal", false)
end,
opts = {
position = "center",
text = txt,
shortcut = sc,
cursor = 5,
width = 36,
align_shortcut = "right",
hl = "DashboardCenter",
hl_shortcut = "DashboardShortcut",
},
}
end
function astronvim.is_available(plugin)
return packer_plugins ~= nil and packer_plugins[plugin] ~= nil
end
function astronvim.set_mappings(map_table, base)
for mode, maps in pairs(map_table) do
for keymap, options in pairs(maps) do
if options then
local cmd = options
if type(options) == "table" then
cmd = options[1]
options[1] = nil
else
options = {}
end
map(mode, keymap, cmd, vim.tbl_deep_extend("force", options, base or {}))
end
end
end
end
function astronvim.delete_url_match()
for _, match in ipairs(vim.fn.getmatches()) do
if match.group == "HighlightURL" then
vim.fn.matchdelete(match.id)
end
end
end
function astronvim.set_url_match()
astronvim.delete_url_match()
if vim.g.highlighturl_enabled then
vim.fn.matchadd("HighlightURL", astronvim.url_matcher, 15)
end
end
function astronvim.toggle_url_match()
vim.g.highlighturl_enabled = not vim.g.highlighturl_enabled
astronvim.set_url_match()
end
function astronvim.cmd(cmd, show_error)
local result = vim.fn.system(cmd)
local success = vim.api.nvim_get_vvar "shell_error" == 0
if not success and (show_error == nil and true or show_error) then
vim.api.nvim_err_writeln("Error running command: " .. cmd .. "\nError message:\n" .. result)
end
return success and result or nil
end
require "core.utils.updater"
return astronvim
-160
View File
@@ -1,160 +0,0 @@
local fn = vim.fn
local git = require "core.utils.git"
local options = astronvim.user_plugin_opts(
"updater",
{ remote = "origin", branch = "main", channel = "nightly", show_changelog = true }
)
if astronvim.install.is_stable ~= nil then
options.channel = astronvim.install.is_stable and "stable" or "nightly"
end
astronvim.updater = { options = options }
if options.pin_plugins == nil and options.channel == "stable" or options.pin_plugins then
local loaded, snapshot = pcall(fn.readfile, astronvim.install.home .. "/packer_snapshot")
if loaded then
loaded, snapshot = pcall(fn.json_decode, snapshot)
astronvim.updater.snapshot = type(snapshot) == "table" and snapshot or nil
end
if not loaded then
vim.api.nvim_err_writeln "Error loading packer snapshot"
end
end
function astronvim.updater.version()
local version = astronvim.install.version or git.current_version(false)
if version then
astronvim.notify("Version: " .. version)
end
end
local function attempt_update(target)
if options.channel == "stable" or options.commit then
return git.checkout(target, false)
else
return git.pull(false)
end
end
local cancelled_message = { { "Update cancelled", "WarningMsg" } }
function astronvim.updater.update()
if not git.is_repo() then
astronvim.notify("Updater not available for non-git installations", "error")
return
end
for remote, entry in pairs(options.remotes and options.remotes or {}) do
local url = git.parse_remote_url(entry)
local current_url = git.remote_url(remote, false)
local check_needed = false
if not current_url then
git.remote_add(remote, url)
check_needed = true
elseif
current_url ~= url
and astronvim.confirm_prompt {
{ "Remote " },
{ remote, "Title" },
{ " is currently set to " },
{ current_url, "WarningMsg" },
{ "\nWould you like us to set it to " },
{ url, "String" },
{ "?" },
}
then
git.remote_update(remote, url)
check_needed = true
end
if check_needed and git.remote_url(remote, false) ~= url then
vim.api.nvim_err_writeln("Error setting up remote " .. remote .. " to " .. url)
return
end
end
local is_stable = options.channel == "stable"
options.branch = is_stable and "main" or options.branch
if not git.fetch(options.remote) then
vim.api.nvim_err_writeln("Error fetching remote: " .. options.remote)
return
end
local local_branch = (options.remote == "origin" and "" or (options.remote .. "_")) .. options.branch
if git.current_branch() ~= local_branch then
astronvim.echo {
{ "Switching to branch: " },
{ options.remote .. "/" .. options.branch .. "\n\n", "String" },
}
if not git.checkout(local_branch, false) then
git.checkout("-b " .. local_branch .. " " .. options.remote .. "/" .. options.branch, false)
end
end
if git.current_branch() ~= local_branch then
vim.api.nvim_err_writeln("Error checking out branch: " .. options.remote .. "/" .. options.branch)
return
end
local source = git.local_head() -- calculate current commit
local target -- calculate target commit
if is_stable then -- if stable get tag commit
options.version = git.latest_version(git.get_versions(options.version or "latest"))
target = git.tag_commit(options.version)
elseif options.commit then -- if commit specified use it
target = git.branch_contains(options.remote, options.branch, options.commit) and options.commit or nil
else -- get most recent commit
target = git.remote_head(options.remote, options.branch)
end
if not source or not target then -- continue if current and target commits were found
vim.api.nvim_err_writeln "Error checking for updates"
return
elseif source == target then
astronvim.echo { { "No updates available", "String" } }
return
elseif -- prompt user if they want to accept update
not options.skip_prompts
and not astronvim.confirm_prompt {
{ "Update available to ", "Title" },
{ is_stable and options.version or target, "String" },
{ "\nContinue?" },
}
then
astronvim.echo(cancelled_message)
return
else -- perform update
local changelog = git.get_commit_range(source, target)
local breaking = git.breaking_changes(changelog)
local breaking_prompt = { { "Update contains the following breaking changes:\n", "WarningMsg" } }
vim.list_extend(breaking_prompt, git.pretty_changelog(breaking))
vim.list_extend(breaking_prompt, { { "\nWould you like to continue?" } })
if #breaking > 0 and not options.skip_prompts and not astronvim.confirm_prompt(breaking_prompt) then
astronvim.echo(cancelled_message)
return
end
local updated = attempt_update(target)
if
not updated
and not options.skip_prompts
and not astronvim.confirm_prompt {
{ "Unable to pull due to local modifications to base files.\n", "ErrorMsg" },
{ "Reset local files and continue?" },
}
then
astronvim.echo(cancelled_message)
return
elseif not updated then
git.hard_reset(source)
updated = attempt_update(target)
end
if not updated then
vim.api.nvim_err_writeln "Error ocurred performing update"
return
end
local summary = {
{ "AstroNvim updated successfully to ", "Title" },
{ git.current_version(), "String" },
{ "!\n", "Title" },
{ "Please restart and run :PackerSync.\n\n", "WarningMsg" },
}
if options.show_changelog and #changelog > 0 then
vim.list_extend(summary, { { "Changelog:\n", "Title" } })
vim.list_extend(summary, git.pretty_changelog(changelog))
end
astronvim.echo(summary)
end
end
-89
View File
@@ -1,89 +0,0 @@
local base = {
Normal = { fg = C.fg, bg = C.bg },
Comment = { fg = C.grey_2, bg = C.none },
Constant = { fg = C.yellow, bg = C.none },
String = { fg = C.green, bg = C.none },
Character = { fg = C.green, bg = C.none },
Number = { fg = C.orange, bg = C.none },
Boolean = { fg = C.blue, bg = C.none },
Float = { fg = C.yellow, bg = C.none },
Identifier = { fg = C.blue, bg = C.none },
Function = { fg = C.yellow, bg = C.none },
Statement = { fg = C.purple, bg = C.none },
Conditional = { fg = C.purple_1, bg = C.none },
Repeat = { fg = C.purple, bg = C.none },
Label = { fg = C.blue, bg = C.none },
Operator = { fg = C.purple, bg = C.none },
Keyword = { fg = C.purple, bg = C.none },
Exception = { fg = C.purple, bg = C.none },
Preproc = { fg = C.yellow, bg = C.none },
Include = { fg = C.purple, bg = C.none },
Define = { fg = C.purple, bg = C.none },
Title = { fg = C.cyan, bg = C.none },
Macro = { fg = C.purple, bg = C.none },
PreCondit = { fg = C.blue, bg = C.none },
Type = { fg = C.blue, bg = C.none },
StorageClass = { fg = C.blue, bg = C.none },
Structure = { fg = C.yellow, bg = C.none },
Typedef = { fg = C.yellow, bg = C.none },
Special = { fg = C.blue, bg = C.none },
SpecialComment = { fg = C.grey, bg = C.none },
Error = { fg = C.red, bg = C.none },
Todo = { fg = C.purple, bg = C.none },
Underlined = { fg = C.cyan, bg = C.none },
Cursor = { fg = C.none, bg = C.none },
ColorColumn = { fg = C.none, bg = C.grey_4 },
CursorLineNr = { fg = C.fg, bg = C.none },
Conceal = { fg = C.grey, bg = C.none },
CursorColumn = { fg = C.none, bg = C.grey_4 },
CursorLine = { fg = C.none, bg = C.grey_8 },
Directory = { fg = C.blue, bg = C.none },
DiffAdd = { fg = C.grey_3, bg = C.green },
DiffChange = { fg = C.yellow, bg = C.none },
DiffDelete = { fg = C.grey_3, bg = C.red },
DiffText = { fg = C.grey_3, bg = C.yellow },
ErrorMsg = { fg = C.red, bg = C.none },
VertSplit = { fg = C.black, bg = C.none },
Folded = { fg = C.grey, bg = C.none },
FoldColumn = { fg = C.none, bg = C.none },
IncSearch = { fg = C.yellow, bg = C.grey },
LineNr = { fg = C.grey_1, bg = C.none },
NonText = { fg = C.grey_1, bg = C.none },
Pmenu = { fg = C.fg, bg = C.black_1 },
PmenuSel = { fg = C.none, bg = C.grey_4 },
PmenuSbar = { fg = C.none, bg = C.grey_3 },
PmenuThumb = { fg = C.none, bg = C.fg },
Question = { fg = C.purple, bg = C.none },
QuickFixLine = { fg = C.grey_3, bg = C.yellow },
Search = { fg = C.grey_3, bg = C.yellow },
SignColumn = { fg = C.none, bg = C.none },
SpecialKey = { fg = C.grey_1, bg = C.none },
SpellBad = { fg = C.red, bg = C.none },
SpellCap = { fg = C.yellow, bg = C.none },
SpellLocal = { fg = C.yellow, bg = C.none },
SpellRare = { fg = C.yellow, bg = C.none },
StatusLine = { fg = C.fg, bg = C.grey_4 },
StatusLineNC = { fg = C.grey, bg = C.none },
StatusLineTerm = { fg = C.fg, bg = C.grey_4 },
StatusLineTermNC = { fg = C.grey_4, bg = C.none },
TabLine = { fg = C.grey, bg = C.none },
TabLineSel = { fg = C.fg, bg = C.none },
TabLineFill = { fg = C.none, bg = C.grey_3 },
Terminal = { fg = C.fg, bg = C.grey_3 },
Visual = { fg = C.none, bg = C.grey_5 },
VisualNOS = { fg = C.grey_5, bg = C.none },
WarningMsg = { fg = C.yellow, bg = C.none },
WildMenu = { fg = C.grey_3, bg = C.blue },
EndOfBuffer = { fg = C.bg, bg = C.none },
CmpItemAbbrDefault = { fg = C.fg },
CmpItemAbbrDeprecatedDefault = { fg = C.grey_2 },
CmpItemAbbrMatchDefault = { fg = C.white },
CmpItemAbbrMatchFuzzyDefault = { fg = C.white },
CmpItemKind = { fg = C.yellow },
CmpItemAbbr = { fg = C.fg },
CmpItemMenuDefault = { fg = C.fg },
FloatBorder = { bg = C.none },
MatchParen = { fg = C.none, bg = C.grey_5 },
}
return base
-76
View File
@@ -1,76 +0,0 @@
local colors = {
none = "NONE",
fg = "#abb2bf",
bg = "",
bg_1 = "#303742",
black = "#181a1f",
black_1 = "#1f1f25",
green = "#98c379",
green_1 = "#89b06d",
green_2 = "#95be76",
white = "#dedede",
white_1 = "#afb2bb",
white_2 = "#c9c9c9",
blue = "#61afef",
blue_1 = "#40d9ff",
blue_2 = "#1b1f27",
blue_3 = "#8094B4",
orange = "#d19a66",
orange_1 = "#ff9640",
orange_2 = "#ff8800",
yellow = "#e5c07b",
yellow_1 = "#ebae34",
yellow_2 = "#d1b071",
red = "#e06c75",
red_1 = "#ec5f67",
red_2 = "#ffbba6",
red_3 = "#cc626a",
red_4 = "#d47d85",
grey = "#5c6370",
grey_1 = "#4b5263",
grey_2 = "#777d86",
grey_3 = "#282c34",
grey_4 = "#2c323c",
grey_5 = "#3e4452",
grey_6 = "#3b4048",
grey_7 = "#5c5c5c",
grey_8 = "#252931",
grey_9 = "#787e87",
grey_10 = "#D3D3D3",
gold = "#ffcc00",
cyan = "#56b6c2",
purple = "#c678dd",
purple_1 = "#a9a1e1",
-- icon colors
c = "#519aba",
css = "#61afef",
deb = "#a1b7ee",
docker = "#384d54",
html = "#de8c92",
jpeg = "#c882e7",
jpg = "#c882e7",
js = "#ebcb8b",
jsx = "#519ab8",
kt = "#7bc99c",
lock = "#c4c720",
lua = "#51a0cf",
mp3 = "#d39ede",
mp4 = "#9ea3de",
out = "#abb2bf",
png = "#c882e7",
py = "#a3b8ef",
rb = "#ff75a0",
robots = "#abb2bf",
rpm = "#fca2aa",
rs = "#dea584",
toml = "#39bf39",
ts = "#519aba",
ttf = "#abb2bf",
vue = "#7bc99c",
woff = "#abb2bf",
woff2 = "#abb2bf",
zip = "#f9d71c",
}
return astronvim.user_plugin_opts("default_theme.colors", colors)
-49
View File
@@ -1,49 +0,0 @@
vim.cmd "highlight clear"
if vim.fn.exists "syntax_on" then
vim.cmd "syntax reset"
end
vim.o.background = "dark"
vim.o.termguicolors = true
vim.g.colors_name = "default_theme"
local user_plugin_opts = astronvim.user_plugin_opts
local utils = require "default_theme.utils"
C = require "default_theme.colors"
local highlights = {}
for _, module in ipairs { "base", "treesitter", "lsp" } do
highlights = vim.tbl_deep_extend("force", highlights, require("default_theme." .. module))
end
for plugin, enabled in
pairs(user_plugin_opts("default_theme.plugins", {
aerial = true,
beacon = false,
bufferline = true,
dashboard = true,
gitsigns = true,
highlighturl = true,
hop = false,
indent_blankline = true,
lightspeed = false,
["neo-tree"] = true,
notify = true,
["nvim-tree"] = false,
["nvim-web-devicons"] = true,
rainbow = true,
symbols_outline = false,
telescope = true,
vimwiki = false,
["which-key"] = true,
}))
do
if enabled then
highlights = vim.tbl_deep_extend("force", highlights, require("default_theme.plugins." .. plugin))
end
end
for group, spec in pairs(user_plugin_opts("default_theme.highlights", highlights)) do
vim.api.nvim_set_hl(0, group, utils.parse_style(spec))
end
-26
View File
@@ -1,26 +0,0 @@
local utils = require "default_theme.utils"
local lsp = {
DiagnosticError = utils.parse_diagnostic_style { fg = C.red_1 },
DiagnosticHint = utils.parse_diagnostic_style { fg = C.yellow_1 },
DiagnosticInfo = utils.parse_diagnostic_style { fg = C.white_2 },
DiagnosticWarn = utils.parse_diagnostic_style { fg = C.orange_1 },
DiagnosticInformation = { fg = C.yellow, bold = true },
DiagnosticTruncateLine = { fg = C.white_1, bold = true },
DiagnosticUnderlineError = { sp = C.red_2, undercurl = true },
DiagnosticUnderlineHint = { sp = C.red_2, undercurl = true },
DiagnosticUnderlineInfo = { sp = C.red_2, undercurl = true },
DiagnosticUnderlineWarn = { sp = C.red_2, undercurl = true },
LspDiagnosticsFloatingError = { fg = C.red_1 },
LspDiagnosticsFloatingHint = { fg = C.yellow_1 },
LspDiagnosticsFloatingInfor = { fg = C.white_2 },
LspDiagnosticsFloatingWarn = { fg = C.orange_1 },
LspFloatWinBorder = { fg = C.white_1 },
LspFloatWinNormal = { fg = C.fg, bg = C.black_1 },
LspReferenceRead = { fg = C.none, bg = C.grey_5 },
LspReferenceText = { fg = C.none, bg = C.grey_5 },
LspReferenceWrite = { fg = C.none, bg = C.grey_5 },
ProviderTruncateLine = { fg = C.white_1 },
}
return lsp
@@ -1,30 +0,0 @@
return {
AerialLine = { fg = C.yellow, bg = C.none },
AerialGuide = { fg = C.grey_2 },
AerialBooleanIcon = { link = "TSBoolean" },
AerialClassIcon = { link = "TSType" },
AerialConstantIcon = { link = "TSConstant" },
AerialConstructorIcon = { link = "TSConstructor" },
AerialFieldIcon = { link = "TSField" },
AerialFunctionIcon = { link = "TSFunction" },
AerialMethodIcon = { link = "TSMethod" },
AerialNamespaceIcon = { link = "TSNamespace" },
AerialNumberIcon = { link = "TSNumber" },
AerialOperatorIcon = { link = "TSOperator" },
AerialTypeParameterIcon = { link = "TSParameter" },
AerialPropertyIcon = { link = "TSProperty" },
AerialStringIcon = { link = "TSString" },
AerialVariableIcon = { link = "TSConstant" },
AerialEnumMemberIcon = { link = "TSField" },
AerialEnumIcon = { link = "TSType" },
AerialFileIcon = { link = "TSURI" },
AerialModuleIcon = { link = "TSNamespace" },
AerialPackageIcon = { link = "TSNamespace" },
AerialInterfaceIcon = { link = "TSType" },
AerialStructIcon = { link = "TSType" },
AerialEventIcon = { link = "TSType" },
AerialArrayIcon = { link = "TSConstant" },
AerialObjectIcon = { link = "TSType" },
AerialKeyIcon = { link = "TSType" },
AerialNullIcon = { link = "TSType" },
}
@@ -1 +0,0 @@
return { Beacon = { bg = C.blue } }
@@ -1,21 +0,0 @@
return {
BufferLineFill = { fg = C.grey_9, bg = C.grey_4 },
BufferLineBackground = { fg = C.grey_9, bg = C.grey_4 },
BufferLineBufferVisible = { fg = C.fg, bg = C.bg },
BufferLineBufferSelected = { fg = C.white, bg = C.bg, bold = true },
BufferLineTab = { fg = C.grey_9, bg = C.bg },
BufferLineTabSelected = { fg = C.fg, bg = C.bg },
BufferLineTabClose = { fg = C.red_4, bg = C.bg },
BufferLineIndicatorSelected = { fg = C.bg, bg = C.bg },
BufferLineSeparator = { fg = C.grey_4, bg = C.grey_4 },
BufferLineSeparatorVisible = { fg = C.bg, bg = C.bg },
BufferLineSeparatorSelected = { fg = C.grey_4, bg = C.grey_4 },
BufferLineCloseButton = { fg = C.grey_9, bg = C.grey_4 },
BufferLineCloseButtonVisible = { fg = C.grey_10, bg = C.bg },
BufferLineCloseButtonSelected = { fg = C.red_4, bg = C.bg },
BufferLineModified = { fg = C.red_4, bg = C.grey_4 },
BufferLineModifiedVisible = { fg = C.fg, bg = C.bg },
BufferLineModifiedSelected = { fg = C.green_2, bg = C.bg },
BufferLineError = { fg = C.red_1, bg = C.red_1 },
BufferLineErrorDiagnostic = { fg = C.red_1, bg = C.red_1 },
}
@@ -1,6 +0,0 @@
return {
DashboardHeader = { fg = C.cyan },
DashboardShortcut = { fg = C.yellow },
DashboardFooter = { fg = C.cyan },
DashboardCenter = { fg = C.blue },
}
@@ -1,7 +0,0 @@
return {
GitSignsAdd = { fg = C.green, bg = C.none },
GitSignsChange = { fg = C.orange_1, bg = C.none },
GitSignsDelete = { fg = C.red_1, bg = C.none },
MoreMsg = { fg = C.green, bold = true },
ModeMsg = { fg = C.grey, bold = true },
}
@@ -1 +0,0 @@
return { HighlightURL = { underline = true } }
@@ -1,6 +0,0 @@
return {
HopNextKey = { fg = C.red, bold = true },
HopNextKey1 = { fg = C.cyan, bold = true },
HopNextKey2 = { fg = C.blue },
HopUnmatched = { fg = C.grey },
}
@@ -1,7 +0,0 @@
return {
IndentBlanklineSpaceChar = { fg = C.grey_6, nocombine = true },
IndentBlanklineChar = { fg = C.grey_6, nocombine = true },
IndentBlanklineContextStart = { fg = C.grey_7, underline = true },
IndentBlanklineContextChar = { fg = C.grey_7, nocombine = true },
IndentBlanklineSpaceCharBlankline = { fg = C.grey_6, nocombine = true },
}
@@ -1,14 +0,0 @@
return {
LightspeedLabel = { fg = C.red_3, underline = true },
LightspeedLabelOverlapped = { fg = C.blue, underline = true },
LightspeedLabelDistant = { fg = C.red_1, underline = true },
LightspeedLabelDistantOverlapped = { fg = C.blue_1, underline = true },
LightspeedShortcut = { fg = C.black, bg = C.red_3, bold = true, underline = true },
LightspeedShortcutOverlapped = { fg = C.black, bg = C.blue, bold = true, underline = true },
LightspeedMaskedChar = { fg = C.green_1 },
LightspeedGreyWash = { fg = C.grey_2, bg = C.none },
LightspeedUnlabeledMatch = { fg = C.white, bold = true },
LightspeedOneCharMatch = { fg = C.green, bg = C.red_3, bold = true },
LightspeedUniqueChar = { fg = C.white, bold = true },
LightspeedPendingOpArea = { fg = C.yellow },
}
@@ -1,15 +0,0 @@
return {
NeoTreeDirectoryIcon = { fg = C.blue },
NeoTreeRootName = { fg = C.fg, bold = true },
NeoTreeFileName = { fg = C.fg },
NeoTreeFileIcon = { fg = C.fg },
NeoTreeFileNameOpened = { fg = C.green },
NeoTreeIndentMarker = { fg = C.blue_3 },
NeoTreeGitAdded = { fg = C.green },
NeoTreeGitConflict = { fg = C.red },
NeoTreeGitModified = { fg = C.orange },
NeoTreeGitUntracked = { fg = C.yellow },
NeoTreeNormal = { bg = C.blue_2 },
NeoTreeNormalNC = { bg = C.blue_2 },
NeoTreeSymbolicLinkTarget = { fg = C.cyan },
}
@@ -1,24 +0,0 @@
return {
NotifyERRORBorder = { fg = C.red },
NotifyWARNBorder = { fg = C.orange_1 },
NotifyINFOBorder = { fg = C.green },
NotifyDEBUGBorder = { fg = C.cyan },
NotifyTRACERBorder = { fg = C.purple },
NotifyERRORIcon = { fg = C.red },
NotifyWARNIcon = { fg = C.orange_1 },
NotifyINFOIcon = { fg = C.green },
NotifyDEBUGIcon = { fg = C.cyan },
NotifyTRACEIcon = { fg = C.purple },
NotifyERRORTitle = { fg = C.red },
NotifyWARNTitle = { fg = C.orange_1 },
NotifyINFOTitle = { fg = C.green },
NotifyDEBUGTitle = { fg = C.cyan },
NotifyTRACETitle = { fg = C.purple },
NotifyERRORBody = { fg = C.fg },
NotifyWARNBody = { fg = C.fg },
NotifyINFOBody = { fg = C.fg },
NotifyDEBUGBody = { fg = C.fg },
NotifyTRACEBody = { fg = C.fg },
NotifyLogTime = { fg = C.grey_2 },
NotifyLogTitle = { fg = C.blue },
}
@@ -1,19 +0,0 @@
return {
NvimTreeFolderIcon = { fg = C.blue },
NvimTreeExecFile = { fg = C.green },
NvimTreeOpenedFile = { fg = C.green },
NvimTreeRootFolder = { fg = C.bg },
NvimTreeEndOfBuffer = { fg = C.bg },
NvimTreeNormal = { bg = C.blue_2 },
NvimTreeNormalNC = { bg = C.blue_2 },
NvimTreeVertSplit = { fg = C.blue_2, bg = C.blue_2 },
NvimTreeImageFile = { fg = C.purple },
NvimTreeSymlink = { fg = C.cyan },
NvimTreeSpecialFile = { fg = C.yellow },
NvimTreeGitDeleted = { fg = C.red },
NvimTreeGitMerge = { fg = C.orange },
NvimTreeGitRenamed = { fg = C.purple },
NvimTreeGitStaged = { fg = C.green },
NvimTreeGitDirty = { fg = C.red },
NvimTreeGitNew = { fg = C.yellow },
}
@@ -1,31 +0,0 @@
return {
DevIconC = { fg = C.c },
DevIconCss = { fg = C.css },
DevIconDeb = { fg = C.deb },
DevIconDockerfile = { fg = C.docker },
DevIconHtml = { fg = C.html },
DevIconJpeg = { fg = C.jpeg },
DevIconJpg = { fg = C.jpg },
DevIconJs = { fg = C.js },
DevIconJsx = { fg = C.jsx },
DevIconKotlin = { fg = C.kt },
DevIconLock = { fg = C.lock },
DevIconLua = { fg = C.lua },
DevIconMp3 = { fg = C.mp3 },
DevIconMp4 = { fg = C.mp4 },
DevIconOut = { fg = C.out },
DevIconPng = { fg = C.png },
DevIconPy = { fg = C.py },
DevIconRb = { fg = C.rb },
DevIconRobots = { fg = C.robots },
DevIconRpm = { fg = C.rpm },
DevIconRs = { fg = C.rs },
DevIconToml = { fg = C.toml },
DevIconTrueTypeFont = { fg = C.ttf },
DevIconTs = { fg = C.ts },
DevIconVue = { fg = C.vue },
DevIconWebOpenFontFormat = { fg = C.woff },
DevIconWebOpenFontFormat2 = { fg = C.woff2 },
DevIconXz = { fg = C.zip },
DevIconZip = { fg = C.zip },
}
@@ -1,9 +0,0 @@
return {
rainbowcol1 = { fg = "Gold" },
rainbowcol2 = { fg = "Orchid" },
rainbowcol3 = { fg = "LightSkyBlue" },
rainbowcol4 = { fg = "Gold" },
rainbowcol5 = { fg = "Orchid" },
rainbowcol6 = { fg = "LightSkyBlue" },
rainbowcol7 = { fg = "Orchid" },
}
@@ -1 +0,0 @@
return { FocusedSymbol = { fg = C.yellow, bg = C.none } }
@@ -1,57 +0,0 @@
return {
TelescopeResultsTitle = { fg = C.green },
TelescopePromptTitle = { fg = C.blue },
TelescopePreviewTitle = { fg = C.purple },
TelescopeResultsBorder = { fg = C.fg },
TelescopePromptBorder = { fg = C.fg },
TelescopePreviewBorder = { fg = C.fg },
TelescopeSelectionCaret = { fg = C.red },
TelescopeMatching = { fg = C.yellow },
TelescopeSelection = { bg = C.grey_5 },
TelescopeMultiSelection = { fg = C.blue },
TelescopeMultiIcon = { fg = C.blue },
TelescopeNormal = { fg = C.fg, bg = C.bg },
TelescopePreviewNormal = { fg = C.fg, bg = C.bg },
TelescopePromptNormal = { fg = C.fg, bg = C.bg },
TelescopeResultsNormal = { fg = C.fg, bg = C.bg },
TelescopeBorder = { fg = C.fg },
TelescopeTitle = { fg = C.fg },
TelescopePromptCounter = { fg = C.grey_1 },
TelescopePromptPrefix = { fg = C.blue },
TelescopePreviewLine = { bg = C.grey_5 },
TelescopePreviewMatch = { fg = C.yellow },
TelescopePreviewPipe = { fg = C.yellow },
TelescopePreviewCharDev = { fg = C.yellow },
TelescopePreviewDirectory = { fg = C.blue },
TelescopePreviewBlock = { fg = C.yellow },
TelescopePreviewLink = { fg = C.blue },
TelescopePreviewSocket = { fg = C.purple },
TelescopePreviewRead = { fg = C.yellow },
TelescopePreviewWrite = { fg = C.purple },
TelescopePreviewExecute = { fg = C.green },
TelescopePreviewHyphen = { fg = C.grey_1 },
TelescopePreviewSticky = { fg = C.blue },
TelescopePreviewSize = { fg = C.green },
TelescopePreviewUser = { fg = C.yellow },
TelescopePreviewGroup = { fg = C.yellow },
TelescopePreviewDate = { fg = C.blue },
TelescopePreviewMessage = { fg = C.fg },
TelescopePreviewMessageFillchar = { fg = C.fg },
TelescopeResultsClass = { fg = C.yellow },
TelescopeResultsConstant = { fg = C.yellow },
TelescopeResultsField = { fg = C.red },
TelescopeResultsFunction = { fg = C.blue },
TelescopeResultsMethod = { fg = C.blue },
TelescopeResultsOperator = { fg = C.cyan },
TelescopeResultsStruct = { fg = C.purple },
TelescopeResultsVariable = { fg = C.red },
TelescopeResultsLineNr = { fg = C.grey_1 },
TelescopeResultsIdentifier = { fg = C.blue },
TelescopeResultsNumber = { fg = C.orange },
TelescopeResultsComment = { fg = C.grey_2 },
TelescopeResultsSpecialComment = { fg = C.grey },
TelescopeResultsDiffChange = { fg = C.none, bg = C.yellow },
TelescopeResultsDiffAdd = { fg = C.none, bg = C.green },
TelescopeResultsDiffDelete = { fg = C.none, bg = C.red },
TelescopeResultsDiffUntracked = { fg = C.none, bg = C.grey_1 },
}
@@ -1,14 +0,0 @@
return {
VimwikiLink = { fg = C.cyan, bg = C.none },
VimwikiHeaderChar = { fg = C.grey, bg = C.none },
VimwikiHR = { fg = C.yellow, bg = C.none },
VimwikiList = { fg = C.orange, bg = C.orange },
VimwikiTag = { fg = C.orange, bg = C.orange },
VimwikiMarkers = { fg = C.grey, bg = C.none },
VimwikiHeader1 = { fg = C.orange, bg = C.none, bold = true },
VimwikiHeader2 = { fg = C.green, bg = C.none, bold = true },
VimwikiHeader3 = { fg = C.blue, bg = C.none, bold = true },
VimwikiHeader4 = { fg = C.cyan, bg = C.none, bold = true },
VimwikiHeader5 = { fg = C.yellow, bg = C.none, bold = true },
VimwikiHeader6 = { fg = C.purple, bg = C.none, bold = true },
}
@@ -1,5 +0,0 @@
return {
WhichKeyFloat = { fg = C.fg },
WhichKeyDesc = { fg = C.blue },
WhichKeyGroup = { fg = C.blue },
}
@@ -1,59 +0,0 @@
local treesitter = {
TSError = { fg = C.red },
TSPunctDelimiter = { fg = C.fg },
TSPunctBracket = { fg = C.fg },
TSPunctSpecial = { fg = C.fg },
TSConstant = { fg = C.yellow },
TSConstBuiltin = { fg = C.orange },
TSConstMacro = { fg = C.red },
TSStringRegex = { fg = C.green },
TSString = { fg = C.green },
TSStringEscap = { fg = C.red },
TSCharacter = { fg = C.green },
TSNumber = { fg = C.orange },
TSBoolean = { fg = C.orange },
TSFloat = { fg = C.green },
TSAnnotation = { fg = C.yellow },
TSAttribute = { fg = C.red },
TSNamespace = { fg = C.purple },
TSFuncBuiltin = { fg = C.blue },
TSFunction = { fg = C.blue },
TSFuncMacro = { fg = C.yellow },
TSParameter = { fg = C.red },
TSParameterReference = { fg = C.cyan },
TSMethod = { fg = C.blue },
TSField = { fg = C.red },
TSProperty = { fg = C.yellow },
TSConstructor = { fg = C.yellow },
TSConditional = { fg = C.purple },
TSRepeat = { fg = C.purple },
TSLabel = { fg = C.blue },
TSKeyword = { fg = C.purple },
TSKeywordFunction = { fg = C.purple },
TSKeywordOperator = { fg = C.purple },
TSOperator = { fg = C.cyan },
TSException = { fg = C.purple },
TSType = { fg = C.blue },
TSTypeBuiltin = { fg = C.blue },
TSStructure = { fg = C.purple },
TSInclude = { fg = C.purple },
TSVariable = { fg = C.red },
TSVariableBuiltin = { fg = C.yellow },
TSText = { fg = C.fg },
TSTextReference = { fg = C.yellow },
TSStrong = { fg = C.blue, style = "bold" },
TSEmphasis = { fg = C.purple, style = "italic" },
TSUnderline = { fg = C.fg },
TSTitle = { fg = C.fg },
TSLiteral = { fg = C.fg },
TSURI = { fg = C.green },
TSTag = { fg = C.red },
TSTagDelimiter = { fg = C.fg },
markdownTSNone = { fg = C.fg },
markdownTSTitle = { fg = C.red },
markdownTSLiteral = { fg = C.green },
markdownTSPunctSpecial = { fg = C.red },
markdownTSPunctDelimiter = { fg = C.fg },
}
return treesitter
-24
View File
@@ -1,24 +0,0 @@
local M = {}
local user_settings = astronvim.user_plugin_opts "default_theme"
function M.parse_diagnostic_style(default)
if type(user_settings.diagnostics_style) == "table" then
default = vim.tbl_deep_extend("force", user_settings.diagnostics_style, default)
elseif type(user_settings.diagnostics_style) == "string" then
default.style = user_settings.diagnostics_style
end
return default
end
function M.parse_style(spec)
if spec.style then
for match in (spec.style .. ","):gmatch "(.-)," do
spec[match] = true
end
spec.style = nil
end
return spec
end
return M
-251
View File
@@ -1,251 +0,0 @@
local config = {
-- Configure AstroNvim updates
updater = {
remote = "origin", -- remote to use
channel = "nightly", -- "stable" or "nightly"
version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY)
branch = "main", -- branch name (NIGHTLY ONLY)
commit = nil, -- commit hash (NIGHTLY ONLY)
pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only)
skip_prompts = false, -- skip prompts about breaking changes
show_changelog = true, -- show the changelog after performing an update
-- remotes = { -- easily add new remotes to track
-- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url
-- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut,
-- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork
-- },
},
-- Set colorscheme
colorscheme = "default_theme",
-- set vim options here (vim.<first_key>.<second_key> = value)
options = {
opt = {
relativenumber = true, -- sets vim.opt.relativenumber
},
g = {
mapleader = " ", -- sets vim.g.mapleader
},
},
-- Default theme configuration
default_theme = {
diagnostics_style = { italic = true },
-- Modify the color table
colors = {
fg = "#abb2bf",
},
-- Modify the highlight groups
highlights = function(highlights)
local C = require "default_theme.colors"
highlights.Normal = { fg = C.fg, bg = C.bg }
return highlights
end,
plugins = { -- enable or disable extra plugin highlighting
aerial = true,
beacon = false,
bufferline = true,
dashboard = true,
highlighturl = true,
hop = false,
indent_blankline = true,
lightspeed = false,
["neo-tree"] = true,
notify = true,
["nvim-tree"] = false,
["nvim-web-devicons"] = true,
rainbow = true,
symbols_outline = false,
telescope = true,
vimwiki = false,
["which-key"] = true,
},
},
-- Disable AstroNvim ui features
ui = {
nui_input = true,
telescope_select = true,
},
-- Configure plugins
plugins = {
-- Add plugins, the packer syntax without the "use"
init = {
-- You can disable default plugins as follows:
-- ["goolord/alpha-nvim"] = { disable = true },
-- You can also add new plugins here as well:
-- { "andweeb/presence.nvim" },
-- {
-- "ray-x/lsp_signature.nvim",
-- event = "BufRead",
-- config = function()
-- require("lsp_signature").setup()
-- end,
-- },
},
-- All other entries override the setup() call for default plugins
["null-ls"] = function(config)
local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Set a formatter
null_ls.builtins.formatting.rufo,
-- Set a linter
null_ls.builtins.diagnostics.rubocop,
}
-- set up null-ls's on_attach function
config.on_attach = function(client)
-- NOTE: You can remove this on attach function to disable format on save
if client.resolved_capabilities.document_formatting then
vim.api.nvim_create_autocmd("BufWritePre", {
desc = "Auto format before save",
pattern = "<buffer>",
callback = vim.lsp.buf.formatting_sync,
})
end
end
return config -- return final config table
end,
treesitter = {
ensure_installed = { "lua" },
},
["nvim-lsp-installer"] = {
ensure_installed = { "sumneko_lua" },
},
packer = {
compile_path = vim.fn.stdpath "data" .. "/packer_compiled.lua",
},
},
-- LuaSnip Options
luasnip = {
-- Add paths for including more VS Code style snippets in luasnip
vscode_snippet_paths = {},
-- Extend filetypes
filetype_extend = {
javascript = { "javascriptreact" },
},
},
-- Modify which-key registration
["which-key"] = {
-- Add bindings
register_mappings = {
-- first key is the mode, n == normal mode
n = {
-- second key is the prefix, <leader> prefixes
["<leader>"] = {
-- which-key registration table for normal mode, leader prefix
-- ["N"] = { "<cmd>tabnew<cr>", "New Buffer" },
},
},
},
},
-- CMP Source Priorities
-- modify here the priorities of default cmp sources
-- higher value == higher priority
-- The value can also be set to a boolean for disabling default sources:
-- false == disabled
-- true == 1000
cmp = {
source_priority = {
nvim_lsp = 1000,
luasnip = 750,
buffer = 500,
path = 250,
},
},
-- Extend LSP configuration
lsp = {
-- enable servers that you already have installed without lsp-installer
servers = {
-- "pyright"
},
-- easily add or disable built in mappings added during LSP attaching
mappings = {
n = {
-- ["<leader>lf"] = false -- disable formatting keymap
},
},
-- add to the server on_attach function
-- on_attach = function(client, bufnr)
-- end,
-- override the lsp installer server-registration function
-- server_registration = function(server, opts)
-- require("lspconfig")[server].setup(opts)
-- end,
-- Add overrides for LSP server settings, the keys are the name of the server
["server-settings"] = {
-- example for addings schemas to yamlls
-- yamlls = {
-- settings = {
-- yaml = {
-- schemas = {
-- ["http://json.schemastore.org/github-workflow"] = ".github/workflows/*.{yml,yaml}",
-- ["http://json.schemastore.org/github-action"] = ".github/action.{yml,yaml}",
-- ["http://json.schemastore.org/ansible-stable-2.9"] = "roles/tasks/*.{yml,yaml}",
-- },
-- },
-- },
-- },
},
},
-- Diagnostics configuration (for vim.diagnostics.config({}))
diagnostics = {
virtual_text = true,
underline = true,
},
mappings = {
-- first key is the mode
n = {
-- second key is the lefthand side of the map
["<C-s>"] = { ":w!<cr>", desc = "Save File" },
},
t = {
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
},
},
-- This function is run last
-- good place to configuring augroups/autocommands and custom filetypes
polish = function()
-- Set key binding
-- Set autocommands
vim.api.nvim_create_augroup("packer_conf", { clear = true })
vim.api.nvim_create_autocmd("BufWritePost", {
desc = "Sync packer after modifying plugins.lua",
group = "packer_conf",
pattern = "plugins.lua",
command = "source <afile> | PackerSync",
})
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {
-- foo = "fooscript",
-- },
-- filename = {
-- ["Foofile"] = "fooscript",
-- },
-- pattern = {
-- ["~/%.config/foo/.*"] = "fooscript",
-- },
-- }
end,
}
return config
-1
View File
@@ -1 +0,0 @@
{"better-escape.nvim": {"commit": "d5ee0ce"}, "FixCursorHold.nvim": {"commit": "1bfb32e"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "00ec5ad"}, "nvim-notify": {"commit": "7caeaae"}, "nvim-lspconfig": {"commit": "9278dfb"}, "smart-splits.nvim": {"commit": "2af8bc3"}, "null-ls.nvim": {"commit": "ff40739"}, "which-key.nvim": {"commit": "bd4411a"}, "bufferline.nvim": {"commit": "68839d6"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "d27a83a"}, "nvim-colorizer.lua": {"commit": "36c610a"}, "gitsigns.nvim": {"commit": "4883988"}, "SchemaStore.nvim": {"commit": "186e4ad"}, "indent-blankline.nvim": {"commit": "42fe62e"}, "nvim-ts-autotag": {"commit": "044a05c"}, "neo-tree.nvim": {"commit": "c552119"}, "telescope.nvim": {"commit": "d88b44d"}, "nvim-ts-context-commentstring": {"commit": "8834375"}, "Comment.nvim": {"commit": "2c26a00"}, "aerial.nvim": {"commit": "dd35fd7"}, "alpha-nvim": {"commit": "ef27a59"}, "nvim-autopairs": {"commit": "4a95b39"}, "cinnamon.nvim": {"commit": "da5880d"}, "LuaSnip": {"commit": "a12441e"}, "popup.nvim": {"commit": "b7404d3"}, "nvim-web-devicons": {"commit": "8d2c533"}, "neovim-session-manager": {"commit": "4f9129a"}, "nvim-treesitter": {"commit": "f5aa00d"}, "nui.nvim": {"commit": "0f590b7"}, "impatient.nvim": {"commit": "969f2c5"}, "feline.nvim": {"commit": "1ea4267"}, "nvim-lsp-installer": {"commit": "5904749"}, "indent-o-matic": {"commit": "bf37c6e"}, "toggleterm.nvim": {"commit": "8f2e78d"}, "plenary.nvim": {"commit": "968a4b9"}, "bufdelete.nvim": {"commit": "46255e4"}, "nvim-cmp": {"commit": "df6734a"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "466b6b8"}, "cmp-buffer": {"commit": "62fc67a"}}
-22
View File
@@ -1,22 +0,0 @@
# Documentation: https://github.com/yshui/picom/wiki
# Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
# Copyright (C) 2022 Keyitdev
fading = true;
fade-in-step = 0.015;
fade-out-step = 0.1;
fade-delta = 5
experimental-backends = false;
backend = "glx";
vsync = false
refresh-rate = 0
detect-transient = true
log-level = "debug";
opacity-rule: [
"95:class_g = 'Org.gnome.Nautilus'"
];
-553
View File
@@ -1,553 +0,0 @@
; Documentation: https://github.com/polybar/polybar/wiki
; Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
; Copyright (C) 2022 Keyitdev
;; Global WM Settings
[global/wm]
margin-bottom = 0
margin-top = 0
fixed-center = true
include-file = $HOME/.config/polybar/colors.ini
;; Application Settings
[settings]
throttle-output = 5
throttle-output-for = 10
screenchange-reload = true
; Compositing operators
pseudo-transparency = true
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
;; Bar Settings
[bar/main]
modules-left = right1 i3 left1 sep right1 mpd left1 sep right1 network left1
modules-center = right1 date left1
modules-right = right1 temperature sep2 sep2 cpu sep2 sep2 memory left1 sep right1 backlight sep2 sep2 alsa left1 sep right1 battery left1
separator =
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
wm-name =
locale =
bottom = false
fixed-center = true
padding = 0
width = 100%
height = 31
offset-x = 0%
offset-y = 0%
radius-top = 0
radius-bottom = 0
background = #002d333f
foreground = ${color.foreground}
dim-value = 1.0
line-size = 2
line-color = ${color.background}
border-top-size = 8
border-top-color = #002d333f
border-left-size = 8
border-left-color = #002d333f
border-right-size = 8
border-right-color = #002d333f
font-0 = "Iosevka Nerd Font:size=12;4"
font-1 = "Iosevka Nerd Font:style=Medium:size=18;4"
font-2 = "feather:size=13;5"
tray-position = right
tray-detached = false
tray-maxsize = 16
tray-background = #002d333f
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
[bar/second]
modules-left = sep2 i3 left1
modules-center = right1 date left1
modules-right =
separator =
; Change it for yourself
; find /sys/devices -name "edid"
monitor = HDMI-1
monitor-fallback =
monitor-strict = false
override-redirect = false
wm-name =
locale =
bottom = false
fixed-center = true
padding = 0
width = 100%
height = 31
offset-x = 0%
offset-y = 0%
radius-top = 0
radius-bottom = 0
background = #002d333f
foreground = ${color.foreground}
dim-value = 1.0
line-size = 2
line-color = ${color.background}
border-top-size = 8
border-top-color = #002d333f
border-left-size = 8
border-left-color = #002d333f
border-right-size = 8
border-right-color = #002d333f
font-0 = "Iosevka Nerd Font:size=12;4"
font-1 = "Iosevka Nerd Font:style=Medium:size=18;4"
font-2 = "feather:size=13;5"
tray-position = right
tray-detached = false
tray-maxsize = 16
tray-background = ${color.background}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
;; Modules
; Don't delete it, it's important
[glyph]
gleft =
gright =
[module/left1]
type = custom/text
content-background = #002d333f
content-foreground = ${color.background}
content = ${glyph.gleft}
content-font = 2
[module/right1]
type = custom/text
content-background = #002d333f
content-foreground = ${color.background}
content = ${glyph.gright}
content-font = 2
[module/sep]
type = custom/text
content = " "
[module/sep2]
type = custom/text
content = " "
content-foreground = ${color.background}
content-background = ${color.background}
[module/alsa]
type = internal/alsa
interval = 5
master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default
master-mixer = Master
format-volume = <ramp-volume> <label-volume>
format-volume-background = ${color.background}
format-muted = <label-muted>
format-muted-background = ${color.background}
label-volume = %percentage%%
label-muted =
label-muted-foreground =${color.red}
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-headphones-0 =
ramp-volume-foreground = ${color.blue}
[module/backlight]
type = internal/backlight
; Change it for yourself
; ls -1 /sys/class/backlight/
card = amdgpu_bl0
use-actual-brightness = true
enable-scroll = true
format = <ramp> <label>
format-background = ${color.background}
label =%percentage%%
ramp-0 =
ramp-1 =
ramp-foreground = ${color.yellow}
[module/battery]
type = internal/battery
poll-interval = 2
; Change it for yourself
; ls /sys/class/power_supply/
battery = BAT1
adapter = ADP0
full-at = 99
time-format = %H:%M
format-charging = <label-charging>
format-charging-prefix = ""
format-charging-prefix-foreground = ${color.green}
format-charging-prefix-background = ${color.background}
format-discharging = <label-discharging>
format-discharging-prefix = ""
format-discharging-prefix-foreground = ${color.pink}
format-discharging-prefix-background = ${color.background}
format-full = <label-full>
format-full-prefix =
format-full-prefix-foreground = ${color.red}
format-full-prefix-background = ${color.background}
label-charging = " %percentage%%"
label-charging-background = ${color.background}
label-discharging = " %percentage%%"
label-discharging-background = ${color.background}
label-full = " Full"
label-full-background = ${color.background}
[module/cpu]
type = internal/cpu
interval = 1
format = <label>
format-prefix =
format-prefix-foreground = ${color.green}
format-background = ${color.background}
label = " %percentage%%"
[module/date]
type = internal/date
interval = 1
; Change it for yourself
; https://en.cppreference.com/w/cpp/io/manip/put_time
date = %a %d %b
time = %H:%M
date-alt = %A %d %B %Y
time-alt = %H:%M:%S
format = <label>
format-prefix = " "
format-prefix-foreground = ${color.red}
format-background = ${color.background}
label = %date% %time%
[module/filesystem]
type = internal/fs
interval = 30
mount-0 = /
fixed-values = true
format-mounted = <label-mounted>
format-mounted-prefix =
format-mounted-prefix-foreground = ${color.orange}
format-mounted-background = ${color.background}
format-unmounted = <label-unmounted>
format-unmounted-prefix =
format-unmounted-prefix-foreground = ${color.red}
format-unmounted-background = ${color.background}
label-mounted = " %free%"
label-unmounted = " %mountpoint%: NA"
[module/i3]
type = internal/i3
pin-workspaces = true
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;
ws-icon-default =
; Available tags:
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
; <label-mode> (default)
format = <label-state><label-mode>
label-mode = %mode%
label-mode-padding = 1
label-mode-background = ${color.background}
label-mode-foreground = ${color.foreground}
label-focused = %icon%
label-focused-foreground = ${color.green}
label-focused-background = ${color.background}
label-focused-underline = ${color.green}
label-focused-padding = 1
label-unfocused = %icon%
label-unfocused-padding = 1
label-unfocused-background = ${color.background}
label-visible = %icon%
label-visible-underline = ${color.purple}
label-visible-padding = 1
label-visible-foreground = ${color.purple}
label-visible-background = ${color.background}
label-urgent = %icon%
label-urgent-foreground = ${color.red}
label-urgent-background = ${color.background}
label-urgent-padding = 1
[module/keyboard]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = scroll lock
format = <label-layout> <label-indicator>
format-prefix =
format-prefix-foreground = ${color.cyan}
format-foreground = ${color.foreground}
format-background = ${color.background}
label-layout = " %layout%"
label-indicator-on = "%name%"
label-indicator-on-foreground = ${color.cyan}
[module/memory]
type = internal/memory
interval = 1
format = <label>
format-prefix =
format-prefix-foreground = ${color.purple}
format-background = ${color.background}
label = " %gb_used%"
[module/mpd]
type = internal/mpd
interval = 1
format-online = <label-song> <icon-prev> <toggle> <icon-next>
format-online-prefix = " "
format-online-prefix-foreground = ${color.green}
format-online-background = ${color.background}
format-playing = ${self.format-online}
format-paused = ${self.format-online}
format-stopped = ${self.format-online}
format-offline = <label-offline>
format-offline-prefix =
format-offline-prefix-foreground = ${color.red}
format-offline-background = ${color.background}
label-song = " %title%"
label-song-maxlen = 25
label-song-ellipsis = true
label-time = %elapsed% / %total%
label-time-background = ${color.background-alt}
label-time-padding = 1
label-offline = " Offline"
icon-play =
icon-play-foreground = ${color.cyan}
icon-pause =
icon-pause-foreground = ${color.cyan}
icon-stop =
icon-stop-foreground = ${color.red}
icon-next =
icon-next-foreground = ${color.cyan}
icon-prev =
icon-prev-foreground = ${color.cyan}
icon-seekf =
icon-seekb =
icon-random =
icon-repeat =
icon-repeatone =
icon-single =
icon-consume =
toggle-on-foreground = ${color.primary}
toggle-off-foreground = ${color.red}
; Change it for yourself
; ls /sys/class/net
[module/wired-network]
type = internal/network
interface = eth0
[module/wireless-network]
type = internal/network
interface = wlan0
[module/network]
type = internal/network
interface = wlan0
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-prefix =
format-connected-prefix-foreground = ${color.orange}
format-connected-background = ${color.background}
format-connected-padding = 0
format-disconnected = <label-disconnected>
format-disconnected-prefix =
format-disconnected-prefix-foreground = ${color.red}
format-disconnected-background = ${color.background}
format-disconnected-padding = 0
label-connected = "%{A1:networkmanager_dmenu &:} %essid% %downspeed%%{A}"
label-disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}"
; Change it for yourself
; ls /sys/class/net
[module/wired-network_stats]
type = internal/network
interface = eth0
[module/wireless-network_stats]
type = internal/network
interface = wlan0
[module/network_stats]
type = internal/network
interface = wlan0
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-prefix =
format-connected-prefix-foreground = ${color.orange}
format-connected-background = ${color.background}
format-connected-padding = 0
format-disconnected = <label-disconnected>
format-disconnected-prefix =
format-disconnected-prefix-foreground = ${color.red}
format-disconnected-background = ${color.background}
format-disconnected-padding = 0
label-connected = "%{A1:networkmanager_dmenu &:} %{F#6C77BB}%{F-} %downspeed%%{A} %{F#6C77BB}%{F-} %upspeed%%{A}"
label-disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}"
[module/temperature]
type = internal/temperature
interval = 0.5
thermal-zone = 0
warn-temperature = 80
units = true
format = <ramp> <label>
format-background = ${color.background}
format-warn = <ramp> <label-warn>
format-warn-background = ${color.background}
label = %temperature-c%
label-warn = "%temperature-c%"
label-warn-foreground = ${color.red}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-foreground = ${color.cyan}
[module/title]
type = internal/xwindow
format = <label>
format-prefix =
format-prefix-foreground = ${color.green}
format-foreground = ${color.foreground}
format-background = ${color.background}
label = " %title%"
label-maxlen = 30
label-empty = " Desktop"
[module/uptime]
type = custom/script
exec = ~/.config/polybar/uptime.sh
interval = 1
format-prefix = " "
format-prefix-foreground = ${color.green}
format-foreground = ${color.foreground}
format-background = ${color.background}
-3
View File
@@ -1,3 +0,0 @@
#!/bin/sh
uptime -p
-759
View File
@@ -1,759 +0,0 @@
# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create either /etc/ranger/rc.conf
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
# commands there.
#
# If you copy this whole file there, you may want to set the environment
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
#
# The purpose of this file is mainly to define keybindings and settings.
# For running more complex python code, please create a plugin in "plugins/" or
# a command in "commands.py".
#
# Each line is a command that will be run before the user interface
# is initialized. As a result, you can not use commands which rely
# on the UI such as :delete or :mark.
# ===================================================================
# ===================================================================
# == Options
# ===================================================================
# Which viewmode should be used? Possible values are:
# miller: Use miller columns which show multiple levels of the hierarchy
# multipane: Midnight-commander like multipane view showing all tabs next
# to each other
set viewmode miller
#set viewmode multipane
# How many columns are there, and what are their relative widths?
set column_ratios 2,4,4
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete multiple
# Use non-default path for file preview script?
# ranger ships with scope.sh, a script that calls external programs (see
# README.md for dependencies) to preview images, archives, etc.
#set preview_script ~/.config/ranger/scope.sh
# Use the external preview script or display simple plain text or image previews?
set use_preview_script true
# Automatically count files in the directory, even before entering them?
set automatically_count_files true
# Open all images in this directory when running certain image viewers
# like feh or sxiv? You can still open selected files by marking them.
set open_all_images true
# Be aware of version control systems and display information.
set vcs_aware false
# State of the four backends git, hg, bzr, svn. The possible states are
# disabled, local (only show local info), enabled (show local and remote
# information).
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set vcs_backend_svn disabled
# Truncate the long commit messages to this length when shown in the statusbar.
set vcs_msg_length 50
# Use one of the supported image preview protocols
set preview_images true
# Set the preview image method. Supported methods:
#
# * w3m (default):
# Preview images in full color with the external command "w3mimgpreview"?
# This requires the console web browser "w3m" and a supported terminal.
# It has been successfully tested with "xterm" and "urxvt" without tmux.
#
# * iterm2:
# Preview images in full color using iTerm2 image previews
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
# with image preview support.
#
# This feature relies on the dimensions of the terminal's font. By default, a
# width of 8 and height of 11 are used. To use other values, set the options
# iterm2_font_width and iterm2_font_height to the desired values.
#
# * terminology:
# Previews images in full color in the terminology terminal emulator.
# Supports a wide variety of formats, even vector graphics like svg.
#
# * urxvt:
# Preview images in full color using urxvt image backgrounds. This
# requires using urxvt compiled with pixbuf support.
#
# * urxvt-full:
# The same as urxvt but utilizing not only the preview pane but the
# whole terminal window.
#
# * kitty:
# Preview images in full color using kitty image protocol.
# Requires python PIL or pillow library.
# If ranger does not share the local filesystem with kitty
# the transfer method is changed to encode the whole image;
# while slower, this allows remote previews,
# for example during an ssh session.
# Tmux is unsupported.
#
# * ueberzug:
# Preview images in full color with the external command "ueberzug".
# Images are shown by using a child window.
# Only for users who run X11 in GNU/Linux.
set preview_images_method ueberzug
# Delay in seconds before displaying an image with the w3m method.
# Increase it in case of experiencing display corruption.
set w3m_delay 0.02
# Manually adjust the w3mimg offset when using a terminal which needs this
set w3m_offset 0
# Default iTerm2 font size (see: preview_images_method: iterm2)
set iterm2_font_width 8
set iterm2_font_height 11
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
# Requires the python-bidi pip package
set bidi_support false
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized
set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files true
set preview_directories true
set collapse_preview true
# Wrap long lines in plain text previews?
set wrap_plaintext_previews false
# Save the console history on exit?
set save_console_history true
# Draw the status bar on top of the browser window (default: bottom)
set status_bar_on_top false
# Draw a progress bar in the status bar which displays the average state of all
# currently running tasks which support progress bars?
set draw_progress_bar_in_status_bar true
# Draw borders around columns? (separators, outline, both, or none)
# Separators are vertical lines between columns.
# Outline draws a box around all the columns.
# Both combines the two.
set draw_borders both
# Display the directory name in tabs?
set dirname_in_tabs false
# Enable the mouse support?
set mouse_enabled true
# Display the file size in the main column or status bar?
set display_size_in_main_column true
set display_size_in_status_bar true
# Display the free disk space in the status bar?
set display_free_space_in_status_bar true
# Display files tags in all columns or only in main column?
set display_tags_in_all_columns true
# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
set update_title false
# Set the tmux/screen window-name to "ranger"?
set update_tmux_title true
# Shorten the title if it gets long? The number defines how many
# directories are displayed at once, 0 turns off this feature.
set shorten_title 3
# Show hostname in titlebar?
set hostname_in_titlebar true
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
set tilde_in_titlebar false
# How many directory-changes or console-commands should be kept in history?
set max_history_size 20
set max_console_history_size 50
# Try to keep so much space between the top/bottom border when scrolling:
set scroll_offset 8
# Flush the input after each key hit? (Noticeable when ranger lags)
set flushinput true
# Padding on the right when there's no preview?
# This allows you to click into the space to run the file.
set padding_right true
# Save bookmarks (used with mX and `X) instantly?
# This helps to synchronize bookmarks between multiple ranger
# instances but leads to *slight* performance loss.
# When false, bookmarks are saved when ranger is exited.
set autosave_bookmarks true
# Save the "`" bookmark to disk. This can be used to switch to the last
# directory by typing "``".
set save_backtick_bookmark true
# You can display the "real" cumulative size of directories by using the
# command :get_cumulative_size or typing "dc". The size is expensive to
# calculate and will not be updated automatically. You can choose
# to update it automatically though by turning on this option:
set autoupdate_cumulative_size false
# Turning this on makes sense for screen readers:
set show_cursor false
# One of: size, natural, basename, atime, ctime, mtime, type, random
set sort natural
# Additional sorting options
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode false
# Enable this if key combinations with the Alt Key don't work for you.
# (Especially on xterm)
set xterm_alt_key false
# Whether to include bookmarks in cd command
set cd_bookmarks true
# Changes case sensitivity for the cd command tab completion
set cd_tab_case sensitive
# Use fuzzy tab completion with the "cd" command. For example,
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
set cd_tab_fuzzy false
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
# disable this feature.
set preview_max_size 0
# The key hint lists up to this size have their sublists expanded.
# Otherwise the submaps are replaced with "...".
set hint_collapse_threshold 10
# Add the highlighted file to the path in the titlebar
set show_selection_in_titlebar true
# The delay that ranger idly waits for user input, in milliseconds, with a
# resolution of 100ms. Lower delay reduces lag between directory updates but
# increases CPU load.
set idle_delay 2000
# When the metadata manager module looks for metadata, should it only look for
# a ".metadata.json" file in the current directory, or do a deep search and
# check all directories above the current one as well?
set metadata_deep_search false
# Clear all existing filters when leaving a directory
set clear_filters_on_dir_change false
# Disable displaying line numbers in main column.
# Possible values: false, absolute, relative.
set line_numbers false
# When line_numbers=relative show the absolute line number in the
# current line.
set relative_current_zero false
# Start line numbers from 1 instead of 0
set one_indexed false
# Save tabs on exit
set save_tabs_on_exit false
# Enable scroll wrapping - moving down while on the last item will wrap around to
# the top and vice versa.
set wrap_scroll false
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
# directories, files and symlinks respectively.
set global_inode_type_filter
# This setting allows to freeze the list of files to save I/O bandwidth. It
# should be 'false' during start-up, but you can toggle it by pressing F.
set freeze_files false
# Print file sizes in bytes instead of the default human-readable format.
set size_in_bytes false
# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
# give a warning when you nest ranger in a subshell started by ranger.
# Special value "error" makes the warning more visible.
set nested_ranger_warning true
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
alias e edit
alias q quit
alias q! quit!
alias qa quitall
alias qa! quitall!
alias qall quitall
alias qall! quitall!
alias setl setlocal
alias filter scout -prts
alias find scout -aets
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
map Q quitall
map q quit
copymap q ZZ ZQ
map R reload_cwd
map F set freeze_files!
map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
map ~ set viewmode!
map i display_file
map <A-j> scroll_preview 1
map <A-k> scroll_preview -1
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map s console shell%space
map r chain draw_possible_programs; console open_with%space
map f console find%space
map cd console cd%space
map <C-p> chain console; eval fm.ui.console.history_move(-1)
# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mh linemode humanreadablemtime
map Mp linemode permissions
map Ms linemode sizemtime
map MH linemode sizehumanreadablemtime
map Mt linemode metatitle
# Tagging / Marking
map t tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map v mark_files all=True toggle=True
map uv mark_files all=True val=False
map V toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F2> rename_append
map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
#map <F8> console trash
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
#map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map ] move_parent 1
map [ move_parent -1
map } traverse
map { traverse_backwards
map ) jump_non
map gh cd ~
map ge cd /etc
map gu cd /usr
map gd cd /dev
map gl cd -r .
map gL cd -r %f
map go cd /opt
map gv cd /var
map gm cd /media
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
map gM cd /mnt
map gs cd /srv
map gp cd /tmp
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp yank path
map yd yank dir
map yn yank name
map y. yank name_without_extension
# Filesystem Operations
map = chmod
map cw console rename%space
map a rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map pd console paste dest=
map p`<any> paste dest=%any_path
map p'<any> paste dest=%any_path
map dD console delete
map dT console trash
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
map cs search_next order=size
map ci search_next order=mimetype
map cc search_next order=ctime
map cm search_next order=mtime
map ca search_next order=atime
# Tabs
map <C-n> tab_new
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map gt tab_move 1
map gT tab_move -1
map gn tab_new
map gc tab_close
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
map <a-r> tab_shift 1
map <a-l> tab_shift -1
# Sorting
map or set sort_reverse!
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
map zc set collapse_preview!
map zd set sort_directories_first!
map zh set show_hidden!
map <C-h> set show_hidden!
copymap <C-h> <backspace>
copymap <backspace> <backspace2>
map zI set flushinput!
map zi set preview_images!
map zm set mouse_enabled!
map zp set preview_files!
map zP set preview_directories!
map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size!
map zv set use_preview_script!
map zf console filter%space
copymap zf zz
# Filter stack
map .d filter_stack add type d
map .f filter_stack add type f
map .l filter_stack add type l
map .m console filter_stack add mime%space
map .n console filter_stack add name%space
map .# console filter_stack add hash%space
map ." filter_stack add duplicate
map .' filter_stack add unique
map .| filter_stack add or
map .& filter_stack add and
map .! filter_stack add not
map .r filter_stack rotate
map .c filter_stack clear
map .* filter_stack decompose
map .p filter_stack pop
map .. filter_stack show
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map m<any> set_bookmark %any
map um<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
# ===================================================================
# Note: Unmapped keys are passed directly to the console.
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <C-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
cmap <a-b> eval fm.ui.console.move_word(left=1)
cmap <a-f> eval fm.ui.console.move_word(right=1)
copycmap <a-b> <a-left>
copycmap <a-f> <a-right>
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
copycmap <ESC> <C-g>
copycmap <up> <C-p>
copycmap <down> <C-n>
copycmap <left> <C-b>
copycmap <right> <C-f>
copycmap <home> <C-a>
copycmap <end> <C-e>
copycmap <delete> <C-d>
copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
# ===================================================================
# == Pager Keybindings
# ===================================================================
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>
-10
View File
@@ -1,10 +0,0 @@
/* colors */
* {
al: #00000000;
bg: #1b1b25;
se: #282a36;
fg: #dedede;
ac: #16161e;
br: #343746;
}
-120
View File
@@ -1,120 +0,0 @@
/*
* Documentation: https://github.com/davatorium/rofi/wiki
* Config created by Aditya Shakya https://github.com/adi1090x
* Config modified by Keyitdev https://www.github.com/keyitdev/dotfiles
* Copyright (C) 2022 Keyitdev, Aditya Shakya
*/
configuration {
font: "Roboto mono 11";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
display-window: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 2px;
border-color: @br;
border-radius: 0px;
height: 100%;
width: 100%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @fg;
font: "Iosevka Nerd Font 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 4;
lines: 5;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 28px;
border: 0px;
padding: 0 10px 0 10px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}
-121
View File
@@ -1,121 +0,0 @@
/*
* Documentation: https://github.com/davatorium/rofi/wiki
* Config created by Aditya Shakya https://github.com/adi1090x
* Config modified by Keyitdev https://www.github.com/keyitdev/dotfiles
* Copyright (C) 2022 Keyitdev, Aditya Shakya
*/
configuration {
font: "Roboto mono 11";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
display-window: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 2px;
border-color: @br;
border-radius: 20px;
height: 46%;
width: 25%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @fg;
font: "Iosevka Nerd Font 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 28px;
border: 0px;
padding: 0 10px 0 10px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}
-121
View File
@@ -1,121 +0,0 @@
/*
* Documentation: https://github.com/davatorium/rofi/wiki
* Config created by Aditya Shakya https://github.com/adi1090x
* Config modified by Keyitdev https://www.github.com/keyitdev/dotfiles
* Copyright (C) 2022 Keyitdev, Aditya Shakya
*/
configuration {
font: "Roboto mono 11";
show-icons: false;
icon-theme: "Papirus";
display-drun: "";
display-window: "";
drun-display-format: "{name}";
disable-history: false;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 2px;
border-color: @br;
border-radius: 20px;
height: 28%;
width: 25%;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0.30% 1% 0% -0.5%;
background-color: @al;
text-color: @fg;
font: "Iosevka Nerd Font 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search";
padding: 0.10% 0% 0% 0%;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @ac;
text-color: @bg;
expand: false;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @ac;
margin: 0% 0% 0% 0%;
padding: 1.5%;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 0%;
cycle: false;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0% 0% 0% 0%;
border-radius: 0% 0% 0% 0%;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 0%;
padding: 0%;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0%;
padding: 1% 0.5% 1% 0.5%;
}
element-icon {
background-color: inherit;
text-color: inherit;
horizontal-align: 0.5;
vertical-align: 0.5;
size: 28px;
border: 0px;
padding: 0 10px 0 10px;
}
element-text {
background-color: @al;
text-color: inherit;
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0% 0.25% 0% 0.25%;
}
element selected {
background-color: @se;
text-color: @fg;
border: 0% 0% 0% 0%;
border-radius: 0px;
border-color: @bg;
}
-34
View File
@@ -1,34 +0,0 @@
# Documentation: See man `man zathurarc'
# Config created by Keyitdev https://www.github.com/keyitdev/dotfiles
# Copyright (C) 2022 Keyitdev
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries
set scroll-page-aware "true"
set scroll-full-overlap 0.01
set scroll-step 100
set zoom-min 10
set guioptions ""
# set font "Roboto mono 15"
set default-bg "#1b1b25"
set default-fg "#dedede"
set recolor "true"
set recolor-lightcolor "#16161e"
set recolor-darkcolor "#dedede"
set recolor-reverse-video "true"
set recolor-keephue "true"
set render-loading "false"
set scroll-step 200
unmap f
map f toggle_fullscreen
map [fullscreen] f toggle_fullscreen
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More