From ac8b19f7c8bd1a4ec2a34a59268ce31285916d27 Mon Sep 17 00:00:00 2001 From: awy Date: Tue, 13 Aug 2024 11:46:15 +0300 Subject: fixes --- .config/foot/foot.ini | 210 +++++++++++++++++++++++++++++++++++++++++++++ .config/hypr/hyprland.conf | 4 +- .config/lf/cleaner | 4 +- .config/lf/kitty_scope | 29 +++++++ .config/lf/scope | 29 ++----- dependencies.txt | 4 +- 6 files changed, 253 insertions(+), 27 deletions(-) create mode 100644 .config/foot/foot.ini create mode 100755 .config/lf/kitty_scope diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..ceaaeeb --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,210 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode +# title=foot +# locked-title=no + +font=LiterationMono Nerd Font Mono:size=14 +# font-bold= +# font-italic= +# font-bold-italic= +# font-size-adjustment=0.5 +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# underline-thickness= +# box-drawings-uses-font-glyphs=no +# dpi-aware=no + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +# pad=0x0 # optionally append 'center' +# resize-by-cells=yes +# resize-delay-ms=100 + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= +# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) +# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# visual=no +# command= +# command-focused=no + +[desktop-notifications] +# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body} +# command-action-argument=--action ${action-name}=${action-label} +# close="" +# inhibit-when-focused=yes + + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format="" + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +# style=block +# color= +# blink=no +# blink-rate=500 +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[touch] +# long-press-delay=400 + +[colors] +background=282828 +foreground=ebdbb2 +regular0=282828 +regular1=cc241d +regular2=98971a +regular3=d79921 +regular4=458588 +regular5=b16286 +regular6=689d6a +regular7=a89984 +bright0=928374 +bright1=fb4934 +bright2=b8bb26 +bright3=fabd2f +bright4=83a598 +bright5=d3869b +bright6=8ec07c +bright7=ebdbb2 + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-maximized=no +# double-click-to-maximize=yes +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard +# show-urls-launch=Control+Shift+o +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=Control+Shift+u +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-char=Shift+Right +# extend-to-word-boundary=Control+w Control+Shift+Right +# extend-to-next-whitespace=Control+Shift+w +# extend-line-down=Shift+Down +# extend-backward-char=Shift+Left +# extend-backward-to-word-boundary=Control+Shift+Left +# extend-backward-to-next-whitespace=none +# extend-line-up=Shift+Up +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none +# quit=none +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# scrollback-up-mouse=BTN_WHEEL_BACK +# scrollback-down-mouse=BTN_WHEEL_FORWARD +# font-increase=Control+BTN_WHEEL_BACK +# font-decrease=Control+BTN_WHEEL_FORWARD +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-quote = BTN_LEFT-3 +# select-row=BTN_LEFT-4 + +# vim: ft=dosini diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 7f6b3cf..84d8d4c 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -10,7 +10,7 @@ monitor=DP-2,2560x1440@165,0x0,1 ### MY PROGRAMS ### ################### -$terminal = kitty +$terminal = foot $fileManager = dolphin $menu = wofi --show drun $browser = firefox @@ -107,7 +107,7 @@ misc { disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( disable_splash_rendering = true enable_swallow = 1 - swallow_regex = ^(kitty)$ + swallow_regex = ^(foot)$ } ############# diff --git a/.config/lf/cleaner b/.config/lf/cleaner index 08dd4e8..9b48783 100755 --- a/.config/lf/cleaner +++ b/.config/lf/cleaner @@ -1,4 +1,4 @@ #!/bin/sh -rm ~/.cache/lf/* -f -exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file /dev/tty +#rm ~/.cache/lf/* -f +#exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file /dev/tty diff --git a/.config/lf/kitty_scope b/.config/lf/kitty_scope new file mode 100755 index 0000000..a7d0bc1 --- /dev/null +++ b/.config/lf/kitty_scope @@ -0,0 +1,29 @@ +#!/bin/sh +draw() { + kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" /dev/tty + exit 1 +} + +file="$1" +w="$2" +h="$3" +x="$4" +y="$5" + +case "$(file -Lb --mime-type "$file")" in + image/*) + draw "$file" + ;; + audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; + video/*) + # vidthumb is from here: + # https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 + draw "$CACHE" + #draw "$(vidthumb "$file")" + ;; + text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; +esac + +#pistol "$file"lace "${2}x${3}@${4}x${5}" "$1" diff --git a/.config/lf/scope b/.config/lf/scope index a7d0bc1..5f892ed 100755 --- a/.config/lf/scope +++ b/.config/lf/scope @@ -1,29 +1,14 @@ #!/bin/sh -draw() { - kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" /dev/tty - exit 1 -} - -file="$1" -w="$2" -h="$3" -x="$4" -y="$5" - -case "$(file -Lb --mime-type "$file")" in +case "$(file -Lb --mime-type -- "$1")" in image/*) - draw "$file" + chafa -f sixel -s "$2x$3" --animate off --polite on "$1" + exit 1 + ;; + text/*) + cat "$1" ;; - audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; video/*) - # vidthumb is from here: - # https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 - draw "$CACHE" - #draw "$(vidthumb "$file")" - ;; - text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; + chafa -f sixel -s "$2x$3" --animate off --polite on "$CACHE" esac - -#pistol "$file"lace "${2}x${3}@${4}x${5}" "$1" diff --git a/dependencies.txt b/dependencies.txt index 6946510..fbcf7c3 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -6,7 +6,8 @@ wireplumber firefox wl-clipboard wofi -kitty +#kitty +foot waybar neovim ttf-liberation-mono-nerd @@ -33,3 +34,4 @@ lf ffmpegthumbnailer mediainfo bat +chafa -- cgit v1.2.3