mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
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:
parent
73a0cc0977
commit
5f54bb78ad
@ -66,6 +66,7 @@ depends = [ "torrent", "zathura" ]
|
||||
"config/fastfetch/" = "~/.config/fastfetch/"
|
||||
"config/flameshot.ini" = "~/.config/flameshot/flameshot.ini"
|
||||
"config/gitui/" = "~/.config/gitui/"
|
||||
"config/git/" = "~/.config/git/"
|
||||
"config/mpv/" = "~/.config/mpv/"
|
||||
"config/lf/" = "~/.config/lf/"
|
||||
"config/paru.conf" = "~/.config/paru/paru.conf"
|
||||
@ -128,6 +129,8 @@ depends = [ "zsh", "tmux" ]
|
||||
"config/alacritty/" = "~/.config/alacritty/"
|
||||
"config/alacritty/alacritty.toml" = {target = "~/.config/alacritty/alacritty.toml", type = "template"}
|
||||
"config/starship.toml" = "~/.config/starship/starship.toml"
|
||||
"config/ghostty/" = "~/.config/ghostty/"
|
||||
"config/ghostty/config" = {target = "~/.config/ghostty/config", type = "template"}
|
||||
|
||||
[tmux.files]
|
||||
"config/tmux/" = "~/.config/tmux/"
|
||||
|
||||
0
config/HybridBar/scripts/change-active-workspace
Executable file → Normal file
0
config/HybridBar/scripts/change-active-workspace
Executable file → Normal file
0
config/HybridBar/scripts/get-active-workspace
Executable file → Normal file
0
config/HybridBar/scripts/get-active-workspace
Executable file → Normal file
0
config/HybridBar/scripts/get-window-title
Executable file → Normal file
0
config/HybridBar/scripts/get-window-title
Executable file → Normal file
0
config/HybridBar/scripts/get-workspaces
Executable file → Normal file
0
config/HybridBar/scripts/get-workspaces
Executable file → Normal 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 }, "b", function()
|
||||
awful.spawn("floorp")
|
||||
awful.spawn("zen-browser")
|
||||
end, { description = "open browser", group = "launcher" }),
|
||||
awful.key({ modkey }, "n", function()
|
||||
awful.spawn("alacritty -e yazi")
|
||||
|
||||
@ -202,7 +202,7 @@ net_download = 100
|
||||
net_upload = 100
|
||||
|
||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||
net_auto = False
|
||||
net_auto = True
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = False
|
||||
|
||||
@ -20,21 +20,21 @@
|
||||
foreground = "#e0def4"
|
||||
|
||||
[urgency_low]
|
||||
background = "#26273d"
|
||||
highlight = "#31748f"
|
||||
frame_color = "#31748f"
|
||||
background = "#26233a"
|
||||
highlight = "#9ccfd8"
|
||||
frame_color = "#9ccfd8"
|
||||
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]
|
||||
background = "#362e3c"
|
||||
highlight = "#f6c177"
|
||||
frame_color = "#f6c177"
|
||||
background = "#26233a"
|
||||
highlight = "#ebbcba"
|
||||
frame_color = "#ebbcba"
|
||||
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]
|
||||
background = "#35263d"
|
||||
background = "#26233a"
|
||||
highlight = "#eb6f92"
|
||||
frame_color = "#eb6f92"
|
||||
default_icon = "dialog-error"
|
||||
|
||||
@ -224,7 +224,7 @@
|
||||
:height "10px"
|
||||
:anchor "top center")
|
||||
:reserve (struts :side "top" :distance "4%")
|
||||
(bar))
|
||||
(bar))
|
||||
|
||||
(defwidget bright []
|
||||
(eventbox :onhover "eww update br_reveal=true" :onhoverlost "eww update br_reveal=false"
|
||||
|
||||
@ -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
|
||||
@ -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}'
|
||||
@ -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"
|
||||
@ -1,5 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
line=$(nmcli connection show | rg wlan0)
|
||||
echo $line
|
||||
|
||||
@ -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}'
|
||||
@ -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
|
||||
@ -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
|
||||
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
notifications="$(gh api notifications 2> /dev/null | jq '. | length')"
|
||||
[ -z notifications ] && echo "" || echo "$notifications"
|
||||
@ -18,7 +18,7 @@ $bg: rgba(25, 23, 37, 0.7);
|
||||
* {
|
||||
all: unset;
|
||||
font-family: "JetBrainsMono NF";
|
||||
font-size: 14;
|
||||
font-size: 20;
|
||||
}
|
||||
|
||||
/** General **/
|
||||
@ -128,6 +128,10 @@ clock_time {
|
||||
&__Charging {
|
||||
color: $gold;
|
||||
}
|
||||
|
||||
&__low {
|
||||
color: $love;
|
||||
}
|
||||
}
|
||||
|
||||
.iconbat,
|
||||
@ -275,6 +279,10 @@ calendar:indeterminate {
|
||||
.sys_icon_mem {
|
||||
font-size: 30;
|
||||
margin: 30px;
|
||||
|
||||
&__low {
|
||||
color: $love;
|
||||
}
|
||||
}
|
||||
|
||||
.sys_win {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
;; Variables
|
||||
(defpoll clock_hour :interval "5m" "date +%H")
|
||||
(defpoll clock_hour :interval "1m" "date +%H")
|
||||
(defpoll clock_minute :interval "2s" "date +%M")
|
||||
(defpoll clock_second :interval "1s" "date +%S")
|
||||
(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 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 battery :interval "15s" "./scripts/battery --bat")
|
||||
(defpoll battery_status :interval "1m" "./scripts/battery --bat-st")
|
||||
(defpoll memory :interval "15s" "scripts/memory")
|
||||
(defpoll memory_used_mb :interval "2m" "scripts/mem-ad used")
|
||||
(defpoll memory_total_mb :interval "2m" "scripts/mem-ad total")
|
||||
(defpoll memory_free_mb :interval "2m" "scripts/mem-ad free")
|
||||
(defpoll memory :interval "10s" "scripts/memory")
|
||||
(defpoll memory_used_mb :interval "1m" "scripts/mem-ad used")
|
||||
(defpoll memory_total_mb :interval "1m" "scripts/mem-ad total")
|
||||
(defpoll memory_free_mb :interval "1m" "scripts/mem-ad free")
|
||||
(defvar vol_reveal false)
|
||||
(defvar br_reveal false)
|
||||
(defvar music_reveal false)
|
||||
(defvar wifi_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 window :initial "..." "bash ~/.config/eww/scripts/get-window-title")
|
||||
|
||||
(defvar eww "eww")
|
||||
|
||||
|
||||
(defpoll COL_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --COL")
|
||||
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/bar/scripts/wifi --ESSID")
|
||||
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/bar/scripts/wifi --ICON")
|
||||
(defpoll COL_WLAN :interval "1m" "~/.config/eww/scripts/wifi --COL")
|
||||
(defpoll ESSID_WLAN :interval "1m" "~/.config/eww/scripts/wifi --ESSID")
|
||||
(defpoll WLAN_ICON :interval "1m" "~/.config/eww/scripts/wifi --ICON")
|
||||
|
||||
|
||||
(defpoll song :interval "2s" "~/.config/eww/bar/scripts/music_info --song")
|
||||
(defpoll song_artist :interval "2s" "~/.config/eww/bar/scripts/music_info --artist")
|
||||
(defpoll current_status :interval "1s" "~/.config/eww/bar/scripts/music_info --time")
|
||||
(defpoll song_status :interval "2s" "~/.config/eww/bar/scripts/music_info --status")
|
||||
(defpoll cover_art :interval "2s" "~/.config/eww/bar/scripts/music_info --cover")
|
||||
(defpoll song :interval "2s" "~/.config/eww/scripts/music_info --song")
|
||||
(defpoll song_artist :interval "2s" "~/.config/eww/scripts/music_info --artist")
|
||||
(defpoll current_status :interval "1s" "~/.config/eww/scripts/music_info --time")
|
||||
(defpoll song_status :interval "2s" "~/.config/eww/scripts/music_info --status")
|
||||
(defpoll cover_art :interval "2s" "~/.config/eww/scripts/music_info --cover")
|
||||
|
||||
(defpoll calendar_day :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :interval "20h" "date '+%Y'")
|
||||
@ -42,16 +40,21 @@
|
||||
;; widgets
|
||||
|
||||
(defwidget wifi []
|
||||
(eventbox :onhover "${eww} update wifi_rev=true"
|
||||
(eventbox
|
||||
:onhover "${eww} update wifi_rev=true"
|
||||
:onhoverlost "${eww} update wifi_rev=false"
|
||||
(box :vexpand "false" :hexpand "false" :space-evenly "false"
|
||||
(box
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:space-evenly "false"
|
||||
(button
|
||||
:class "module-wif"
|
||||
:class "module-wifi"
|
||||
:onclick "networkmanager_dmenu"
|
||||
:wrap "false"
|
||||
:limit-width 12
|
||||
:style "color: ${COL_WLAN};" WLAN_ICON)
|
||||
(revealer :transition "slideright"
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:reveal wifi_rev
|
||||
:duration "350ms"
|
||||
(label
|
||||
@ -62,7 +65,9 @@
|
||||
|
||||
|
||||
(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
|
||||
:halign "start"
|
||||
:space-evenly true
|
||||
@ -74,25 +79,25 @@
|
||||
(eventbox :onclick "hyprctl dispatch workspace ${workspace.id}"
|
||||
(box :class "workspace-entry ${workspace.windows > 0 ? "occupied" : "empty"}"
|
||||
(label :text "${workspace.id}" :class "workspace-entry ${workspace.id == current_workspace ? "current" : ""}" )
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
))))))
|
||||
|
||||
|
||||
(defwidget bat []
|
||||
(box :class "bat_module" :vexpand "false" :hexpand "false"
|
||||
(circular-progress :value battery
|
||||
(button
|
||||
:class "bat_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:onclick "bash ~/.config/eww/scripts/pop system"
|
||||
(circular-progress
|
||||
:value "${EWW_BATTERY.BAT0.capacity}"
|
||||
:class "batbar"
|
||||
:thickness 4
|
||||
(button
|
||||
:class "iconbat iconbat__${battery_status}"
|
||||
(box
|
||||
:class "iconbat iconbat__${EWW_BATTERY.BAT0.status} ${EWW_BATTERY.BAT0.capacity < 20 ? "iconbat__low" : ""}"
|
||||
:interval "5m"
|
||||
:limit-width 2
|
||||
:tooltip "battery on ${battery}%"
|
||||
:tooltip "Battery on ${EWW_BATTERY.BAT0.capacity}%"
|
||||
:show_truncated false
|
||||
:onclick "$HOME/.config/eww/bar/scripts/pop system"
|
||||
:wrap false
|
||||
"${EWW_BATTERY.BAT0.status == "Charging" ? "" :
|
||||
EWW_BATTERY.BAT0.capacity > 90 ? "" :
|
||||
@ -104,15 +109,19 @@
|
||||
|
||||
|
||||
(defwidget mem []
|
||||
(box :class "mem_module" :vexpand "false" :hexpand "false"
|
||||
(circular-progress :value memory
|
||||
(button
|
||||
:class "mem_module"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
:onclick "bash ~/.config/eww/scripts/pop system"
|
||||
(circular-progress
|
||||
:value memory
|
||||
:class "membar"
|
||||
:thickness 4
|
||||
(button
|
||||
(box
|
||||
:class "iconmem"
|
||||
:limit-width 2
|
||||
:tooltip "using ${memory}% ram"
|
||||
:onclick "$HOME/.config/eww/bar/scripts/pop system"
|
||||
:tooltip "Using ${memory}% ram"
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
""))))
|
||||
@ -132,7 +141,7 @@
|
||||
:reveal time_rev
|
||||
:duration "350ms"
|
||||
(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"
|
||||
:reveal vol_reveal
|
||||
:duration "350ms"
|
||||
(scale :class "volbar"
|
||||
(scale
|
||||
:class "volbar"
|
||||
:value volume_percent
|
||||
:orientation "h"
|
||||
:tooltip "${volume_percent}%"
|
||||
@ -153,13 +163,24 @@
|
||||
:onchange "amixer -D pulse sset Master {}%" )))))
|
||||
|
||||
(defwidget bright []
|
||||
(eventbox :onhover "${eww} update br_reveal=true" :onhoverlost "${eww} update br_reveal=false"
|
||||
(box :class "module-2" :space-evenly "false" :orientation "h" :spacing "3"
|
||||
(label :text "☼" :class "bright_icon" :tooltip "brightness")
|
||||
(revealer :transition "slideleft"
|
||||
(eventbox
|
||||
:onhover "${eww} update br_reveal=true"
|
||||
:onhoverlost "${eww} update br_reveal=false"
|
||||
(box
|
||||
:class "module-2"
|
||||
:space-evenly "false"
|
||||
:orientation "h"
|
||||
:spacing "3"
|
||||
(label
|
||||
:text "☼"
|
||||
:class "bright_icon"
|
||||
:tooltip "brightness")
|
||||
(revealer
|
||||
:transition "slideleft"
|
||||
:reveal br_reveal
|
||||
:duration "350ms"
|
||||
(scale :class "brightbar"
|
||||
(scale
|
||||
:class "brightbar"
|
||||
:value brightness_percent
|
||||
:orientation "h"
|
||||
:tooltip "${brightness_percent}%"
|
||||
@ -171,18 +192,35 @@
|
||||
|
||||
;; Music
|
||||
(defwidget music []
|
||||
(eventbox :onhover "${eww} update music_reveal=true"
|
||||
(eventbox
|
||||
:onhover "${eww} update music_reveal=true"
|
||||
:onhoverlost "${eww} update music_reveal=false"
|
||||
(box :class "module-2" :orientation "h" :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/bar/scripts/pop music" song)
|
||||
(revealer :transition "slideright"
|
||||
(box
|
||||
:class "module-2"
|
||||
:orientation "h"
|
||||
: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
|
||||
:duration "350ms"
|
||||
(box :vexpand "false" :hexpand "false" :oreintation "h"
|
||||
(button :class "song_btn_prev" :onclick "~/.config/eww/bar/scripts/music_info --prev" "")
|
||||
(button :class "song_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||
(button :class "song_btn_next" :onclick "~/.config/eww/bar/scripts/music_info --next" ""))))))
|
||||
(box
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
: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 []
|
||||
(box :orientation "h"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:class "right_modules"
|
||||
@ -211,14 +250,16 @@
|
||||
|
||||
|
||||
(defwidget center []
|
||||
(box :orientation "h"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:class "center_modules"
|
||||
(window)))
|
||||
|
||||
(defwidget bar_1 []
|
||||
(box :class "bar"
|
||||
(box
|
||||
:class "bar"
|
||||
:orientation "h"
|
||||
(right)
|
||||
(center)
|
||||
@ -239,61 +280,117 @@
|
||||
:windowtype "dock"
|
||||
(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 []
|
||||
(box :class "sys_win" :orientation "v" :space-evenly "false" :hexpand "false" :vexpand "false" :spacing 0
|
||||
(box :class "sys_bat_box" :orientation "h" :space-evenly "false"
|
||||
(circular-progress :value battery
|
||||
(box
|
||||
:class "sys_win"
|
||||
: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"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
:class "sys_icon_bat"
|
||||
(label
|
||||
: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
|
||||
:show_truncated false
|
||||
:wrap false))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "battery"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "Battery"
|
||||
:halign "start"
|
||||
:class "sys_text_bat"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery}%"
|
||||
(label
|
||||
:text "${EWW_BATTERY.BAT0.capacity}%"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${battery_status}"
|
||||
(label
|
||||
:text "${EWW_BATTERY.BAT0.status}"
|
||||
:halign "start"
|
||||
:class "sys_text_bat_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)))
|
||||
(label :text "" :class "sys_sep" :halign "center")
|
||||
(box :class "sys_mem_box" :orientation "h" :space-evenly "false" :halign "start"
|
||||
(circular-progress :value memory
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:class "sys_mem_box"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:halign "start"
|
||||
(circular-progress
|
||||
:value memory
|
||||
:class "sys_mem"
|
||||
:thickness 9
|
||||
(label :text ""
|
||||
(label
|
||||
:text ""
|
||||
:class "sys_icon_mem"
|
||||
:limit-width 2
|
||||
:show_truncated false
|
||||
:wrap false
|
||||
:angle 0.0))
|
||||
(box :orientation "v" :space-evenly "false" :spacing 0 :hexpand "false" :vexpand "false"
|
||||
(label :text "memory"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly "false"
|
||||
:spacing 0
|
||||
:hexpand "false"
|
||||
:vexpand "false"
|
||||
(label
|
||||
:text "Memory"
|
||||
:halign "start"
|
||||
:class "sys_text_mem"
|
||||
:limit-width 9
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_used_mb} | ${memory_total_mb}mb "
|
||||
(label
|
||||
:text "${memory_used_mb}/${memory_total_mb}mb"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
:show_truncated false
|
||||
:wrap false)
|
||||
(label :text "${memory_free_mb}mb free"
|
||||
(label
|
||||
:text "${memory_free_mb}mb free"
|
||||
:halign "start"
|
||||
:class "sys_text_mem_sub"
|
||||
:limit-width 22
|
||||
@ -301,16 +398,21 @@
|
||||
:wrap false)))))
|
||||
|
||||
(defwidget cal []
|
||||
(box :class "cal" :orientation "v"
|
||||
(box :class "cal-in"
|
||||
(calendar :class "cal"
|
||||
(box
|
||||
:class "cal"
|
||||
:orientation "v"
|
||||
(box
|
||||
:class "cal-in"
|
||||
(calendar
|
||||
:class "cal"
|
||||
:day calendar_day
|
||||
:year calendar_year))))
|
||||
|
||||
(defwindow calendar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "-20px"
|
||||
:y "7%"
|
||||
:geometry (geometry
|
||||
:x "0px"
|
||||
:y "10px"
|
||||
:anchor "top right"
|
||||
:width "270px"
|
||||
:height "60px")
|
||||
@ -332,13 +434,35 @@
|
||||
:tooltip "volume on ${volume_percent}%"
|
||||
:max 100
|
||||
:min 0))))
|
||||
(label :text "" :class "audio_sep" :halign "center")
|
||||
(box :halign "v" :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
|
||||
(label
|
||||
:text ""
|
||||
:class "audio_sep"
|
||||
:halign "center")
|
||||
(box
|
||||
:halign "v"
|
||||
: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"
|
||||
:orientation "h"
|
||||
:tooltip "mic on ${mic_percent}%"
|
||||
@ -348,8 +472,9 @@
|
||||
|
||||
(defwindow audio_ctl
|
||||
:monitor 0
|
||||
:geometry (geometry :x "-20px"
|
||||
:y "7%"
|
||||
:geometry (geometry
|
||||
:x "10px"
|
||||
:y "10px"
|
||||
:anchor "top right"
|
||||
:width "280px"
|
||||
:height "60px")
|
||||
@ -359,8 +484,8 @@
|
||||
(defwindow system
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
:x "-20px"
|
||||
:y "5%"
|
||||
:x "10px"
|
||||
:y "10px"
|
||||
:anchor "top right"
|
||||
:width "290px"
|
||||
:height "120px")
|
||||
@ -370,26 +495,71 @@
|
||||
|
||||
;; Music
|
||||
(defwidget music_pop []
|
||||
(box :class "music_pop" :orientation "h" :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
(box :class "music_cover_art" :vexpand "false" :hexpand "false" :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/bar/scripts/music_info --prev" "")
|
||||
(button :class "music_btn_play" :onclick "~/.config/eww/bar/scripts/music_info --toggle" song_status)
|
||||
(button :class "music_btn_next" :onclick "~/.config/eww/bar/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)))))
|
||||
(box
|
||||
:class "music_pop"
|
||||
:orientation "h"
|
||||
:space-evenly "false"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
(box
|
||||
:class "music_cover_art"
|
||||
:vexpand "false"
|
||||
:hexpand "false"
|
||||
: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
|
||||
(defwindow music_win
|
||||
;; :monitor 0
|
||||
:monitor 0
|
||||
:stacking "fg"
|
||||
:focusable "false"
|
||||
: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))
|
||||
|
||||
(defwidget window []
|
||||
|
||||
@ -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
0
config/eww/scripts/change-active-workspace
Executable file → Normal file
0
config/eww/scripts/get-active-workspace
Executable file → Normal file
0
config/eww/scripts/get-active-workspace
Executable file → Normal file
0
config/eww/scripts/get-window-title
Executable file → Normal file
0
config/eww/scripts/get-window-title
Executable file → Normal file
0
config/eww/scripts/get-workspaces
Executable file → Normal file
0
config/eww/scripts/get-workspaces
Executable file → Normal file
3
config/eww/scripts/mem-ad
Executable file → Normal file
3
config/eww/scripts/mem-ad
Executable file → Normal file
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
total="$(free -m | grep Mem: | awk '{ print $2 }')"
|
||||
used="$(free -m | grep Mem: | awk '{ print $3 }')"
|
||||
|
||||
4
config/eww/scripts/memory
Executable file → Normal file
4
config/eww/scripts/memory
Executable file → Normal 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
0
config/eww/scripts/music_info
Executable file → Normal file
0
config/eww/scripts/music_info.bak
Executable file → Normal file
0
config/eww/scripts/music_info.bak
Executable file → Normal file
0
config/eww/scripts/pop
Executable file → Normal file
0
config/eww/scripts/pop
Executable file → Normal file
0
config/eww/scripts/wifi
Executable file → Normal file
0
config/eww/scripts/wifi
Executable file → Normal file
0
config/eww/scripts/workspace
Executable file → Normal file
0
config/eww/scripts/workspace
Executable file → Normal file
2253
config/ghostty/config
Normal file
2253
config/ghostty/config
Normal file
File diff suppressed because it is too large
Load Diff
56
config/git/config
Normal file
56
config/git/config
Normal 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
|
||||
@ -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.
|
||||
# https://wiki.hyprland.org/Configuring/
|
||||
|
||||
@ -15,8 +15,9 @@
|
||||
################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=eDP-1,prefered,auto,1.5
|
||||
monitor=DP-1,prefered,auto,1
|
||||
monitor=eDP-1,prefered,0x0,1
|
||||
monitor=DP-1,prefered,180x-1440,1
|
||||
# monitor=DP-1,disabled
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
@ -30,7 +31,6 @@ $fileManager = $terminal -e yazi
|
||||
$menu = wofi --show drun -ib
|
||||
$browser = zen-browser
|
||||
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
@ -38,8 +38,8 @@ $browser = zen-browser
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# 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=nextcloud & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & xrdb "$XDG_CONFIG_HOME/x11/xresources" & transmission-daemon & dunst & hyprpaper
|
||||
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 & hyprland-per-window-layout
|
||||
exec-once=[workspace 1 silent] $browser
|
||||
exec-once=[workspace 8 silent] vesktop & kotatogram-desktop
|
||||
exec-once=[workspace 9 silent] spotify-launcher
|
||||
@ -55,6 +55,11 @@ source=~/.config/hypr/rose-pine.conf
|
||||
|
||||
env = XCURSOR_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 CTRL, SPACE, togglefloating
|
||||
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, M, bringactivetotop
|
||||
bind = $mainMod, A, pin
|
||||
bind = $mainMod, B, exec, $browser
|
||||
#bind = $mainMod, O, split-changemonitor, +1
|
||||
# bind = $mainMod, O, split-changemonitor, +1
|
||||
# bind = $mainMod, P, pseudo, # dwindle
|
||||
# bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
@ -254,6 +260,16 @@ bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
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]
|
||||
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, 9, movetoworkspace, 9
|
||||
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)
|
||||
# bind = $mainMod, S, togglespecialworkspace, magic
|
||||
@ -305,12 +331,13 @@ bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
bindel = , XF86AudioPlay, exec, playerctl -a play-pause # pause/play everything
|
||||
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 -s "$(slurp -f '%x %y %w %y')" --stdout | wl-copy
|
||||
# bind = $mainMod, , exec, wayshot -f "$(HOME)/Pictures/screenshots/$(date + '%s.png')"
|
||||
bind = CTRL, PRINT, exec, hyprshot -m region
|
||||
bind = , PRINT, exec, hyprshot -m output
|
||||
bind = , PRINT, exec, hyprshot -m output
|
||||
bind = SHIFT, PRINT, exec, hyprshot -m window
|
||||
|
||||
bind = $mainMod ALT, P, exec, hyprpicker -a # colorpicker
|
||||
@ -356,9 +383,13 @@ windowrulev2 = opacity 0.9, class:teams-for-linux
|
||||
windowrulev2 = workspace 5, class:Ferdium
|
||||
windowrulev2 = opacity 0.9, class:Ferdium
|
||||
|
||||
windowrulev2 = workspace 9, class:com.github.wwmm.easyeffects
|
||||
windowrulev2 = workspace 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:lutris
|
||||
@ -374,4 +405,3 @@ windowrulev2 = float, class:galculator
|
||||
windowrulev2=float,title:^(flameshot)
|
||||
windowrulev2=move 0 0,title:^(flameshot)
|
||||
windowrulev2=suppressevent fullscreen,title:^(flameshot)
|
||||
|
||||
|
||||
@ -1,15 +1,25 @@
|
||||
$font = JetBrainsMonoNF
|
||||
|
||||
$bg = rgb(1a1b26)
|
||||
$fg = rgb(c0caf5)
|
||||
$border_highlight = rgb(27a1b9)
|
||||
$error = rgb(db4b4b)
|
||||
$warning = rgb(e0af68)
|
||||
$base = rgb(191724)
|
||||
$surface = rgb(1f1d2e)
|
||||
$overlay = rgb(26233a)
|
||||
$muted = rgb(6e6a86)
|
||||
$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 {
|
||||
monitor =
|
||||
path = screenshot
|
||||
color = $bg
|
||||
color = $base
|
||||
|
||||
blur_passes = 1
|
||||
blur_size = 10
|
||||
@ -23,7 +33,7 @@ background {
|
||||
# TIME
|
||||
label {
|
||||
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
|
||||
font_size = 90
|
||||
font_family = $font
|
||||
@ -35,7 +45,7 @@ label {
|
||||
# DATE
|
||||
label {
|
||||
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
|
||||
font_size = 25
|
||||
font_family = $font
|
||||
@ -49,7 +59,7 @@ image {
|
||||
monitor =
|
||||
path = ~/.local/share/profile
|
||||
size = 300
|
||||
border_color = $border_highlight
|
||||
border_color = $pine
|
||||
|
||||
position = 0, 200
|
||||
halign = center
|
||||
@ -59,21 +69,21 @@ image {
|
||||
input-field {
|
||||
monitor =
|
||||
size = 300, 60
|
||||
outline_thickness = 4
|
||||
outline_thickness = 3
|
||||
dots_size = 0.2
|
||||
dots_spacing = 0.2
|
||||
dots_center = true
|
||||
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
|
||||
outer_color = $border_highlight
|
||||
inner_color = $fg
|
||||
font_color = $bg
|
||||
outer_color = $pine
|
||||
inner_color = $text
|
||||
font_color = $base
|
||||
fade_on_empty = true
|
||||
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.
|
||||
hide_input = false
|
||||
rounding = -1 # -1 means complete rounding (circle/oval)
|
||||
check_color = rgb(e0af68)
|
||||
fail_color = rgb(db4b4b) # if authentication failed, changes outer_color and fail message color
|
||||
check_color = $gold
|
||||
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_transition = 300 # transition time in ms between normal outer_color and fail_color
|
||||
capslock_color = -1
|
||||
|
||||
@ -2,5 +2,6 @@ ipc = off
|
||||
splash = true
|
||||
preload = ~/Pictures/wallpapers/Linux-Dynamic-Wallpapers/Firewatch2/Firewatch2-1.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
0
config/lf/cleaner
Executable file → Normal file
0
config/lf/lfrc
Executable file → Normal file
0
config/lf/lfrc
Executable file → Normal file
0
config/nsxiv/exec/image-info
Executable file → Normal file
0
config/nsxiv/exec/image-info
Executable file → Normal file
0
config/nsxiv/exec/key-handler
Executable file → Normal file
0
config/nsxiv/exec/key-handler
Executable file → Normal file
0
config/nsxiv/exec/nsxiv-url
Executable file → Normal file
0
config/nsxiv/exec/nsxiv-url
Executable file → Normal file
0
config/nsxiv/exec/thumb-info
Executable file → Normal file
0
config/nsxiv/exec/thumb-info
Executable file → Normal file
0
config/nsxiv/exec/win-title
Executable file → Normal file
0
config/nsxiv/exec/win-title
Executable file → Normal file
@ -17,13 +17,12 @@ export LESSHISTFILE=-
|
||||
export $(dbus-launch)
|
||||
|
||||
export LIBSEAT_BACKEND=logind
|
||||
# export XDG_RUNTIME_DIR="/run/user/$UID"
|
||||
|
||||
unsetopt PROMPT_SP
|
||||
|
||||
|
||||
# Default Apps
|
||||
export BROWSER="floorp"
|
||||
export BROWSER="zen-browser"
|
||||
export EDITOR="nvim"
|
||||
export IMAGE="nsxiv"
|
||||
export READER="zathura"
|
||||
@ -87,8 +86,8 @@ export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
||||
export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons"
|
||||
export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc"
|
||||
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"
|
||||
# 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"
|
||||
|
||||
# Other program settings
|
||||
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
|
||||
|
||||
. "$XDG_DATA_HOME/cargo/env"
|
||||
. "$XDG_DATA_HOME/rye/env"
|
||||
. "$XDG_CACHE_HOME/deno/.deno/env"
|
||||
. "/home/kristofers/.local/share/cargo/env"
|
||||
|
||||
2
config/x11/opt-apps
Executable file → Normal file
2
config/x11/opt-apps
Executable file → Normal file
@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
pidof -sx "$program" || "$program" &
|
||||
|
||||
@ -41,8 +41,8 @@ keymap = [
|
||||
{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 = [ "g", "g" ], run = "arrow -99999999", desc = "Move cursor to the top"},
|
||||
{on = [ "G" ], run = "arrow 99999999", desc = "Move cursor to the bottom"},
|
||||
{on = [ "g", "g" ], run = "arrow top", desc = "Move cursor to the top"},
|
||||
{on = [ "G" ], run = "arrow bot", desc = "Move cursor to the bottom"},
|
||||
|
||||
# Selection
|
||||
{on = [ "<Space>" ], run = [ "toggle --state=none", "arrow 1" ], desc = "Toggle the current selection state"},
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
[[plugin.deps]]
|
||||
use = "AnirudhG07/nbpreview"
|
||||
rev = "1d85745"
|
||||
rev = "f8879b3"
|
||||
hash = "d378328e5d0a1b9fb9f04ab3aade4575"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "Reledia/glow"
|
||||
rev = "5ce76dc"
|
||||
hash = "52e5f5c602962e7cbf874da28f52ba45"
|
||||
rev = "c76bf4f"
|
||||
hash = "a6b78bf9af5390e3a85a6951fbb7b93"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "Reledia/hexyl"
|
||||
rev = "39d3d4e"
|
||||
hash = "dd624cbaff94af65f39fd86bc57b340"
|
||||
rev = "228a9ef"
|
||||
hash = "cdc65cfe4e60e1bf5afe5769d074fa9c"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "Reledia/miller"
|
||||
@ -25,13 +25,13 @@ hash = "a8e15d3c21c02a5af41d46ed04778a02"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "dedukun/relative-motions"
|
||||
rev = "df97039"
|
||||
hash = "395940d2b22941e0acb1232579c9d4cf"
|
||||
rev = "a1466a9"
|
||||
hash = "26d7fd10e163e0624d733c067eba4b61"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "hankertrix/augment-command"
|
||||
rev = "e337feb"
|
||||
hash = "feeb35edcf1677c7bafac2bc573670bb"
|
||||
rev = "af31941"
|
||||
hash = "71c1ef899b40a54fcdf5a41f87daa967"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "imsi32/yatline"
|
||||
@ -40,13 +40,13 @@ hash = "3e51d1fd8a2e481fcfa8eab1251d1c5f"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "kirasok/torrent-preview"
|
||||
rev = "c9e67df"
|
||||
hash = "f0d9a684da8e4ab9ccbcd255a97cf42b"
|
||||
rev = "4ca5996"
|
||||
hash = "6af40ce6b2cd849b5fa32de04a598b06"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "ndtoan96/ouch"
|
||||
rev = "083d564"
|
||||
hash = "1e4c0ac1fca31a23412324710193358a"
|
||||
rev = "ce6fb75"
|
||||
hash = "ed6c185514109d7c5463f609282b220c"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "pirafrank/what-size"
|
||||
@ -55,28 +55,28 @@ hash = "98e5f5af3efd3ba8bc2db0720187cc83"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:chmod"
|
||||
rev = "f202fa8"
|
||||
hash = "4c7e8fd0266eedee7b619d966bd2d025"
|
||||
rev = "5186af7"
|
||||
hash = "f28138c2e11e87962b66d583fef724c3"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:full-border"
|
||||
rev = "f202fa8"
|
||||
hash = "882ed23839778f82dc137248979c8681"
|
||||
rev = "5186af7"
|
||||
hash = "ae9e1d0c6bfd68cdebc98cc684c22b45"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:git"
|
||||
rev = "f202fa8"
|
||||
hash = "4d6a07559118975e2dee983d27474d70"
|
||||
rev = "5186af7"
|
||||
hash = "771f18427fb75fb19990ce602bb322f4"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:hide-preview"
|
||||
rev = "f202fa8"
|
||||
hash = "5be5885898ca9df783bdec0d402bf4b0"
|
||||
rev = "5186af7"
|
||||
hash = "1e31898370b752e4faf335b762b3eeaf"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:max-preview"
|
||||
rev = "f202fa8"
|
||||
hash = "9bc26d10d2f6e2aa93b10905b1b76979"
|
||||
rev = "5186af7"
|
||||
hash = "a8025f2bb311e869069364fba01abffc"
|
||||
|
||||
[flavor]
|
||||
deps = []
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
A [Yazi][yazi-link] plugin that enhances Yazi's default commands.
|
||||
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
|
||||
and the [fast-enter.yazi](https://github.com/ourongxing/fast-enter.yazi)
|
||||
plugin.
|
||||
@ -20,7 +20,7 @@ plugin.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Yazi](https://github.com/sxyazi/yazi) v0.4.2+
|
||||
- [Yazi][yazi-link] v25.2.7+
|
||||
- [`7z` or `7zz` command][7z-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_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. |
|
||||
| `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. |
|
||||
| `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. |
|
||||
@ -65,13 +66,12 @@ ya pack -u
|
||||
|
||||
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`
|
||||
file on Linux and macOS, or your
|
||||
`C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua`
|
||||
file on Windows, where `USERNAME` is your Windows username.
|
||||
file on Linux and macOS, or your `%AppData%\yazi\config\init.lua`
|
||||
file on Windows.
|
||||
|
||||
```lua
|
||||
-- ~/.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
|
||||
require("augment-command"):setup({
|
||||
@ -81,6 +81,7 @@ require("augment-command"):setup({
|
||||
smart_paste = false,
|
||||
smart_tab_create = false,
|
||||
smart_tab_switch = false,
|
||||
confirm_on_quit = true,
|
||||
open_file_after_creation = false,
|
||||
enter_directory_after_creation = 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
|
||||
your desired configuration options to your `~/.config/yazi/init.lua` file
|
||||
on Linux and macOS, or your
|
||||
`C:\Users\USERNAME\AppData\Roaming\yazi\config\init.lua`
|
||||
file on Windows, where `USERNAME` is your Windows username.
|
||||
`%AppData%\yazi\config\init.lua` file on Windows.
|
||||
You can leave out configuration options that you would
|
||||
like to be left as default.
|
||||
An example configuration is shown below:
|
||||
|
||||
```lua
|
||||
-- ~/.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
|
||||
require("augment-command"):setup({
|
||||
@ -238,8 +238,7 @@ then it will operate on the selected items.
|
||||
[`extract` openers section][yazi-yazi-toml-extract-openers]
|
||||
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
|
||||
`C:\Users\USERNAME\AppData\Roaming\yazi\config\yazi.toml`
|
||||
file on Windows, where `USERNAME` is your Windows username.
|
||||
`%AppData%\yazi\config\yazi.toml` file on Windows.
|
||||
Make sure that the `extract` openers are under the `opener` key in your
|
||||
`yazi.toml`. Then replace `extract` with `augmented-extract`,
|
||||
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
|
||||
# ~/.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 = [
|
||||
@ -262,7 +261,7 @@ then it will operate on the selected items.
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
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.
|
||||
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.
|
||||
However, due to the
|
||||
[`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
|
||||
Do note that the separator in the `confirm` component will be the text colour
|
||||
instead of your configured border colour for the `confirm` component as
|
||||
the `list` part of the `confirm` component has not been exposed to plugin
|
||||
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
|
||||
`shell` command provided by Yazi. You just provide the command you want and
|
||||
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
|
||||
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
|
||||
# ~/.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"
|
||||
```
|
||||
|
||||
- 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"
|
||||
```
|
||||
- There is no need to quote the shell variable on Linux and macOS,
|
||||
as it is expanded by the plugin instead of the shell,
|
||||
and the paths are already quoted using the `ya.quote` function
|
||||
before execution, so quoting is entirely unnecessary
|
||||
and may result in unexpected behaviour.
|
||||
|
||||
- `--exit-if-dir` flag to stop the shell command given
|
||||
from executing if the item group consists only of directories.
|
||||
@ -586,11 +548,11 @@ then it will operate on the selected items.
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
on = [ "i" ]
|
||||
run = '''plugin augment-command --args="shell '$PAGER $@' --block --exit-if-dir"'''
|
||||
on = "i"
|
||||
run = "plugin augment-command -- shell '$PAGER $@' --block --exit-if-dir"
|
||||
desc = "Open the pager"
|
||||
```
|
||||
|
||||
@ -601,18 +563,118 @@ then it will operate on the selected items.
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
on = [ "i" ]
|
||||
run = '''plugin augment-command --args="shell '$EDITOR $@' --block --exit-if-dir"'''
|
||||
desc = "Open the pager"
|
||||
on = "o"
|
||||
run = "plugin augment-command -- shell '$EDITOR $@' --block --exit-if-dir"
|
||||
desc = "Open the editor"
|
||||
```
|
||||
|
||||
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`)
|
||||
|
||||
- When `smart_paste` is set to `true`,
|
||||
@ -699,6 +761,35 @@ then it will operate on the selected items.
|
||||
|
||||
[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`)
|
||||
|
||||
- When `wraparound_file_navigation` is set to `true`,
|
||||
@ -738,19 +829,19 @@ then it will operate on the selected items.
|
||||
|
||||
```toml
|
||||
# ~/.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
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "K" ]
|
||||
run = [ "leave", "arrow -1", "enter" ]
|
||||
on = "K"
|
||||
run = ["leave", "arrow -1", "enter"]
|
||||
desc = "Move up in the parent directory"
|
||||
|
||||
|
||||
# Use J to move down in the parent directory
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "J" ]
|
||||
run = [ "leave", "arrow 1", "enter" ]
|
||||
on = "J"
|
||||
run = ["leave", "arrow 1", "enter"]
|
||||
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,
|
||||
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:
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
on = [ "key" ]
|
||||
run = "plugin augment-command --args='command arguments --flags --options=42'"
|
||||
on = "key"
|
||||
run = "plugin augment-command -- command arguments --flags --options=42"
|
||||
desc = "Description"
|
||||
```
|
||||
|
||||
@ -832,11 +923,11 @@ For example, to use the augmented `enter` command:
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
on = [ "l" ]
|
||||
run = "plugin augment-command --args='enter'"
|
||||
on = "l"
|
||||
run = "plugin augment-command -- enter"
|
||||
desc = "Enter a directory and skip directories with only a single subdirectory"
|
||||
```
|
||||
|
||||
@ -845,33 +936,35 @@ are also supported, for example:
|
||||
|
||||
```toml
|
||||
# ~/.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]]
|
||||
on = [ "k" ]
|
||||
run = "plugin augment-command --args='arrow -1'"
|
||||
on = "k"
|
||||
run = "plugin augment-command -- arrow -1"
|
||||
desc = "Move cursor up"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "r" ]
|
||||
run = "plugin augment-command --args='rename --cursor=before_ext'"
|
||||
on = "r"
|
||||
run = "plugin augment-command -- rename --cursor=before_ext"
|
||||
desc = "Rename a file or directory"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "D" ]
|
||||
run = "plugin augment-command --args='remove --permanently'"
|
||||
on = "D"
|
||||
run = "plugin augment-command -- remove --permanently"
|
||||
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
|
||||
[Yazi's default `keymap.toml` file][yazi-keymap-toml].
|
||||
|
||||
Essentially, all you need to do to use this plugin
|
||||
is to wrap a Yazi command in single quotes,
|
||||
like `'enter'`,
|
||||
then add `plugin augment-command --args=`
|
||||
in front of it, which results in
|
||||
`plugin augment-command --args='enter'`.
|
||||
is to add `plugin augment-command --`, with a space at the end,
|
||||
in front of a Yazi command, such as `enter`,
|
||||
which results in `plugin augment-command -- enter'`.
|
||||
|
||||
### Using the `extract` command as an opener
|
||||
|
||||
@ -883,7 +976,7 @@ for details on how to do so.
|
||||
### 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].
|
||||
|
||||
## [Licence]
|
||||
@ -894,6 +987,7 @@ You can view the full licence in the [`LICENSE`][Licence] file.
|
||||
<!-- Regular links -->
|
||||
|
||||
[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-tab-tip]: https://yazi-rs.github.io/docs/tips#smart-tab
|
||||
[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/
|
||||
[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-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
|
||||
[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
|
||||
@ -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
|
||||
|
||||
<!-- Quit command -->
|
||||
|
||||
[quit-with-confirmation-video]: https://github.com/user-attachments/assets/b6206ee4-766b-44ce-b90b-15b015ae71f9
|
||||
|
||||
<!-- Arrow command -->
|
||||
|
||||
[wraparound-arrow-video]: https://github.com/user-attachments/assets/41ea1fb0-a526-4549-95a2-547c3c4b0498
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,5 @@
|
||||
--- @since 25.2.7
|
||||
|
||||
local selected_or_hovered = ya.sync(function()
|
||||
local tab, paths = cx.active, {}
|
||||
for _, u in pairs(tab.selected) do
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
--- @since 25.2.7
|
||||
|
||||
local function setup(_, opts)
|
||||
local type = opts and opts.type or ui.Border.ROUNDED
|
||||
local old_build = Tab.build
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# git.yazi
|
||||
|
||||
> [!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.
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
--- @since 25.2.7
|
||||
|
||||
local WIN = ya.target_family() == "windows"
|
||||
local PATS = {
|
||||
{ "[MT]", 6 }, -- Modified
|
||||
@ -159,9 +161,6 @@ local function fetch(_, job)
|
||||
local repo = root(cwd)
|
||||
if not repo then
|
||||
remove(tostring(cwd))
|
||||
if not ya.__250127 then -- TODO: remove this
|
||||
return 1
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@ -178,10 +177,6 @@ local function fetch(_, job)
|
||||
:stdout(Command.PIPED)
|
||||
:output()
|
||||
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)
|
||||
end
|
||||
|
||||
@ -208,9 +203,6 @@ local function fetch(_, job)
|
||||
end
|
||||
add(tostring(cwd), repo, changed)
|
||||
|
||||
if not ya.__250127 then -- TODO: remove this
|
||||
return 3
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ Make sure you have [glow](https://github.com/charmbracelet/glow) installed, and
|
||||
|
||||
## 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`)
|
||||
```toml
|
||||
prepend_keymap = [
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
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 child = Command("glow")
|
||||
@ -55,20 +55,8 @@ function M:seek(job)
|
||||
if not h or h.url ~= job.file.url then
|
||||
return
|
||||
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', {
|
||||
math.max(0, cx.active.preview.skip + scroll_offset),
|
||||
math.max(0, cx.active.preview.skip + job.units),
|
||||
only_if = job.file.url,
|
||||
})
|
||||
end
|
||||
|
||||
@ -1,57 +1,76 @@
|
||||
local M = {}
|
||||
|
||||
function M:peek(job)
|
||||
local child
|
||||
local l = self.file.cha.len
|
||||
if l == 0 then
|
||||
child = Command("hexyl")
|
||||
:args({
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:spawn()
|
||||
else
|
||||
child = Command("hexyl")
|
||||
:args({
|
||||
"--border",
|
||||
"none",
|
||||
"--terminal-width",
|
||||
tostring(job.area.w),
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:spawn()
|
||||
end
|
||||
local child
|
||||
local l = job.file.cha.len
|
||||
if l == 0 then
|
||||
child = Command("hexyl")
|
||||
:args({
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:spawn()
|
||||
else
|
||||
child = Command("hexyl")
|
||||
:args({
|
||||
"--border", "none",
|
||||
"--terminal-width", tostring(job.area.w),
|
||||
tostring(job.file.url),
|
||||
})
|
||||
:stdout(Command.PIPED)
|
||||
:stderr(Command.PIPED)
|
||||
:spawn()
|
||||
end
|
||||
|
||||
local limit = job.area.h
|
||||
local i, lines = 0, ""
|
||||
repeat
|
||||
local next, event = child:read_line()
|
||||
if event == 1 then
|
||||
ya.err(tostring(event))
|
||||
elseif event ~= 0 then
|
||||
break
|
||||
end
|
||||
if not child then
|
||||
return require("code").peek(job)
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
if i > job.skip then
|
||||
lines = lines .. next
|
||||
end
|
||||
until i >= job.skip + limit
|
||||
local limit = job.area.h
|
||||
local i, lines = 0, ""
|
||||
repeat
|
||||
local line, event = child:read_line()
|
||||
if event == 1 then
|
||||
ya.err(tostring(event))
|
||||
break
|
||||
elseif event ~= 0 then
|
||||
break
|
||||
end
|
||||
|
||||
child:start_kill()
|
||||
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 })
|
||||
else
|
||||
lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
|
||||
ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
|
||||
end
|
||||
i = i + 1
|
||||
if i > job.skip then
|
||||
lines = lines .. line
|
||||
end
|
||||
until i >= job.skip + limit
|
||||
|
||||
child:start_kill()
|
||||
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,
|
||||
})
|
||||
else
|
||||
lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
|
||||
ya.preview_widgets(job, { ui.Text.parse(lines):area(job.area) })
|
||||
end
|
||||
end
|
||||
|
||||
function M:seek(units)
|
||||
require("code").seek(job, units)
|
||||
function M:seek(job)
|
||||
-- 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
|
||||
|
||||
return M
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
# 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.
|
||||
|
||||
https://github.com/yazi-rs/plugins/assets/17523360/c4f0b5c4-ff9f-4be8-ba73-4d8e7902e383
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
--- @since 25.2.7
|
||||
--- @sync entry
|
||||
|
||||
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
|
||||
Tab.layout, st.old = st.old, nil
|
||||
else
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
# 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.
|
||||
|
||||
https://github.com/yazi-rs/plugins/assets/17523360/8976308e-ebfe-4e9e-babe-153eb1f87d61
|
||||
|
||||
@ -1,6 +1,14 @@
|
||||
--- @since 25.2.7
|
||||
--- @sync entry
|
||||
|
||||
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
|
||||
Tab.layout, st.old = st.old, nil
|
||||
else
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
If you use latest Yazi from main branch
|
||||
If you use Yazi from latest main branch
|
||||
```bash
|
||||
# Linux/macOS
|
||||
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"
|
||||
```
|
||||
|
||||
If you use Yazi <= 0.3.3
|
||||
If you use Yazi < 0.4.3
|
||||
```bash
|
||||
# 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
|
||||
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
|
||||
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`.
|
||||
|
||||
@ -6,26 +6,14 @@ https://github.com/dedukun/relative-motions.yazi/assets/25795432/04fb186a-5efe-4
|
||||
|
||||
## Requirements
|
||||
|
||||
- [Yazi](https://github.com/sxyazi/yazi) v0.3.0+
|
||||
- [Yazi](https://github.com/sxyazi/yazi) v25.2.7+
|
||||
|
||||
## Installation
|
||||
|
||||
If you use the latest Yazi from main branch
|
||||
|
||||
```sh
|
||||
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
|
||||
|
||||
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
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "1" ]
|
||||
run = "plugin relative-motions --args=1"
|
||||
run = "plugin relative-motions 1"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "2" ]
|
||||
run = "plugin relative-motions --args=2"
|
||||
run = "plugin relative-motions 2"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "3" ]
|
||||
run = "plugin relative-motions --args=3"
|
||||
run = "plugin relative-motions 3"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "4" ]
|
||||
run = "plugin relative-motions --args=4"
|
||||
run = "plugin relative-motions 4"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "5" ]
|
||||
run = "plugin relative-motions --args=5"
|
||||
run = "plugin relative-motions 5"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "6" ]
|
||||
run = "plugin relative-motions --args=6"
|
||||
run = "plugin relative-motions 6"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "7" ]
|
||||
run = "plugin relative-motions --args=7"
|
||||
run = "plugin relative-motions 7"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "8" ]
|
||||
run = "plugin relative-motions --args=8"
|
||||
run = "plugin relative-motions 8"
|
||||
desc = "Move in relative steps"
|
||||
|
||||
[[manager.prepend_keymap]]
|
||||
on = [ "9" ]
|
||||
run = "plugin relative-motions --args=9"
|
||||
run = "plugin relative-motions 9"
|
||||
desc = "Move in relative steps"
|
||||
```
|
||||
|
||||
@ -94,18 +82,19 @@ desc = "Trigger a new relative motion"
|
||||
|
||||
Additionally there are a couple of initial configurations that can be given to the plugin's `setup` function:
|
||||
|
||||
| Configuration | Values | Default | Description |
|
||||
| -------------- | ----------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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 |
|
||||
| Configuration | Values | Default | Description |
|
||||
| -------------- | ----------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `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 |
|
||||
| `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,
|
||||
add the following to Yazi's `init.lua`, i.e. `~/.config/yazi/init.lua`:
|
||||
|
||||
```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]
|
||||
@ -119,13 +108,15 @@ require("relative-motions"):setup({ show_numbers="relative", show_motion = true
|
||||
This plugin adds the some basic vim motions like `3k`, `12j`, `10gg`, etc.
|
||||
The following table show all the available motions:
|
||||
|
||||
| Command | Description |
|
||||
| -------------- | ------------------- |
|
||||
| `j`/`<Down>` | Move `n` lines down |
|
||||
| `k`/`<Up>` | Move `n` lines up |
|
||||
| `gj`/`g<Down>` | Go `n` lines down |
|
||||
| `gk`/`g<Up>` | Go `n` lines up |
|
||||
| `gg` | Go to line |
|
||||
| Command | Description |
|
||||
| -------------- | --------------------- |
|
||||
| `j`/`<Down>` | Move `n` lines down |
|
||||
| `k`/`<Up>` | Move `n` lines up |
|
||||
| `h`/`<Left>` | Move `n` folders back |
|
||||
| `l`/`<Right>` | Enter `n` folders |
|
||||
| `gj`/`g<Down>` | Go `n` lines down |
|
||||
| `gk`/`g<Up>` | Go `n` lines up |
|
||||
| `gg` | Go to line |
|
||||
|
||||
Furthermore, the following operations were also added:
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
--- @since 25.2.7
|
||||
-- stylua: ignore
|
||||
local MOTIONS_AND_OP_KEYS = {
|
||||
{ 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 = "W" }, { on = "<" }, { on = ">" }, { on = "~" },
|
||||
-- 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
|
||||
@ -16,7 +17,7 @@ local MOTION_KEYS = {
|
||||
{ on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" },
|
||||
{ on = "5" }, { on = "6" }, { on = "7" }, { on = "8" }, { on = "9" },
|
||||
-- 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
|
||||
@ -30,6 +31,10 @@ local SHOW_NUMBERS_ABSOLUTE = 0
|
||||
local SHOW_NUMBERS_RELATIVE = 1
|
||||
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 -----------------
|
||||
-----------------------------------------------
|
||||
@ -149,6 +154,10 @@ local function normal_direction(dir)
|
||||
return "j"
|
||||
elseif dir == "<Up>" then
|
||||
return "k"
|
||||
elseif dir == "<Left>" then
|
||||
return "h"
|
||||
elseif dir == "<Right>" then
|
||||
return "l"
|
||||
end
|
||||
return dir
|
||||
end
|
||||
@ -205,6 +214,29 @@ 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 ----------
|
||||
-----------------------------------------------
|
||||
@ -231,7 +263,7 @@ return {
|
||||
|
||||
if cmd == "g" then
|
||||
if direction == "g" then
|
||||
ya.manager_emit("arrow", { -99999999 })
|
||||
ya.manager_emit("arrow", { "top" })
|
||||
ya.manager_emit("arrow", { lines - 1 })
|
||||
render_clear()
|
||||
return
|
||||
@ -254,6 +286,19 @@ return {
|
||||
ya.manager_emit("arrow", { lines })
|
||||
elseif cmd == "k" then
|
||||
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
|
||||
if cmd == "t" then
|
||||
for _ = 1, lines do
|
||||
@ -315,6 +360,16 @@ return {
|
||||
render_motion_setup()
|
||||
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
|
||||
render_numbers(SHOW_NUMBERS_ABSOLUTE)
|
||||
elseif args["show_numbers"] == "relative" then
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# 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
|
||||
|
||||

|
||||
|
||||
@ -13,6 +13,14 @@
|
||||
|
||||
### 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
|
||||
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
|
||||
[[plugin.prepend_previewers]]
|
||||
mime = "application/x-bittorrent"
|
||||
mime = "application/bittorrent"
|
||||
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))
|
||||
|
||||
|
||||
@ -93,7 +93,7 @@ previewers = [
|
||||
{mime = "application/json", run = "code"},
|
||||
# Image
|
||||
{mime = "image/vnd.djvu", run = "noop"},
|
||||
{mime = "image/*", run = "image"},
|
||||
# {mime = "image/*", run = "image"},
|
||||
# Video
|
||||
# {mime = "video/*", run = "video"},
|
||||
# PDF
|
||||
|
||||
0
dotter.arm
Executable file → Normal file
0
dotter.arm
Executable file → Normal file
0
dotter.exe
Executable file → Normal file
0
dotter.exe
Executable file → Normal file
@ -3,7 +3,7 @@
|
||||
if [[ $# -eq 1 ]]; then
|
||||
selected=$1
|
||||
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
|
||||
|
||||
if [[ -z $selected ]]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user