update: hypr&neovim improvements, yazi plugins, waybar tweaking before bigger update

This commit is contained in:
2026-04-25 09:48:48 +03:00
parent 1930ed092f
commit 6cbd52f0db
71 changed files with 1470 additions and 223 deletions

View File

@@ -14,6 +14,12 @@ export PROMPT_COMMAND="history -a"
export GCM_CREDENTIAL_STORE=cache
# zoxide
if command -v zoxide >/dev/null 2>&1; then
eval "$(zoxide init bash)"
fi
# pyenv
if command -v pyenv >/dev/null 2>&1; then
export PYENV_ROOT="$HOME/.pyenv"

View File

@@ -1,3 +1,4 @@
# includes
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
@@ -6,10 +7,9 @@ if [ -f "$HOME/.bash_exports" ]; then
. "$HOME/.bash_exports"
fi
# if ! shopt -oq posix; then
# if [ -f /usr/share/bash-completion/bash_completion ]; then
# . /usr/share/bash-completion/bash_completion
# elif [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
# fi
# fi
# bash decorations
# arch-linux default:
# PS1='[\u@\h \W]\$ '
# servers:
# PS1='|\u@\h \W|\$ '
PS1='[\u@\h \W]\$ '

117
.bashrc
View File

@@ -1,12 +1,4 @@
# additional aliases
if [ -f "$HOME/.bash_private" ]; then
. "$HOME/.bash_private"
fi
if [ -f "$HOME/.bash_aliases" ]; then
. "$HOME/.bash_aliases"
fi
# saving aliases aliases
# aliases aliases
alias aliasm='alias |comm -13 <(grep -h ^alias ~/.bashrc ~/.bash_private | sort) -'
alias aliasd='aliasm |diff -u --color ~/.bash_aliases -'
alias aliasr='unalias -a; . ~/.bashrc'
@@ -21,50 +13,62 @@ alias l='ls --color=auto'
alias s='ls --color=auto'
# cd aliases
alias cr='cd ..'
alias cdp='cd ~/Programming'
alias cds='cd ~/services'
alias cdd='cd ~/Downloads'
alias cdt='cd ~/tmp'
alias cdn='cd ~/Documents/obsidian/Notes'
alias cda='cd /run/media/$USER/'
# rm aliases
alias cleartmp='rm -r ~/tmp/*'
alias rmr='rm -rf'
# grep aliases
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# edit configs aliases
alias cfghypr='(nvim ~/.config/hypr)'
alias cfgkitty='(nvim ~/.config/kitty)'
alias cfgnvim='(nvim ~/.config/nvim)'
alias cfgrofi='(nvim ~/.config/rofi)'
alias cfgwaybar='(nvim ~/.config/waybar)'
alias cfgdunst='(nvim ~/.config/dunst)'
alias cfgyazi='(nvim ~/.config/yazi)'
alias cfgfastfetch='(nvim ~/.config/fastfetch)'
alias cfgbash='(nvim ~/.config/bash)'
# utils aliases
alias y='yazi'
alias py='python'
alias pyv='python --version'
alias clipclear='cliphist wipe'
alias scrcpy-def='scrcpy -S --no-audio -K'
alias hload='hyprctl reload'
# wm aliases
alias shy='start-hyprland'
alias hload='hyprctl reload'
alias sudo-gtk='sudo WAYLAND_DISPLAY="$WAYLAND_DISPLAY" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR"'
# edit aliases
alias cfgssh='(cd ~/.ssh && nvim .)'
alias cfghypr='(cd ~/.config/hypr && nvim .)'
alias cfgkitty='(cd ~/.config/kitty && nvim .)'
alias cfgnvim='(cd ~/.config/nvim && nvim .)'
alias cfgrofi='(cd ~/.config/rofi && nvim .)'
alias cfgwaybar='(cd ~/.config/waybar && nvim .)'
alias cfgdunst='(cd ~/.config/dunst && nvim .)'
alias cfgyazi='(cd ~/.config/yazi && nvim .)'
alias cfgfastfetch='(cd ~/.config/fastfetch && nvim .)'
alias cfgbash='(cd ~/.config/bash && nvim .)'
alias cfgquickshell='(cd ~/.config/quickshell && nvim .)'
alias cfgdriftwm='(cd ~/.config/driftwm && nvim .)'
alias cfgscripts='(cd ~/config-scripts && nvim .)'
alias script='(cd ~/scripts && nvim .)'
alias scripts='(cd ~/scripts && nvim .)'
alias notes='(cd ~/Documents/obsidian/Notes && nvim .)'
# tmp handling aliases
alias cleartmp='rm -rf ~/tmp && mkdir -p ~/tmp/daily'
alias tmp='(cd ~/tmp/daily && nvim $(date +"%Y-%m-%d-%H").md)'
alias tmpmd='(cd ~/tmp/daily && nvim $(date +"%Y-%m-%d-%H").md)'
alias tmppy='(cd ~/tmp/daily && nvim $(date +"%Y-%m-%d-%H").py)'
alias tmpsh='(cd ~/tmp/daily && nvim $(date +"%Y-%m-%d-%H").sh)'
# productivity aliases
alias profile='source ~/.bash_profile'
# rewrite "modes" to scripts
alias mode-local='cat ~/.config/nvim/lua/templates/clipboard/local-clipboard.lua > ~/.config/nvim/lua/config/clipboard.lua'
alias mode-remote='cat ~/.config/nvim/lua/templates/clipboard/remote-clipboard.lua > ~/.config/nvim/lua/config/clipboard.lua'
# wifi aliases
alias wifi-reload='nmcli r wifi off && nmcli r wifi on'
alias wifi-reload-off='nmcli r wifi off'
alias wifi-reload-on='nmcli r wifi on'
alias swagger-docs='sudo host-docs'
alias share='python3 -m http.server'
alias globalshare='(cd ~/Share && python3 -m http.server)'
alias download='aria2c -x16 -s16'
alias docker-enable='sudo systemctl start docker.service'
alias docker-disable='sudo systemctl stop docker.service && sudo systemctl stop docker.socket'
alias docker-status='sudo systemctl status docker.service'
alias sudo-gtk='sudo WAYLAND_DISPLAY="$WAYLAND_DISPLAY" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR"'
# kitty aliases
alias ssh='kitty +kitten ssh'
@@ -73,13 +77,48 @@ alias edit-in-kitty='kitten edit-in-kitty'
# yay/pacman aliases
alias pzf='yay -Qq | fzf --preview '\''yay -Qil {}'\'' --layout reverse --bind '\''enter:execute(yay -Qil {} | less)'\'' --bind '\''ctrl-r:execute(yay -R {} | less)'\'''
alias paclean='sudo pacman -Rs '
alias update='yay --noconfirm'
# fastfetch
alias fastfetch='python3 ~/.config/fastfetch/detect_os.py'
alias ff='python3 ~/.config/fastfetch/detect_os.py'
# fastfetch aliases
alias fastfetch='~/.config/fastfetch/detect_os.py'
alias ff='~/.config/fastfetch/detect_os.py'
# curl aliases
alias post='curl -X POST -H "Content-Type: application\json"'
alias get='curl -X GET'
# docker aliases
alias docker-enable='sudo systemctl start docker.service'
alias docker-disable='sudo systemctl stop docker.service && sudo systemctl stop docker.socket'
alias docker-status='sudo systemctl status docker.service'
alias dcd='sudo docker compose down'
alias dcu='sudo docker compose up'
alias dcp='sudo docker compose pull'
alias swagger-docs='sudo host-docs'
# other utils aliases
alias x='sudo chmod +x'
alias y='yazi'
alias n='nvim .'
alias py='python'
alias pyv='python --version'
alias clipclear='cliphist wipe'
alias download='aria2c -x16 -s16'
alias scrcpy-def='scrcpy -S --no-audio -K'
alias share='python3 -m http.server'
alias globalshare='(cd ~/Share && python3 -m http.server)'
# fun aliases
alias mm='unimatrix -f -a -s 92 -l coo -c yellow'
alias mmbee='unimatrix -f -a -s 86 -u '\''bee'\'' -c yellow'
alias mmbeesquit='unimatrix -f -s 86 -u '\''beesquit'\'' -c yellow'
alias mmsnow='unimatrix -u ❄❆❅᪥𑁍⭒*❄❆❅᪥* -c white -a'
# extra
# additional aliases
if [ -f "$HOME/.bash_private" ]; then
. "$HOME/.bash_private"
fi
if [ -f "$HOME/.bash_aliases" ]; then
. "$HOME/.bash_aliases"
fi

View File

@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import os
import platform
import subprocess

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 16 MiB

After

Width:  |  Height:  |  Size: 16 MiB

View File

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

Before

Width:  |  Height:  |  Size: 11 MiB

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

@@ -1,20 +1,31 @@
# TODO: testing
exec-once = bash -c "sleep 1 && for monitor in $(hyprctl monitors -j | jq -r '.[].name'); do hyprctl dispatch workspace 100 && hyprctl dispatch focusworkspaceoncurrentmonitor 100; done"
# System
# Initialize dbus
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# Set workspace 100 for the scroll-left support
exec-once = bash -c "sleep 1 && for monitor in $(hyprctl monitors -j | jq -r '.[].name'); do hyprctl dispatch workspace 100 && hyprctl dispatch focusworkspaceoncurrentmonitor 100; done"
# Initialize sleep
exec-once = uwsm app -- systemd-inhibit --who="Hyprland config" --why="wlogout keybind" --what=handle-power-key --mode=block sleep infinity
# Run xdg portals
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal
exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-gtk
exec-once = uwsm app -- hypridle
# Clipboard
exec-once = uwsm app -- wl-paste --type text --watch cliphist store #Stores only text data
exec-once = uwsm app -- wl-paste --type image --watch cliphist store #Stores only image data
# Essential
exec-once = uwsm app -- dunst
exec-once = uwsm app -- awww-daemon
exec-once = uwsm app -- awww img "$WALLPAPER"
# Important
exec-once = uwsm app -- hypridle
exec-once = uwsm app -- waybar
exec-once = uwsm app -- dunst
exec-once = uwsm app -- wl-paste --type text --watch cliphist store #Stores only text data
exec-once = uwsm app -- wl-paste --type image --watch cliphist store #Stores only image data
exec-once = uwsm app -- systemd-inhibit --who="Hyprland config" --why="wlogout keybind" --what=handle-power-key --mode=block sleep infinity
# Extra
# Color correction
exec-once = uwsm app -- ~/.config/hypr/scripts/color-correction.sh
# Apply GTK themes
exec-once = nwg-look -a

View File

@@ -1,6 +1,13 @@
# general
$mainMod = SUPER
# change layout that supports no shift retapping
bindl = ALT, Shift_L, exec, hyprctl switchxkblayout main next
# Toggle performance mode
bind = $mainMod, F1, exec, ~/.config/hypr/scripts/mode-performance.sh
# navigation binds
bind = $mainMod SHIFT, C, killactive
@@ -22,12 +29,12 @@ bind = $mainMod SHIFT, T, layoutmsg, swapsplit
bind = $mainMod, Q, exec, kitty
bind = $mainMod, E, exec, thunar
bind = $mainMod, R, exec, rofi -show drun -no-history -matching prefix -drun-match-fields name -no-tokenize
bind = $mainMod SHIFT, R, exec, .config/rofi/network-manager/run-manager.sh
bind = $mainMod SHIFT, R, exec, ~/.config/rofi/network-manager/run-manager.sh
bind = $mainMod, C, exec, hyprpicker -a
# copy binds
bind = $mainMod, V, exec, rofi -modi clipboard:/$HOME/.config/rofi/clipboard/cliphist-rofi-img.sh -show clipboard -show-icon -config ~/.config/rofi/clipboard-config.rasi
# -config $HOME/.config/rofi/clipboard-config.rasi
bind = $mainMod SHIFT, S, exec, IMG=~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG
bind = , PRINT, exec, grim - | wl-copy
@@ -40,57 +47,54 @@ bind = $mainMod, code:49, exec, hyprlock
bindr = $mainMod, w, exec, pkill -9 waybar || uwsm app -- waybar
# quickshell bind
bindr = $mainMod SHIFT, w, exec, pkill -9 quickshell || uwsm app -- quickshell
# multimedia binds
binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%; .config/hypr/scripts/dunst/volume.sh
binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%; .config/hypr/scripts/dunst/volume-down.sh
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle; .config/hypr/scripts/dunst/volume-mute.sh
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle; .config/hypr/scripts/dunst/micro.sh
binde = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%; ~/.config/hypr/scripts/dunst/volume.sh
binde = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%; ~/.config/hypr/scripts/dunst/volume-down.sh
bind = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle; ~/.config/hypr/scripts/dunst/volume-mute.sh
bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle; ~/.config/hypr/scripts/dunst/micro.sh
bind = , XF86AudioStop, exec, playerctl stop
bind = , XF86AudioPause, exec, playerctl pause
bind = , XF86AudioPrev, exec, playerctl previous; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioNext, exec, playerctl next; .config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioPrev, exec, playerctl previous; ~/.config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioNext, exec, playerctl next; ~/.config/hypr/scripts/dunst/trackinfo.sh
bind = , XF86AudioPlay, exec, playerctl play-pause
# bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +10%
# bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -10%
# bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# brightness binds
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; .config/hypr/scripts/dunst/brightness.sh
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; .config/hypr/scripts/dunst/brightness-down.sh
binde = , XF86MonBrightnessUp , exec, brightnessctl --class='backlight' set 5%+; ~/.config/hypr/scripts/dunst/brightness.sh
binde = , XF86MonBrightnessDown , exec, brightnessctl --class='backlight' set 5%-; ~/.config/hypr/scripts/dunst/brightness-down.sh
# power binds
# bindl = , switch:off:Lid Switch, exec, hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# bindl = , switch:on:Lid Switch, exec, .config/hypr/scripts/eDPower.sh
# bind = , XF86PowerOff, exec, .config/hypr/scripts/before-sleep.sh
bind = , XF86PowerOff, exec, systemctl suspend
# Move focus with mainMod + arrow keys
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
binde = $mainMod, H, movefocus, l
binde = $mainMod, L, movefocus, r
binde = $mainMod, K, movefocus, u
binde = $mainMod, J, movefocus, d
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
binde = $mainMod, left, movefocus, l
binde = $mainMod, right, movefocus, r
binde = $mainMod, up, movefocus, u
binde = $mainMod, down, movefocus, d
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
binde = $mainMod SHIFT, H, movewindow, l
binde = $mainMod SHIFT, L, movewindow, r
binde = $mainMod SHIFT, K, movewindow, u
binde = $mainMod SHIFT, J, movewindow, d
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
binde = $mainMod SHIFT, left, movewindow, l
binde = $mainMod SHIFT, right, movewindow, r
binde = $mainMod SHIFT, up, movewindow, u
binde = $mainMod SHIFT, down, movewindow, d
bind = ALT, TAB, cyclenext
binde = ALT, TAB, cyclenext
# Scroll through existing workspaces with mainMod + scroll
@@ -105,24 +109,24 @@ bindm = $mainMod SHIFT, mouse:272, resizewindow
# Resize with keyboard
bind = $mainMod CTRL, h, resizeactive, -30 0
bind = $mainMod CTRL, l, resizeactive, 30 0
bind = $mainMod CTRL, j, resizeactive, 0 30
bind = $mainMod CTRL, k, resizeactive, 0 -30
binde = $mainMod CTRL, h, resizeactive, -30 0
binde = $mainMod CTRL, l, resizeactive, 30 0
binde = $mainMod CTRL, j, resizeactive, 0 30
binde = $mainMod CTRL, k, resizeactive, 0 -30
# Switch workspaces
bind = $mainMod, A, exec, .config/hypr/scripts/workspace-handler.sh change previous
bind = $mainMod, D, exec, .config/hypr/scripts/workspace-handler.sh change next
bind = $mainMod CTRL, A, focusworkspaceoncurrentmonitor, r-1
bind = $mainMod CTRL, D, focusworkspaceoncurrentmonitor, r+1
binde = $mainMod, A, exec, .config/hypr/scripts/workspace-handler.sh change previous
binde = $mainMod, D, exec, .config/hypr/scripts/workspace-handler.sh change next
binde = $mainMod CTRL, A, focusworkspaceoncurrentmonitor, r-1
binde = $mainMod CTRL, D, focusworkspaceoncurrentmonitor, r+1
# Move active window between workspaces
bind = $mainMod SHIFT, A, exec, .config/hypr/scripts/workspace-handler.sh move previous
bind = $mainMod SHIFT, D, exec, .config/hypr/scripts/workspace-handler.sh move next
bind = $mainMod CTRL SHIFT, A, movetoworkspace, r-1
bind = $mainMod CTRL SHIFT, D, movetoworkspace, r+1
binde = $mainMod SHIFT, A, exec, .config/hypr/scripts/workspace-handler.sh move previous
binde = $mainMod SHIFT, D, exec, .config/hypr/scripts/workspace-handler.sh move next
binde = $mainMod CTRL SHIFT, A, movetoworkspace, r-1
binde = $mainMod CTRL SHIFT, D, movetoworkspace, r+1
# Swap worlspaces between monitors

View File

@@ -1,20 +1,27 @@
# GTK theme
env = GTK_THEME,Colloid-Transparent-Dracula
# Session settings
env = QT_QPA_PLATFORM,wayland;xcb
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = GDK_BACKEND,wayland,x11,*
# Gnome theme
exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
exec = gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3-dark"
# Cursor
env = XCURSOR_SIZE,24
# Wayland support
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
env = MOZ_ENABLE_WAYLAND,1
# env = chrome,--enable-features=TouchpadOverscrollHistoryNavigation
# chrome --enable-features=TouchpadOverscrollHistoryNavigation
# Scaling
env = GDK_SCALE,1
xwayland {
force_zero_scaling = true

View File

@@ -2,7 +2,10 @@ input {
kb_layout = us, ru
kb_variant =
kb_model =
kb_options = grp:alt_shift_toggle, caps:escape
# The change layout hotkey is at the top of binds.conf
# The grp:alt_shift_toggle does not support not retapping shift after toggle to capitalize
# kb_options = grp:alt_shift_toggle, caps:escape
kb_options = caps:escape
kb_rules =
follow_mouse = 1

View File

@@ -5,3 +5,4 @@ monitor = eDP-1, prefered, auto, 1
# custom
monitor = desc:Communications Supply Corporation (A division of WESCO) P120ZDG-BF4, 2160x1440@60, auto, 1.33333334
monitor = desc:AU Optronics 0x243D, 1920x1080@60, 0x0, 1, bitdepth, 10

View File

@@ -7,6 +7,7 @@ ecosystem {
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
key_press_enables_dpms = true
}
@@ -23,6 +24,7 @@ general {
dwindle {
pseudotile = yes
preserve_split = yes
# smart_split = no
}
cursor {

View File

@@ -0,0 +1,2 @@
#### Layout change
https://www.reddit.com/r/hyprland/comments/1jintly/how_to_make_altshift_layout_switch_work_correctly/

View File

@@ -1,30 +1,34 @@
general {
lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on && brightnessctl -r
inhibit_sleep = 3
# lock_cmd = pidof hyprlock || hyprlock
before_sleep_cmd = ~/.config/hypr/scripts/before-sleep.sh
after_sleep_cmd = ~/.config/hypr/scripts/after-sleep.sh
# ignore_dbus_inhibit = false
}
# TODO: migrate to brillo?
# Listener 1: Dim screen
# TODO: migrate to brillo? (just replace `brightnessctl` with `brillo`)
listener {
timeout = 120
on-timeout = brightnessctl -s set 0 # avoid 0 with OLED monitors
timeout = 180
on-timeout = brightnessctl -s set 2% # avoid 0 with OLED monitors
on-resume = brightnessctl -r
}
# Listener 2: Lock session
listener {
timeout = 180
timeout = 240
on-timeout = loginctl lock-session
}
# Listener 3: Turn off display
listener {
timeout = 330
timeout = 250
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on && brightnessctl -r
}
# Listener 4: Suspend system
listener {
timeout = 300
timeout = 360
on-timeout = systemctl suspend
}

View File

@@ -1,4 +0,0 @@
#!/bin/bash
# hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# brightnessctl -r

View File

@@ -1,12 +0,0 @@
#!/bin/bash
# hyprctl keyword monitor "eDP-1, 1920x1080@120, 0x0, 1, vrr, 1"
# TODO: why uwsm?
brightnessctl -s
# brightnessctl --class='backlight' set 0%
#
# sleep 4
# brightnessctl --class='backlight' set 20%
uwsm app -- hyprlock &

View File

@@ -0,0 +1,4 @@
#!/bin/bash
if command -v hyprshade &>/dev/null; then
hyprshade on vibrance

View File

@@ -0,0 +1,7 @@
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
<g transform="translate(16.8, 16.8) scale(2.6)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0002 12V14C13.1048 14 14.0002 13.1045 14.0002 12H12.0002ZM12.0002 12H10.0002C10.0002 13.1045 10.8956 14 12.0002 14V12ZM12.0002 12V9.99995C10.8956 9.99995 10.0002 10.8954 10.0002 12H12.0002ZM12.0002 12H14.0002C14.0002 10.8954 13.1048 9.99995 12.0002 9.99995V12ZM12.0002 13H12.0102V11H12.0002V13ZM14.8286 14.8284C12.7579 16.8991 10.5345 18.3566 8.64907 19.0636C6.67076 19.8055 5.45764 19.5995 4.92913 19.071L3.51492 20.4852C4.93902 21.9093 7.23488 21.7299 9.35132 20.9363C11.5606 20.1078 14.0178 18.4677 16.2428 16.2426L14.8286 14.8284ZM4.92913 19.071C4.40061 18.5425 4.19466 17.3294 4.93653 15.3511C5.64358 13.4656 7.10106 11.2422 9.17177 9.17152L7.75756 7.75731C5.5325 9.98237 3.89235 12.4395 3.06387 14.6488C2.2702 16.7653 2.09081 19.0611 3.51492 20.4852L4.92913 19.071ZM9.17177 9.17152C11.2425 7.10082 13.4658 5.64333 15.3513 4.93628C17.3296 4.19441 18.5427 4.40037 19.0713 4.92888L20.4855 3.51467C19.0614 2.09056 16.7655 2.26996 14.6491 3.06362C12.4398 3.8921 9.98262 5.53225 7.75756 7.75731L9.17177 9.17152ZM19.0713 4.92888C19.5998 5.4574 19.8057 6.67051 19.0639 8.64883C18.3568 10.5343 16.8993 12.7577 14.8286 14.8284L16.2428 16.2426C18.4679 14.0175 20.108 11.5604 20.9365 9.35108C21.7302 7.23464 21.9096 4.93878 20.4855 3.51467L19.0713 4.92888ZM14.8286 9.17152C16.8993 11.2422 18.3568 13.4656 19.0639 15.3511C19.8057 17.3294 19.5998 18.5425 19.0713 19.071L20.4855 20.4852C21.9096 19.0611 21.7302 16.7653 20.9365 14.6488C20.108 12.4395 18.4679 9.98237 16.2428 7.75731L14.8286 9.17152ZM19.0713 19.071C18.5427 19.5995 17.3296 19.8055 15.3513 19.0636C13.4658 18.3566 11.2425 16.8991 9.17177 14.8284L7.75756 16.2426C9.98262 18.4677 12.4398 20.1078 14.6491 20.9363C16.7655 21.7299 19.0614 21.9093 20.4855 20.4852L19.0713 19.071ZM9.17177 14.8284C7.10106 12.7577 5.64358 10.5343 4.93653 8.64883C4.19466 6.67051 4.40061 5.4574 4.92913 4.92888L3.51491 3.51467C2.09081 4.93878 2.2702 7.23464 3.06387 9.35108C3.89235 11.5604 5.5325 14.0175 7.75756 16.2426L9.17177 14.8284ZM4.92913 4.92888C5.45764 4.40037 6.67076 4.19441 8.64907 4.93628C10.5345 5.64333 12.7579 7.10082 14.8286 9.17152L16.2428 7.75731C14.0178 5.53225 11.5606 3.8921 9.35132 3.06362C7.23488 2.26996 4.93902 2.09056 3.51491 3.51467L4.92913 4.92888Z" fill="#DADAFF"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,8 @@
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="48" cy="48" r="46" stroke="#DADAFF" stroke-width="4"/>
<g transform="translate(16.8, 16.8) scale(2.6)" stroke="#DADAFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 3v3m6-3v3m3 3h3m-3 6h3m-6 3v3m-6-3v3m-3-6H3m3-6H3m6.5 4.5v-3a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 0 1-1-1ZM7 18h10a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 523 B

View File

@@ -0,0 +1,26 @@
#!/bin/bash
msgId="3378455"
PERFORMANCE_MODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
if [ "$PERFORMANCE_MODE" = 1 ] ; then
hyprctl --batch "\
keyword general:allow_tearing 1;\
keyword animations:enabled 0;\
keyword animation borderangle,0; \
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword decoration:fullscreen_opacity 1;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:rounding 0"
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/cpu.svg" -u low -r "$msgId" "Performance mode [ON]"
exit
else
notify-send -i "$HOME/.config/hypr/scripts/dunst/icons/core.svg" -u low -r "$msgId" "Performance mode [OFF]"
hyprctl reload
exit 0
fi
exit 1

View File

@@ -23,14 +23,16 @@ disable_ligatures always
# Opacity
background_opacity 0.4
# Curor trail
# Cursor
# shell_integration no-cursor
# cursor_shape block
cursor_trail 4
cursor_trail_decay 0.1 0.4
# Window settings
initial_window_width 95c
initial_window_height 35c
window_padding_width 20
window_padding_width 14
confirm_os_window_close 0
# Tab bar

View File

@@ -1,31 +1,32 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
"catppuccin": { "branch": "main", "commit": "426dbebe06b5c69fd846ceb17b42e12f890aedf1" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"conform.nvim": { "branch": "master", "commit": "5420c4b5ea0aeb99c09cfbd4fd0b70d257b44f25" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flutter-tools.nvim": { "branch": "main", "commit": "539e84f5a652d96917f0afc1341c20f0d59dd789" },
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"harpoon-lualine": { "branch": "master", "commit": "215c0847dfb787b19268f7b42eed83bdcf06b966" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"mini.nvim": { "branch": "main", "commit": "7e55c3d2c04da134085a31156196836f80a89982" },
"neo-tree.nvim": { "branch": "main", "commit": "b0b73273b4f5a1f4b4aac8accd6e0c3b4b5a6967" },
"lualine.nvim": { "branch": "master", "commit": "a905eeebc4e63fdc48b5135d3bf8aea5618fb21c" },
"mini.nvim": { "branch": "main", "commit": "5849ef04c32a6a8e55957b946c0a275801d87530" },
"neo-tree.nvim": { "branch": "main", "commit": "4d0828d95adaf4250c1373d2cd9318d3509712b7" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-dap": { "branch": "master", "commit": "818cd8787a77a97703eb1d9090543a374f79a9ac" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-lspconfig": { "branch": "master", "commit": "d696e36d5792daf828f8c8e8d4b9aa90c1a10c2a" },
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
"nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "07d088bf8bdadd159eb807b90eaee86a4778383f" },
"telescope.nvim": { "branch": "master", "commit": "4d0f5e0e7f69071e315515c385fab2a4eff07b3d" },
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"render-markdown.nvim": { "branch": "main", "commit": "d67113f11384c0dad96fced2f7b91f1fc811e97f" },
"telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" },
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
"vim-suda": { "branch": "master", "commit": "c492741b4679b3cdd4d9e34138209784e061d916" },
"yanky.nvim": { "branch": "main", "commit": "04fc42b94305d94948c9c197f679336668af3292" }
"yanky.nvim": { "branch": "main", "commit": "784188e0a7363e762e53140f39124d786aec0832" }
}

View File

@@ -1,15 +1,24 @@
-- Also check plugins/neo-tree.lua for binds
-- There are more binds in plugins/
-- /neo-tree.lua
-- /harpoon.lua
vim.cmd([[
" Terminal thingies
tnoremap <C-h> <C-\\><C-o><C-w>h
tnoremap <C-k> <C-\\><C-o><C-w>k
tnoremap <C-l> <C-\\><C-o><C-w>l
tnoremap <C-j> <C-\\><C-o><C-w>j
" Moving between windows
" Window navigation
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-j> <C-w>j
" Arrows navigation
nnoremap <C-Left> <C-w>h
nnoremap <C-Down> <C-w>j
nnoremap <C-Up> <C-w>k
nnoremap <C-Right> <C-w>l
" I don't remember
nnoremap <C-Space> 

View File

@@ -1,5 +1,5 @@
function number_switch(harpoon)
for i = 1, 9, 1 do
for i = 1, 10, 1 do
vim.keymap.set("n", "<leader>" .. i, function()
harpoon:list():select(i)
end)
@@ -15,18 +15,24 @@ return {
opts = {
settings = {
save_on_toggle = false,
tabline = false,
save_on_toggle = true,
save_on_change = true,
excluded_filetypes = { "harpoon" },
excluded_filetypes = {
"harpoon",
"neo-tree",
},
},
menu = {
border = "rounded",
width = vim.api.nvim_win_get_width(0) - 4,
},
},
config = function()
local harpoon = require("harpoon")
harpoon:setup()
-- vim.g.harpoon_log_level = "fatal",
config = function(_, opts)
local harpoon = require("harpoon")
harpoon:setup(opts)
local harpoon_extensions = require("harpoon.extensions")
harpoon:extend(harpoon_extensions.builtins.highlight_current_file())
@@ -34,6 +40,9 @@ return {
vim.keymap.set("n", "<leader>h", function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set("n", "<leader>a", function()
harpoon:list():add()
end)
vim.keymap.set("n", "<leader>H", function()
harpoon:list():add()
end)
@@ -43,14 +52,14 @@ return {
vim.keymap.set("n", "<leader>L", function()
harpoon:list():clear()
end)
vim.keymap.set("n", "<M-h>", function()
vim.keymap.set("n", "<S-h>", function()
harpoon:list():prev()
end)
vim.keymap.set("n", "<M-l>", function()
vim.keymap.set("n", "<S-l>", function()
harpoon:list():next()
end)
number_switch(harpoon)
-- number_switch(harpoon)
end,
}

View File

@@ -1,7 +1,25 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
dependencies = {
"nvim-tree/nvim-web-devicons",
"letieu/harpoon-lualine",
},
config = function()
require("lualine").setup()
require("lualine").setup({
sections = {
lualine_c = {
{
"harpoon2",
icon = " Tabs: ",
_separator = " ",
indicators = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" },
active_indicators = { "!", "@", "#", "$", "%%", "^", "&", "*", "-", "+" },
color_active = { fg = "#6aa0d2", gui = "bold" },
},
},
},
})
end,
}

View File

@@ -23,6 +23,24 @@ return {
["<Right>"] = "open",
["<Left>"] = "close_node",
["C"] = "convert_to_directory",
["F"] = "toggle_hidden",
["/"] = "fuzzy_search",
},
},
filesystem = {
filtered_items = {
visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
".git",
".venv",
".copier-answers.yml",
".prettierrc.json",
"package-lock.json",
},
never_show = {},
},
},
commands = {

View File

@@ -1,14 +0,0 @@
return {
-- "crispgm/nvim-tabline",
-- config = true,
-- require("tabline").setup({
-- show_index = true,
-- show_modify = true,
-- show_icon = true,
-- fnamemodify = ":t",
-- modify_indicator = "*",
-- no_name = "Без вымени",
-- brackets = { "[", "]" },
-- inactive_tab_max_length = 0,
-- }),
}

View File

@@ -1,26 +1,48 @@
return {
"nvim-treesitter/nvim-treesitter",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = {
"python",
"go",
"kotlin",
"dart",
"lua",
"bash",
"json",
"yaml",
"markdown",
},
ts = require("nvim-treesitter")
ts.setup()
ts.install({
"python",
"go",
"kotlin",
"dart",
"lua",
"bash",
"json",
"yaml",
"markdown",
"vim",
"vimdoc",
})
vim.treesitter.language.register("html", "gotmpl")
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local lang = vim.treesitter.language.get_lang(args.match)
if vim.list_contains(ts.get_available(), lang) then
if not vim.list_contains(ts.get_installed(), lang) then
ts.install(lang):wait()
end
sync_install = false,
auto_install = true,
vim.treesitter.start(args.buf)
end
end,
desc = "enable nvim-treesitter and install parser if not installed",
})
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
})
-- require("nvim-treesitter").setup()
-- {
-- ensure_installed = {
-- },
--
-- sync_install = false,
-- auto_install = true,
--
-- highlight = {
-- enable = true,
-- additional_vim_regex_highlighting = false,
-- },
-- })
end,
}

View File

@@ -0,0 +1,3 @@
-- clipboard.lua will be edited by the bash command
-- it will be replaced with one of the files from templates/clipboard/ directory
vim.o.clipboard = "unnamedplus"

View File

@@ -0,0 +1,12 @@
-- clipboard.lua will be edited by the bash command
-- it will be replaced with one of the files from templates/clipboard/ directory
vim.o.clipboard = "unnamedplus"
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
local copy_to_unnamedplus = require("vim.ui.clipboard.osc52").copy("+")
copy_to_unnamedplus(vim.v.event.regcontents)
local copy_to_unnamed = require("vim.ui.clipboard.osc52").copy("*")
copy_to_unnamed(vim.v.event.regcontents)
end,
})

View File

@@ -5,6 +5,7 @@ configuration {
display-clipboard: "󰅌 Clipboard";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";

View File

@@ -6,6 +6,7 @@ configuration {
display-window: " ";
drun-display-format: "{name}";
window-format: "{w} · {c} · {t}";
terminal: "kitty";
// binds
kb-row-up: "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab";

View File

@@ -52,7 +52,7 @@ fi
# active param
active="\0active\x1f"
# netbird
# wireguard
if $wireguard_installed; then
wireguard_status=$(sudo wg show interfaces)
if [ "$wireguard_status" != "wg0" ]; then
@@ -67,7 +67,10 @@ fi
# netbird
if $netbird_installed; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
netbird_status=""
if timeout 0.3 netbird status >/dev/null 2>&1; then
netbird_status=$(netbird status | grep "Networks" | cut -d: -f2 | sed "s/ -//")
fi
if [ -z "$netbird_status" ]; then
echo " Start netbird"
else

View File

@@ -2,6 +2,7 @@
"clock": {
"format": "{:%H:%M}",
"tooltip-format": "<span>{calendar}</span>",
"locale": "en_GB.UTF-8",
"calendar": {
"mode": "month",
"mode-mon-col": 3,

View File

@@ -1,10 +1,16 @@
{
"group/workspaces-group": {
"orientation": "horizontal",
"modules": ["hyprland/windowcount", "hyprland/workspaces"],
"modules": ["hyprland/workspaces#active", "hyprland/workspaces#list"],
},
"hyprland/workspaces": {
// fix on-click
"hyprland/workspaces#active": {
"format": "{id}",
"tooltip": false,
"active-only": true,
"on-click": "rofi -show",
},
"hyprland/workspaces#list": {
"format": "{icon}",
"tooltip": false,
"tooltips": {
@@ -19,11 +25,4 @@
"default": "󰣇", // 
},
},
"hyprland/windowcount": {
"format": "{icon}",
"format-empty": "{}",
"format-windowed": "{}",
"separate-outputs": true,
"on-click": "rofi -show",
},
}

View File

@@ -79,23 +79,22 @@ tooltip label {
}
#custom-media {
margin-left: 5px;
padding-left: 12px;
padding-right: 12px;
padding-right: 8px;
}
#windowcount {
padding-left: 12px;
padding-right: 4px;
}
#workspaces button {
padding-left: 4px;
}
#workspaces {
padding-right: 6px;
#workspaces.active {
padding-left: 12px;
padding-right: 4px;
}
#workspaces list {
padding-left: 12px;
padding-right: 4px;
}

3
.config/yazi/init.lua Normal file
View File

@@ -0,0 +1,3 @@
require("full-border"):setup({
type = ui.Border.ROUNDED,
})

View File

@@ -83,3 +83,24 @@ run = ["plugin wl-clipboard"]
on = [ "D", "<Enter>" ]
run = 'remove --force --permanently'
desc = "Permanently delete"
[[mgr.prepend_keymap]]
on = "F"
run = "plugin toggle-pane max-preview"
desc = "Maximize or restore the preview pane"
[[mgr.prepend_keymap]]
on = "M"
run = "plugin mount"
desc = "Mount plugin"
[[mgr.prepend_keymap]]
on = "f"
run = "plugin jump-to-char"
desc = "Jump to char"
[[mgr.prepend_keymap]]
on = "p"
run = "plugin smart-paste"
desc = "Paste into the hovered directory or CWD"

View File

@@ -1,7 +1,32 @@
[[plugin.deps]]
use = "grappas/wl-clipboard"
rev = "e9a38e4"
hash = "6b8e5d6b09626facec713923d3ddb54b"
rev = "8cc5524"
hash = "5c587834c274dca9059092714ece1f18"
[[plugin.deps]]
use = "yazi-rs/plugins:toggle-pane"
rev = "ac82af3"
hash = "4c0260feb50ea2437380690ffc241da7"
[[plugin.deps]]
use = "yazi-rs/plugins:full-border"
rev = "ac82af3"
hash = "eff8ff12fa4e5f035a10d8aeeb4c258d"
[[plugin.deps]]
use = "yazi-rs/plugins:mount"
rev = "ac82af3"
hash = "77e20b071404f97c09d3f9afdb9482e0"
[[plugin.deps]]
use = "yazi-rs/plugins:jump-to-char"
rev = "ac82af3"
hash = "7a4b4237223aaa94e589d1c01a23542a"
[[plugin.deps]]
use = "yazi-rs/plugins:smart-paste"
rev = "ac82af3"
hash = "3f8d49413bc8691b4c652eb417a20178"
[flavor]
deps = []

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 yazi-rs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,32 @@
# full-border.yazi
Add a full border to Yazi to make it look fancier.
![full-border](https://github.com/yazi-rs/plugins/assets/17523360/ef81b560-2465-4d36-abf2-5d21dcb7b987)
## Installation
```sh
ya pkg add yazi-rs/plugins:full-border
```
## Usage
Add this to your `init.lua` to enable the plugin:
```lua
require("full-border"):setup()
```
Or you can customize the border type:
```lua
require("full-border"):setup {
-- Available values: ui.Border.PLAIN, ui.Border.ROUNDED
type = ui.Border.ROUNDED,
}
```
## License
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.

View File

@@ -0,0 +1,53 @@
--- @since 25.2.26
local function setup(_, opts)
local type = opts and opts.type or ui.Border.ROUNDED
local old_build = Tab.build
Tab.build = function(self, ...)
local bar = function(c, x, y)
if x <= 0 or x == self._area.w - 1 or th.mgr.border_symbol ~= "" then
return ui.Bar(ui.Edge.TOP)
end
return ui.Bar(ui.Edge.TOP)
:area(
ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) }
)
:symbol(c)
end
local c = self._chunks
self._chunks = {
c[1]:pad(ui.Pad.y(1)),
-- TODO: remove this compatibility hack
fs.unique and c[2]:pad(ui.Pad.y(1)) or c[2]:pad(ui.Pad(1, c[3].w > 0 and 0 or 1, 1, c[1].w > 0 and 0 or 1)),
c[3]:pad(ui.Pad.y(1)),
}
local style = th.mgr.border_style
if rt.opener then -- TODO: remove this compatibility hack
self._base = ya.list_merge(self._base or {}, {
ui.Border(ui.Edge.ALL):area(self._area):type(type):style(style),
bar("", c[2].x, c[1].y),
bar("", c[2].x, c[1].bottom - 1),
bar("", c[2].right - 1, c[2].y),
bar("", c[2].right - 1, c[2].bottom - 1),
})
else
self._base = ya.list_merge(self._base or {}, {
ui.Border(ui.Edge.ALL):area(self._area):type(type):style(style),
bar("", c[1].right - 1, c[1].y),
bar("", c[1].right - 1, c[1].bottom - 1),
bar("", c[2].right, c[2].y),
bar("", c[2].right, c[2].bottom - 1),
})
end
old_build(self, ...)
end
end
return { setup = setup }

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 yazi-rs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,28 @@
# jump-to-char.yazi
Vim-like `f<char>`, jump to the next file whose name starts with `<char>`.
https://github.com/yazi-rs/plugins/assets/17523360/aac9341c-b416-4e0c-aaba-889d48389869
## Installation
```sh
ya pkg add yazi-rs/plugins:jump-to-char
```
## Usage
Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[mgr.prepend_keymap]]
on = "f"
run = "plugin jump-to-char"
desc = "Jump to char"
```
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other actions/plugins.
## License
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.

View File

@@ -0,0 +1,32 @@
--- @since 25.5.31
local AVAILABLE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."
local changed = ya.sync(function(st, new)
local b = st.last ~= new
st.last = new
return b or not cx.active.finder
end)
local escape = function(s) return s == "." and "\\." or s end
return {
entry = function()
local cands = {}
for i = 1, #AVAILABLE_CHARS do
cands[#cands + 1] = { on = AVAILABLE_CHARS:sub(i, i) }
end
local idx = ya.which { cands = cands, silent = true }
if not idx then
return
end
local kw = escape(cands[idx].on)
if changed(kw) then
ya.emit("find_do", { "^" .. kw })
else
ya.emit("find_arrow", {})
end
end,
}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 yazi-rs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,50 @@
# mount.yazi
A mount manager for Yazi, providing disk mount, unmount, and eject functionality.
Supported platforms:
- Linux with [`udisksctl`](https://github.com/storaged-project/udisks), `lsblk` and `eject` both provided by [`util-linux`](https://github.com/util-linux/util-linux)
- macOS with `diskutil`, which is pre-installed
https://github.com/user-attachments/assets/c6f780ab-458b-420f-85cf-2fc45fcfe3a2
## Installation
```sh
ya pkg add yazi-rs/plugins:mount
```
## Usage
Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[mgr.prepend_keymap]]
on = "M"
run = "plugin mount"
```
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other actions/plugins.
## Actions
| Key binding | Alternate key | Action |
| ------------ | ------------- | --------------------- |
| <kbd>q</kbd> | - | Quit the plugin |
| <kbd>k</kbd> | <kbd>↑</kbd> | Move up |
| <kbd>j</kbd> | <kbd>↓</kbd> | Move down |
| <kbd>l</kbd> | <kbd>→</kbd> | Enter the mount point |
| <kbd>m</kbd> | - | Mount the partition |
| <kbd>u</kbd> | - | Unmount the partition |
| <kbd>e</kbd> | - | Eject the disk |
## TODO
- Custom keybindings
- Windows support (I don't use Windows myself, PRs welcome!)
- Support mount, unmount, and eject the entire disk
## License
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.

View File

@@ -0,0 +1,66 @@
local M = {}
--- @param type "mount"|"unmount"|"eject"
--- @param partition table
function M.operate(type, partition)
if not partition then
return
elseif not partition.sub then
return -- TODO: mount/unmount main disk
end
local cmd, output, err
if ya.target_os() == "macos" then
cmd, output, err = "diskutil", M.diskutil(type, partition.src)
elseif ya.target_os() == "linux" then
if type == "eject" and partition.src:match("^/dev/sr%d+") then
M.udisksctl("unmount", partition.src)
cmd, output, err = "eject", M.eject(partition.src)
elseif type == "eject" then
M.udisksctl("unmount", partition.src)
cmd, output, err = "udisksctl", M.udisksctl("power-off", partition.src)
else
cmd, output, err = "udisksctl", M.udisksctl(type, partition.src)
end
end
if not cmd then
M.fail("mount.yazi is not currently supported on your platform")
elseif not output then
M.fail("Failed to spawn `%s`: %s", cmd, err)
elseif not output.status.success then
M.fail("Failed to %s `%s`: %s", type, partition.src, output.stderr)
end
end
--- @param type "mount"|"unmount"|"eject"
--- @param src string
--- @return Output? output
--- @return Error? err
function M.diskutil(type, src) return Command("diskutil"):arg({ type, src }):output() end
--- @param type "mount"|"unmount"|"power-off"
--- @param src string
--- @return Output? output
--- @return Error? err
function M.udisksctl(type, src)
local args = { type, "-b", src, "--no-user-interaction" }
local output, err = Command("udisksctl"):arg(args):output()
if not output or err then
return nil, err
elseif output.stderr:find("org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain", 1, true) then
return require(".sudo").run_with_sudo("udisksctl", args)
else
return output
end
end
--- @param src string
--- @return Output? output
--- @return Error? err
function M.eject(src) return Command("eject"):arg({ "--traytoggle", src }):output() end
function M.fail(...) ya.notify { title = "Mount", content = string.format(...), timeout = 10, level = "error" } end
return M

View File

@@ -0,0 +1,263 @@
--- @since 25.12.29
local toggle_ui = ya.sync(function(self)
if self.children then
Modal:children_remove(self.children)
self.children = nil
else
self.children = Modal:children_add(self, 10)
end
ui.render()
end)
local subscribe = ya.sync(function(self)
ps.unsub("mount")
ps.sub("mount", function() ya.emit("plugin", { self._id, "refresh" }) end)
end)
local update_partitions = ya.sync(function(self, partitions)
self.partitions = partitions
self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1))
ui.render()
end)
local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end)
local update_cursor = ya.sync(function(self, cursor)
if #self.partitions == 0 then
self.cursor = 0
else
self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1)
end
ui.render()
end)
local M = {
keys = {
{ on = "q", run = "quit" },
{ on = "<Esc>", run = "quit" },
{ on = "<Enter>", run = { "enter", "quit" } },
{ on = "k", run = "up" },
{ on = "j", run = "down" },
{ on = "l", run = { "enter", "quit" } },
{ on = "<Up>", run = "up" },
{ on = "<Down>", run = "down" },
{ on = "<Right>", run = { "enter", "quit" } },
{ on = "m", run = "mount" },
{ on = "u", run = "unmount" },
{ on = "e", run = "eject" },
},
}
function M:new(area)
self:layout(area)
return self
end
function M:layout(area)
local chunks = ui.Layout()
:constraints({
ui.Constraint.Percentage(10),
ui.Constraint.Percentage(80),
ui.Constraint.Percentage(10),
})
:split(area)
local chunks = ui.Layout()
:direction(ui.Layout.HORIZONTAL)
:constraints({
ui.Constraint.Percentage(10),
ui.Constraint.Percentage(80),
ui.Constraint.Percentage(10),
})
:split(chunks[2])
self._area = chunks[2]
end
function M:entry(job)
if job.args[1] == "refresh" then
return update_partitions(self.obtain())
end
toggle_ui()
update_partitions(self.obtain())
subscribe()
local tx1, rx1 = ya.chan("mpsc")
local tx2, rx2 = ya.chan("mpsc")
function producer()
while true do
local cand = self.keys[ya.which { cands = self.keys, silent = true }] or { run = {} }
for _, r in ipairs(type(cand.run) == "table" and cand.run or { cand.run }) do
tx1:send(r)
if r == "quit" then
toggle_ui()
return
end
end
end
end
function consumer1()
repeat
local run = rx1:recv()
if run == "quit" then
tx2:send(run)
break
elseif run == "up" then
update_cursor(-1)
elseif run == "down" then
update_cursor(1)
elseif run == "enter" then
local active = active_partition()
if active and active.dist then
ya.emit("cd", { active.dist })
end
else
tx2:send(run)
end
until not run
end
function consumer2()
repeat
local run = rx2:recv()
if run == "quit" then
break
elseif run == "mount" then
require(".cross").operate("mount", active_partition())
elseif run == "unmount" then
require(".cross").operate("unmount", active_partition())
elseif run == "eject" then
require(".cross").operate("eject", active_partition())
end
until not run
end
ya.join(producer, consumer1, consumer2)
end
function M:reflow() return { self } end
function M:redraw()
local rows = {}
for _, p in ipairs(self.partitions or {}) do
if not p.sub then
rows[#rows + 1] = ui.Row { p.main }
elseif p.sub == "" then
rows[#rows + 1] = ui.Row { p.main, p.label or "", p.dist or "", p.fstype or "" }
else
rows[#rows + 1] = ui.Row { " " .. p.sub, p.label or "", p.dist or "", p.fstype or "" }
end
end
return {
ui.Clear(self._area),
ui.Border(ui.Edge.ALL)
:area(self._area)
:type(ui.Border.ROUNDED)
:style(ui.Style():fg("blue"))
:title(ui.Line("Mount"):align(ui.Align.CENTER)),
ui.Table(rows)
:area(self._area:pad(ui.Pad(1, 2, 1, 2)))
:header(ui.Row({ "Src", "Label", "Dist", "FSType" }):style(ui.Style():bold()))
:row(self.cursor)
:row_style(ui.Style():fg("blue"):underline())
:widths {
ui.Constraint.Length(20),
ui.Constraint.Length(20),
ui.Constraint.Percentage(70),
ui.Constraint.Length(20),
},
}
end
function M.obtain()
local tbl = {}
local last
for _, p in ipairs(fs.partitions()) do
local main, sub = M.split(p.src)
if main and last ~= main then
if p.src == main then
last, p.main, p.sub, tbl[#tbl + 1] = p.src, p.src, "", p
else
last, tbl[#tbl + 1] = main, { src = main, main = main, sub = "" }
end
end
if sub then
if tbl[#tbl].sub == "" and tbl[#tbl].main == main then
tbl[#tbl].sub = nil
end
p.main, p.sub, tbl[#tbl + 1] = main, sub, p
end
end
table.sort(M.fillin(tbl), function(a, b)
if a.main == b.main then
return (a.sub or "") < (b.sub or "")
else
return a.main > b.main
end
end)
return tbl
end
function M.split(src)
local pats = {
{ "^/dev/sd[a-z]", "%d+$" }, -- /dev/sda1
{ "^/dev/nvme%d+n%d+", "p%d+$" }, -- /dev/nvme0n1p1
{ "^/dev/mmcblk%d+", "p%d+$" }, -- /dev/mmcblk0p1
{ "^/dev/disk%d+", ".+$" }, -- /dev/disk1s1
{ "^/dev/sr%d+", ".+$" }, -- /dev/sr0
{ "^/dev/fd%d+", ".+$" }, -- /dev/fd0
{ "^/dev/md%d+", "p%d+$" }, -- /dev/md0p1
{ "^/dev/nbd%d+", "p%d+$" }, -- /dev/nbd0p1
{ "^/dev/bcache%d+", "p%d+$" }, -- /dev/bcache0p1
{ "^/dev/mapper/", ".+$" }, -- /dev/mapper/<name>
}
for _, p in ipairs(pats) do
local main = src:match(p[1])
if main then
return main, src:sub(#main + 1):match(p[2])
end
end
end
function M.fillin(tbl)
if ya.target_os() ~= "linux" then
return tbl
end
local sources, indices = {}, {}
for i, p in ipairs(tbl) do
if p.sub and not p.fstype then
sources[#sources + 1], indices[p.src] = p.src, i
end
end
if #sources == 0 then
return tbl
end
local output, err = Command("lsblk"):arg({ "-p", "-o", "name,fstype", "-J" }):arg(sources):output()
if err then
ya.dbg("Failed to fetch filesystem types for unmounted partitions: " .. err)
return tbl
end
local t = ya.json_decode(output and output.stdout or "")
for _, p in ipairs(t and t.blockdevices or {}) do
tbl[indices[p.name]].fstype = p.fstype
end
return tbl
end
function M:click() end
function M:scroll() end
function M:touch() end
return M

View File

@@ -0,0 +1,54 @@
local M = {}
--- Verify if `sudo` is already authenticated
--- @return boolean
--- @return Error?
function M.sudo_already()
local status, err = Command("sudo"):arg({ "--validate", "--non-interactive" }):status()
return status and status.success or false, err
end
--- Run a program with `sudo` privilege
--- @param program string
--- @param args table
--- @return Output? output
--- @return Error? err
function M.run_with_sudo(program, args)
local cmd = Command("sudo")
:arg({ "--stdin", "--user", "#" .. ya.uid(), "--", program })
:arg(args)
:stdin(Command.PIPED)
:stdout(Command.PIPED)
:stderr(Command.PIPED)
if M.sudo_already() then
return cmd:output()
end
local value, event = ya.input {
pos = { "top-center", y = 3, w = 40 },
title = string.format("Password for `sudo %s`:", program),
obscure = true,
}
if not value or event ~= 1 then
return nil, Err("Sudo password input cancelled")
end
local child, err = cmd:spawn()
if not child or err then
return nil, err
end
child:write_all(value .. "\n")
child:flush()
local output, err = child:wait_with_output()
if not output or err then
return nil, err
elseif output.status.success or M.sudo_already() then
return output
else
return nil, Err("Incorrect sudo password")
end
end
return M

View File

@@ -0,0 +1 @@
../LICENSE

View File

@@ -0,0 +1,28 @@
# smart-paste.yazi
Paste files into the hovered directory or to the CWD if hovering over a file.
https://github.com/user-attachments/assets/b3f6348e-abbe-42fe-9a67-a96e68f11255
## Installation
```sh
ya pkg add yazi-rs/plugins:smart-paste
```
## Usage
Add this to your `~/.config/yazi/keymap.toml`:
```toml
[[mgr.prepend_keymap]]
on = "p"
run = "plugin smart-paste"
desc = "Paste into the hovered directory or CWD"
```
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other actions/plugins.
## License
This plugin is MIT-licensed. For more information check the [LICENSE](LICENSE) file.

View File

@@ -0,0 +1,14 @@
--- @since 25.5.31
--- @sync entry
return {
entry = function()
local h = cx.active.current.hovered
if h and h.cha.is_dir then
ya.emit("enter", {})
ya.emit("paste", {})
ya.emit("leave", {})
else
ya.emit("paste", {})
end
end,
}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 yazi-rs
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,80 @@
# toggle-pane.yazi
Toggle the show, hide, and maximize states for different panes: parent, current, and preview. It respects the user's [`ratio` settings](https://yazi-rs.github.io/docs/configuration/yazi#mgr.ratio)!
Assume the user's `ratio` is $$[A, B, C]$$, that is, $$\text{parent}=A, \text{current}=B, \text{preview}=C$$:
- `min-parent`: Toggles between $$0$$ and $$A$$ - the parent is either completely hidden or showed with width $$A$$.
- `max-parent`: Toggles between $$A$$ and $$\infty$$ - the parent is either showed with width $$A$$ or fills the entire screen.
- `min-current`: Toggles between $$0$$ and $$B$$ - the current is either completely hidden or showed with width $$B$$.
- `max-current`: Toggles between $$B$$ and $$\infty$$ - the current is either showed with width $$B$$ or fills the entire screen.
- `min-preview`: Toggles between $$0$$ and $$C$$ - the preview is either completely hidden or showed with width $$C$$.
- `max-preview`: Toggles between $$C$$ and $$\infty$$ - the preview is either showed with width $$C$$ or fills the entire screen.
- `reset`: Resets to the user's configured `ratio`.
## Installation
```sh
ya pkg add yazi-rs/plugins:toggle-pane
```
## Usage
Hide/Show preview:
```toml
# keymap.toml
[[mgr.prepend_keymap]]
on = "T"
run = "plugin toggle-pane min-preview"
desc = "Show or hide the preview pane"
```
Maximize/Restore preview:
```toml
# keymap.toml
[[mgr.prepend_keymap]]
on = "T"
run = "plugin toggle-pane max-preview"
desc = "Maximize or restore the preview pane"
```
You can replace `preview` with `current` or `parent` to toggle the other panes.
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other actions/plugins.
## Advanced
In addition to triggering the plugin with a keypress, you can also trigger it in your `init.lua` file:
```lua
if os.getenv("NVIM") then
require("toggle-pane"):entry("min-preview")
end
```
In the example above, when it detects that you're [using Yazi in nvim](https://yazi-rs.github.io/docs/resources#vim), the preview is hidden by default — you can always press `T` (or any key you've bound) to show it again.
## Tips
This plugin only maximizes the "available preview area", without actually changing the content size.
This means that the appearance of your preview largely depends on the previewer you are using.
However, most previewers tend to make the most of the available space, so this usually isn't an issue.
For image previews, you may want to tune up the [`max_width`][max-width] and [`max_height`][max-height] options in your `yazi.toml`:
```toml
[preview]
# Change them to your desired values
max_width = 1000
max_height = 1000
```
[max-width]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_width
[max-height]: https://yazi-rs.github.io/docs/configuration/yazi/#preview.max_height
## License
This plugin is MIT-licensed. For more information, check the [LICENSE](LICENSE) file.

View File

@@ -0,0 +1,45 @@
--- @since 25.5.31
--- @sync entry
local function entry(st, job)
local R = rt.mgr.ratio
job = type(job) == "string" and { args = { job } } or job
st.parent = st.parent or R.parent
st.current = st.current or R.current
st.preview = st.preview or R.preview
local act, to = string.match(job.args[1] or "", "(.-)-(.+)")
if act == "min" then
st[to] = st[to] == R[to] and 0 or R[to]
elseif act == "max" then
local max = st[to] == 65535 and R[to] or 65535
st.parent = st.parent == 65535 and R.parent or st.parent
st.current = st.current == 65535 and R.current or st.current
st.preview = st.preview == 65535 and R.preview or st.preview
st[to] = max
end
if not st.old then
st.old = Tab.layout
Tab.layout = function(self)
local all = st.parent + st.current + st.preview
self._chunks = ui.Layout()
:direction(ui.Layout.HORIZONTAL)
:constraints({
ui.Constraint.Ratio(st.parent, all),
ui.Constraint.Ratio(st.current, all),
ui.Constraint.Ratio(st.preview, all),
})
:split(self._area)
end
end
if not act then
Tab.layout, st.old = st.old, nil
st.parent, st.current, st.preview = nil, nil, nil
end
ya.emit("app:resize", {})
end
return { entry = entry }

View File

@@ -13,7 +13,7 @@ end)
return {
entry = function()
ya.manager_emit("escape", { visual = true })
ya.emit("escape", { visual = true })
local urls = selected_or_hovered()

33
config-scripts/export-config.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
CONFIG_TIME=$(date +"%Y-%m-%d-%H-%M")
CONFIG_SAVE_DIR="$HOME/tmp/config-$CONFIG_TIME"
mkdir -p "$CONFIG_SAVE_DIR/.config"
mkdir -p "$CONFIG_SAVE_DIR/.themes"
echo 'Created config save directory'
cp -r ~/config-scripts "$CONFIG_SAVE_DIR/config-scripts"
cp -r ~/.themes/Colloid-Transparent-Dracula "$CONFIG_SAVE_DIR/.themes/Colloid-Transparent-Dracula/"
cp -r ~/.config/nvim "$CONFIG_SAVE_DIR/.config/nvim/"
cp -r ~/.config/rofi "$CONFIG_SAVE_DIR/.config/rofi/"
cp -r ~/.config/yazi "$CONFIG_SAVE_DIR/.config/yazi/"
cp -r ~/.config/hypr "$CONFIG_SAVE_DIR/.config/hypr/"
cp -r ~/.config/waybar "$CONFIG_SAVE_DIR/.config/waybar/"
cp -r ~/.config/dunst "$CONFIG_SAVE_DIR/.config/dunst/"
cp -r ~/.config/kitty "$CONFIG_SAVE_DIR/.config/kitty/"
cp -r ~/.config/fastfetch "$CONFIG_SAVE_DIR/.config/fastfetch/"
cp -r ~/.inputrc "$CONFIG_SAVE_DIR/.inputrc"
cp -r ~/.bash_profile "$CONFIG_SAVE_DIR/.bash_profile"
cp -r ~/.bashrc "$CONFIG_SAVE_DIR/.bashrc"
cp -r ~/.bash_exports "$CONFIG_SAVE_DIR/.bash_exports"
cp -r ~/.bash_aliases "$CONFIG_SAVE_DIR/.bash_aliases"
cp -r ~/.ideavimrc "$CONFIG_SAVE_DIR/.ideavimrc"
echo 'Copied configs'
zip -r "$HOME/tmp/config-$CONFIG_TIME.zip" "$CONFIG_SAVE_DIR"
echo 'Compressed the configs'
echo -e "\e[32mDone!\e[0m"

51
config-scripts/import-config.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
SOURCE=$1
if [ -z "$SOURCE" ]; then
echo "Usage: $0 <path-to-zip-or-directory>"
exit 1
fi
# Handle zip extraction
if [[ "$SOURCE" == *.zip ]]; then
TEMP_DIR=$(mktemp -d)
unzip -q "$SOURCE" -d "$TEMP_DIR"
RESTORE_PATH=$(find "$TEMP_DIR" -maxdepth 1 -type d -name "config-*" | head -n 1)
else
RESTORE_PATH="$SOURCE"
fi
if [ ! -d "$RESTORE_PATH" ]; then
echo "Error: Invalid config source"
exit 1
fi
# Clean and restore config-scripts/
rm -rf ~/config-scripts
cp -r "$RESTORE_PATH/config-scripts" ~/
# Clean and restore .themes/
rm -rf ~/.themes/Colloid-Transparent-Dracula
mkdir -p ~/.themes
cp -r "$RESTORE_PATH/.themes/Colloid-Transparent-Dracula" ~/.themes/
# Clean and restore .config/
for dir in nvim rofi yazi hypr waybar dunst kitty fastfetch; do
rm -rf ~/.config/$dir
mkdir -p ~/.config/$dir
cp -r "$RESTORE_PATH/.config/$dir/." ~/.config/$dir/
done
# Restore single dotfiles
cp -r "$RESTORE_PATH/.inputrc" ~/
cp -r "$RESTORE_PATH/.bash_profile" ~/
cp -r "$RESTORE_PATH/.bashrc" ~/
cp -r "$RESTORE_PATH/.bash_exports" ~/
cp -r "$RESTORE_PATH/.bash_aliases" ~/
cp -r "$RESTORE_PATH/.ideavimrc" ~/
echo 'Restored configs'
# Cleanup temp files
[ -n "$TEMP_DIR" ] && rm -rf "$TEMP_DIR"
echo -e "\e[32mDone!\e[0m"

View File

@@ -0,0 +1,59 @@
#!/bin/bash
# ---- Initial setup ----
# Creating all the directories
echo "Creating all the directories...."
mkdir -p ~/.config/bash
mkdir -p ~/Documents/obsidian/Notes
mkdir -p ~/Pictures/Screenshots
mkdir ~/Downloads
mkdir ~/Programming
mkdir ~/Public
mkdir ~/Music
mkdir ~/Videos
mkdir ~/config-scripts
mkdir ~/scripts
mkdir -p ~/tmp/daily
# Creating extra files
echo "Creating extra files...."
touch ~/.bash_profile
touch ~/.bash_exports
touch ~/.inputrc
touch ~/.bashrc
touch ~/.bash_aliases
touch ~/.bash_private
# Creating extra links
echo "Creating extra links...."
ln -s ~/.bash_profile ~/.config/bash/bash_profile
ln -s ~/.bash_exports ~/.config/bash/bash_exports
ln -s ~/.inputrc ~/.config/bash/inputrc
ln -s ~/.bashrc ~/.config/bash/bashrc
ln -s ~/.bash_aliases ~/.config/bash/bash_aliases
ln -s ~/.bash_private ~/.config/bash/bash_private
# ---- Packages setup ----
# Updating package databases & installed packages
echo "Updating package databases & installed packages...."
sudo pacman -Syu --noconfirm
# Installing the base packages
echo "Installing the base packages...."
sudo pacman -S --needed git base-devel less jq inetutils
# Installing extra packages
echo "Installing extra packages...."
sudo pacman -S --noconfirm yadm wl-clipboard hyprland uwsm hypridle hyprlock brightnessctl
sudo pacman -S --noconfirm xdg-desktop-portal-hyprland xdg-desktop-portal xdg-desktop-portal-gtk
sudo pacman -S --noconfirm rofi waybar dunst awww kitty neovim nwg-look grim slurp
sudo pacman -S --noconfirm thunar thunar-shares-plugin thunar-archive-plugin thunar-volman gvfs gvfs-goa gvfs-nfs gvfs-smb
# ---- Config setup ----
# This will delete all current dotfiles. Please be careful!
# Cloning config from git
echo "Cloning config from git...."
yadm clone https://git.frik.su/Beesquit/dotfiles.git
yadm reset --hard origin/main
ya pkg upgrade

15
config-scripts/install-yay.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Installing yay
echo "Checking if yay is installed...."
if ! command -v yay >/dev/null 2>&1; then
echo "yay is not installed. Installing..."
mkdir -p ~/tmp/yay-install
cd ~/tmp/yay-install
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd
rm -rf ~/tmp/yay-install
else
echo "yay is installed. Skipping..."
fi

17
config-scripts/link-bash.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
bash_cfg_path=~/.config/bash
touch ~/.inputrc
touch ~/.bash_profile
touch ~/.bashrc
touch ~/.bash_aliases
touch ~/.bash_private
touch ~/.bash_exports
mkdir -p "$bash_cfg_path"
ln -s ~/.inputrc "$bash_cfg_path/inputrc"
ln -s ~/.bash_profile "$bash_cfg_path/bash_profile"
ln -s ~/.bashrc "$bash_cfg_path/bashrc"
ln -s ~/.bash_aliases "$bash_cfg_path/bash_aliases"
ln -s ~/.bash_private "$bash_cfg_path/bash_private"
ln -s ~/.bash_exports "$bash_cfg_path/bash_exports"

View File

@@ -1,4 +1,4 @@
yadm add ~/yadm-readd.sh
yadm add ~/config-scripts
yadm add ~/.themes/Colloid-Transparent-Dracula/