Update 2025-02-24

Update 2025-02-03

Update 2025-02-04

Update 2025-02-09

Update 2025-02-14

Update 2025-02-15

Update 2025-02-22

Update 2025-02-24
This commit is contained in:
Kristofers Solo 2025-02-02 16:12:25 +02:00
parent 73a0cc0977
commit 5f54bb78ad
69 changed files with 5418 additions and 2753 deletions

View File

@ -66,6 +66,7 @@ depends = [ "torrent", "zathura" ]
"config/fastfetch/" = "~/.config/fastfetch/" "config/fastfetch/" = "~/.config/fastfetch/"
"config/flameshot.ini" = "~/.config/flameshot/flameshot.ini" "config/flameshot.ini" = "~/.config/flameshot/flameshot.ini"
"config/gitui/" = "~/.config/gitui/" "config/gitui/" = "~/.config/gitui/"
"config/git/" = "~/.config/git/"
"config/mpv/" = "~/.config/mpv/" "config/mpv/" = "~/.config/mpv/"
"config/lf/" = "~/.config/lf/" "config/lf/" = "~/.config/lf/"
"config/paru.conf" = "~/.config/paru/paru.conf" "config/paru.conf" = "~/.config/paru/paru.conf"
@ -128,6 +129,8 @@ depends = [ "zsh", "tmux" ]
"config/alacritty/" = "~/.config/alacritty/" "config/alacritty/" = "~/.config/alacritty/"
"config/alacritty/alacritty.toml" = {target = "~/.config/alacritty/alacritty.toml", type = "template"} "config/alacritty/alacritty.toml" = {target = "~/.config/alacritty/alacritty.toml", type = "template"}
"config/starship.toml" = "~/.config/starship/starship.toml" "config/starship.toml" = "~/.config/starship/starship.toml"
"config/ghostty/" = "~/.config/ghostty/"
"config/ghostty/config" = {target = "~/.config/ghostty/config", type = "template"}
[tmux.files] [tmux.files]
"config/tmux/" = "~/.config/tmux/" "config/tmux/" = "~/.config/tmux/"

0
config/HybridBar/scripts/change-active-workspace Executable file → Normal file
View File

0
config/HybridBar/scripts/get-active-workspace Executable file → Normal file
View File

0
config/HybridBar/scripts/get-window-title Executable file → Normal file
View File

0
config/HybridBar/scripts/get-workspaces Executable file → Normal file
View File

View File

@ -435,7 +435,7 @@ local globalkeys = gears.table.join(
-- awful.key({ modkey, "Control" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }), -- awful.key({ modkey, "Control" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
awful.key({ modkey }, "b", function() awful.key({ modkey }, "b", function()
awful.spawn("floorp") awful.spawn("zen-browser")
end, { description = "open browser", group = "launcher" }), end, { description = "open browser", group = "launcher" }),
awful.key({ modkey }, "n", function() awful.key({ modkey }, "n", function()
awful.spawn("alacritty -e yazi") awful.spawn("alacritty -e yazi")

View File

@ -202,7 +202,7 @@ net_download = 100
net_upload = 100 net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. #* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = False net_auto = True
#* Sync the auto scaling for download and upload to whichever currently has the highest scale. #* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = False net_sync = False

View File

@ -20,21 +20,21 @@
foreground = "#e0def4" foreground = "#e0def4"
[urgency_low] [urgency_low]
background = "#26273d" background = "#26233a"
highlight = "#31748f" highlight = "#9ccfd8"
frame_color = "#31748f" frame_color = "#9ccfd8"
default_icon = "dialog-information" default_icon = "dialog-information"
format = "<b><span foreground='#31748f'>%s</span></b>\n%b" format = "<b><span foreground='#9ccfd8'>%s</span></b>\n%b"
[urgency_normal] [urgency_normal]
background = "#362e3c" background = "#26233a"
highlight = "#f6c177" highlight = "#ebbcba"
frame_color = "#f6c177" frame_color = "#ebbcba"
default_icon = "dialog-warning" default_icon = "dialog-warning"
format = "<b><span foreground='#f6c177'>%s</span></b>\n%b" format = "<b><span foreground='#ebbcba'>%s</span></b>\n%b"
[urgency_critical] [urgency_critical]
background = "#35263d" background = "#26233a"
highlight = "#eb6f92" highlight = "#eb6f92"
frame_color = "#eb6f92" frame_color = "#eb6f92"
default_icon = "dialog-error" default_icon = "dialog-error"

View File

@ -224,7 +224,7 @@
:height "10px" :height "10px"
:anchor "top center") :anchor "top center")
:reserve (struts :side "top" :distance "4%") :reserve (struts :side "top" :distance "4%")
(bar)) (bar))
(defwidget bright [] (defwidget bright []
(eventbox :onhover "eww update br_reveal=true" :onhoverlost "eww update br_reveal=false" (eventbox :onhover "eww update br_reveal=true" :onhoverlost "eww update br_reveal=false"

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
function clamp {
min=$1
max=$2
val=$3
python -c "print(max($min, min($val, $max)))"
}
direction=$1
current=$2
if test "$direction" = "down"
then
target=$(clamp 1 10 $(($current+1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
elif test "$direction" = "up"
then
target=$(clamp 1 10 $(($current-1)))
echo "jumping to $target"
hyprctl dispatch workspace $target
fi

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'

View File

@ -1,5 +0,0 @@
#!/bin/bash
title="$(sp metadata | rg title| cut -d'|' -f2)"
artist="$(sp metadata | rg artist | cut -d'|' -f2)"
echo "$artist" - "$title"

View File

@ -1,5 +0,0 @@
#!/bin/bash
line=$(nmcli connection show | rg wlan0)
echo $line

View File

@ -1,3 +0,0 @@
#!/bin/sh
hyprctl activewindow -j | jq --raw-output .title
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'

View File

@ -1,11 +0,0 @@
#!/usr/bin/env bash
spaces (){
WORKSPACE_WINDOWS=$(hyprctl workspaces -j | jq 'map({key: .id | tostring, value: .windows}) | from_entries')
seq 1 10 | jq --argjson windows "${WORKSPACE_WINDOWS}" --slurp -Mc 'map(tostring) | map({id: ., windows: ($windows[.]//0)})'
}
spaces
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done

View File

@ -1,12 +0,0 @@
#!/bin/sh
if command -v pamixer &>/dev/null; then
if [ true == $(pamixer --get-mute) ]; then
echo 0
exit
else
pamixer --get-volume
fi
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi

View File

@ -1,4 +0,0 @@
#!/bin/sh
notifications="$(gh api notifications 2> /dev/null | jq '. | length')"
[ -z notifications ] && echo "" || echo "$notifications"

View File

@ -18,7 +18,7 @@ $bg: rgba(25, 23, 37, 0.7);
* { * {
all: unset; all: unset;
font-family: "JetBrainsMono NF"; font-family: "JetBrainsMono NF";
font-size: 14; font-size: 20;
} }
/** General **/ /** General **/
@ -128,6 +128,10 @@ clock_time {
&__Charging { &__Charging {
color: $gold; color: $gold;
} }
&__low {
color: $love;
}
} }
.iconbat, .iconbat,
@ -275,6 +279,10 @@ calendar:indeterminate {
.sys_icon_mem { .sys_icon_mem {
font-size: 30; font-size: 30;
margin: 30px; margin: 30px;
&__low {
color: $love;
}
} }
.sys_win { .sys_win {

View File

@ -1,5 +1,5 @@
;; Variables ;; Variables
(defpoll clock_hour :interval "5m" "date +%H") (defpoll clock_hour :interval "1m" "date +%H")
(defpoll clock_minute :interval "2s" "date +%M") (defpoll clock_minute :interval "2s" "date +%M")
(defpoll clock_second :interval "1s" "date +%S") (defpoll clock_second :interval "1s" "date +%S")
(defpoll clock_date :interval "10h" "date +%d.%m.%Y") (defpoll clock_date :interval "10h" "date +%d.%m.%Y")
@ -7,34 +7,32 @@
(defpoll volume_percent :interval "3s" "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'") (defpoll volume_percent :interval "3s" "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
(defpoll mic_percent :interval "3s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'") (defpoll mic_percent :interval "3s" "amixer -D pulse sget Capture | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'")
(defpoll brightness_percent :interval "5s" "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'") (defpoll brightness_percent :interval "5s" "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
(defpoll battery :interval "15s" "./scripts/battery --bat") (defpoll memory :interval "10s" "scripts/memory")
(defpoll battery_status :interval "1m" "./scripts/battery --bat-st") (defpoll memory_used_mb :interval "1m" "scripts/mem-ad used")
(defpoll memory :interval "15s" "scripts/memory") (defpoll memory_total_mb :interval "1m" "scripts/mem-ad total")
(defpoll memory_used_mb :interval "2m" "scripts/mem-ad used") (defpoll memory_free_mb :interval "1m" "scripts/mem-ad free")
(defpoll memory_total_mb :interval "2m" "scripts/mem-ad total")
(defpoll memory_free_mb :interval "2m" "scripts/mem-ad free")
(defvar vol_reveal false) (defvar vol_reveal false)
(defvar br_reveal false) (defvar br_reveal false)
(defvar music_reveal false) (defvar music_reveal false)
(defvar wifi_rev false) (defvar wifi_rev false)
(defvar time_rev false) (defvar time_rev false)
(deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/get-workspaces") (deflisten workspaces :initial "[]" "bash ~/.config/eww/scripts/workspace")
(deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace") (deflisten current_workspace :initial "1" "bash ~/.config/eww/scripts/get-active-workspace")
(deflisten window :initial "..." "bash ~/.config/eww/scripts/get-window-title") (deflisten window :initial "..." "bash ~/.config/eww/scripts/get-window-title")
(defvar eww "eww") (defvar eww "eww")
(defpoll COL_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --COL") (defpoll COL_WLAN :interval "1m" "~/.config/eww/scripts/wifi --COL")
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --ESSID") (defpoll ESSID_WLAN :interval "1m" "~/.config/eww/scripts/wifi --ESSID")
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/bar/scripts/wifi --ICON") (defpoll WLAN_ICON :interval "1m" "~/.config/eww/scripts/wifi --ICON")
(defpoll song :interval "2s" "~/.config/eww/bar/scripts/music_info --song") (defpoll song :interval "2s" "~/.config/eww/scripts/music_info --song")
(defpoll song_artist :interval "2s" "~/.config/eww/bar/scripts/music_info --artist") (defpoll song_artist :interval "2s" "~/.config/eww/scripts/music_info --artist")
(defpoll current_status :interval "1s" "~/.config/eww/bar/scripts/music_info --time") (defpoll current_status :interval "1s" "~/.config/eww/scripts/music_info --time")
(defpoll song_status :interval "2s" "~/.config/eww/bar/scripts/music_info --status") (defpoll song_status :interval "2s" "~/.config/eww/scripts/music_info --status")
(defpoll cover_art :interval "2s" "~/.config/eww/bar/scripts/music_info --cover") (defpoll cover_art :interval "2s" "~/.config/eww/scripts/music_info --cover")
(defpoll calendar_day :interval "20h" "date '+%d'") (defpoll calendar_day :interval "20h" "date '+%d'")
(defpoll calendar_year :interval "20h" "date '+%Y'") (defpoll calendar_year :interval "20h" "date '+%Y'")
@ -42,16 +40,21 @@
;; widgets ;; widgets
(defwidget wifi [] (defwidget wifi []
(eventbox :onhover "${eww} update wifi_rev=true" (eventbox
:onhover "${eww} update wifi_rev=true"
:onhoverlost "${eww} update wifi_rev=false" :onhoverlost "${eww} update wifi_rev=false"
(box :vexpand "false" :hexpand "false" :space-evenly "false" (box
:vexpand "false"
:hexpand "false"
:space-evenly "false"
(button (button
:class "module-wif" :class "module-wifi"
:onclick "networkmanager_dmenu" :onclick "networkmanager_dmenu"
:wrap "false" :wrap "false"
:limit-width 12 :limit-width 12
:style "color: ${COL_WLAN};" WLAN_ICON) :style "color: ${COL_WLAN};" WLAN_ICON)
(revealer :transition "slideright" (revealer
:transition "slideright"
:reveal wifi_rev :reveal wifi_rev
:duration "350ms" :duration "350ms"
(label (label
@ -62,7 +65,9 @@
(defwidget workspaces [] (defwidget workspaces []
(eventbox :onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}" :class "workspaces" (eventbox
:onscroll "bash ~/.config/eww/scripts/change-active-workspace {} ${current_workspace}"
:class "workspaces"
(box :space-evenly true (box :space-evenly true
:halign "start" :halign "start"
:space-evenly true :space-evenly true
@ -74,25 +79,25 @@
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}" (eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
(box :class "workspace-entry ${workspace.windows > 0 ? "occupied" : "empty"}" (box :class "workspace-entry ${workspace.windows > 0 ? "occupied" : "empty"}"
(label :text "${workspace.id}" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""}" ) (label :text "${workspace.id}" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""}" )
) ))))))
)
)
)
)
)
(defwidget bat [] (defwidget bat []
(box :class "bat_module" :vexpand "false" :hexpand "false" (button
(circular-progress :value battery :class "bat_module"
:vexpand "false"
:hexpand "false"
:onclick "bash ~/.config/eww/scripts/pop system"
(circular-progress
:value "${EWW_BATTERY.BAT0.capacity}"
:class "batbar" :class "batbar"
:thickness 4 :thickness 4
(button (box
:class "iconbat iconbat__${battery_status}" :class "iconbat iconbat__${EWW_BATTERY.BAT0.status} ${EWW_BATTERY.BAT0.capacity < 20 ? "iconbat__low" : ""}"
:interval "5m"
:limit-width 2 :limit-width 2
:tooltip "battery on ${battery}%" :tooltip "Battery on ${EWW_BATTERY.BAT0.capacity}%"
:show_truncated false :show_truncated false
:onclick "$HOME/.config/eww/bar/scripts/pop system"
:wrap false :wrap false
"${EWW_BATTERY.BAT0.status == "Charging" ? "" : "${EWW_BATTERY.BAT0.status == "Charging" ? "" :
EWW_BATTERY.BAT0.capacity > 90 ? "" : EWW_BATTERY.BAT0.capacity > 90 ? "" :
@ -104,15 +109,19 @@
(defwidget mem [] (defwidget mem []
(box :class "mem_module" :vexpand "false" :hexpand "false" (button
(circular-progress :value memory :class "mem_module"
:vexpand "false"
:hexpand "false"
:onclick "bash ~/.config/eww/scripts/pop system"
(circular-progress
:value memory
:class "membar" :class "membar"
:thickness 4 :thickness 4
(button (box
:class "iconmem" :class "iconmem"
:limit-width 2 :limit-width 2
:tooltip "using ${memory}% ram" :tooltip "Using ${memory}% ram"
:onclick "$HOME/.config/eww/bar/scripts/pop system"
:show_truncated false :show_truncated false
:wrap false :wrap false
"")))) ""))))
@ -132,7 +141,7 @@
:reveal time_rev :reveal time_rev
:duration "350ms" :duration "350ms"
(button :class "clock_date" (button :class "clock_date"
:onclick "$HOME/.config/eww/bar/scripts/pop calendar" "${clock_date}, ${clock_day}" :onclick "bash ~/.config/eww/scripts/pop calendar" "${clock_date}, ${clock_day}"
) )
)))) ))))
@ -144,7 +153,8 @@
(revealer :transition "slideleft" (revealer :transition "slideleft"
:reveal vol_reveal :reveal vol_reveal
:duration "350ms" :duration "350ms"
(scale :class "volbar" (scale
:class "volbar"
:value volume_percent :value volume_percent
:orientation "h" :orientation "h"
:tooltip "${volume_percent}%" :tooltip "${volume_percent}%"
@ -153,13 +163,24 @@
:onchange "amixer -D pulse sset Master {}%" ))))) :onchange "amixer -D pulse sset Master {}%" )))))
(defwidget bright [] (defwidget bright []
(eventbox :onhover "${eww} update br_reveal=true" :onhoverlost "${eww} update br_reveal=false" (eventbox
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3" :onhover "${eww} update br_reveal=true"
(label :text "☼" :class "bright_icon" :tooltip "brightness") :onhoverlost "${eww} update br_reveal=false"
(revealer :transition "slideleft" (box
:class "module-2"
:space-evenly "false"
:orientation "h"
:spacing "3"
(label
:text "☼"
:class "bright_icon"
:tooltip "brightness")
(revealer
:transition "slideleft"
:reveal br_reveal :reveal br_reveal
:duration "350ms" :duration "350ms"
(scale :class "brightbar" (scale
:class "brightbar"
:value brightness_percent :value brightness_percent
:orientation "h" :orientation "h"
:tooltip "${brightness_percent}%" :tooltip "${brightness_percent}%"
@ -171,18 +192,35 @@
;; Music ;; Music
(defwidget music [] (defwidget music []
(eventbox :onhover "${eww} update music_reveal=true" (eventbox
:onhover "${eww} update music_reveal=true"
:onhoverlost "${eww} update music_reveal=false" :onhoverlost "${eww} update music_reveal=false"
(box :class "module-2" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false" (box
(box :class "song_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');") :class "module-2"
(button :class "song" :wrap "true" :onclick "~/.config/eww/bar/scripts/pop music" song) :orientation "h"
(revealer :transition "slideright" :space-evenly "false"
:vexpand "false"
:hexpand "false"
(box
:class "song_cover_art"
:vexpand "false"
:hexpand "false"
:style "background-image: url('${cover_art}');")
(button
:class "song"
:wrap "true"
:onclick "~/.config/eww/scripts/pop music" song)
(revealer
:transition "slideright"
:reveal music_reveal :reveal music_reveal
:duration "350ms" :duration "350ms"
(box :vexpand "false" :hexpand "false" :oreintation "h" (box
(button :class "song_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "") :vexpand "false"
(button :class "song_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status) :hexpand "false"
(button :class "song_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" "")))))) :oreintation "h"
(button :class "song_btn_prev" :onclick "~/.config/eww/scripts/music_info --prev" "")
(button :class "song_btn_play" :onclick "~/.config/eww/scripts/music_info --toggle" song_status)
(button :class "song_btn_next" :onclick "~/.config/eww/scripts/music_info --next" ""))))))
@ -203,7 +241,8 @@
(defwidget right [] (defwidget right []
(box :orientation "h" (box
:orientation "h"
:space-evenly false :space-evenly false
:halign "start" :halign "start"
:class "right_modules" :class "right_modules"
@ -211,14 +250,16 @@
(defwidget center [] (defwidget center []
(box :orientation "h" (box
:orientation "h"
:space-evenly false :space-evenly false
:halign "center" :halign "center"
:class "center_modules" :class "center_modules"
(window))) (window)))
(defwidget bar_1 [] (defwidget bar_1 []
(box :class "bar" (box
:class "bar"
:orientation "h" :orientation "h"
(right) (right)
(center) (center)
@ -239,61 +280,117 @@
:windowtype "dock" :windowtype "dock"
(bar_1)) (bar_1))
(defwindow bar-1
:monitor 1
:exclusive true
:geometry (geometry
:x "0%"
:y "0%"
:width "100%"
:height "10px"
:anchor "top center")
:reserve (struts :side "top" :distance "4%")
:stacking "fg"
:windowtype "dock"
(bar_1))
(defwidget system [] (defwidget system []
(box :class "sys_win" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 0 (box
(box :class "sys_bat_box" :orientation "h" :space-evenly "false" :class "sys_win"
(circular-progress :value battery :orientation "v"
:space-evenly "false"
:hexpand "false"
:vexpand "false"
:spacing 0
(box
:class "sys_bat_box"
:orientation "h"
:space-evenly "false"
(circular-progress
:value "${EWW_BATTERY.BAT0.capacity}"
:class "sys_bat" :class "sys_bat"
:thickness 9 :thickness 9
(label :text "" (label
:class "sys_icon_bat" :text "${EWW_BATTERY.BAT0.status == "Charging" ? "" :
EWW_BATTERY.BAT0.capacity > 90 ? "" :
EWW_BATTERY.BAT0.capacity > 70 ? "" :
EWW_BATTERY.BAT0.capacity > 40 ? "" :
EWW_BATTERY.BAT0.capacity > 20 ? "" :
""}"
:interval "5m"
:class "sys_icon_bat ${EWW_BATTERY.BAT0.capacity} syst_icon_bat__${EWW_BATTERY.BAT0.status} ${EWW_BATTERY.BAT0.capacity < 20 ? "sys_icon_bat__low" : ""}"
:limit-width 2 :limit-width 2
:show_truncated false :show_truncated false
:wrap false)) :wrap false))
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false" (box
(label :text "battery" :orientation "v"
:space-evenly "false"
:spacing 0
:hexpand "false"
:vexpand "false"
(label
:text "Battery"
:halign "start" :halign "start"
:class "sys_text_bat" :class "sys_text_bat"
:limit-width 9 :limit-width 9
:show_truncated false :show_truncated false
:wrap false) :wrap false)
(label :text "${battery}%" (label
:text "${EWW_BATTERY.BAT0.capacity}%"
:halign "start" :halign "start"
:class "sys_text_bat_sub" :class "sys_text_bat_sub"
:limit-width 22 :limit-width 22
:show_truncated false :show_truncated false
:wrap false) :wrap false)
(label :text "${battery_status}" (label
:text "${EWW_BATTERY.BAT0.status}"
:halign "start" :halign "start"
:class "sys_text_bat_sub" :class "sys_text_bat_sub"
:limit-width 22 :limit-width 22
:show_truncated false :show_truncated false
:wrap false))) :wrap false)))
(label :text "" :class "sys_sep" :halign "center") (label
(box :class "sys_mem_box" :orientation "h" :space-evenly "false" :halign "start" :text ""
(circular-progress :value memory :class "sys_sep"
:halign "center")
(box
:class "sys_mem_box"
:orientation "h"
:space-evenly "false"
:halign "start"
(circular-progress
:value memory
:class "sys_mem" :class "sys_mem"
:thickness 9 :thickness 9
(label :text "" (label
:text ""
:class "sys_icon_mem" :class "sys_icon_mem"
:limit-width 2 :limit-width 2
:show_truncated false :show_truncated false
:wrap false :wrap false
:angle 0.0)) :angle 0.0))
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false" (box
(label :text "memory" :orientation "v"
:space-evenly "false"
:spacing 0
:hexpand "false"
:vexpand "false"
(label
:text "Memory"
:halign "start" :halign "start"
:class "sys_text_mem" :class "sys_text_mem"
:limit-width 9 :limit-width 9
:show_truncated false :show_truncated false
:wrap false) :wrap false)
(label :text "${memory_used_mb} | ${memory_total_mb}mb " (label
:text "${memory_used_mb}/${memory_total_mb}mb"
:halign "start" :halign "start"
:class "sys_text_mem_sub" :class "sys_text_mem_sub"
:limit-width 22 :limit-width 22
:show_truncated false :show_truncated false
:wrap false) :wrap false)
(label :text "${memory_free_mb}mb free" (label
:text "${memory_free_mb}mb free"
:halign "start" :halign "start"
:class "sys_text_mem_sub" :class "sys_text_mem_sub"
:limit-width 22 :limit-width 22
@ -301,16 +398,21 @@
:wrap false))))) :wrap false)))))
(defwidget cal [] (defwidget cal []
(box :class "cal" :orientation "v" (box
(box :class "cal-in" :class "cal"
(calendar :class "cal" :orientation "v"
(box
:class "cal-in"
(calendar
:class "cal"
:day calendar_day :day calendar_day
:year calendar_year)))) :year calendar_year))))
(defwindow calendar (defwindow calendar
:monitor 0 :monitor 0
:geometry (geometry :x "-20px" :geometry (geometry
:y "7%" :x "0px"
:y "10px"
:anchor "top right" :anchor "top right"
:width "270px" :width "270px"
:height "60px") :height "60px")
@ -332,13 +434,35 @@
:tooltip "volume on ${volume_percent}%" :tooltip "volume on ${volume_percent}%"
:max 100 :max 100
:min 0)))) :min 0))))
(label :text "" :class "audio_sep" :halign "center") (label
(box :halign "v" :space-evenly "false" :hexpand "false" :vexpand "false" :text ""
(box :class "mic_icon" :orientation "v") :class "audio_sep"
(box :orientation "v" :halign "center" :vexpand "false" :hexpand "false" :halign "center")
(label :class "mic_text" :text "mic" :valign "center" :halign "left" ) (box
(box :class "mic_bar" :halign "center" :vexpand "false" :hexpand "false" :halign "v"
(scale :value mic_percent :space-evenly "false"
:hexpand "false"
:vexpand "false"
(box
:class "mic_icon"
:orientation "v")
(box
:orientation "v"
:halign "center"
:vexpand "false"
:hexpand "false"
(label
:class "mic_text"
:text "mic"
:valign "center"
:halign "left" )
(box
:class "mic_bar"
:halign "center"
:vexpand "false"
:hexpand "false"
(scale
:value mic_percent
:space-evenly "false" :space-evenly "false"
:orientation "h" :orientation "h"
:tooltip "mic on ${mic_percent}%" :tooltip "mic on ${mic_percent}%"
@ -348,8 +472,9 @@
(defwindow audio_ctl (defwindow audio_ctl
:monitor 0 :monitor 0
:geometry (geometry :x "-20px" :geometry (geometry
:y "7%" :x "10px"
:y "10px"
:anchor "top right" :anchor "top right"
:width "280px" :width "280px"
:height "60px") :height "60px")
@ -359,8 +484,8 @@
(defwindow system (defwindow system
:monitor 0 :monitor 0
:geometry (geometry :geometry (geometry
:x "-20px" :x "10px"
:y "5%" :y "10px"
:anchor "top right" :anchor "top right"
:width "290px" :width "290px"
:height "120px") :height "120px")
@ -370,26 +495,71 @@
;; Music ;; Music
(defwidget music_pop [] (defwidget music_pop []
(box :class "music_pop" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false" (box
(box :class "music_cover_art" :vexpand "false" :hexpand "false" :style "background-image: url('${cover_art}');") :class "music_pop"
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false" :orientation "h"
(label :halign "center" :class "music" :wrap "true" :limit-width 13 :text song) :space-evenly "false"
(label :halign "center" :class "music_artist" :wrap "true" :limit-width 15 :text song_artist) :vexpand "false"
(box :orientation "h" :spacing 15 :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false" :hexpand "false"
(button :class "music_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "") (box
(button :class "music_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status) :class "music_cover_art"
(button :class "music_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" "")) :vexpand "false"
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false" :hexpand "false"
(scale :onscroll "mpc -q seek {}" :min 0 :active "true" :max 100 :value current_status))))) :style "background-image: url('${cover_art}');")
(box
:orientation "v"
:spacing 20
:space-evenly "false"
:vexpand "false"
:hexpand "false"
(label
:halign "center"
:class "music"
:wrap "true"
:limit-width 13
:text song)
(label
:halign "center"
:class "music_artist"
:wrap "true"
:limit-width 15
:text song_artist)
(box
:orientation "h"
:spacing 15
:halign "center"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
(button :class "music_btn_prev" :onclick "~/.config/eww/scripts/music_info --prev" "")
(button :class "music_btn_play" :onclick "~/.config/eww/scripts/music_info --toggle" song_status)
(button :class "music_btn_next" :onclick "~/.config/eww/scripts/music_info --next" ""))
(box
:class "music_bar"
:halign "center"
:vexpand "false"
:hexpand "false"
:space-evenly "false"
(scale
:onscroll "mpc -q seek {}"
:min 0
:active "true"
:max 100
:value current_status)))))
;; music ;; music
(defwindow music_win (defwindow music_win
;; :monitor 0 :monitor 0
:stacking "fg" :stacking "fg"
:focusable "false" :focusable "false"
:screen 1 :screen 1
:geometry (geometry :x "0" :y "7%" :width 428 :height 104 :anchor "top center") :geometry (geometry
:x "10px"
:y "10px"
:width 428
:height 104
:anchor "top center")
(music_pop)) (music_pop))
(defwidget window [] (defwidget window []

View File

@ -1,17 +0,0 @@
#!/bin/bash
battery() {
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
cat /sys/class/power_supply/${BAT}/capacity
}
battery_stat() {
BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
cat /sys/class/power_supply/${BAT}/status
}
if [[ "$1" == "--bat" ]]; then
battery
elif [[ "$1" == "--bat-st" ]]; then
battery_stat
fi

0
config/eww/scripts/change-active-workspace Executable file → Normal file
View File

0
config/eww/scripts/get-active-workspace Executable file → Normal file
View File

0
config/eww/scripts/get-window-title Executable file → Normal file
View File

0
config/eww/scripts/get-workspaces Executable file → Normal file
View File

3
config/eww/scripts/mem-ad Executable file → Normal file
View File

@ -1,5 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
total="$(free -m | grep Mem: | awk '{ print $2 }')" total="$(free -m | grep Mem: | awk '{ print $2 }')"
used="$(free -m | grep Mem: | awk '{ print $3 }')" used="$(free -m | grep Mem: | awk '{ print $3 }')"

4
config/eww/scripts/memory Executable file → Normal file
View File

@ -1,3 +1,3 @@
#!/bin/sh #!/usr/bin/env bash
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') awk '/Mem:/ {printf "%.0f\n", ($3/$2)*100}' <(free -m)

0
config/eww/scripts/music_info Executable file → Normal file
View File

0
config/eww/scripts/music_info.bak Executable file → Normal file
View File

0
config/eww/scripts/pop Executable file → Normal file
View File

0
config/eww/scripts/wifi Executable file → Normal file
View File

0
config/eww/scripts/workspace Executable file → Normal file
View File

2253
config/ghostty/config Normal file

File diff suppressed because it is too large Load Diff

56
config/git/config Normal file
View File

@ -0,0 +1,56 @@
[user]
email = dev@kristofers.xyz
name = Kristofers Solo
[init]
defaultBranch = main
[core]
editor = nvim
# https://blog.gitbutler.com/how-git-core-devs-configure-git/
# clearly makes git better
[column]
ui = auto
[branch]
sort = -committerdate
[tag]
sort = version:refname
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[push]
default = simple
autoSetupRemote = true
followTags = true
[fetch]
prune = true
pruneTags = true
all = true
# why the hell not?
[help]
autocorrect = prompt
[commit]
verbose = true
[rerere]
enabled = true
autoupdate = true
[core]
excludesfile = ~/.gitignore
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
# a matter of taste (uncomment if you dare)
[core]
# fsmonitor = true
# untrackedCache = true
[merge]
# (just 'diff3' if git version < 2.3)
# conflictstyle = zdiff3
[pull]
# rebase = true

View File

@ -1,4 +1,4 @@
# This is an example Hyprland config file. # This is an example Hyprland config file.hypr
# Refer to the wiki for more information. # Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/ # https://wiki.hyprland.org/Configuring/
@ -15,8 +15,9 @@
################ ################
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,prefered,auto,1.5 monitor=eDP-1,prefered,0x0,1
monitor=DP-1,prefered,auto,1 monitor=DP-1,prefered,180x-1440,1
# monitor=DP-1,disabled
################### ###################
### MY PROGRAMS ### ### MY PROGRAMS ###
@ -30,7 +31,6 @@ $fileManager = $terminal -e yazi
$menu = wofi --show drun -ib $menu = wofi --show drun -ib
$browser = zen-browser $browser = zen-browser
################# #################
### AUTOSTART ### ### AUTOSTART ###
################# #################
@ -38,8 +38,8 @@ $browser = zen-browser
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this: # Or execute your favorite apps at launch like this:
exec-once=pipewire & pipewire-pulse & wireplumber & eww daemon & eww open bar & dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DISPLAY XAUTHORITY exec-once=pipewire & pipewire-pulse & wireplumber & eww daemon & eww open bar #& dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DISPLAY XAUTHORITY
exec-once=nextcloud & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & xrdb "$XDG_CONFIG_HOME/x11/xresources" & transmission-daemon & dunst & hyprpaper exec-once=nextcloud & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & xrdb "$XDG_CONFIG_HOME/x11/xresources" & transmission-daemon & dunst & hyprland-per-window-layout
exec-once=[workspace 1 silent] $browser exec-once=[workspace 1 silent] $browser
exec-once=[workspace 8 silent] vesktop & kotatogram-desktop exec-once=[workspace 8 silent] vesktop & kotatogram-desktop
exec-once=[workspace 9 silent] spotify-launcher exec-once=[workspace 9 silent] spotify-launcher
@ -55,6 +55,11 @@ source=~/.config/hypr/rose-pine.conf
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24
# env = DBUS_SESSION_BUS_ADDRESS,unix:path=/run/user/1000/bus
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = WM,Hyprland
##################### #####################
@ -218,11 +223,12 @@ bind = $mainMod SHIFT, Q, killactive
bind = $mainMod, N, exec, $fileManager bind = $mainMod, N, exec, $fileManager
bind = $mainMod CTRL, SPACE, togglefloating bind = $mainMod CTRL, SPACE, togglefloating
bind = $mainMod, P, exec, $menu bind = $mainMod, P, exec, $menu
bind = $mainMod SHIFT, P, exec, cliphist list | wofi -S dmenu | cliphist decode | wl-copy
bind = $mainMod, F, fullscreen bind = $mainMod, F, fullscreen
bind = $mainMod, M, bringactivetotop bind = $mainMod, M, bringactivetotop
bind = $mainMod, A, pin bind = $mainMod, A, pin
bind = $mainMod, B, exec, $browser bind = $mainMod, B, exec, $browser
#bind = $mainMod, O, split-changemonitor, +1 # bind = $mainMod, O, split-changemonitor, +1
# bind = $mainMod, P, pseudo, # dwindle # bind = $mainMod, P, pseudo, # dwindle
# bind = $mainMod, J, togglesplit, # dwindle # bind = $mainMod, J, togglesplit, # dwindle
@ -254,6 +260,16 @@ bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8 bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9 bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10 bind = $mainMod, 0, workspace, 10
# bind = $mainMod, 1, split-workspace, 1
# bind = $mainMod, 2, split-workspace, 2
# bind = $mainMod, 3, split-workspace, 3
# bind = $mainMod, 4, split-workspace, 4
# bind = $mainMod, 5, split-workspace, 5
# bind = $mainMod, 6, split-workspace, 6
# bind = $mainMod, 7, split-workspace, 7
# bind = $mainMod, 8, split-workspace, 8
# bind = $mainMod, 9, split-workspace, 9
# bind = $mainMod, 0, split-workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9] # Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1 bind = $mainMod SHIFT, 1, movetoworkspace, 1
@ -266,6 +282,16 @@ bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod SHIFT, 0, movetoworkspace, 10
# bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
# bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
# bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
# bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
# bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
# bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
# bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
# bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
# bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
# bind = $mainMod SHIFT, 0, split-movetoworkspace, 10
# Example special workspace (scratchpad) # Example special workspace (scratchpad)
# bind = $mainMod, S, togglespecialworkspace, magic # bind = $mainMod, S, togglespecialworkspace, magic
@ -305,6 +331,7 @@ bindl = , XF86AudioPrev, exec, playerctl previous
bindel = , XF86AudioPlay, exec, playerctl -a play-pause # pause/play everything bindel = , XF86AudioPlay, exec, playerctl -a play-pause # pause/play everything
bindel = $mainMod, Space, exec, hyprlock bindel = $mainMod, Space, exec, hyprlock
bindl = , switch:[Lid Switch], exec, hyprlock
# bind = $mainMod CTRL, P, exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')" -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy # bind = $mainMod CTRL, P, exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')" -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy
# bind = $mainMod CTRL, P, exec, wayshot -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy # bind = $mainMod CTRL, P, exec, wayshot -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy
@ -356,9 +383,13 @@ windowrulev2 = opacity 0.9, class:teams-for-linux
windowrulev2 = workspace 5, class:Ferdium windowrulev2 = workspace 5, class:Ferdium
windowrulev2 = opacity 0.9, class:Ferdium windowrulev2 = opacity 0.9, class:Ferdium
windowrulev2 = workspace 9, class:com.github.wwmm.easyeffects
windowrulev2 = workspace 9, class:Spotify windowrulev2 = workspace 9, class:Spotify
windowrulev2 = opacity 0.9, class:Spotify windowrulev2 = opacity 0.9, class:Spotify
windowrulev2 = tile, class:Spotify # windowrulev2 = tile, class:Spotify
# https://github.com/alexhulbert/Hyprchroma
# windowrulev2 = plugin:chromakey, class:Spotify
# chromakey_background = 7,8,17
windowrulev2 = opacity 0.95, class:qbittorrent windowrulev2 = opacity 0.95, class:qbittorrent
windowrulev2 = opacity 0.95, class:lutris windowrulev2 = opacity 0.95, class:lutris
@ -374,4 +405,3 @@ windowrulev2 = float, class:galculator
windowrulev2=float,title:^(flameshot) windowrulev2=float,title:^(flameshot)
windowrulev2=move 0 0,title:^(flameshot) windowrulev2=move 0 0,title:^(flameshot)
windowrulev2=suppressevent fullscreen,title:^(flameshot) windowrulev2=suppressevent fullscreen,title:^(flameshot)

View File

@ -1,15 +1,25 @@
$font = JetBrainsMonoNF $font = JetBrainsMonoNF
$bg = rgb(1a1b26) $base = rgb(191724)
$fg = rgb(c0caf5) $surface = rgb(1f1d2e)
$border_highlight = rgb(27a1b9) $overlay = rgb(26233a)
$error = rgb(db4b4b) $muted = rgb(6e6a86)
$warning = rgb(e0af68) $subtle = rgb(908caa)
$text = rgb(e0def4)
$love = rgb(eb6f92)
$gold = rgb(f6c177)
$rose = rgb(ebbcba)
$pine = rgb(31748f)
$foam = rgb(9ccfd8)
$iris = rgb(c4a7e7)
$highlight_low = rgb(21202e)
$highlight_med = rgb(403d52)
$highlight_high = rgb(524f67)
background { background {
monitor = monitor =
path = screenshot path = screenshot
color = $bg color = $base
blur_passes = 1 blur_passes = 1
blur_size = 10 blur_size = 10
@ -23,7 +33,7 @@ background {
# TIME # TIME
label { label {
monitor = monitor =
text = cmd[update:1000] echo "<span foreground='##c0caf5'>$(date +"%H:%M:%S")</span>" text = cmd[update:1000] echo "<span foreground='##31748f'>$(date +"%H:%M:%S")</span>"
color = $text color = $text
font_size = 90 font_size = 90
font_family = $font font_family = $font
@ -35,7 +45,7 @@ label {
# DATE # DATE
label { label {
monitor = monitor =
text = cmd[update:43200000] echo "<span foreground='##c0caf5'>$(date +"%d.%m.%Y")</span>" text = cmd[update:43200000] echo "<span foreground='##9ccfd8'>$(date +"%d.%m.%Y")</span>"
color = $text color = $text
font_size = 25 font_size = 25
font_family = $font font_family = $font
@ -49,7 +59,7 @@ image {
monitor = monitor =
path = ~/.local/share/profile path = ~/.local/share/profile
size = 300 size = 300
border_color = $border_highlight border_color = $pine
position = 0, 200 position = 0, 200
halign = center halign = center
@ -59,21 +69,21 @@ image {
input-field { input-field {
monitor = monitor =
size = 300, 60 size = 300, 60
outline_thickness = 4 outline_thickness = 3
dots_size = 0.2 dots_size = 0.2
dots_spacing = 0.2 dots_spacing = 0.2
dots_center = true dots_center = true
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = $border_highlight outer_color = $pine
inner_color = $fg inner_color = $text
font_color = $bg font_color = $base
fade_on_empty = true fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty. placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval) rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(e0af68) check_color = $gold
fail_color = rgb(db4b4b) # if authentication failed, changes outer_color and fail message color fail_color = $love # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1 capslock_color = -1

View File

@ -2,5 +2,6 @@ ipc = off
splash = true splash = true
preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/Firewatch2/Firewatch2-1.png preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/Firewatch2/Firewatch2-1.png
preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/LakesideDeerComplete/LakesideDeer-03.png preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/LakesideDeerComplete/LakesideDeer-03.png
preload = ~/Pictures/wallpapers/abstract/GDWP-789-4K-No-Logo.jpg
wallpaper = ,~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/LakesideDeerComplete/LakesideDeer-03.png wallpaper = ,~/Pictures/wallpapers/abstract/GDWP-789-4K-No-Logo.jpg

0
config/lf/cleaner Executable file → Normal file
View File

0
config/lf/lfrc Executable file → Normal file
View File

0
config/nsxiv/exec/image-info Executable file → Normal file
View File

0
config/nsxiv/exec/key-handler Executable file → Normal file
View File

0
config/nsxiv/exec/nsxiv-url Executable file → Normal file
View File

0
config/nsxiv/exec/thumb-info Executable file → Normal file
View File

0
config/nsxiv/exec/win-title Executable file → Normal file
View File

View File

@ -17,13 +17,12 @@ export LESSHISTFILE=-
export $(dbus-launch) export $(dbus-launch)
export LIBSEAT_BACKEND=logind export LIBSEAT_BACKEND=logind
# export XDG_RUNTIME_DIR="/run/user/$UID"
unsetopt PROMPT_SP unsetopt PROMPT_SP
# Default Apps # Default Apps
export BROWSER="floorp" export BROWSER="zen-browser"
export EDITOR="nvim" export EDITOR="nvim"
export IMAGE="nsxiv" export IMAGE="nsxiv"
export READER="zathura" export READER="zathura"
@ -87,8 +86,8 @@ export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons" export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons"
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java - Djavafx.cachedir=${XDG_CACHE_HOME}/openjfx" # export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java - Djavafx.cachedir=${XDG_CACHE_HOME}/openjfx"
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" # export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
# Other program settings # Other program settings
export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname export AWT_TOOLKIT="MToolkit wmname LG3D" # May have to install wmname
@ -112,6 +111,5 @@ export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
. "$XDG_DATA_HOME/cargo/env" . "$XDG_DATA_HOME/cargo/env"
. "$XDG_DATA_HOME/rye/env"
. "$XDG_CACHE_HOME/deno/.deno/env" . "$XDG_CACHE_HOME/deno/.deno/env"
. "/home/kristofers/.local/share/cargo/env" . "/home/kristofers/.local/share/cargo/env"

2
config/x11/opt-apps Executable file → Normal file
View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
autostart="picom nextcloud transmission-daemon zen-browser vesktop syncthing mullvad-vpn spotify-launcher kotatogram-desktop easyeffects" autostart="picom nextcloud transmission-daemon zen-browser discord syncthing mullvad-vpn spotify-launcher kotatogram-desktop easyeffects"
for program in $autostart; do for program in $autostart; do
pidof -sx "$program" || "$program" & pidof -sx "$program" || "$program" &

View File

@ -41,8 +41,8 @@ keymap = [
{on = [ "<A-h>" ], run = "seek -5", desc = "Seek up 5 units in the preview"}, {on = [ "<A-h>" ], run = "seek -5", desc = "Seek up 5 units in the preview"},
{on = [ "<A-l>" ], run = "seek 5", desc = "Seek down 5 units in the preview"}, {on = [ "<A-l>" ], run = "seek 5", desc = "Seek down 5 units in the preview"},
{on = [ "g", "g" ], run = "arrow -99999999", desc = "Move cursor to the top"}, {on = [ "g", "g" ], run = "arrow top", desc = "Move cursor to the top"},
{on = [ "G" ], run = "arrow 99999999", desc = "Move cursor to the bottom"}, {on = [ "G" ], run = "arrow bot", desc = "Move cursor to the bottom"},
# Selection # Selection
{on = [ "<Space>" ], run = [ "toggle --state=none", "arrow 1" ], desc = "Toggle the current selection state"}, {on = [ "<Space>" ], run = [ "toggle --state=none", "arrow 1" ], desc = "Toggle the current selection state"},

View File

@ -1,17 +1,17 @@
[[plugin.deps]] [[plugin.deps]]
use = "AnirudhG07/nbpreview" use = "AnirudhG07/nbpreview"
rev = "1d85745" rev = "f8879b3"
hash = "d378328e5d0a1b9fb9f04ab3aade4575" hash = "d378328e5d0a1b9fb9f04ab3aade4575"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/glow" use = "Reledia/glow"
rev = "5ce76dc" rev = "c76bf4f"
hash = "52e5f5c602962e7cbf874da28f52ba45" hash = "a6b78bf9af5390e3a85a6951fbb7b93"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/hexyl" use = "Reledia/hexyl"
rev = "39d3d4e" rev = "228a9ef"
hash = "dd624cbaff94af65f39fd86bc57b340" hash = "cdc65cfe4e60e1bf5afe5769d074fa9c"
[[plugin.deps]] [[plugin.deps]]
use = "Reledia/miller" use = "Reledia/miller"
@ -25,13 +25,13 @@ hash = "a8e15d3c21c02a5af41d46ed04778a02"
[[plugin.deps]] [[plugin.deps]]
use = "dedukun/relative-motions" use = "dedukun/relative-motions"
rev = "df97039" rev = "a1466a9"
hash = "395940d2b22941e0acb1232579c9d4cf" hash = "26d7fd10e163e0624d733c067eba4b61"
[[plugin.deps]] [[plugin.deps]]
use = "hankertrix/augment-command" use = "hankertrix/augment-command"
rev = "e337feb" rev = "af31941"
hash = "feeb35edcf1677c7bafac2bc573670bb" hash = "71c1ef899b40a54fcdf5a41f87daa967"
[[plugin.deps]] [[plugin.deps]]
use = "imsi32/yatline" use = "imsi32/yatline"
@ -40,13 +40,13 @@ hash = "3e51d1fd8a2e481fcfa8eab1251d1c5f"
[[plugin.deps]] [[plugin.deps]]
use = "kirasok/torrent-preview" use = "kirasok/torrent-preview"
rev = "c9e67df" rev = "4ca5996"
hash = "f0d9a684da8e4ab9ccbcd255a97cf42b" hash = "6af40ce6b2cd849b5fa32de04a598b06"
[[plugin.deps]] [[plugin.deps]]
use = "ndtoan96/ouch" use = "ndtoan96/ouch"
rev = "083d564" rev = "ce6fb75"
hash = "1e4c0ac1fca31a23412324710193358a" hash = "ed6c185514109d7c5463f609282b220c"
[[plugin.deps]] [[plugin.deps]]
use = "pirafrank/what-size" use = "pirafrank/what-size"
@ -55,28 +55,28 @@ hash = "98e5f5af3efd3ba8bc2db0720187cc83"
[[plugin.deps]] [[plugin.deps]]
use = "yazi-rs/plugins:chmod" use = "yazi-rs/plugins:chmod"
rev = "f202fa8" rev = "5186af7"
hash = "4c7e8fd0266eedee7b619d966bd2d025" hash = "f28138c2e11e87962b66d583fef724c3"
[[plugin.deps]] [[plugin.deps]]
use = "yazi-rs/plugins:full-border" use = "yazi-rs/plugins:full-border"
rev = "f202fa8" rev = "5186af7"
hash = "882ed23839778f82dc137248979c8681" hash = "ae9e1d0c6bfd68cdebc98cc684c22b45"
[[plugin.deps]] [[plugin.deps]]
use = "yazi-rs/plugins:git" use = "yazi-rs/plugins:git"
rev = "f202fa8" rev = "5186af7"
hash = "4d6a07559118975e2dee983d27474d70" hash = "771f18427fb75fb19990ce602bb322f4"
[[plugin.deps]] [[plugin.deps]]
use = "yazi-rs/plugins:hide-preview" use = "yazi-rs/plugins:hide-preview"
rev = "f202fa8" rev = "5186af7"
hash = "5be5885898ca9df783bdec0d402bf4b0" hash = "1e31898370b752e4faf335b762b3eeaf"
[[plugin.deps]] [[plugin.deps]]
use = "yazi-rs/plugins:max-preview" use = "yazi-rs/plugins:max-preview"
rev = "f202fa8" rev = "5186af7"
hash = "9bc26d10d2f6e2aa93b10905b1b76979" hash = "a8025f2bb311e869069364fba01abffc"
[flavor] [flavor]
deps = [] deps = []

View File

@ -2,7 +2,7 @@
A [Yazi][yazi-link] plugin that enhances Yazi's default commands. A [Yazi][yazi-link] plugin that enhances Yazi's default commands.
This plugin is inspired by the This plugin is inspired by the
[Yazi tips page](https://yazi-rs.github.io/docs/tips), [Yazi tips page][yazi-tips-page],
the [bypass.yazi](https://github.com/Rolv-Apneseth/bypass.yazi) plugin the [bypass.yazi](https://github.com/Rolv-Apneseth/bypass.yazi) plugin
and the [fast-enter.yazi](https://github.com/ourongxing/fast-enter.yazi) and the [fast-enter.yazi](https://github.com/ourongxing/fast-enter.yazi)
plugin. plugin.
@ -20,7 +20,7 @@ plugin.
## Requirements ## Requirements
- [Yazi](https://github.com/sxyazi/yazi) v0.4.2+ - [Yazi][yazi-link] v25.2.7+
- [`7z` or `7zz` command][7z-link] - [`7z` or `7zz` command][7z-link]
- [`file` command][file-command-link] - [`file` command][file-command-link]
@ -51,6 +51,7 @@ ya pack -u
| `smart_paste` | `true` or `false` | `false` | Paste items into a directory without entering it. The behaviour is exactly the same as the [smart paste tip on Yazi's documentation][smart-paste-tip]. Setting this option to `false` will use the default `paste` behaviour. You can also enable this behaviour by passing the `--smart` flag to the `paste` command. | | `smart_paste` | `true` or `false` | `false` | Paste items into a directory without entering it. The behaviour is exactly the same as the [smart paste tip on Yazi's documentation][smart-paste-tip]. Setting this option to `false` will use the default `paste` behaviour. You can also enable this behaviour by passing the `--smart` flag to the `paste` command. |
| `smart_tab_create` | `true` or `false` | `false` | Create tabs in the directory that is being hovered instead of the current directory. The behaviour is exactly the same as the [smart tab tip on Yazi's documentation][smart-tab-tip]. Setting this option to `false` will use the default `tab_create` behaviour, which means you need to pass the `--current` flag to the command. You can also enable this behaviour by passing the `--smart` flag to the `tab_create` command. | | `smart_tab_create` | `true` or `false` | `false` | Create tabs in the directory that is being hovered instead of the current directory. The behaviour is exactly the same as the [smart tab tip on Yazi's documentation][smart-tab-tip]. Setting this option to `false` will use the default `tab_create` behaviour, which means you need to pass the `--current` flag to the command. You can also enable this behaviour by passing the `--smart` flag to the `tab_create` command. |
| `smart_tab_switch` | `true` or `false` | `false` | If the tab that is being switched to does not exist yet, setting this option to `true` will create all the tabs in between the current number of open tabs, and the tab that is being switched to. The behaviour is exactly the same as the [smart switch tip on Yazi's documentation][smart-switch-tip]. Setting this option to `false` will use the default `tab_switch` behaviour. You can also enable this behaviour by passing the `--smart` flag to the `tab_switch` command. | | `smart_tab_switch` | `true` or `false` | `false` | If the tab that is being switched to does not exist yet, setting this option to `true` will create all the tabs in between the current number of open tabs, and the tab that is being switched to. The behaviour is exactly the same as the [smart switch tip on Yazi's documentation][smart-switch-tip]. Setting this option to `false` will use the default `tab_switch` behaviour. You can also enable this behaviour by passing the `--smart` flag to the `tab_switch` command. |
| `confirm_on_quit` | `true` or `false` | `true` | Setting this option to `true` will cause Yazi to prompt you for a confirmation before quitting when there is more than 1 tab open. Setting this option to `false` will use the default `quit` behaviour, which is to immediately quit Yazi. You can also enable this behaviour by passing the `--confirm` flag to the `quit` command. |
| `open_file_after_creation` | `true` or `false` | `false` | This option determines whether the plugin will open a file after it has been created. Setting this option to `true` will cause the plugin to open the created file. You can also enable this behaviour by passing the `--open` flag to the `create` command. | | `open_file_after_creation` | `true` or `false` | `false` | This option determines whether the plugin will open a file after it has been created. Setting this option to `true` will cause the plugin to open the created file. You can also enable this behaviour by passing the `--open` flag to the `create` command. |
| `enter_directory_after_creation` | `true` or `false` | `false` | This option determines whether the plugin will enter a directory after it has been created. Setting this option to `true` will cause the plugin to enter the created directory. You can also enable this behaviour by passing the `--enter` flag to the `create` command. | | `enter_directory_after_creation` | `true` or `false` | `false` | This option determines whether the plugin will enter a directory after it has been created. Setting this option to `true` will cause the plugin to enter the created directory. You can also enable this behaviour by passing the `--enter` flag to the `create` command. |
| `use_default_create_behaviour` | `true` or `false` | `false` | This option determines whether the plugin will use the behaviour of Yazi's `create` command. Setting this option to `true` will use the behaviour of Yazi's `create` command. You can also enable this behaviour by passing the `--default-behaviour` flag to the `create` command. | | `use_default_create_behaviour` | `true` or `false` | `false` | This option determines whether the plugin will use the behaviour of Yazi's `create` command. Setting this option to `true` will use the behaviour of Yazi's `create` command. You can also enable this behaviour by passing the `--default-behaviour` flag to the `create` command. |
@ -65,13 +66,12 @@ ya pack -u
If you would like to use the default configuration, which is shown below, If you would like to use the default configuration, which is shown below,
you don't need to add anything to your `~/.config/yazi/init.lua` you don't need to add anything to your `~/.config/yazi/init.lua`
file on Linux and macOS, or your file on Linux and macOS, or your `%AppData%\yazi\config\init.lua`
`C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua` file on Windows.
file on Windows, where `USERNAME` is your Windows username.
```lua ```lua
-- ~/.config/yazi/init.lua for Linux and macOS -- ~/.config/yazi/init.lua for Linux and macOS
-- C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua for Windows -- %AppData%\yazi\config\init.lua for Windows
-- Using the default configuration -- Using the default configuration
require("augment-command"):setup({ require("augment-command"):setup({
@ -81,6 +81,7 @@ require("augment-command"):setup({
smart_paste = false, smart_paste = false,
smart_tab_create = false, smart_tab_create = false,
smart_tab_switch = false, smart_tab_switch = false,
confirm_on_quit = true,
open_file_after_creation = false, open_file_after_creation = false,
enter_directory_after_creation = false, enter_directory_after_creation = false,
use_default_create_behaviour = false, use_default_create_behaviour = false,
@ -98,15 +99,14 @@ require("augment-command"):setup({
However, if you would like to configure the plugin, you can add However, if you would like to configure the plugin, you can add
your desired configuration options to your `~/.config/yazi/init.lua` file your desired configuration options to your `~/.config/yazi/init.lua` file
on Linux and macOS, or your on Linux and macOS, or your
`C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua` `%AppData%\yazi\config\init.lua` file on Windows.
file on Windows, where `USERNAME` is your Windows username.
You can leave out configuration options that you would You can leave out configuration options that you would
like to be left as default. like to be left as default.
An example configuration is shown below: An example configuration is shown below:
```lua ```lua
-- ~/.config/yazi/init.lua for Linux and macOS -- ~/.config/yazi/init.lua for Linux and macOS
-- C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua for Windows -- %AppData%\yazi\config\init.lua for Windows
-- Custom configuration -- Custom configuration
require("augment-command"):setup({ require("augment-command"):setup({
@ -238,8 +238,7 @@ then it will operate on the selected items.
[`extract` openers section][yazi-yazi-toml-extract-openers] [`extract` openers section][yazi-yazi-toml-extract-openers]
in [Yazi's default `yazi.toml`][yazi-yazi-toml] into your `yazi.toml`, in [Yazi's default `yazi.toml`][yazi-yazi-toml] into your `yazi.toml`,
which is located at `~/.config/yazi/yazi.toml` for Linux and macOS, and which is located at `~/.config/yazi/yazi.toml` for Linux and macOS, and
`C:\Users\USERNAME\AppData\Roaming\yazi\config\yazi.toml` `%AppData%\yazi\config\yazi.toml` file on Windows.
file on Windows, where `USERNAME` is your Windows username.
Make sure that the `extract` openers are under the `opener` key in your Make sure that the `extract` openers are under the `opener` key in your
`yazi.toml`. Then replace `extract` with `augmented-extract`, `yazi.toml`. Then replace `extract` with `augmented-extract`,
and you will be using the plugin's `extract` command instead of and you will be using the plugin's `extract` command instead of
@ -249,7 +248,7 @@ then it will operate on the selected items.
```toml ```toml
# ~/.config/yazi/yazi.toml for Linux and macOS # ~/.config/yazi/yazi.toml for Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\yazi.toml for Windows # %AppData%\yazi\config\yazi.toml for Windows
[opener] [opener]
extract = [ extract = [
@ -262,7 +261,7 @@ then it will operate on the selected items.
```toml ```toml
# ~/.config/yazi/yazi.toml for Linux and macOS # ~/.config/yazi/yazi.toml for Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\yazi.toml for Windows # %AppData%\yazi\config\yazi.toml for Windows
[[opener.extract]] [[opener.extract]]
run = 'ya pub augmented-extract --list "$@"' run = 'ya pub augmented-extract --list "$@"'
@ -452,16 +451,7 @@ then it will operate on the selected items.
create directories to ensure that the path given exists. create directories to ensure that the path given exists.
It also supports all the options supported by Yazi's `create` command, It also supports all the options supported by Yazi's `create` command,
so you can pass them to the command and expect the same behaviour. so you can pass them to the command and expect the same behaviour.
However, due to the Do note that the separator in the `confirm` component will be the text colour
[`confirm` component](https://github.com/sxyazi/yazi/issues/2082)
currently not being exposed to plugin developers, it uses Yazi's input
component to prompt for a confirmation, like in Yazi v0.3.0 and below.
This is not ideal, but it shouldn't happen that often and
hopefully wouldn't be too annoying.
If you are using the latest version of Yazi from the main branch,
the `confirm` component is now exposed to plugin developers and
the plugin will use the `confirm` component instead.
However, the separator in the `confirm` component will be the text colour
instead of your configured border colour for the `confirm` component as instead of your configured border colour for the `confirm` component as
the `list` part of the `confirm` component has not been exposed to plugin the `list` part of the `confirm` component has not been exposed to plugin
developers, so the separator is made using text. developers, so the separator is made using text.
@ -536,43 +526,15 @@ then it will operate on the selected items.
- To use this command, the syntax is exactly the same as the default - To use this command, the syntax is exactly the same as the default
`shell` command provided by Yazi. You just provide the command you want and `shell` command provided by Yazi. You just provide the command you want and
provide any Yazi shell variable, which is documented provide any Yazi shell variable, which is documented
[here](https://yazi-rs.github.io/docs/configuration/keymap/#manager.shell). [here][yazi-shell-variables].
The plugin will automatically replace the shell variable you give The plugin will automatically replace the shell variable you give
with the file paths for the item group before executing the command. with the file paths for the item group before executing the command.
- You will also need to escape the quotes when giving the shell command
if you use the same quotes to quote the given arguments to the plugin.
For example, if you pass the arguments to the plugin with double quotes,
i.e. `--args="shell"`, you will have to escape the double quotes with a
backslash character, like shown below:
```toml - There is no need to quote the shell variable on Linux and macOS,
# ~/.config/yazi/keymap.toml on Linux and macOS as it is expanded by the plugin instead of the shell,
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows and the paths are already quoted using the `ya.quote` function
before execution, so quoting is entirely unnecessary
[[manager.prepend_keymap]] and may result in unexpected behaviour.
on = [ "o" ]
run = 'plugin augment-command --args="shell \"$EDITOR $@\" --block"'
desc = "Open the editor"
```
- Alternatively, you can use the triple single quote `'''` delimiter
for the run string and avoid the escaping the shell command altogether,
like the two examples below:
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = [ "o" ]
run = '''plugin augment-command --args='shell "$EDITOR $@" --block''''
desc = "Open the editor"
[[manager.prepend_keymap]]
on = [ "i" ]
run = '''plugin augment-command --args="shell '$PAGER $@' --block"'''
desc = "Open the pager"
```
- `--exit-if-dir` flag to stop the shell command given - `--exit-if-dir` flag to stop the shell command given
from executing if the item group consists only of directories. from executing if the item group consists only of directories.
@ -586,11 +548,11 @@ then it will operate on the selected items.
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "i" ] on = "i"
run = '''plugin augment-command --args="shell '$PAGER $@' --block --exit-if-dir"''' run = "plugin augment-command -- shell '$PAGER $@' --block --exit-if-dir"
desc = "Open the pager" desc = "Open the pager"
``` ```
@ -601,18 +563,118 @@ then it will operate on the selected items.
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "i" ] on = "o"
run = '''plugin augment-command --args="shell '$EDITOR $@' --block --exit-if-dir"''' run = "plugin augment-command -- shell '$EDITOR $@' --block --exit-if-dir"
desc = "Open the pager" desc = "Open the editor"
``` ```
Video: Video:
[shell-exit-if-directory-video] [shell-exit-if-directory-video]
#### Passing arguments to the `shell` command
Ideally, you will want to avoid using backslashes to escape the shell command
arguments, so here are a few ways to do it:
1. Shell arguments that don't have special shell variables
on Linux and macOS, like `$SHELL`, or don't have special shell characters
like `>`, `|` or spaces, need not be quoted with double quotes `"`
or single quotes `'` respectively.
For example:
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "i"
run = "plugin augment-command -- shell --block 'bat -p --pager less $@'"
desc = "Open with bat"
```
Even though the `$@` argument above is considered a shell variable in Linux
and macOS, the plugin automatically replaces it with the full path
of the items in the item group, so it does not need to be quoted with
double quotes `"`, as it is expanded by the plugin,
and not meant to be expanded by the shell.
2. If the arguments to the `shell` command have special shell variables
on Linux and macOS, like `$SHELL`, or special shell characters like
`>`, `|`, or spaces, use `--` to denote the end of the flags and options
passed to the `shell` command.
For example:
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "<C-s>"
run = 'plugin augment-command -- shell --block -- sh -c "$SHELL"'
desc = "Open a shell inside of a shell here"
```
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "<C-s>"
run = "plugin augment-command -- shell --block -- sh -c 'echo hello'"
desc = "Open a shell and say hello inside the opened shell"
```
3. If the arguments passed to the `shell` command themselves contain arguments
that have special shell variables on Linux and macOS, like `$SHELL`,
or special shell characters like `>`, `|`, or spaces,
use the triple single quote `'''` delimiter for the `run` string.
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "<C-s>"
run = '''plugin augment-command -- shell --block -- sh -c 'sh -c "$SHELL"''''
desc = "Open a shell inside of a shell inside of a shell here"
```
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "<C-s>"
run = '''plugin augment-command --
shell --block -- sh -c "$SHELL -c 'echo hello'"
'''
desc = "Open a shell inside of a shell and say hello inside the opened shell"
```
A more legitimate use case for this would be something like
[Yazi's tip to email files using Mozilla Thunderbird][thunderbird-tip]:
```toml
# ~/.config/yazi/keymap.toml on Linux and macOS
# %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]]
on = "<C-e>"
run = '''plugin augment-command --
shell --
paths=$(for p in $@; do echo "$p"; done | paste -s -d,)
thunderbird -compose "attachment='$paths'"
'''
desc = "Email files using Mozilla Thunderbird"
```
Once again, the `$@` variable above does not need to be quoted in double
quotes `"` as it is expanded by the plugin instead of the shell.
If the above few methods to avoid using backslashes within your shell command
to escape the quotes are still insufficient for your use case,
it is probably more appropriate to write a shell script in a separate file
and execute that instead of writing the shell command inline
in your `keymap.toml` file.
### Paste (`paste`) ### Paste (`paste`)
- When `smart_paste` is set to `true`, - When `smart_paste` is set to `true`,
@ -699,6 +761,35 @@ then it will operate on the selected items.
[smart-tab-switch-video] [smart-tab-switch-video]
### Quit (`quit`)
- You should use Yazi's default `quit` command instead of this augmented
command if you don't want to have a prompt when quitting Yazi
with multiple tabs open.
This command has a visual side effect of showing a confirmation prompt
for a split second before closing Yazi when quitting Yazi
with only 1 tab open, which can be annoying.
This confirmation prompt is due to the plugin still running for a bit
after the `quit` command is emitted, causing Yazi to prompt you for
confirmation as there are tasks still running.
However, once the plugin has stopped running, which is a split second
after the `quit` command is emitted, Yazi will exit.
You can observe this visual effect in the video demonstration below.
- When `confirm_on_quit` is set to `true`, the plugin will prompt you for
confirmation when there is more than 1 tab open. Otherwise, it will
immediately quit Yazi, just like the default `quit` command.
- `--confirm` flag to get the plugin to prompt you for confirmation when
quitting with multiple tabs open.
This flag will cause the `quit` command to prompt you for confirmation
when quitting with multiple tabs open even when `confirm_on_quit` is
set to `false`.
This allows you to set a specific key to use this behaviour with the
`quit` command instead of using it for every `quit` command.
Video:
[quit-with-confirmation-video]
### Arrow (`arrow`) ### Arrow (`arrow`)
- When `wraparound_file_navigation` is set to `true`, - When `wraparound_file_navigation` is set to `true`,
@ -738,19 +829,19 @@ then it will operate on the selected items.
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
# Use K to move up in the parent directory # Use K to move up in the parent directory
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "K" ] on = "K"
run = [ "leave", "arrow -1", "enter" ] run = ["leave", "arrow -1", "enter"]
desc = "Move up in the parent directory" desc = "Move up in the parent directory"
# Use J to move down in the parent directory # Use J to move down in the parent directory
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "J" ] on = "J"
run = [ "leave", "arrow 1", "enter" ] run = ["leave", "arrow 1", "enter"]
desc = "Move down in the parent directory" desc = "Move down in the parent directory"
``` ```
@ -815,16 +906,16 @@ then it will operate on the selected items.
Add the commands that you would like to use to your `keymap.toml` file, Add the commands that you would like to use to your `keymap.toml` file,
located at `~/.config/yazi/keymap.toml` on Linux and macOS located at `~/.config/yazi/keymap.toml` on Linux and macOS
and at `C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml` and at `%AppData%\yazi\config\keymap.toml`
on Windows, in this format: on Windows, in this format:
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "key" ] on = "key"
run = "plugin augment-command --args='command arguments --flags --options=42'" run = "plugin augment-command -- command arguments --flags --options=42"
desc = "Description" desc = "Description"
``` ```
@ -832,11 +923,11 @@ For example, to use the augmented `enter` command:
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "l" ] on = "l"
run = "plugin augment-command --args='enter'" run = "plugin augment-command -- enter"
desc = "Enter a directory and skip directories with only a single subdirectory" desc = "Enter a directory and skip directories with only a single subdirectory"
``` ```
@ -845,33 +936,35 @@ are also supported, for example:
```toml ```toml
# ~/.config/yazi/keymap.toml on Linux and macOS # ~/.config/yazi/keymap.toml on Linux and macOS
# C:\Users\USERNAME\AppData\Roaming\yazi\config\keymap.toml on Windows # %AppData%\yazi\config\keymap.toml on Windows
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "k" ] on = "k"
run = "plugin augment-command --args='arrow -1'" run = "plugin augment-command -- arrow -1"
desc = "Move cursor up" desc = "Move cursor up"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "r" ] on = "r"
run = "plugin augment-command --args='rename --cursor=before_ext'" run = "plugin augment-command -- rename --cursor=before_ext"
desc = "Rename a file or directory" desc = "Rename a file or directory"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "D" ] on = "D"
run = "plugin augment-command --args='remove --permanently'" run = "plugin augment-command -- remove --permanently"
desc = "Permanently delete the files" desc = "Permanently delete the files"
[[manager.prepend_keymap]]
on = ["g", "j"]
run = "plugin augment-command -- parent_arrow 1"
``` ```
For the default descriptions of the commands, you can refer to For the default descriptions of the commands, you can refer to
[Yazi's default `keymap.toml` file][yazi-keymap-toml]. [Yazi's default `keymap.toml` file][yazi-keymap-toml].
Essentially, all you need to do to use this plugin Essentially, all you need to do to use this plugin
is to wrap a Yazi command in single quotes, is to add `plugin augment-command --`, with a space at the end,
like `'enter'`, in front of a Yazi command, such as `enter`,
then add `plugin augment-command --args=` which results in `plugin augment-command -- enter'`.
in front of it, which results in
`plugin augment-command --args='enter'`.
### Using the `extract` command as an opener ### Using the `extract` command as an opener
@ -883,7 +976,7 @@ for details on how to do so.
### Full configuration example ### Full configuration example
For a full configuration example, For a full configuration example,
you can take a look at [my `keymap.toml` file][my-keymap-toml] you can have a look at [my `keymap.toml` file][my-keymap-toml]
and [my `yazi.toml` file][my-yazi-toml]. and [my `yazi.toml` file][my-yazi-toml].
## [Licence] ## [Licence]
@ -894,6 +987,7 @@ You can view the full licence in the [`LICENSE`][Licence] file.
<!-- Regular links --> <!-- Regular links -->
[yazi-link]: https://github.com/sxyazi/yazi [yazi-link]: https://github.com/sxyazi/yazi
[yazi-tips-page]: https://yazi-rs.github.io/docs/tips
[smart-paste-tip]: https://yazi-rs.github.io/docs/tips#smart-paste [smart-paste-tip]: https://yazi-rs.github.io/docs/tips#smart-paste
[smart-tab-tip]: https://yazi-rs.github.io/docs/tips#smart-tab [smart-tab-tip]: https://yazi-rs.github.io/docs/tips#smart-tab
[smart-switch-tip]: https://yazi-rs.github.io/docs/tips#smart-switch [smart-switch-tip]: https://yazi-rs.github.io/docs/tips#smart-switch
@ -905,6 +999,8 @@ You can view the full licence in the [`LICENSE`][Licence] file.
[brew-link]: https://brew.sh/ [brew-link]: https://brew.sh/
[yazi-yazi-toml-extract-openers]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/yazi-default.toml#L51-L54 [yazi-yazi-toml-extract-openers]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/yazi-default.toml#L51-L54
[yazi-yazi-toml]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/yazi-default.toml [yazi-yazi-toml]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/yazi-default.toml
[yazi-shell-variables]: https://yazi-rs.github.io/docs/configuration/keymap/#manager.shell
[thunderbird-tip]: https://yazi-rs.github.io/docs/tips#email-selected-files-using-thunderbird
[yazi-keymap-toml]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap-default.toml [yazi-keymap-toml]: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap-default.toml
[my-keymap-toml]: https://github.com/hankertrix/Dotfiles/blob/main/.config/yazi/keymap.toml [my-keymap-toml]: https://github.com/hankertrix/Dotfiles/blob/main/.config/yazi/keymap.toml
[my-yazi-toml]: https://github.com/hankertrix/Dotfiles/blob/main/.config/yazi/yazi.toml [my-yazi-toml]: https://github.com/hankertrix/Dotfiles/blob/main/.config/yazi/yazi.toml
@ -979,6 +1075,10 @@ You can view the full licence in the [`LICENSE`][Licence] file.
[smart-tab-switch-video]: https://github.com/user-attachments/assets/1afb540d-47a9-4625-ae59-95d5cd91aa35 [smart-tab-switch-video]: https://github.com/user-attachments/assets/1afb540d-47a9-4625-ae59-95d5cd91aa35
<!-- Quit command -->
[quit-with-confirmation-video]: https://github.com/user-attachments/assets/b6206ee4-766b-44ce-b90b-15b015ae71f9
<!-- Arrow command --> <!-- Arrow command -->
[wraparound-arrow-video]: https://github.com/user-attachments/assets/41ea1fb0-a526-4549-95a2-547c3c4b0498 [wraparound-arrow-video]: https://github.com/user-attachments/assets/41ea1fb0-a526-4549-95a2-547c3c4b0498

View File

@ -1,3 +1,5 @@
--- @since 25.2.7
-- Plugin to make some Yazi commands smarter -- Plugin to make some Yazi commands smarter
-- Written in Lua 5.4 -- Written in Lua 5.4
@ -48,6 +50,7 @@
---@field smart_paste boolean Whether to use smart paste ---@field smart_paste boolean Whether to use smart paste
---@field smart_tab_create boolean Whether to use smart tab create ---@field smart_tab_create boolean Whether to use smart tab create
---@field smart_tab_switch boolean Whether to use smart tab switch ---@field smart_tab_switch boolean Whether to use smart tab switch
---@field confirm_on_quit boolean Whether to show a confirmation when quitting
---@field open_file_after_creation boolean Whether to open after creation ---@field open_file_after_creation boolean Whether to open after creation
---@field enter_directory_after_creation boolean Whether to enter after creation ---@field enter_directory_after_creation boolean Whether to enter after creation
---@field use_default_create_behaviour boolean Use Yazi's create behaviour? ---@field use_default_create_behaviour boolean Use Yazi's create behaviour?
@ -96,6 +99,7 @@ local Commands = {
Paste = "paste", Paste = "paste",
TabCreate = "tab_create", TabCreate = "tab_create",
TabSwitch = "tab_switch", TabSwitch = "tab_switch",
Quit = "quit",
Arrow = "arrow", Arrow = "arrow",
ParentArrow = "parent_arrow", ParentArrow = "parent_arrow",
Editor = "editor", Editor = "editor",
@ -120,6 +124,7 @@ local DEFAULT_CONFIG = {
smart_paste = false, smart_paste = false,
smart_tab_create = false, smart_tab_create = false,
smart_tab_switch = false, smart_tab_switch = false,
confirm_on_quit = true,
open_file_after_creation = false, open_file_after_creation = false,
enter_directory_after_creation = false, enter_directory_after_creation = false,
use_default_create_behaviour = false, use_default_create_behaviour = false,
@ -346,9 +351,9 @@ local file_extension_pattern = "%.([%a]+)$"
---@type string ---@type string
local shell_variable_pattern = "[%$%%][%*@0]" local shell_variable_pattern = "[%$%%][%*@0]"
-- The pattern to match the bat command with the pager option passed -- The pattern to match the bat command
---@type string ---@type string
local bat_command_with_pager_pattern = "%f[%a]bat%f[%A].*%-%-pager%s+" local bat_command_pattern = "%f[%a]bat%f[%A]"
-- Utility functions -- Utility functions
@ -597,16 +602,10 @@ local function get_user_input(prompt, options)
end end
-- Function to get the user's confirmation -- Function to get the user's confirmation
-- TODO: Remove the `ya.input` version once `ya.confirm` is stable
---@param prompt string The prompt to show to the user
---@param title string|ui.Line The title of the confirmation prompt ---@param title string|ui.Line The title of the confirmation prompt
---@param content string|ui.Text The content of the confirmation prompt ---@param content string|ui.Text The content of the confirmation prompt
---@return boolean confirmation Whether the user has confirmed or not ---@return boolean confirmation Whether the user has confirmed or not
local function get_user_confirmation(prompt, title, content) local function get_user_confirmation(title, content)
--
-- If the ya.confirm API exists, use it
if ya.confirm then
-- --
-- Get the user's confirmation -- Get the user's confirmation
@ -617,26 +616,6 @@ local function get_user_confirmation(prompt, title, content)
-- Return the result of the confirmation -- Return the result of the confirmation
return confirmation return confirmation
end
-- TODO: Remove everything after this when `ya.confirm` is stable
-- Get the user's input
local user_input, event = get_user_input(prompt)
-- If the user has not confirmed the input,
-- or the user input is nil,
-- then return false
if not user_input or event ~= 1 then return false end
-- Lowercase the user's input
user_input = user_input:lower()
-- If the user input starts with a "y", then return true
if user_input:find("^y") then return true end
-- Otherwise, return false
return false
end end
-- Function to merge the given configuration table with the default one -- Function to merge the given configuration table with the default one
@ -739,11 +718,7 @@ end
local function emit_plugin_command(command, args) local function emit_plugin_command(command, args)
return ya.manager_emit("plugin", { return ya.manager_emit("plugin", {
PLUGIN_NAME, PLUGIN_NAME,
args = string.format( string.format("%s %s", command, convert_arguments_to_string(args)),
"%s %s",
command,
convert_arguments_to_string(args)
),
}) })
end end
@ -1039,6 +1014,10 @@ local get_paths_of_selected_items = ya.sync(function(_, quote)
return paths_of_selected_items return paths_of_selected_items
end) end)
-- Function to get the number of tabs currently open
---@type fun(): number
local get_number_of_tabs = ya.sync(function() return #cx.tabs end)
-- Function to get the tab preferences -- Function to get the tab preferences
---@type fun(): tab.Preference ---@type fun(): tab.Preference
local get_tab_preferences = ya.sync(function(_) local get_tab_preferences = ya.sync(function(_)
@ -2851,9 +2830,6 @@ local function handle_create(args, config)
-- Get the user's confirmation for -- Get the user's confirmation for
-- whether they want to overwrite the item -- whether they want to overwrite the item
local user_confirmation = get_user_confirmation( local user_confirmation = get_user_confirmation(
-- TODO: Remove the line below
"The item already exists, overwrite? (y/N)",
"Overwrite file?", "Overwrite file?",
ui.Text({ ui.Text({
ui.Line("Will overwrite the following file:") ui.Line("Will overwrite the following file:")
@ -2950,41 +2926,73 @@ end
-- Function to fix the bat default pager command -- Function to fix the bat default pager command
---@param command string The command containing the bat default pager command ---@param command string The command containing the bat default pager command
---@return string command The fixed bat command ---@return string command The fixed bat command
local function fix_bat_default_pager_shell_command(command) local function fix_shell_command_containing_bat(command)
-- --
-- Initialise the default pager command for bat without the F flag -- The pattern to match the pager argument for the bat command
local bat_pager_pattern = "(%-%-pager)%s+(%S+)"
-- Get the pager argument for the bat command
local _, pager_argument = command:match(bat_pager_pattern)
-- If there is a pager argument
--
-- We don't need to do much if the pager argument already exists,
-- as we can rely on the function that fixes the less command to
-- remove the -F flag that is executed after this function is called.
--
-- There's only work to be done if the pager argument isn't quoted,
-- as we need to quote it so the function that fixes the less command
-- can execute cleanly without causing shell syntax errors.
--
-- The reason why we don't quote the less command in the function
-- to fix the less command is to not deal with using backslashes
-- to escape the quotes, which can get really messy and really confusing,
-- so we just naively replace the less command with the fixed version
-- without caring about whether the less command is passed as an
-- argument, or is called as a shell command.
if pager_argument then
--
-- If the pager argument is quoted, return the command immediately
if pager_argument:find("['\"].+['\"]") then
return command
end
-- Otherwise, quote the pager argument with single quotes
--
-- It should be fine to quote with single quotes
-- as the user passing the argument probably isn't
-- using a shell variable, as they would have quoted
-- the shell variable in double quotes instead of
-- omitting the quotes.
pager_argument = string.format("'%s'", pager_argument)
-- Replace the pager argument with the quoted version
local modified_command =
command:gsub(bat_pager_pattern, "%1 " .. pager_argument)
-- Return the modified command
return modified_command
end
-- If there is no pager argument,
-- initialise the default pager command for bat without the F flag
local bat_default_pager_command_without_f_flag = "less -RX" local bat_default_pager_command_without_f_flag = "less -RX"
-- Get the modified command and the replacement count -- Replace the bat command with the command to use the
-- when replacing the less command when it is quoted -- bat default pager command without the F flag
local modified_command, replacement_count = command:gsub( local modified_command = command:gsub(
"(" bat_command_pattern,
.. bat_command_with_pager_pattern string.format(
.. "['\"]+%s*" "bat --pager '%s'",
.. ")" bat_default_pager_command_without_f_flag
.. "less" ),
.. "(%s*['\"]+)", 1
"%1" .. bat_default_pager_command_without_f_flag .. "%2"
) )
-- If the replacement count is not 0, -- Return the modified command
-- then return the modified command return modified_command
if replacement_count ~= 0 then return modified_command end
-- Otherwise, get the modified command and the replacement count
-- when replacing the less command when it is unquoted
modified_command, replacement_count = command:gsub(
"(" .. bat_command_with_pager_pattern .. ")" .. "less",
'%1"' .. bat_default_pager_command_without_f_flag .. '"'
)
-- If the replacement count is not 0,
-- then return the modified command
if replacement_count ~= 0 then return modified_command end
-- Otherwise, return the given command
return command
end end
-- Function to fix the shell commands given to work properly with Yazi -- Function to fix the shell commands given to work properly with Yazi
@ -2993,6 +3001,14 @@ end
local function fix_shell_command(command) local function fix_shell_command(command)
-- --
-- If the given command contains the bat command
if command:find(bat_command_pattern) ~= nil then
--
-- Calls the command to fix the bat command
command = fix_shell_command_containing_bat(command)
end
-- If the given command includes the less command -- If the given command includes the less command
if command:find("%f[%a]less%f[%A]") ~= nil then if command:find("%f[%a]less%f[%A]") ~= nil then
-- --
@ -3001,15 +3017,6 @@ local function fix_shell_command(command)
command = fix_shell_command_containing_less(command) command = fix_shell_command_containing_less(command)
end end
-- If the given command contains the bat command with the pager
-- option passed
if command:find(bat_command_with_pager_pattern) ~= nil then
--
-- Calls the command to fix the bat command with the default pager
command = fix_bat_default_pager_shell_command(command)
end
-- Return the modified command -- Return the modified command
return command return command
end end
@ -3175,8 +3182,7 @@ local execute_tab_create = ya.sync(function(state, args)
not hovered_item not hovered_item
or not hovered_item.cha.is_dir or not hovered_item.cha.is_dir
or not ( or not (
state.config.smart_tab_create state.config.smart_tab_create or table_pop(args, "smart", false)
or table_pop(args, "smart", false)
) )
then then
-- --
@ -3260,6 +3266,37 @@ local function handle_tab_switch(args)
execute_tab_switch(args) execute_tab_switch(args)
end end
-- Function to execute the quit command
---@type CommandFunction
local function handle_quit(args, config)
--
-- Get the number of tabs
local number_of_tabs = get_number_of_tabs()
-- If the user doesn't want the confirm on quit functionality,
-- or if the number of tabs is 1 or less,
-- then emit the quit command
if not (config.confirm_on_quit or args.confirm) or number_of_tabs <= 1 then
return ya.manager_emit("quit", args)
end
-- Otherwise, get the user's confirmation for quitting
local user_confirmation = get_user_confirmation(
"Quit?",
ui.Text({
"There are multiple tabs open.",
"Are you sure you want to quit?",
}):wrap(ui.Text.WRAP_TRIM)
)
-- If the user didn't confirm, then exit the function
if not user_confirmation then return end
-- Otherwise, emit the quit command
ya.manager_emit("quit", args)
end
-- Function to do the wraparound for the arrow command -- Function to do the wraparound for the arrow command
---@type fun( ---@type fun(
--- args: Arguments, -- The arguments passed to the plugin --- args: Arguments, -- The arguments passed to the plugin
@ -3552,6 +3589,7 @@ local function run_command_func(command, args, config)
[Commands.Paste] = handle_paste, [Commands.Paste] = handle_paste,
[Commands.TabCreate] = handle_tab_create, [Commands.TabCreate] = handle_tab_create,
[Commands.TabSwitch] = handle_tab_switch, [Commands.TabSwitch] = handle_tab_switch,
[Commands.Quit] = handle_quit,
[Commands.Arrow] = handle_arrow, [Commands.Arrow] = handle_arrow,
[Commands.ParentArrow] = handle_parent_arrow, [Commands.ParentArrow] = handle_parent_arrow,
[Commands.Editor] = handle_editor, [Commands.Editor] = handle_editor,

View File

@ -1,3 +1,5 @@
--- @since 25.2.7
local selected_or_hovered = ya.sync(function() local selected_or_hovered = ya.sync(function()
local tab, paths = cx.active, {} local tab, paths = cx.active, {}
for _, u in pairs(tab.selected) do for _, u in pairs(tab.selected) do

View File

@ -1,3 +1,5 @@
--- @since 25.2.7
local function setup(_, opts) local function setup(_, opts)
local type = opts and opts.type or ui.Border.ROUNDED local type = opts and opts.type or ui.Border.ROUNDED
local old_build = Tab.build local old_build = Tab.build

View File

@ -1,7 +1,7 @@
# git.yazi # git.yazi
> [!NOTE] > [!NOTE]
> Yazi v0.4.1 or later is required for this plugin to work. > Yazi v25.2.7 or later is required for this plugin to work.
Show the status of Git file changes as linemode in the file list. Show the status of Git file changes as linemode in the file list.

View File

@ -1,3 +1,5 @@
--- @since 25.2.7
local WIN = ya.target_family() == "windows" local WIN = ya.target_family() == "windows"
local PATS = { local PATS = {
{ "[MT]", 6 }, -- Modified { "[MT]", 6 }, -- Modified
@ -159,9 +161,6 @@ local function fetch(_, job)
local repo = root(cwd) local repo = root(cwd)
if not repo then if not repo then
remove(tostring(cwd)) remove(tostring(cwd))
if not ya.__250127 then -- TODO: remove this
return 1
end
return true return true
end end
@ -178,10 +177,6 @@ local function fetch(_, job)
:stdout(Command.PIPED) :stdout(Command.PIPED)
:output() :output()
if not output then if not output then
if not ya.__250127 then -- TODO: remove this
ya.err("Cannot spawn git command, error: " .. err)
return 0
end
return true, Err("Cannot spawn `git` command, error: %s", err) return true, Err("Cannot spawn `git` command, error: %s", err)
end end
@ -208,9 +203,6 @@ local function fetch(_, job)
end end
add(tostring(cwd), repo, changed) add(tostring(cwd), repo, changed)
if not ya.__250127 then -- TODO: remove this
return 3
end
return false return false
end end

View File

@ -19,7 +19,7 @@ Make sure you have [glow](https://github.com/charmbracelet/glow) installed, and
## Feature ## Feature
+ You can modify line wrap in `init.lua`, the current value is 55. + You can modify line wrap in `main.lua`, the current value is 55.
+ You can press `ctrl+e` to scroll up and `ctrl+y` to scroll down the readme file in preview panel in yazi: (add this to `keymap.toml`) + You can press `ctrl+e` to scroll up and `ctrl+y` to scroll down the readme file in preview panel in yazi: (add this to `keymap.toml`)
```toml ```toml
prepend_keymap = [ prepend_keymap = [

View File

@ -1,7 +1,7 @@
local M = {} local M = {}
function M:peek(job) function M:peek(job)
-- Set a fixed width of 55 characters for the preview -- Set a fixed width of 50 characters for the preview
local preview_width = 55 local preview_width = 55
local child = Command("glow") local child = Command("glow")
@ -55,20 +55,8 @@ function M:seek(job)
if not h or h.url ~= job.file.url then if not h or h.url ~= job.file.url then
return return
end end
local scroll_amount = 1
local scroll_offset = job.units
if job.key == "ctrl-e" then
scroll_offset = scroll_amount
elseif job.key == "ctrl-y" then
scroll_offset = -scroll_amount
else
scroll_offset = job.units
end
ya.manager_emit('peek', { ya.manager_emit('peek', {
math.max(0, cx.active.preview.skip + scroll_offset), math.max(0, cx.active.preview.skip + job.units),
only_if = job.file.url, only_if = job.file.url,
}) })
end end

View File

@ -2,7 +2,7 @@ local M = {}
function M:peek(job) function M:peek(job)
local child local child
local l = self.file.cha.len local l = job.file.cha.len
if l == 0 then if l == 0 then
child = Command("hexyl") child = Command("hexyl")
:args({ :args({
@ -14,10 +14,8 @@ function M:peek(job)
else else
child = Command("hexyl") child = Command("hexyl")
:args({ :args({
"--border", "--border", "none",
"none", "--terminal-width", tostring(job.area.w),
"--terminal-width",
tostring(job.area.w),
tostring(job.file.url), tostring(job.file.url),
}) })
:stdout(Command.PIPED) :stdout(Command.PIPED)
@ -25,33 +23,54 @@ function M:peek(job)
:spawn() :spawn()
end end
if not child then
return require("code").peek(job)
end
local limit = job.area.h local limit = job.area.h
local i, lines = 0, "" local i, lines = 0, ""
repeat repeat
local next, event = child:read_line() local line, event = child:read_line()
if event == 1 then if event == 1 then
ya.err(tostring(event)) ya.err(tostring(event))
break
elseif event ~= 0 then elseif event ~= 0 then
break break
end end
i = i + 1 i = i + 1
if i > job.skip then if i > job.skip then
lines = lines .. next lines = lines .. line
end end
until i >= job.skip + limit until i >= job.skip + limit
child:start_kill() child:start_kill()
if job.skip > 0 and i < job.skip + limit then if job.skip > 0 and i < job.skip + limit then
ya.manager_emit("peek", { math.max(0, i - limit), only_if = job.file.url, upper_bound = true }) ya.manager_emit("peek", {
math.max(0, i - limit),
only_if = job.file.url,
upper_bound = true,
})
else else
lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size)) lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) }) ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
end end
end end
function M:seek(units) function M:seek(job)
require("code").seek(job, units) -- Get the currently hovered file from your UI context.
local h = cx.active.current.hovered
if not h or h.url ~= job.file.url then
return
end
local scroll_offset = job.units
-- Emit a new peek event with the updated skip value.
ya.manager_emit("peek", {
math.max(0, cx.active.preview.skip + scroll_offset),
only_if = job.file.url,
})
end end
return M return M

View File

@ -1,5 +1,8 @@
# hide-preview.yazi # hide-preview.yazi
> [!WARNING]
> This plugin has been deprecated. Please use the new [toggle-pane.yazi](../toggle-pane.yazi) instead.
Switch the preview pane between hidden and shown. Switch the preview pane between hidden and shown.
https://github.com/yazi-rs/plugins/assets/17523360/c4f0b5c4-ff9f-4be8-ba73-4d8e7902e383 https://github.com/yazi-rs/plugins/assets/17523360/c4f0b5c4-ff9f-4be8-ba73-4d8e7902e383

View File

@ -1,6 +1,14 @@
--- @since 25.2.7
--- @sync entry --- @sync entry
local function entry(st) local function entry(st)
ya.notify {
title = "Deprecated plugin",
content = "The `hide-preview` plugin is deprecated, please use the new `toggle-pane` plugin instead: https://github.com/yazi-rs/plugins/tree/main/toggle-pane.yazi",
timeout = 10,
level = "warn",
}
if st.old then if st.old then
Tab.layout, st.old = st.old, nil Tab.layout, st.old = st.old, nil
else else

View File

@ -1,5 +1,8 @@
# max-preview.yazi # max-preview.yazi
> [!WARNING]
> This plugin has been deprecated. Please use the new [toggle-pane.yazi](../toggle-pane.yazi) instead.
Maximize or restore the preview pane. Maximize or restore the preview pane.
https://github.com/yazi-rs/plugins/assets/17523360/8976308e-ebfe-4e9e-babe-153eb1f87d61 https://github.com/yazi-rs/plugins/assets/17523360/8976308e-ebfe-4e9e-babe-153eb1f87d61

View File

@ -1,6 +1,14 @@
--- @since 25.2.7
--- @sync entry --- @sync entry
local function entry(st) local function entry(st)
ya.notify {
title = "Deprecated plugin",
content = "The `max-preview` plugin is deprecated, please use the new `toggle-pane` plugin instead: https://github.com/yazi-rs/plugins/tree/main/toggle-pane.yazi",
timeout = 10,
level = "warn",
}
if st.old then if st.old then
Tab.layout, st.old = st.old, nil Tab.layout, st.old = st.old, nil
else else

View File

@ -10,7 +10,7 @@
## Installation ## Installation
If you use latest Yazi from main branch If you use Yazi from latest main branch
```bash ```bash
# Linux/macOS # Linux/macOS
git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
@ -22,16 +22,16 @@ git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugin
git clone https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi" git clone https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi"
``` ```
If you use Yazi <= 0.3.3 If you use Yazi < 0.4.3
```bash ```bash
# Linux/macOS # Linux/macOS
git clone --branch v0.2.1 --single-branch https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
# Windows with cmd # Windows with cmd
git clone --branch v0.2.1 --single-branch https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yazi git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yazi
# Windows with powershell # Windows with powershell
git clone --branch v0.2.1 --single-branch https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi" git clone --branch v0.4.0 --single-branch https://github.com/ndtoan96/ouch.yazi.git "$($env:APPDATA)\yazi\config\plugins\ouch.yazi"
``` ```
Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`. Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`.

View File

@ -6,26 +6,14 @@ https://github.com/dedukun/relative-motions.yazi/assets/25795432/04fb186a-5efe-4
## Requirements ## Requirements
- [Yazi](https://github.com/sxyazi/yazi) v0.3.0+ - [Yazi](https://github.com/sxyazi/yazi) v25.2.7+
## Installation ## Installation
If you use the latest Yazi from main branch
```sh ```sh
ya pack -a dedukun/relative-motions ya pack -a dedukun/relative-motions
``` ```
If you are using <= v0.3.3
```sh
# Linux/macOS
git clone --branch 0.3.3 https://github.com/dedukun/relative-motions.yazi.git ~/.config/yazi/plugins/relative-motions.yazi
# Windows
git clone --branch 0.3.3 https://github.com/dedukun/relative-motions.yazi.git %AppData%\yazi\config\plugins\relative-motions.yazi
```
## Configuration ## Configuration
If you want to use the numbers directly to start a motion add this to your `keymap.toml`: If you want to use the numbers directly to start a motion add this to your `keymap.toml`:
@ -35,47 +23,47 @@ If you want to use the numbers directly to start a motion add this to your `keym
```toml ```toml
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "1" ] on = [ "1" ]
run = "plugin relative-motions --args=1" run = "plugin relative-motions 1"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "2" ] on = [ "2" ]
run = "plugin relative-motions --args=2" run = "plugin relative-motions 2"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "3" ] on = [ "3" ]
run = "plugin relative-motions --args=3" run = "plugin relative-motions 3"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "4" ] on = [ "4" ]
run = "plugin relative-motions --args=4" run = "plugin relative-motions 4"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "5" ] on = [ "5" ]
run = "plugin relative-motions --args=5" run = "plugin relative-motions 5"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "6" ] on = [ "6" ]
run = "plugin relative-motions --args=6" run = "plugin relative-motions 6"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "7" ] on = [ "7" ]
run = "plugin relative-motions --args=7" run = "plugin relative-motions 7"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "8" ] on = [ "8" ]
run = "plugin relative-motions --args=8" run = "plugin relative-motions 8"
desc = "Move in relative steps" desc = "Move in relative steps"
[[manager.prepend_keymap]] [[manager.prepend_keymap]]
on = [ "9" ] on = [ "9" ]
run = "plugin relative-motions --args=9" run = "plugin relative-motions 9"
desc = "Move in relative steps" desc = "Move in relative steps"
``` ```
@ -95,17 +83,18 @@ desc = "Trigger a new relative motion"
Additionally there are a couple of initial configurations that can be given to the plugin's `setup` function: Additionally there are a couple of initial configurations that can be given to the plugin's `setup` function:
| Configuration | Values | Default | Description | | Configuration | Values | Default | Description |
| -------------- | ----------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- | | -------------- | ----------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `show_numbers` | `relative`, `absolute`, `relative_absolute` or `none` | `none` | Shows relative or absolute numbers before the file icon | | `show_numbers` | `relative`, `absolute`, `relative_absolute` or `none` | `none` | Shows relative or absolute numbers before the file icon |
| `show_motion` | `true` or `false` | `false` | Shows current motion in Status bar | | `show_motion` | `true` or `false` | `false` | Shows current motion in Status bar |
| `only_motions` | `true` or `false` | `false` | If true, only the motion movements will be enabled, i.e., the commands for delete, cut, yank and visual selection will be disabled | | `only_motions` | `true` or `false` | `false` | If true, only the motion movements will be enabled, i.e., the commands for delete, cut, yank and visual selection will be disabled |
| `enter_mode` | `cache`, `first` or `cache_or_first` | `cache_or_first` | The method to enter folders |
If you want, for example, to enable relative numbers as well as to show the motion in the status bar, If you want, for example, to enable relative numbers as well as to show the motion in the status bar,
add the following to Yazi's `init.lua`, i.e. `~/.config/yazi/init.lua`: add the following to Yazi's `init.lua`, i.e. `~/.config/yazi/init.lua`:
```lua ```lua
-- ~/.config/yazi/init.lua -- ~/.config/yazi/init.lua
require("relative-motions"):setup({ show_numbers="relative", show_motion = true }) require("relative-motions"):setup({ show_numbers="relative", show_motion = true, enter_mode ="first" })
``` ```
> [!NOTE] > [!NOTE]
@ -120,9 +109,11 @@ This plugin adds the some basic vim motions like `3k`, `12j`, `10gg`, etc.
The following table show all the available motions: The following table show all the available motions:
| Command | Description | | Command | Description |
| -------------- | ------------------- | | -------------- | --------------------- |
| `j`/`<Down>` | Move `n` lines down | | `j`/`<Down>` | Move `n` lines down |
| `k`/`<Up>` | Move `n` lines up | | `k`/`<Up>` | Move `n` lines up |
| `h`/`<Left>` | Move `n` folders back |
| `l`/`<Right>` | Enter `n` folders |
| `gj`/`g<Down>` | Go `n` lines down | | `gj`/`g<Down>` | Go `n` lines down |
| `gk`/`g<Up>` | Go `n` lines up | | `gk`/`g<Up>` | Go `n` lines up |
| `gg` | Go to line | | `gg` | Go to line |

View File

@ -1,3 +1,4 @@
--- @since 25.2.7
-- stylua: ignore -- stylua: ignore
local MOTIONS_AND_OP_KEYS = { local MOTIONS_AND_OP_KEYS = {
{ on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" }, { on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" },
@ -8,7 +9,7 @@ local MOTIONS_AND_OP_KEYS = {
{ on = "t" }, { on = "L" }, { on = "H" }, { on = "w" }, { on = "t" }, { on = "L" }, { on = "H" }, { on = "w" },
{ on = "W" }, { on = "<" }, { on = ">" }, { on = "~" }, { on = "W" }, { on = "<" }, { on = ">" }, { on = "~" },
-- movement -- movement
{ on = "g" }, { on = "j" }, { on = "k" }, { on = "<Down>" }, { on = "<Up>" } { on = "g" }, { on = "j" }, { on = "k" }, { on = "h" }, { on = "l" }, { on = "<Down>" }, { on = "<Up>" }, { on = "<Left>" }, { on = "<Right>" }
} }
-- stylua: ignore -- stylua: ignore
@ -16,7 +17,7 @@ local MOTION_KEYS = {
{ on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" }, { on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" },
{ on = "5" }, { on = "6" }, { on = "7" }, { on = "8" }, { on = "9" }, { on = "5" }, { on = "6" }, { on = "7" }, { on = "8" }, { on = "9" },
-- movement -- movement
{ on = "g" }, { on = "j" }, { on = "k" } { on = "g" }, { on = "j" }, { on = "k" }, { on = "h" }, { on = "l" }, { on = "<Down>" }, { on = "<Up>" }, { on = "<Left>" }, { on = "<Right>" }
} }
-- stylua: ignore -- stylua: ignore
@ -30,6 +31,10 @@ local SHOW_NUMBERS_ABSOLUTE = 0
local SHOW_NUMBERS_RELATIVE = 1 local SHOW_NUMBERS_RELATIVE = 1
local SHOW_NUMBERS_RELATIVE_ABSOLUTE = 2 local SHOW_NUMBERS_RELATIVE_ABSOLUTE = 2
local ENTER_MODE_FIRST = 0
local ENTER_MODE_CACHE = 1
local ENTER_MODE_CACHE_OR_FIRST = 2
----------------------------------------------- -----------------------------------------------
----------------- R E N D E R ----------------- ----------------- R E N D E R -----------------
----------------------------------------------- -----------------------------------------------
@ -149,6 +154,10 @@ local function normal_direction(dir)
return "j" return "j"
elseif dir == "<Up>" then elseif dir == "<Up>" then
return "k" return "k"
elseif dir == "<Left>" then
return "h"
elseif dir == "<Right>" then
return "l"
end end
return dir return dir
end end
@ -205,6 +214,29 @@ end
local get_active_tab = ya.sync(function(_) return cx.tabs.idx end) local get_active_tab = ya.sync(function(_) return cx.tabs.idx end)
local get_cache_or_first_dir = ya.sync(function(state)
if state._enter_mode == ENTER_MODE_CACHE then
return nil
elseif state._enter_mode == ENTER_MODE_CACHE_OR_FIRST then
local hovered_file = cx.active.current.hovered
if hovered_file ~= nil and hovered_file.cha.is_dir then
return cx.active.current.cursor
end
end
local files = cx.active.current.files
local index = 1
for i = 1, #files do
if files[i].cha.is_dir then
index = i
break
end
end
return index - 1
end)
----------------------------------------------- -----------------------------------------------
---------- E N T R Y / S E T U P ---------- ---------- E N T R Y / S E T U P ----------
----------------------------------------------- -----------------------------------------------
@ -231,7 +263,7 @@ return {
if cmd == "g" then if cmd == "g" then
if direction == "g" then if direction == "g" then
ya.manager_emit("arrow", { -99999999 }) ya.manager_emit("arrow", { "top" })
ya.manager_emit("arrow", { lines - 1 }) ya.manager_emit("arrow", { lines - 1 })
render_clear() render_clear()
return return
@ -254,6 +286,19 @@ return {
ya.manager_emit("arrow", { lines }) ya.manager_emit("arrow", { lines })
elseif cmd == "k" then elseif cmd == "k" then
ya.manager_emit("arrow", { -lines }) ya.manager_emit("arrow", { -lines })
elseif cmd == "h" then
for _ = 1, lines do
ya.manager_emit("leave", {})
end
elseif cmd == "l" then
for _ = 1, lines do
ya.manager_emit("enter", {})
local file_idx = get_cache_or_first_dir()
if file_idx then
ya.manager_emit("arrow", { "top" })
ya.manager_emit("arrow", { file_idx })
end
end
elseif is_tab_command(cmd) then elseif is_tab_command(cmd) then
if cmd == "t" then if cmd == "t" then
for _ = 1, lines do for _ = 1, lines do
@ -315,6 +360,16 @@ return {
render_motion_setup() render_motion_setup()
end end
if args["enter_mode"] == "cache" then
state._enter_mode = ENTER_MODE_CACHE
elseif args["enter_mode"] == "first" then
state._enter_mode = ENTER_MODE_FIRST
elseif args["enter_mode"] == "cache_or_first" then
state._enter_mode = ENTER_MODE_CACHE_OR_FIRST
else
state._enter_mode = ENTER_MODE_CACHE_OR_FIRST
end
if args["show_numbers"] == "absolute" then if args["show_numbers"] == "absolute" then
render_numbers(SHOW_NUMBERS_ABSOLUTE) render_numbers(SHOW_NUMBERS_ABSOLUTE)
elseif args["show_numbers"] == "relative" then elseif args["show_numbers"] == "relative" then

View File

@ -1,6 +1,6 @@
# torrent-preview.yazi # torrent-preview.yazi
[Yazi](https://github.com/sxyazi/yazi) plugin to preview `application/x-bittorrent` files [Yazi](https://github.com/sxyazi/yazi) plugin to preview `application/bittorrent` files
![show case](https://github.com/kirasok/torrent-preview.yazi/assets/75790517/6f215e6d-bb19-46f4-b606-9241594028ff) ![show case](https://github.com/kirasok/torrent-preview.yazi/assets/75790517/6f215e6d-bb19-46f4-b606-9241594028ff)
@ -13,6 +13,14 @@
### Linux/MacOS ### Linux/MacOS
Using the [Yazi Package Manager](https://yazi-rs.github.io/docs/cli/#package-manager):
```sh
ya pack -a kirasok/torrent-preview
```
Or manually:
```sh ```sh
git clone https://github.com/kirasok/torrent-preview.yazi.git ~/.config/yazi/plugins/torrent-preview.yazi git clone https://github.com/kirasok/torrent-preview.yazi.git ~/.config/yazi/plugins/torrent-preview.yazi
``` ```
@ -23,6 +31,10 @@ Add this to your `yazi.toml`:
```toml ```toml
[[plugin.prepend_previewers]] [[plugin.prepend_previewers]]
mime = "application/x-bittorrent" mime = "application/bittorrent"
run = "torrent-preview" run = "torrent-preview"
``` ```
> [!NOTE]
> Yazi after `v0.4` removes `x-` prefix from subtype, so even if `file -i` outputs `application/x-bittorrent`, you should use `application/bittorrent` ([relevant issue](https://github.com/kirasok/torrent-preview.yazi/issues/2))

View File

@ -93,7 +93,7 @@ previewers = [
{mime = "application/json", run = "code"}, {mime = "application/json", run = "code"},
# Image # Image
{mime = "image/vnd.djvu", run = "noop"}, {mime = "image/vnd.djvu", run = "noop"},
{mime = "image/*", run = "image"}, # {mime = "image/*", run = "image"},
# Video # Video
# {mime = "video/*", run = "video"}, # {mime = "video/*", run = "video"},
# PDF # PDF

0
dotter Executable file → Normal file
View File

0
dotter.arm Executable file → Normal file
View File

0
dotter.exe Executable file → Normal file
View File

View File

@ -3,7 +3,7 @@
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
selected=$1 selected=$1
else else
selected=$(fd --min-depth 1 --max-depth 1 --type d . ~/repos/Rust/ ~/repos/examples/ ~/repos/ ~/neorg/Work/ ~/Nextcloud/repos/ ~/Nextcloud/Documents/LaTeX/ ~/Nextcloud/Documents/Typst/ ~/Nextcloud/repos/university/** ~/Nextcloud/repos/university/**/**/ ~/repos/yoda-bot/ ~/repos/Codnity/ ~/repos/Codnity/emisela/ ~/repos/Codnity/dio/ ~/repos/Codnity/zaao/ ~/repos/Codnity/talentflow/ | sk --height 16) selected=$(fd --min-depth 1 --max-depth 1 --type d . ~/repos/Rust/ ~/repos/examples/ ~/repos/ ~/neorg/Work/ ~/Nextcloud/repos/ ~/Nextcloud/Documents/LaTeX/ ~/Nextcloud/Documents/Typst/ ~/Nextcloud/repos/university/** ~/Nextcloud/repos/university/**/**/ ~/repos/yoda-bot/ ~/repos/Codnity/ ~/repos/Codnity/emisela/ ~/repos/Codnity/dio/ ~/repos/Codnity/zaao/ ~/repos/Codnity/talentflow/ ~/Obsidian | sk --height 16)
fi fi
if [[ -z $selected ]]; then if [[ -z $selected ]]; then