plugin heic yazi

This commit is contained in:
grayTerminal-sh 2026-06-03 14:15:15 +02:00
parent 95ce9f00f1
commit 50cdf05a7d
12 changed files with 152 additions and 73 deletions

View file

@ -1 +1 @@
1780170322:success:suspend_resume
1780435997:success:suspend_resume

View file

@ -1 +1 @@
4823
893228

View file

@ -25,7 +25,7 @@ action = "toggle_format"
[[block]]
block = "bluetooth"
mac = "E4:61:F4:F4:A1:F7"
format = " JBL Tune {{$battery_icon}} "
format = " JBL Tune "
disconnected_format = " 󰂲"
[[block.click]]
button = "left"
@ -68,22 +68,6 @@ format_up_to_date = " $icon Up to date "
# aur_command should output available updates to stdout (ie behave as echo -ne "update\n")
aur_command = "yay -Qua"
[[block]]
block = "notify"
driver = "swaync"
[[block.click]]
button = "left"
action = "show"
[[block.click]]
button = "right"
action = "toggle_paused"
[[block]]
block = "time"
interval = 60
[block.format]
full = " $icon $timestamp.datetime(f:'%d-%m-%Y %R')"
short = " $icon $timestamp.datetime(f:%R) "
[[block]]
block = "menu"
text = " \uf011 "

View file

@ -6,6 +6,7 @@
# Applications system
binds=SUPER,Return,spawn,kitty
binds=SUPER+CTRL,t,spawn,thunderbird
binds=SUPER+SHIFT,b,spawn,blueman-manager
binds=SUPER+SHIFT,p,spawn,proton-pass
binds=ALT,p,toggle_named_scratchpad,Proton Pass,none,proton-pass
@ -15,7 +16,7 @@ binds=SUPER+CTRL,e,spawn,wofi --cache-file=/dev/null -Dimage_size=26 -Dynamic_li
binds=SUPER,v,spawn,~/.config/mango/scripts/copypast
binds=NONE,Print,spawn,~/.config/mango/scripts/screenshot-clip.sh
binds=SUPER+CTRL,f,spawn,AppFlowy
binds=SUPER+CTRL+SUPER,g,spawn,gimp
binds=SUPER+CTRL,g,spawn,gimp
# Browsers & net
binds=SUPER,b,spawn,chromium
@ -23,7 +24,6 @@ binds=SUPER+SHIFT,f,spawn,firefox
binds=SUPER,t,spawn,thunderbird
# IA's
binds=SUPER,p,spawn,perplexity
binds=SUPER,m,spawn,spotify-launcher
# Virtualisation

View file

@ -7,19 +7,19 @@
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" },
"mason.nvim": { "branch": "main", "commit": "bb639d4bf385a4d89f478b83af4d770be05ab7eb" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" },
"mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" },
"mini.starter": { "branch": "main", "commit": "a7d8b353cf120fee32bb5d88e7a9de5eaec746e7" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" },
"neowiki.nvim": { "branch": "main", "commit": "85dddf6057b07d4d6772b2f90e754a18e958a865" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-colorizer.lua": { "branch": "master", "commit": "4a59a37498ef19e25946878f1ac1032ed947ac9a" },
"nvim-colorizer.lua": { "branch": "master", "commit": "664c0b7cea1de71f8b65dfe951b7996fc3e6ccde" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
"nvim-lspconfig": { "branch": "master", "commit": "9573948c38bfabeec353ae7dd7d3ffec4c506a6b" },
"nvim-lspconfig": { "branch": "master", "commit": "07dff35e7c95288861200b788ef32d6103f107f0" },
"nvim-tcss": { "branch": "main", "commit": "bf9001416158f32fe7e92c42de94de3595aa13e5" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },

View file

@ -24,9 +24,9 @@ exec python3 ~/.config/sway/scripts/inactive-windows-transparency.py
assign [app_id="kitty-1"] workspace 1
assign [app_id="kitty-2"] workspace 1
assign [app_id="electron" title="Perplexity"] workspace 1
assign [app_id="chromium"] workspace 2
assign [app_id="firefox"] workspace 3
assign [app_id="AppFlowy"] workspace 5
assign [app_id="proton-bridge"] workspace 9
assign [app_id="org.mozilla.Thunderbird"] workspace 9
assign [class="Spotify"] workspace 10
@ -36,24 +36,23 @@ assign [class="Spotify"] workspace 10
# =================================================
exec kitty --class kitty-1 --directory $HOME
exec kitty --class kitty-2 --directory $HOME
exec perplexity
# exec kitty --class kitty-2 --directory $HOME
exec chromium
exec protonmail-bridge
exec thunderbird
exec spotify-launcher
exec ~/.config/sway/scripts/layout-workspace1.sh
exec proton-pass
exec AppFlowy
# =================================================
# Presse-papier
# =================================================
exec wl-paste --watch clipvault store
exec wl-paste --type image/png --watch clipvault store
exec wl-paste --watch cliphist store
exec wl-paste --type image/png --watch cliphist store
# =================================================
# Verrouillage auto (swayidle)
# =================================================
exec-once=swayidle -w timeout 300 'swaylock -f -c 000000' timeout 301 'systemctl suspend' before-sleep 'swaylock -f -c 000000'
exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 360 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' before-sleep 'swaylock -f -c 000000'

View file

@ -49,16 +49,16 @@ set $term kitty
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Ctrl+$left move left
bindsym $mod+Ctrl+$down move down
bindsym $mod+Ctrl+$up move up
bindsym $mod+Ctrl+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
bindsym $mod+Ctrl+Left move left
bindsym $mod+Ctrl+Down move down
bindsym $mod+Ctrl+Up move up
bindsym $mod+Ctrl+Right move right
###############################################
#
@ -79,16 +79,16 @@ set $term kitty
bindsym $mod+agrave workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace number 1
bindsym $mod+Shift+eacute move container to workspace number 2
bindsym $mod+Shift+quotedbl move container to workspace number 3
bindsym $mod+Shift+apostrophe move container to workspace number 4
bindsym $mod+Shift+parenleft move container to workspace number 5
bindsym $mod+Shift+minus move container to workspace number 6
bindsym $mod+Shift+egrave move container to workspace number 7
bindsym $mod+Shift+underscore move container to workspace number 8
bindsym $mod+Shift+ccedilla move container to workspace number 9
bindsym $mod+Shift+agrave move container to workspace number 10
bindsym $mod+Ctrl+ampersand move container to workspace number 1
bindsym $mod+Ctrl+eacute move container to workspace number 2
bindsym $mod+Ctrl+quotedbl move container to workspace number 3
bindsym $mod+Ctrl+apostrophe move container to workspace number 4
bindsym $mod+Ctrl+parenleft move container to workspace number 5
bindsym $mod+Ctrl+minus move container to workspace number 6
bindsym $mod+Ctrl+egrave move container to workspace number 7
bindsym $mod+Ctrl+underscore move container to workspace number 8
bindsym $mod+Ctrl+ccedilla move container to workspace number 9
bindsym $mod+Ctrl+agrave move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
@ -122,7 +122,7 @@ bindsym $mod+N exec swaync-client -t
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
bindsym $mod+Ctrl+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
@ -140,8 +140,7 @@ bindsym $mod+N exec swaync-client -t
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+i move scratchpad
bindsym $mod+Ctrl+i move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+i scratchpad show
@ -201,7 +200,7 @@ bindsym $mod+r mode "resize"
###############################################
# Reload Sway config
bindsym $mod+Shift+c Reload
bindsym $mod+Ctrl+r Reload
###############################################
#
@ -210,18 +209,19 @@ bindsym $mod+Shift+c Reload
###############################################
bindsym $mod+b exec chromium
bindsym $mod+g exec google-chrome-stable
bindsym $mod+Shift+f exec firefox
bindsym $mod+p exec perplexity
bindsym $mod+Ctrl+f exec firefox
bindsym $mod+Alt+f exec AppFlowy
bindsym $mod+g exec gimp
bindsym $mod+m exec spotify-launcher
bindsym $mod+Shift+b exec blueman-manager
bindsym $mod+Ctrl+l exec swaylock
bindsym $mod+Ctrl+o exec swaylock
bindsym $mod+Ctrl+e exec wofi --cache-file=/dev/null -Dimage_size=26 -Dynamic_lines=true --location top --yoffset=10 --width=600 --height=300 --gtk-dark --show drun
bindsym $mod+t exec thunderbird
bindsym $mod+Shift+p exec proton-pass
bindsym $mod+Shift+m exec protonmail-bridge
bindsym $mod+Shift+v exec virt-manager
bindsym $mod+Shift+t exec thunar
bindsym $mod+Ctrl+p exec proton-pass
bindsym $mod+Ctrl+m exec protonmail-bridge
bindsym $mod+Ctrl+v exec virt-manager
bindsym $mod+Ctrl+t exec thunar
bindsym $mod+y exec kitty -- sh -c "yazi"
###############################################
#
@ -237,7 +237,7 @@ bindsym $mod+Shift+t exec thunar
# Print = zone -> presse-papier
bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png
bindsym $mod+v exec ~/.config/sway/scripts/cliphist-wofi-img
bindsym $mod+v exec ~/.config/sway/scripts/copypast
###############################################

View file

@ -0,0 +1,60 @@
#!/usr/bin/env bash
thumb_dir="${XDG_CACHE_HOME:-$HOME/.cache}/cliphist/thumbs"
mkdir -p "$thumb_dir"
clip_list="$(cliphist list)"
# Nettoyer les vignettes orphelines
for thumb in "$thumb_dir"/*; do
[ -e "$thumb" ] || continue
clip_id="${thumb##*/}"
clip_id="${clip_id%.*}"
if ! printf '%s\n' "$clip_list" | rg -q "^${clip_id}[[:space:]]"; then
rm -f "$thumb"
fi
done
read -r -d '' prog <<EOF
match(\$0, /^([0-9]+)[[:space:]]+\\[\\[ binary data .* (png|jpeg|jpg|bmp|webp) [0-9]+x[0-9]+ \\]\\]/, grp) {
id = grp[1]
ext = grp[2]
if (ext == "jpeg") ext = "jpg"
image = id "." ext
thumb = "$thumb_dir/" image
cmd = "[ -f '" thumb "' ] || printf '%s\\n' '" \$0 "' | cliphist decode | magick - -resize '256x256>' '" thumb "'"
system(cmd)
print "img:" thumb
next
}
1
EOF
choice=$(
gawk "$prog" <<< "$clip_list" |
wofi -I --dmenu --cache-file=/dev/null \
-Dimage_size=100 -Dynamic_lines=true \
--xoffset=600 --yoffset=20 --width=45% --height=45% --gtk-dark
)
[ -z "$choice" ] && exit 1
if [ "${choice:0:4}" = "img:" ]; then
thumb_file="${choice:4}"
clip_id="${thumb_file##*/}"
clip_id="${clip_id%.*}"
printf '%s\n' "$clip_list" |
rg "^${clip_id}[[:space:]]" |
head -n 1 |
cliphist decode |
wl-copy
else
printf '%s\n' "$choice" |
cliphist decode |
wl-copy
fi

View file

@ -4,7 +4,7 @@
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg ~/.wallpapers/sway.png fill
output eDP-1 mode 3200x2000 pos 3200 0 scale 1.7
output eDP-1 mode 3200x2000 pos 3200 0 scale 1.5
#
# Style
@ -41,5 +41,5 @@ seat seat0 xcursor_theme $cursor_theme $cursor_size
# Set inner/outer gaps
gaps inner 5
gaps outer -3
gaps inner 8
gaps outer 0

View file

@ -1,4 +1,4 @@
image=~/.wallpapers/662412-vanilla-arch-wallpaper-linuxart.png
image=~/.wallpapers/sway.png
clock
indicator

View file

@ -0,0 +1,32 @@
local M = {}
function M:peek(job)
local cache = ya.file_cache {
file = job.file,
skip = 0,
}
if not cache then
return
end
local out = tostring(cache) .. ".jpg"
if not fs.cha(Url(out)) then
local child = Command("magick")
:arg(tostring(job.file.url))
:arg(out)
:spawn()
if not child then
return
end
child:wait()
end
ya.image_show(Url(out), job.area)
end
function M:seek() end
return M

View file

@ -106,7 +106,9 @@ prepend_previewers = [
{ mime = "application/{json,ndjson}", run = "json" },
# Images
{ mime = "image/{avif,hei?,jxl}", run = "image" },
{ mime = "image/{avif,jxl}", run = "image" },
{ mime = "image/heic", run = "heic" },
{ mime = "image/heif", run = "heic" },
{ mime = "image/svg+xml", run = "image" },
{ mime = "image/*", run = "image" },
@ -134,7 +136,9 @@ prepend_previewers = [
prepend_preloaders = [
# Images
{ mime = "image/{avif,hei?,jxl}", run = "image", prio = "normal" },
{ mime = "image/{avif,jxl}", run = "image", prio = "normal" },
{ mime = "image/heic", run = "heic", prio = "normal" },
{ mime = "image/heif", run = "heic", prio = "normal" },
{ mime = "image/svg+xml", run = "image", prio = "normal" },
{ mime = "image/*", run = "image", prio = "normal" },