update
This commit is contained in:
parent
67f511bd96
commit
32e5c173ed
|
@ -1,7 +1,6 @@
|
||||||
[bonsai]
|
[bonsai]
|
||||||
source = imaps://brk%40bonsai.cool:panda@mail.bonsai.cool
|
source = maildir://~/mail/bonsai/
|
||||||
outgoing = smtps://brk%40bonsai.cool:panda@mail.bonsai.cool
|
outgoing = /home/brk/bin/msmtpq
|
||||||
default = INBOX
|
default = INBOX
|
||||||
from = Jovan Djokic-Sumarac <brk@bonsai.cool>
|
from = Jovan Djokic-Sumarac <brk@bonsai.cool>
|
||||||
cache-headers = true
|
|
||||||
copy-to = Sent
|
copy-to = Sent
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# title=foot
|
# title=foot
|
||||||
# locked-title=no
|
# locked-title=no
|
||||||
|
|
||||||
font = 0xProto Nerd Font:size=12,Noto Sans CJK JP:size=12
|
font = 0xProto Nerd Font:size=12,FiraCode Nerd Font:size=12,Noto Sans CJK JP:size=12
|
||||||
|
|
||||||
# font-bold=<bold variant of regular font>
|
# font-bold=<bold variant of regular font>
|
||||||
# font-italic=<italic variant of regular font>
|
# font-italic=<italic variant of regular font>
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
|
|
||||||
decoration {
|
|
||||||
rounding=12
|
|
||||||
multisample_edges=1
|
|
||||||
|
|
||||||
active_opacity=1
|
|
||||||
inactive_opacity=1
|
|
||||||
|
|
||||||
blur=1
|
|
||||||
blur_size=3
|
|
||||||
blur_passes=1
|
|
||||||
blur_new_optimizations = true
|
|
||||||
|
|
||||||
drop_shadow=true
|
|
||||||
shadow_range=20
|
|
||||||
shadow_render_power = 3
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bezier=slow,0,0.85,0.3,1
|
|
||||||
bezier=overshot,0.7,0.6,0.1,1.1
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled=1
|
|
||||||
|
|
||||||
bezier=overshot,0.13,0.99,0.29,1.1
|
|
||||||
animation=windows,1,4,overshot,slide
|
|
||||||
animation=border,1,10,default
|
|
||||||
animation=fade,1,10,default
|
|
||||||
animation=workspaces,1,6,overshot,slide
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
|
|
||||||
input {
|
|
||||||
kb_layout=us,rs
|
|
||||||
kb_variant=,yz
|
|
||||||
kb_options=caps:escape,grp:menu_toggle
|
|
||||||
|
|
||||||
follow_mouse=1
|
|
||||||
|
|
||||||
numlock_by_default=1
|
|
||||||
repeat_rate=50
|
|
||||||
repeat_delay=300
|
|
||||||
}
|
|
||||||
|
|
||||||
general {
|
|
||||||
sensitivity=2
|
|
||||||
|
|
||||||
gaps_in=10
|
|
||||||
gaps_out=20
|
|
||||||
|
|
||||||
layout=master
|
|
||||||
|
|
||||||
col.active_border = rgba(ee111166) rgba(11ee1166) rgba(1111ee66) 45deg
|
|
||||||
col.inactive_border = rgba(00000000)
|
|
||||||
border_size=3
|
|
||||||
no_border_on_floating=true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gestures {
|
|
||||||
workspace_swipe=true
|
|
||||||
workspace_swipe_fingers=3
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
misc {
|
|
||||||
enable_swallow=1
|
|
||||||
swallow_regex=^(alacritty)$
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
# some nice mouse binds
|
|
||||||
bindm=SUPER,mouse:272,movewindow
|
|
||||||
bindm=SUPER,mouse:273,resizewindow
|
|
||||||
|
|
||||||
# example binds
|
|
||||||
bind=SUPER,Return,exec,footclient
|
|
||||||
bind=SUPER,W,exec,chromium --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy --ozone-platform-hint=auto
|
|
||||||
bind=SUPER,Escape,exec,powermenu-v
|
|
||||||
bind=SUPER,Q,killactive,
|
|
||||||
bind=SUPER,Space,fullscreen,1
|
|
||||||
bind=SUPERSHIFT,Space,fullscreen,0
|
|
||||||
bind=SUPERSHIFT,Q,exit,
|
|
||||||
bind=SUPER,E,exec,footclient --title nmtuiterm -e nmtuidelay
|
|
||||||
bind=SUPER,R,exec,footclient --title lfterm -e lf "$(cat .cache/lfdir)"
|
|
||||||
bind=SUPER,F,togglefloating,
|
|
||||||
bind=SUPER,D,exec,tmenu
|
|
||||||
bind=SUPERSHIFT,D,exec,tmenu -d
|
|
||||||
|
|
||||||
|
|
||||||
bind=SUPER,left,movefocus,l
|
|
||||||
bind=SUPER,right,movefocus,r
|
|
||||||
bind=SUPER,up,movefocus,u
|
|
||||||
bind=SUPER,down,movefocus,d
|
|
||||||
|
|
||||||
bind=SUPER,1,workspace,1
|
|
||||||
bind=SUPER,2,workspace,2
|
|
||||||
bind=SUPER,3,workspace,3
|
|
||||||
bind=SUPER,4,workspace,4
|
|
||||||
bind=SUPER,5,workspace,5
|
|
||||||
bind=SUPER,6,workspace,6
|
|
||||||
|
|
||||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
|
||||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
|
||||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
|
||||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
|
||||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
|
||||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
|
||||||
|
|
||||||
bind=SUPER,mouse_down,workspace,e+1
|
|
||||||
bind=SUPER,mouse_up,workspace,e-1
|
|
||||||
|
|
||||||
bind=SUPERSHIFT,R,forcerendererreload
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind=SUPER,S,togglespecialworkspace
|
|
||||||
bind=SUPERSHIFT,S,movetoworkspace,special
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind=SUPER,Tab,cyclenext
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind=,F4,exec,pamixer --toggle-mute
|
|
||||||
bind=,F2,exec,volctl --down
|
|
||||||
bind=,F3,exec,volctl --up
|
|
||||||
bind=,F7,exec,lightctl --down
|
|
||||||
bind=,F8,exec,lightctl --up
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bind=,XF86AudioPlay,exec,playerctl play-pause
|
|
||||||
bind=,XF86Audiostop,exec,playerctl stop
|
|
||||||
bind=,XF86AudioNext,exec,playerctl next
|
|
||||||
bind=,XF86AudioPrev,exec,playerctl previous
|
|
|
@ -1,3 +0,0 @@
|
||||||
monitor=eDP-1,1920x1080@60,1920x0,1
|
|
||||||
monitor=HDMI-A-1,1920x1080@165,0x0,1
|
|
||||||
monitor=HDMI-A-1,transform,0
|
|
|
@ -1,6 +0,0 @@
|
||||||
windowrule=float,title:^(pulsemixerterm)$
|
|
||||||
windowrule=float,title:^(nmtuiterm)$
|
|
||||||
windowrule=workspace special silent,title:^(scratchpad)$
|
|
||||||
windowrule=workspace 2,class:^(chromium)$
|
|
||||||
windowrule=workspace 6,class:^(ferdium)$
|
|
||||||
windowrule=workspace 4,class:^(org.pwmt.zathura)$
|
|
|
@ -1,25 +0,0 @@
|
||||||
|
|
||||||
# WALLPAPER
|
|
||||||
|
|
||||||
#exec-once=mpvpaper -vs -o "no-audio loop --speed=0.4" eDP-1 ~/.config/wall.webm
|
|
||||||
#exec-once=swaybg -m fill -i hdd/wallpapers/berk/berserker_armor_devouring.png
|
|
||||||
|
|
||||||
|
|
||||||
# STUFF
|
|
||||||
|
|
||||||
exec-once=/usr/bin/polkit-dumb-agent
|
|
||||||
exec-once=hyprpaper
|
|
||||||
exec-once=salut
|
|
||||||
exec-once=mkfifo /tmp/wobpipe
|
|
||||||
exec-once=tail -f /tmp/wobpipe | wob
|
|
||||||
|
|
||||||
exec-once=waybar
|
|
||||||
exec-once=tuf-tray
|
|
||||||
|
|
||||||
exec-once=foot --server
|
|
||||||
# WM go brrr?
|
|
||||||
|
|
||||||
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
|
|
||||||
|
|
||||||
exec-once=rgb-borders
|
|
176
.config/hypr/hhh
176
.config/hypr/hhh
|
@ -1,176 +0,0 @@
|
||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
|
||||||
monitor = HDMI-A-1, 2560x1440@75, 0x0, 1,# transform,1
|
|
||||||
monitor = DP-1, 1920x1080@165, 2560x0, 1
|
|
||||||
monitor = eDP-1, 1920x1080@120, 3480x0, 1
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
|
||||||
|
|
||||||
# Execute your favorite apps at launch
|
|
||||||
# exec-once = waybar & hyprpaper & firefox
|
|
||||||
|
|
||||||
# Source a file (multi-file configs)
|
|
||||||
# source = ~/.config/hypr/myColors.conf
|
|
||||||
|
|
||||||
# Set programs that you use
|
|
||||||
$terminal = kitty
|
|
||||||
$fileManager = dolphin
|
|
||||||
$menu = wofi --show drun
|
|
||||||
|
|
||||||
# Some default env vars.
|
|
||||||
env = XCURSOR_SIZE,24
|
|
||||||
env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that
|
|
||||||
|
|
||||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
|
||||||
input {
|
|
||||||
kb_layout = us
|
|
||||||
kb_variant =
|
|
||||||
kb_model =
|
|
||||||
kb_options =
|
|
||||||
kb_rules =
|
|
||||||
|
|
||||||
follow_mouse = 1
|
|
||||||
|
|
||||||
touchpad {
|
|
||||||
natural_scroll = no
|
|
||||||
}
|
|
||||||
|
|
||||||
sensitivity = 0 # -1.0 to 1.0, 0 means no modification.
|
|
||||||
}
|
|
||||||
|
|
||||||
general {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
|
|
||||||
gaps_in = 5
|
|
||||||
gaps_out = 20
|
|
||||||
border_size = 2
|
|
||||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
|
||||||
col.inactive_border = rgba(595959aa)
|
|
||||||
|
|
||||||
layout = dwindle
|
|
||||||
|
|
||||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
|
||||||
allow_tearing = false
|
|
||||||
}
|
|
||||||
|
|
||||||
decoration {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
|
|
||||||
rounding = 10
|
|
||||||
|
|
||||||
blur {
|
|
||||||
enabled = true
|
|
||||||
size = 3
|
|
||||||
passes = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
drop_shadow = yes
|
|
||||||
shadow_range = 4
|
|
||||||
shadow_render_power = 3
|
|
||||||
col.shadow = rgba(1a1a1aee)
|
|
||||||
}
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled = yes
|
|
||||||
|
|
||||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
|
||||||
|
|
||||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
|
||||||
|
|
||||||
animation = windows, 1, 7, myBezier
|
|
||||||
animation = windowsOut, 1, 7, default, popin 80%
|
|
||||||
animation = border, 1, 10, default
|
|
||||||
animation = borderangle, 1, 8, default
|
|
||||||
animation = fade, 1, 7, default
|
|
||||||
animation = workspaces, 1, 6, default
|
|
||||||
}
|
|
||||||
|
|
||||||
dwindle {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
|
||||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
|
||||||
preserve_split = yes # you probably want this
|
|
||||||
}
|
|
||||||
|
|
||||||
master {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
|
||||||
new_is_master = true
|
|
||||||
}
|
|
||||||
|
|
||||||
gestures {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
workspace_swipe = off
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
|
||||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
|
||||||
}
|
|
||||||
|
|
||||||
# Example per-device config
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
|
||||||
device {
|
|
||||||
name = epic-mouse-v1
|
|
||||||
sensitivity = -0.5
|
|
||||||
}
|
|
||||||
|
|
||||||
# Example windowrule v1
|
|
||||||
# windowrule = float, ^(kitty)$
|
|
||||||
# Example windowrule v2
|
|
||||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
|
||||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
|
||||||
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
|
||||||
$mainMod = SUPER
|
|
||||||
|
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
|
||||||
bind = $mainMod, Q, exec, $terminal
|
|
||||||
bind = $mainMod, C, killactive,
|
|
||||||
bind = $mainMod, M, exit,
|
|
||||||
bind = $mainMod, E, exec, $fileManager
|
|
||||||
bind = $mainMod, V, togglefloating,
|
|
||||||
bind = $mainMod, R, exec, $menu
|
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
|
||||||
bind = $mainMod, J, togglesplit, # dwindle
|
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
|
||||||
bind = $mainMod, left, movefocus, l
|
|
||||||
bind = $mainMod, right, movefocus, r
|
|
||||||
bind = $mainMod, up, movefocus, u
|
|
||||||
bind = $mainMod, down, movefocus, d
|
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
|
||||||
bind = $mainMod, 1, workspace, 1
|
|
||||||
bind = $mainMod, 2, workspace, 2
|
|
||||||
bind = $mainMod, 3, workspace, 3
|
|
||||||
bind = $mainMod, 4, workspace, 4
|
|
||||||
bind = $mainMod, 5, workspace, 5
|
|
||||||
bind = $mainMod, 6, workspace, 6
|
|
||||||
bind = $mainMod, 7, workspace, 7
|
|
||||||
bind = $mainMod, 8, workspace, 8
|
|
||||||
bind = $mainMod, 9, workspace, 9
|
|
||||||
bind = $mainMod, 0, workspace, 10
|
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
|
||||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
|
||||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
|
||||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
|
||||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
|
||||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
|
||||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
|
||||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
|
||||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
|
||||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
|
||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
|
||||||
|
|
||||||
# Example special workspace (scratchpad)
|
|
||||||
bind = $mainMod, S, togglespecialworkspace, magic
|
|
||||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
|
||||||
|
|
||||||
# Scroll through existing workspaces with mainMod + scroll
|
|
||||||
bind = $mainMod, mouse_down, workspace, e+1
|
|
||||||
bind = $mainMod, mouse_up, workspace, e-1
|
|
||||||
|
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
|
|
@ -8,7 +8,7 @@ general {
|
||||||
|
|
||||||
listener {
|
listener {
|
||||||
timeout = 300 # in seconds
|
timeout = 300 # in seconds
|
||||||
on-timeout = hyprlock # command to run when timeout has passed
|
on-timeout = syslock # command to run when timeout has passed
|
||||||
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
on-resume = notify-send "Welcome back!" # command to run when activity is detected after timeout has fired.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,28 +4,26 @@
|
||||||
# who cares? \ o Y o /
|
# who cares? \ o Y o /
|
||||||
# put the \ \__ __/ /
|
# put the \ \__ __/ /
|
||||||
# tranny on the '.__'-'__.'
|
# tranny on the '.__'-'__.'
|
||||||
# choping block '''
|
# chopping block '''
|
||||||
|
|
||||||
|
|
||||||
source = ~/.config/hypr/monitors.conf
|
source = ~/.config/hypr/slices/monitors.conf
|
||||||
source = ~/.config/hypr/general.conf
|
source = ~/.config/hypr/slices/general.conf
|
||||||
source = ~/.config/hypr/decoration.conf
|
source = ~/.config/hypr/slices/decoration.conf
|
||||||
source = ~/.config/hypr/rules.conf
|
source = ~/.config/hypr/slices/rules.conf
|
||||||
source = ~/.config/hypr/keybinds.conf
|
source = ~/.config/hypr/slices/keybinds.conf
|
||||||
source = ~/.config/hypr/workspaces.conf
|
source = ~/.config/hypr/slices/workspaces.conf
|
||||||
source = ~/.config/hypr/env.conf
|
source = ~/.config/hypr/slices/env.conf
|
||||||
|
|
||||||
|
|
||||||
# STARTUP
|
# STARTUP
|
||||||
|
|
||||||
exec-once = dunst
|
exec-once = dunst
|
||||||
exec-once = foot --server
|
exec-once = foot --server
|
||||||
exec-once = avizo-service
|
exec-once = syshud
|
||||||
exec-once = avizo-client
|
|
||||||
exec-once = waybar
|
exec-once = waybar
|
||||||
exec-once = hyprpaper
|
# exec-once = wl-paste --watch cliphist store
|
||||||
exec-once = ~/bin/xdg-portal-hyprland
|
|
||||||
exec-once = wl-paste --watch cliphist store
|
|
||||||
exec-once = hypridle
|
|
||||||
exec-once = wayland-pipewire-idle-inhibit
|
exec-once = wayland-pipewire-idle-inhibit
|
||||||
|
exec-once = hyprsunset -t 5000
|
||||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
exec-once = ~/bin/xdg-portal-hyprland
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
preload = /home/brk/pics/guts_stars.jpg
|
preload = /home/brk/pics/lll/japan_sunset.png
|
||||||
|
|
||||||
wallpaper = eDP-1,/home/brk/pics/guts_stars.jpg
|
wallpaper = ,/home/brk/pics/lll/japan_sunset.png
|
||||||
wallpaper = DP-1,/home/brk/pics/guts_stars.jpg
|
|
||||||
wallpaper = HDMI-A-1,/home/brk/pics/guts_stars.jpg
|
|
||||||
|
|
||||||
ipc = off
|
ipc = off
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
# MONITOR LAYOUT
|
|
||||||
#
|
|
||||||
# monitor = HDMI-A-1, 2560x1440@75, 0x0, 1.0, bitdepth, 10
|
|
||||||
# monitor = DP-1, disabled
|
|
||||||
# monitor = eDP-1, disabled
|
|
||||||
#
|
|
||||||
|
|
||||||
# monitor=HDMI-A-1,2560x1440@75,1920x0,1.0,bitdepth,10
|
|
||||||
# monitor=eDP-1,1920x1080@120,0x0,1.0,bitdepth,10
|
|
||||||
# monitor=DP-1,1920x1080@165,4480x0,1.0,bitdepth,10
|
|
||||||
|
|
||||||
# monitor = eDP-1, 1920x1080@120, 0x0, 1.0, bitdepth, 10
|
|
||||||
# monitor = HDMI-A-1, 2560x1440@75, 1920x0, 1.0
|
|
||||||
# monitor = DP-1, 1920x1080@165, 4480x0, 1.0, bitdepth, 10
|
|
||||||
|
|
||||||
monitor = eDP-1, disabled
|
|
||||||
monitor = HDMI-A-1, 2560x1440@75, 0x0, 1.0
|
|
||||||
monitor = DP-1, 1920x1080@165, 2560x0, 1.0, bitdepth, 10
|
|
||||||
|
|
||||||
#monitor = HDMI-A-1, disabled # 1920x1080@60, 0x0, 1
|
|
||||||
#monitor = eDP-1, disabled
|
|
||||||
#monitor = HDMI-A-1, 3840x2160@60, 0x0, 1
|
|
||||||
#monitor = eDP-1, 1920x1080@120, 3840x0, 1
|
|
|
@ -1,62 +0,0 @@
|
||||||
# RULES
|
|
||||||
|
|
||||||
|
|
||||||
windowrule=float,title:^(iwgtk)$
|
|
||||||
windowrule=center,title:^(iwgtk)$
|
|
||||||
windowrule=size 45% 60%,title:^(iwgtk)$
|
|
||||||
|
|
||||||
|
|
||||||
windowrule=float,title:^(Torrent Options)$
|
|
||||||
windowrule=center,title:^(Torrent Options)$
|
|
||||||
windowrule=size 45% 60%,title:^(Torrent Options)$
|
|
||||||
|
|
||||||
|
|
||||||
windowrule=float,title:^(Picture-in-Picture)$
|
|
||||||
windowrule=center,title:^(Picture-in-Picture)$
|
|
||||||
windowrule=size 60% 60%,title:^(Picture-in-Picture)$
|
|
||||||
|
|
||||||
windowrule=float,title:^(connterm)$
|
|
||||||
windowrule=center,title:^(connterm)$
|
|
||||||
windowrule=size 45% 60%,title:^(connterm)$
|
|
||||||
|
|
||||||
|
|
||||||
windowrule=float,title:^(blueterm)$
|
|
||||||
windowrule=center,title:^(blueterm)$
|
|
||||||
windowrule=size 45% 60%,title:^(blueterm)$
|
|
||||||
|
|
||||||
|
|
||||||
windowrule=float,title:^(btoppy)$
|
|
||||||
windowrule=center,title:^(btoppy)$
|
|
||||||
windowrule=size 75% 65%,title:^(btoppy)$
|
|
||||||
|
|
||||||
windowrule=float,class:^(steam)$
|
|
||||||
windowrule=center,class:^(steam)$
|
|
||||||
windowrule=size 95% 90%,class:^(steam)$
|
|
||||||
|
|
||||||
windowrule=float,title:^(pavucontrol)$
|
|
||||||
windowrule=center,title:^(pavucontrol)$
|
|
||||||
windowrule=size 30% 60%,title:^(pavucontrol)$
|
|
||||||
|
|
||||||
windowrule=workspace special silent,title:^(scratchpad)$
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
windowrule = float, file_progress
|
|
||||||
windowrule = float, confirm
|
|
||||||
windowrule = float, dialog
|
|
||||||
windowrule = float, download
|
|
||||||
windowrule = float, notification
|
|
||||||
windowrule = float, error
|
|
||||||
windowrule = float, splash
|
|
||||||
windowrule = float, confirmreset
|
|
||||||
windowrule = float, title:Open File
|
|
||||||
windowrule = float, title:branchdialog
|
|
||||||
windowrule = float, Lxappearance
|
|
||||||
windowrule = float, Rofi
|
|
||||||
windowrule = float, pavucontrol
|
|
||||||
windowrule = animation none,Rofi
|
|
||||||
|
|
||||||
layerrule = blur, fuzzel
|
|
||||||
layerrule = blur, waybar
|
|
||||||
layerrule = blur, avizo
|
|
|
@ -1,21 +0,0 @@
|
||||||
bind=SUPER,1,workspace,1
|
|
||||||
bind=SUPER,2,workspace,2
|
|
||||||
bind=SUPER,3,workspace,3
|
|
||||||
bind=SUPER,4,workspace,4
|
|
||||||
bind=SUPER,5,workspace,5
|
|
||||||
bind=SUPER,6,workspace,6
|
|
||||||
bind=SUPER,7,workspace,7
|
|
||||||
bind=SUPER,8,workspace,8
|
|
||||||
bind=SUPER,9,workspace,9
|
|
||||||
bind=SUPER,0,workspace,10
|
|
||||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
|
||||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
|
||||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
|
||||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
|
||||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
|
||||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
|
||||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
|
||||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
|
||||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
|
||||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
bind=SUPER,1,split-workspace,1
|
|
||||||
bind=SUPER,2,split-workspace,2
|
|
||||||
bind=SUPER,3,split-workspace,3
|
|
||||||
bind=SUPER,4,split-workspace,4
|
|
||||||
bind=SUPER,5,split-workspace,5
|
|
||||||
bind=SUPER,6,split-workspace,6
|
|
||||||
bind=SUPER,7,split-workspace,7
|
|
||||||
bind=SUPER,8,split-workspace,8
|
|
||||||
bind=SUPER,9,split-workspace,9
|
|
||||||
bind=SUPER,0,split-workspace,10
|
|
||||||
bind=SUPERSHIFT,1,split-movetoworkspace,1
|
|
||||||
bind=SUPERSHIFT,2,split-movetoworkspace,2
|
|
||||||
bind=SUPERSHIFT,3,split-movetoworkspace,3
|
|
||||||
bind=SUPERSHIFT,4,split-movetoworkspace,4
|
|
||||||
bind=SUPERSHIFT,5,split-movetoworkspace,5
|
|
||||||
bind=SUPERSHIFT,6,split-movetoworkspace,6
|
|
||||||
bind=SUPERSHIFT,7,split-movetoworkspace,7
|
|
||||||
bind=SUPERSHIFT,8,split-movetoworkspace,8
|
|
||||||
bind=SUPERSHIFT,9,split-movetoworkspace,9
|
|
||||||
bind=SUPERSHIFT,0,split-movetoworkspace,10
|
|
|
@ -1,16 +1,8 @@
|
||||||
# DECORATION
|
# DECORATION
|
||||||
|
|
||||||
decoration {
|
decoration {
|
||||||
|
|
||||||
active_opacity = 1
|
|
||||||
inactive_opacity = 1
|
|
||||||
rounding = 0
|
|
||||||
|
|
||||||
blur {
|
blur {
|
||||||
enabled = false
|
enabled = false
|
||||||
new_optimizations = true
|
|
||||||
xray = false
|
|
||||||
passes = 3
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
env = XDG_CURRENT_DESKTOP, Hyprland
|
env = XDG_CURRENT_DESKTOP, Hyprland
|
||||||
env = XDG_SESSION_TYPE, wayland
|
env = XDG_SESSION_TYPE, wayland
|
||||||
env = XDG_SESSION_DESKTOP, Hyprland
|
env = XDG_SESSION_DESKTOP, Hyprland
|
||||||
exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
# exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
|
||||||
env = LIBVA_DRIVER_NAME, nvidia
|
env = LIBVA_DRIVER_NAME, nvidia
|
||||||
env = __GLX_VENDOR_LIBRARY_NAME, nvidia
|
env = __GLX_VENDOR_LIBRARY_NAME, nvidia
|
||||||
|
@ -28,3 +28,8 @@ env = BROWSER, chromium
|
||||||
env = TERM, footclient
|
env = TERM, footclient
|
||||||
env = EDITOR, nvim
|
env = EDITOR, nvim
|
||||||
env = _JAVA_AWT_WM_NONREPARENTING, 1
|
env = _JAVA_AWT_WM_NONREPARENTING, 1
|
||||||
|
|
||||||
|
env = NVD_BACKEND, direct
|
||||||
|
env = ELECTRON_OZONE_PLATFORM_HINT, wayland
|
||||||
|
|
||||||
|
env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card0
|
|
@ -4,7 +4,7 @@
|
||||||
input {
|
input {
|
||||||
kb_layout = us,rs
|
kb_layout = us,rs
|
||||||
kb_variant = ,yz
|
kb_variant = ,yz
|
||||||
kb_options = caps:escape,grp:menu_toggle
|
kb_options = caps:escape,grp:win_space_toggle
|
||||||
|
|
||||||
follow_mouse = 1
|
follow_mouse = 1
|
||||||
|
|
||||||
|
@ -21,24 +21,31 @@ input {
|
||||||
tap-and-drag = true
|
tap-and-drag = true
|
||||||
disable_while_typing = true
|
disable_while_typing = true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$LAPTOP_KB_ENABLED = true
|
||||||
|
device {
|
||||||
|
name = at-translated-set-2-keyboard
|
||||||
|
enabled = $LAPTOP_KB_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor {
|
cursor {
|
||||||
allow_dumb_copy = true
|
use_cpu_buffer = true
|
||||||
}
|
}
|
||||||
|
|
||||||
general {
|
general {
|
||||||
col.inactive_border = 0xff45475a
|
col.inactive_border = 0xff45475a
|
||||||
col.active_border = rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg
|
col.active_border = rgba(cba6f7ff) rgba(89b4faff) rgba(94e2d5ff) 10deg
|
||||||
|
|
||||||
|
|
||||||
gaps_in = 7
|
gaps_in = 7
|
||||||
gaps_out = 15
|
gaps_out = 14
|
||||||
|
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
border_size = 0
|
border_size = 0
|
||||||
|
resize_on_border = true
|
||||||
|
|
||||||
|
no_border_on_floating = true
|
||||||
|
allow_tearing = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,20 +56,14 @@ gestures {
|
||||||
|
|
||||||
|
|
||||||
misc {
|
misc {
|
||||||
vfr = true
|
|
||||||
vrr = 1
|
vrr = 1
|
||||||
swallow_regex = ^(kitty)$
|
swallow_regex = ^(Alacritty|kitty|footclient|com.mitchellh.ghostty)$
|
||||||
enable_swallow = 1
|
enable_swallow = 1
|
||||||
disable_hyprland_logo = true
|
disable_hyprland_logo = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
enabled = true
|
||||||
master {
|
|
||||||
no_gaps_when_only = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dwindle {
|
|
||||||
no_gaps_when_only = false
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
# KEYBINDS
|
# KEYBINDS
|
||||||
|
$terminal = footclient
|
||||||
bind = SUPER, N, exec, neovide -- -c "Telescope oldfiles"
|
$browser = brave
|
||||||
|
|
||||||
bind = SUPER, Q, killactive
|
bind = SUPER, Q, killactive
|
||||||
bind = SUPER, Space, fullscreen, 1
|
bind = CTRL, Space, fullscreen, 1
|
||||||
bind = SUPERSHIFT, Space, fullscreen, 0
|
bind = CTRLSHIFT, Space, fullscreen, 0
|
||||||
bind = SUPERSHIFT, Q, exit
|
bind = SUPERSHIFT, Q, exit
|
||||||
bind = SUPER, F, fakefullscreen
|
|
||||||
bind = SUPERSHIFT, F, togglefloating
|
bind = SUPERSHIFT, F, togglefloating
|
||||||
bind = SUPER, Return, exec, footclient
|
bind = SUPER, Return, exec, $terminal
|
||||||
bind = SUPER, W, exec, firefox-nightly
|
bind = SUPER, W, exec, $browser
|
||||||
bind = SUPER, R, exec, footclient -e yazi
|
bind = SUPER, R, exec, $terminal -e yazi
|
||||||
bind = SUPER, D, exec, fuzzel
|
bind = SUPER, D, exec, fuzzel
|
||||||
bind = SUPER, L, exec, hyprlock
|
|
||||||
bind = SUPER, V, exec, clippy
|
bind = SUPER, V, exec, clippy
|
||||||
bind = SUPER, B, exec, killall -SIGUSR1 waybar
|
bind = SUPER, B, exec, killall -SIGUSR1 waybar
|
||||||
bind = SUPERSHIFT, B, exec, killall -SIGUSR2 waybar
|
bind = SUPERSHIFT, B, exec, killall -SIGUSR2 waybar
|
||||||
bind = CTRLSHIFT, Escape, exec, footclient --title btoppy -e btop
|
bind = CTRLSHIFT, Escape, exec, $terminal --title=btoppy -e btop
|
||||||
|
bind = SUPER, P, exec, $terminal --title=pulsemixer -e pulsemixer
|
||||||
|
bind = SUPER, End, exec, syspower
|
||||||
bind = SUPER, E, exec, iwgtk
|
bind = SUPER, E, exec, iwgtk
|
||||||
bind = SUPER, C, exec, /usr/bin/discord --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland
|
bind = SUPER, C, exec, /usr/bin/discord --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland
|
||||||
bind = SUPERSHIFT, E, exec, footclient --title blueterm -e bluetuith
|
bind = SUPERSHIFT, E, exec, $terminal --title=blueterm -e bluetuith
|
||||||
|
|
||||||
|
|
||||||
bind = SUPER, S, exec, grimblast copy area
|
bind = SUPER, S, exec, grimblast copy area
|
||||||
|
@ -31,10 +31,10 @@ bind = SUPERCTRL, 2, focusmonitor, HDMI-A-1
|
||||||
bind = SUPERCTRL, 3, focusmonitor, DP-1
|
bind = SUPERCTRL, 3, focusmonitor, DP-1
|
||||||
|
|
||||||
|
|
||||||
bind=SUPER,h,movefocus,l
|
bind = SUPER, H, movefocus, l
|
||||||
bind=SUPER,l,movefocus,r
|
bind = SUPER, L, movefocus, r
|
||||||
bind=SUPER,k,movefocus,u
|
bind = SUPER, K, movefocus, u
|
||||||
bind=SUPER,j,movefocus,d
|
bind = SUPER, , movefocus, d
|
||||||
|
|
||||||
|
|
||||||
|
|
19
.config/hypr/slices/monitors.conf
Normal file
19
.config/hypr/slices/monitors.conf
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# MONITOR LAYOUT
|
||||||
|
|
||||||
|
bindl = , switch:on:[Lid Switch], exec, hyprctl keyword monitor "eDP-1, disable"
|
||||||
|
bindl = , switch:off:[Lid Switch], exec, hyprctl keyword monitor "eDP-1, preffered, auto, 1"
|
||||||
|
|
||||||
|
# ON OFF OFF
|
||||||
|
# monitor = eDP-1, preffered, auto, 1
|
||||||
|
# monitor = HDMI-A-1, disabled
|
||||||
|
# monitor = DP-1, disabled
|
||||||
|
|
||||||
|
# ON ON ON
|
||||||
|
monitor = HDMI-A-1, 2560x1440@75, 0x0, 1
|
||||||
|
monitor = eDP-1, preffered, auto-left, 1
|
||||||
|
monitor = DP-1, 1920x1080@165, auto-right, 1
|
||||||
|
|
||||||
|
# OFF ON ON
|
||||||
|
# monitor = eDP-1, disabled
|
||||||
|
# monitor = HDMI-A-1, 2560x1440@75, auto, 1
|
||||||
|
# monitor = DP-1, 1920x1080@165, auto-right, 1
|
67
.config/hypr/slices/rules.conf
Normal file
67
.config/hypr/slices/rules.conf
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
# RULES
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float,title:iwgtk
|
||||||
|
windowrulev2=center,title:iwgtk
|
||||||
|
windowrulev2=size 45% 60%,title:iwgtk
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float, title:pulsemixer
|
||||||
|
windowrulev2=center, title:pulsemixer
|
||||||
|
windowrulev2=size 45% 60%, title:pulsemixer
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float,title:Torrent Options
|
||||||
|
windowrulev2=center,title:Torrent Options
|
||||||
|
windowrulev2=size 45% 60%,title:Torrent Options
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float,title:Picture-in-Picture
|
||||||
|
windowrulev2=center,title:Picture-in-Picture
|
||||||
|
windowrulev2=size 60% 60%,title:Picture-in-Picture
|
||||||
|
|
||||||
|
windowrulev2=float,title:connterm
|
||||||
|
windowrulev2=center,title:connterm
|
||||||
|
windowrulev2=size 45% 60%,title:connterm
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float,title:blueterm
|
||||||
|
windowrulev2=center,title:blueterm
|
||||||
|
windowrulev2=size 45% 60%,title:blueterm
|
||||||
|
|
||||||
|
|
||||||
|
windowrulev2=float,title:btoppy
|
||||||
|
windowrulev2=center,title:btoppy
|
||||||
|
windowrulev2=size 75% 65%,title:btoppy
|
||||||
|
|
||||||
|
windowrulev2=float,class:steam
|
||||||
|
windowrulev2=center,class:steam
|
||||||
|
windowrulev2=size 95% 90%,class:steam
|
||||||
|
|
||||||
|
windowrulev2=float,title:pavucontrol
|
||||||
|
windowrulev2=center,title:pavucontrol
|
||||||
|
windowrulev2=size 30% 60%,title:pavucontrol
|
||||||
|
|
||||||
|
windowrulev2=workspace special silent,title:scratchpad
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
windowrule = float, file_progress
|
||||||
|
windowrule = float, confirm
|
||||||
|
windowrule = float, dialog
|
||||||
|
windowrule = float, download
|
||||||
|
windowrule = float, notification
|
||||||
|
windowrule = float, error
|
||||||
|
windowrule = float, splash
|
||||||
|
windowrule = float, confirmreset
|
||||||
|
windowrule = float, title:Open File
|
||||||
|
windowrule = float, title:branchdialog
|
||||||
|
windowrule = float, Lxappearance
|
||||||
|
windowrule = float, Rofi
|
||||||
|
windowrule = float, pavucontrol
|
||||||
|
windowrule = animation none,Rofi
|
||||||
|
|
||||||
|
layerrule = blur, fuzzel
|
||||||
|
layerrule = blur, waybar
|
||||||
|
layerrule = blur, avizo
|
|
@ -1,5 +1,12 @@
|
||||||
# Workspace stuff
|
# Workspace stuff
|
||||||
|
|
||||||
|
workspace = w[tv1], gapsout:0, gapsin:0
|
||||||
|
workspace = f[1], gapsout:0, gapsin:0
|
||||||
|
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||||
|
windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
|
||||||
|
windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
|
||||||
|
windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
|
||||||
|
|
||||||
|
|
||||||
# workspace = 1, monitor:HDMI-1-A, default:true
|
# workspace = 1, monitor:HDMI-1-A, default:true
|
||||||
# workspace = 2, monitor:HDMI-1-A
|
# workspace = 2, monitor:HDMI-1-A
|
|
@ -1,21 +0,0 @@
|
||||||
bind=SUPER,1,workspace,1
|
|
||||||
bind=SUPER,2,workspace,2
|
|
||||||
bind=SUPER,3,workspace,3
|
|
||||||
bind=SUPER,4,workspace,4
|
|
||||||
bind=SUPER,5,workspace,5
|
|
||||||
bind=SUPER,6,workspace,6
|
|
||||||
bind=SUPER,7,workspace,7
|
|
||||||
bind=SUPER,8,workspace,8
|
|
||||||
bind=SUPER,9,workspace,9
|
|
||||||
bind=SUPER,0,workspace,10
|
|
||||||
bind=SUPERSHIFT,1,movetoworkspace,1
|
|
||||||
bind=SUPERSHIFT,2,movetoworkspace,2
|
|
||||||
bind=SUPERSHIFT,3,movetoworkspace,3
|
|
||||||
bind=SUPERSHIFT,4,movetoworkspace,4
|
|
||||||
bind=SUPERSHIFT,5,movetoworkspace,5
|
|
||||||
bind=SUPERSHIFT,6,movetoworkspace,6
|
|
||||||
bind=SUPERSHIFT,7,movetoworkspace,7
|
|
||||||
bind=SUPERSHIFT,8,movetoworkspace,8
|
|
||||||
bind=SUPERSHIFT,9,movetoworkspace,9
|
|
||||||
bind=SUPERSHIFT,0,movetoworkspace,10
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# vim: syntax=config
|
# vim: syntax=config
|
||||||
|
sub-auto=fuzzy
|
||||||
|
sub-file-paths=**
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# General #
|
# General #
|
||||||
|
@ -17,7 +18,7 @@ use-filedir-conf # look for additional config files in th
|
||||||
autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen
|
autofit-larger=100%x95% # resize window in case it's larger than W%xH% of the screen
|
||||||
cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen
|
cursor-autohide-fs-only # don't autohide the cursor in window mode, only fullscreen
|
||||||
input-media-keys=no # enable/disable OSX media keys
|
input-media-keys=no # enable/disable OSX media keys
|
||||||
cursor-autohide=yes
|
cursor-autohide=1
|
||||||
force-seekable=yes
|
force-seekable=yes
|
||||||
|
|
||||||
screenshot-format=png
|
screenshot-format=png
|
||||||
|
@ -41,9 +42,9 @@ ytdl-format=bestvideo[height<=?1080][fps<=?30][vcodec!=?vp9][protocol!=http_dash
|
||||||
# Cache #
|
# Cache #
|
||||||
#########
|
#########
|
||||||
|
|
||||||
cache=no
|
cache=yes
|
||||||
demuxer-max-bytes=3GiB
|
demuxer-max-bytes=1GiB
|
||||||
demuxer-max-back-bytes=2GiB
|
demuxer-max-back-bytes=1GiB
|
||||||
|
|
||||||
|
|
||||||
#############
|
#############
|
||||||
|
@ -51,7 +52,7 @@ demuxer-max-back-bytes=2GiB
|
||||||
#############
|
#############
|
||||||
|
|
||||||
osd-level=1 # enable osd and display --osd-status-msg on interaction
|
osd-level=1 # enable osd and display --osd-status-msg on interaction
|
||||||
osd-duration=2500 # hide the osd after x ms
|
osd-duration=250 # hide the osd after x ms
|
||||||
osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}'
|
osd-status-msg='${time-pos} / ${duration}${?percent-pos: (${percent-pos}%)}${?frame-drop-count:${!frame-drop-count==0: Dropped: ${frame-drop-count}}}\n${?chapter:Chapter: ${chapter}}'
|
||||||
|
|
||||||
osd-font='Source Sans Pro'
|
osd-font='Source Sans Pro'
|
||||||
|
@ -81,7 +82,7 @@ sub-file-paths-append=subtitles
|
||||||
|
|
||||||
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
|
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
|
||||||
sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases)
|
sub-fix-timing=no # do not try to fix gaps (which might make it worse in some cases)
|
||||||
sub-ass-force-style=Kerning=yes # allows you to override style parameters of ASS scripts
|
sub-ass-style-overrides=Kerning=yes # allows you to override style parameters of ASS scripts
|
||||||
sub-use-margins
|
sub-use-margins
|
||||||
sub-ass-force-margins
|
sub-ass-force-margins
|
||||||
|
|
||||||
|
@ -129,7 +130,7 @@ tscale=oversample # [sharp] oversample <-> linear (triangle
|
||||||
# "yes" is currently bugged: https://github.com/mpv-player/mpv/issues/4988
|
# "yes" is currently bugged: https://github.com/mpv-player/mpv/issues/4988
|
||||||
#icc-profile-auto
|
#icc-profile-auto
|
||||||
#icc-force-contrast=1000 # silence some warning because the profile is bad
|
#icc-force-contrast=1000 # silence some warning because the profile is bad
|
||||||
hwdec=no
|
hwdec=yes
|
||||||
|
|
||||||
[high-quality]
|
[high-quality]
|
||||||
profile-desc=cond:is_high(get('width', 0), get('height', 0), get('estimated-vf-fps', 0))
|
profile-desc=cond:is_high(get('width', 0), get('height', 0), get('estimated-vf-fps', 0))
|
||||||
|
|
280
.config/mpv/scripts/fuzzydir.lua
Normal file
280
.config/mpv/scripts/fuzzydir.lua
Normal file
|
@ -0,0 +1,280 @@
|
||||||
|
--[[
|
||||||
|
fuzzydir / by sibwaf / https://github.com/sibwaf/mpv-scripts
|
||||||
|
|
||||||
|
Allows using "**" wildcards in sub-file-paths and audio-file-paths
|
||||||
|
so you don't have to specify all the possible directory names.
|
||||||
|
|
||||||
|
Basically, allows you to do this and never have the need to edit any paths ever again:
|
||||||
|
audio-file-paths = **
|
||||||
|
sub-file-paths = **
|
||||||
|
|
||||||
|
MIT license - do whatever you want, but I'm not responsible for any possible problems.
|
||||||
|
Please keep the URL to the original repository. Thanks!
|
||||||
|
]]
|
||||||
|
|
||||||
|
--[[
|
||||||
|
Configuration:
|
||||||
|
|
||||||
|
# enabled
|
||||||
|
|
||||||
|
Determines whether the script is enabled or not
|
||||||
|
|
||||||
|
# max_search_depth
|
||||||
|
|
||||||
|
Determines the max depth of recursive search, should be >= 1
|
||||||
|
|
||||||
|
Examples for "sub-file-paths = **":
|
||||||
|
"max_search_depth = 1" => mpv will be able to find [xyz.ass, subs/xyz.ass]
|
||||||
|
"max_search_depth = 2" => mpv will be able to find [xyz.ass, subs/xyz.ass, subs/moresubs/xyz.ass]
|
||||||
|
|
||||||
|
Please be careful when setting this value too high as it can result in awful performance or even stack overflow
|
||||||
|
|
||||||
|
|
||||||
|
# discovery_threshold
|
||||||
|
|
||||||
|
fuzzydir will skip paths which contain more than discovery_threshold directories in them
|
||||||
|
|
||||||
|
This is done to keep at least some garbage from getting into *-file-paths properties in case of big collections:
|
||||||
|
- dir1 <- will be ignored on opening video.mp4 as it's probably unrelated to the file
|
||||||
|
- ...
|
||||||
|
- dir999 <- will be ignored
|
||||||
|
- video.mp4
|
||||||
|
|
||||||
|
Use 0 to disable this behavior completely
|
||||||
|
|
||||||
|
|
||||||
|
# use_powershell
|
||||||
|
|
||||||
|
fuzzydir will use PowerShell to traverse directories when it's available
|
||||||
|
|
||||||
|
Can be faster in some cases, but can also be significantly slower
|
||||||
|
]]
|
||||||
|
|
||||||
|
local msg = require 'mp.msg'
|
||||||
|
local utils = require 'mp.utils'
|
||||||
|
local options = require 'mp.options'
|
||||||
|
|
||||||
|
o = {
|
||||||
|
enabled = true,
|
||||||
|
max_search_depth = 3,
|
||||||
|
discovery_threshold = 10,
|
||||||
|
use_powershell = false,
|
||||||
|
}
|
||||||
|
options.read_options(o, _, function() end)
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
|
local default_audio_paths = mp.get_property_native("options/audio-file-paths")
|
||||||
|
local default_sub_paths = mp.get_property_native("options/sub-file-paths")
|
||||||
|
|
||||||
|
function foreach(list, action)
|
||||||
|
for _, item in pairs(list) do
|
||||||
|
action(item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function starts_with(str, prefix)
|
||||||
|
return string.sub(str, 1, string.len(prefix)) == prefix
|
||||||
|
end
|
||||||
|
|
||||||
|
function ends_with(str, suffix)
|
||||||
|
return suffix == "" or string.sub(str, -string.len(suffix)) == suffix
|
||||||
|
end
|
||||||
|
|
||||||
|
function add_all(to, from)
|
||||||
|
for index, element in pairs(from) do
|
||||||
|
table.insert(to, element)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function contains(t, e)
|
||||||
|
for index, element in pairs(t) do
|
||||||
|
if element == e then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function normalize(path)
|
||||||
|
if path == "." then
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
if starts_with(path, "./") or starts_with(path, ".\\") then
|
||||||
|
path = string.sub(path, 3, -1)
|
||||||
|
end
|
||||||
|
if ends_with(path, "/") or ends_with(path, "\\") then
|
||||||
|
path = string.sub(path, 1, -2)
|
||||||
|
end
|
||||||
|
|
||||||
|
return path
|
||||||
|
end
|
||||||
|
|
||||||
|
function call_command(command)
|
||||||
|
local command_string = ""
|
||||||
|
for _, part in pairs(command) do
|
||||||
|
command_string = command_string .. part .. " "
|
||||||
|
end
|
||||||
|
|
||||||
|
msg.trace("Calling external command:", command_string)
|
||||||
|
|
||||||
|
local process = mp.command_native({
|
||||||
|
name = "subprocess",
|
||||||
|
playback_only = false,
|
||||||
|
capture_stdout = true,
|
||||||
|
capture_stderr = true,
|
||||||
|
args = command,
|
||||||
|
})
|
||||||
|
|
||||||
|
if process.status ~= 0 then
|
||||||
|
msg.verbose("External command failed with status " .. process.status .. ": " .. command_string)
|
||||||
|
if process.stderr ~= "" then
|
||||||
|
msg.debug(process.stderr)
|
||||||
|
end
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local result = {}
|
||||||
|
for line in string.gmatch(process.stdout, "([^\r\n]+)") do
|
||||||
|
table.insert(result, line)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Platform-dependent optimization
|
||||||
|
|
||||||
|
local powershell_version = nil
|
||||||
|
if o.use_powershell then
|
||||||
|
powershell_version = call_command({
|
||||||
|
"powershell",
|
||||||
|
"-NoProfile",
|
||||||
|
"-Command",
|
||||||
|
"$Host.Version.Major",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
if powershell_version ~= nil then
|
||||||
|
powershell_version = tonumber(powershell_version[1])
|
||||||
|
end
|
||||||
|
if powershell_version == nil then
|
||||||
|
powershell_version = -1
|
||||||
|
end
|
||||||
|
msg.debug("PowerShell version", powershell_version)
|
||||||
|
|
||||||
|
function fast_readdir(path)
|
||||||
|
if powershell_version >= 3 then
|
||||||
|
msg.trace("Scanning", path, "with PowerShell")
|
||||||
|
result = call_command({
|
||||||
|
"powershell",
|
||||||
|
"-NoProfile",
|
||||||
|
"-Command",
|
||||||
|
[[
|
||||||
|
$dirs = Get-ChildItem -LiteralPath ]] .. string.format("%q", path) .. [[ -Directory
|
||||||
|
foreach($dir in $dirs) {
|
||||||
|
$u8clip = [System.Text.Encoding]::UTF8.GetBytes($dir.Name)
|
||||||
|
[Console]::OpenStandardOutput().Write($u8clip, 0, $u8clip.Length)
|
||||||
|
Write-Host ""
|
||||||
|
} ]],
|
||||||
|
})
|
||||||
|
msg.trace("Finished scanning", path, "with PowerShell")
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
msg.trace("Scanning", path, "with default readdir")
|
||||||
|
result = utils.readdir(path, "dirs")
|
||||||
|
msg.trace("Finished scanning", path, "with default readdir")
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Platform-dependent optimization end
|
||||||
|
|
||||||
|
function traverse(search_path, current_path, level, cache)
|
||||||
|
local full_path = utils.join_path(search_path, current_path)
|
||||||
|
|
||||||
|
if level > o.max_search_depth then
|
||||||
|
msg.trace("Traversed too deep, skipping scan for", full_path)
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if cache[full_path] ~= nil then
|
||||||
|
msg.trace("Returning from cache for", full_path)
|
||||||
|
return cache[full_path]
|
||||||
|
end
|
||||||
|
|
||||||
|
local result = {}
|
||||||
|
|
||||||
|
local discovered_paths = fast_readdir(full_path)
|
||||||
|
if discovered_paths == nil then
|
||||||
|
-- noop
|
||||||
|
msg.debug("Unable to scan " .. full_path .. ", skipping")
|
||||||
|
elseif o.discovery_threshold > 0 and #discovered_paths > o.discovery_threshold then
|
||||||
|
-- noop
|
||||||
|
msg.debug("Too many directories in " .. full_path .. ", skipping")
|
||||||
|
else
|
||||||
|
for _, discovered_path in pairs(discovered_paths) do
|
||||||
|
local new_path = utils.join_path(current_path, discovered_path)
|
||||||
|
|
||||||
|
table.insert(result, new_path)
|
||||||
|
add_all(result, traverse(search_path, new_path, level + 1, cache))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
cache[full_path] = result
|
||||||
|
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function explode(raw_paths, search_path, cache)
|
||||||
|
local result = {}
|
||||||
|
for _, raw_path in pairs(raw_paths) do
|
||||||
|
local parent, leftover = utils.split_path(raw_path)
|
||||||
|
if leftover == "**" then
|
||||||
|
msg.trace("Expanding wildcard for", raw_path)
|
||||||
|
table.insert(result, parent)
|
||||||
|
add_all(result, traverse(search_path, parent, 1, cache))
|
||||||
|
else
|
||||||
|
msg.trace("Path", raw_path, "doesn't have a wildcard, keeping as-is")
|
||||||
|
table.insert(result, raw_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local normalized = {}
|
||||||
|
for index, path in pairs(result) do
|
||||||
|
local normalized_path = normalize(path)
|
||||||
|
if not contains(normalized, normalized_path) and normalized_path ~= "" then
|
||||||
|
table.insert(normalized, normalized_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return normalized
|
||||||
|
end
|
||||||
|
|
||||||
|
function explode_all()
|
||||||
|
if not o.enabled then return end
|
||||||
|
msg.debug("max_search_depth = ".. o.max_search_depth .. ", discovery_threshold = " .. o.discovery_threshold)
|
||||||
|
|
||||||
|
local video_path = mp.get_property("path")
|
||||||
|
local search_path, _ = utils.split_path(video_path)
|
||||||
|
msg.debug("search_path = " .. search_path)
|
||||||
|
|
||||||
|
local cache = {}
|
||||||
|
|
||||||
|
foreach(default_audio_paths, function(it) msg.debug("audio-file-paths:", it) end)
|
||||||
|
local audio_paths = explode(default_audio_paths, search_path, cache)
|
||||||
|
foreach(audio_paths, function(it) msg.debug("Adding to audio-file-paths:", it) end)
|
||||||
|
mp.set_property_native("options/audio-file-paths", audio_paths)
|
||||||
|
|
||||||
|
msg.verbose("Done expanding audio-file-paths")
|
||||||
|
|
||||||
|
foreach(default_sub_paths, function(it) msg.debug("sub-file-paths:", it) end)
|
||||||
|
local sub_paths = explode(default_sub_paths, search_path, cache)
|
||||||
|
foreach(sub_paths, function(it) msg.debug("Adding to sub-file-paths:", it) end)
|
||||||
|
mp.set_property_native("options/sub-file-paths", sub_paths)
|
||||||
|
|
||||||
|
msg.verbose("Done expanding sub-file-paths")
|
||||||
|
|
||||||
|
msg.debug("Done expanding paths")
|
||||||
|
end
|
||||||
|
|
||||||
|
mp.add_hook("on_load", 50, explode_all)
|
124
.config/mpv/scripts/sub-fonts-dir-auto.lua
Normal file
124
.config/mpv/scripts/sub-fonts-dir-auto.lua
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
--[[
|
||||||
|
|
||||||
|
Automatically look for a fonts directory to use with `sub-fonts-dir`.
|
||||||
|
|
||||||
|
This mpv Lua script will automatically use the `sub-fonts-dir` option (to
|
||||||
|
override the default `~~/fonts` location) if it find a `Fonts` directory
|
||||||
|
alongside the currently playing file. (The name of the directory is
|
||||||
|
matched case-insensitively.)
|
||||||
|
|
||||||
|
**NOTE:** The `sub-fonts-dir` option has been submitted as part of [PR
|
||||||
|
#9856](https://github.com/mpv-player/mpv/pull/9856). Until it is merged
|
||||||
|
upstream, you will have to download and compile the [mpv
|
||||||
|
source](https://github.com/mpv-player/mpv) yourself.
|
||||||
|
|
||||||
|
|
||||||
|
USAGE:
|
||||||
|
|
||||||
|
Simply drop this script in your scripts configuration directory (usually
|
||||||
|
`~/.config/mpv/scripts/`).
|
||||||
|
|
||||||
|
|
||||||
|
REQUIREMENTS:
|
||||||
|
|
||||||
|
This script requires a version of mpv that includes the `sub-fonts-dir`
|
||||||
|
option.
|
||||||
|
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
|
||||||
|
- Any `--sub-fonts-dir` option passed on the command-line will override
|
||||||
|
this script.
|
||||||
|
|
||||||
|
- When going through a playlist, `sub-fonts-dir` will be dynamically
|
||||||
|
updated for each individual file.
|
||||||
|
|
||||||
|
- This script will output some additional information on higher verbosity
|
||||||
|
levels (`-v`). To increase the verbosity for this script only, use
|
||||||
|
`--msg-level=sub_fonts_dir_auto=v` (or `=debug` for more output).
|
||||||
|
|
||||||
|
|
||||||
|
AUTHOR:
|
||||||
|
|
||||||
|
Frédéric Brière (fbriere@fbriere.net)
|
||||||
|
|
||||||
|
Licensed under the GNU General Public License, version 2 or later.
|
||||||
|
|
||||||
|
--]]
|
||||||
|
|
||||||
|
|
||||||
|
local utils = require 'mp.utils'
|
||||||
|
local msg = require 'mp.msg'
|
||||||
|
-- msg.trace() was added in 0.28.0 -- define it ourselves if it's missing
|
||||||
|
if msg.trace == nil then
|
||||||
|
msg.trace = function(...) return mp.log("trace", ...) end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Directory name we are looking for (case-insensitive)
|
||||||
|
local FONTS_DIR_NAME = "Fonts"
|
||||||
|
-- Option name that we want to set
|
||||||
|
local OPTION_NAME = "sub-fonts-dir"
|
||||||
|
-- Make sure this option is available in this version of mpv
|
||||||
|
do
|
||||||
|
local _, err = mp.get_property(OPTION_NAME)
|
||||||
|
if err then
|
||||||
|
msg.error(string.format("This version of mpv does not support the %s option", OPTION_NAME))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Whether a path is a directory
|
||||||
|
local function isdir(path)
|
||||||
|
return utils.readdir(path .. "/.") ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set an option's value for this file, without overriding the command-line
|
||||||
|
local function set_option(name, value)
|
||||||
|
if not mp.get_property_bool(string.format("option-info/%s/set-from-commandline", name)) then
|
||||||
|
msg.verbose(string.format("Setting %s to %q", name, value))
|
||||||
|
mp.set_property(string.format("file-local-options/%s", name), value)
|
||||||
|
else
|
||||||
|
msg.debug(string.format("Option %s was set on command-line -- leaving it as-is", name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Find a "Fonts" directory under a single path
|
||||||
|
local function find_fonts_dir(path)
|
||||||
|
local entries = utils.readdir(path, "dirs")
|
||||||
|
if entries == nil then
|
||||||
|
-- mpv will throw an error message soon enough, no need to intervene
|
||||||
|
return
|
||||||
|
end
|
||||||
|
msg.trace(string.format("Iterating over directories under %q", path))
|
||||||
|
for _, entry in ipairs(entries) do
|
||||||
|
msg.trace("Candidate directory:", entry)
|
||||||
|
if entry:lower() == FONTS_DIR_NAME:lower() then
|
||||||
|
msg.trace("Match found")
|
||||||
|
return utils.join_path(path, entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
msg.trace("No match found")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- "on_load" hook callback for when a file is about to be loaded.
|
||||||
|
local function on_load()
|
||||||
|
local path = mp.get_property("path")
|
||||||
|
if isdir(path) then
|
||||||
|
msg.debug("Playing 'file' is actually a directory -- skipping")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local path_dir = utils.split_path(path)
|
||||||
|
-- Cosmetic nitpicking: That trailing "/" just looks annoying to me
|
||||||
|
path_dir = path_dir:gsub("(.)/+$", "%1")
|
||||||
|
|
||||||
|
msg.debug(string.format("Searching %q for fonts directory", path_dir))
|
||||||
|
local fonts_dir = find_fonts_dir(path_dir)
|
||||||
|
if fonts_dir then
|
||||||
|
msg.debug("Found fonts directory:", fonts_dir)
|
||||||
|
set_option(OPTION_NAME, fonts_dir)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
mp.add_hook("on_load", 50, on_load)
|
12
.config/msmtp/config
Normal file
12
.config/msmtp/config
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
defaults
|
||||||
|
tls on
|
||||||
|
|
||||||
|
account brk
|
||||||
|
auth on
|
||||||
|
host mail.bonsai.cool
|
||||||
|
port 587
|
||||||
|
user brk
|
||||||
|
from brk@bonsai.cool
|
||||||
|
passwordeval gopass show -o bonsai/mail
|
||||||
|
|
||||||
|
account default: brk
|
|
@ -1 +1 @@
|
||||||
Subproject commit ca0d4faec420a99de6141fccbdcad0ecc085d1ff
|
Subproject commit 1776bc8edcc5cc6da250133e9153d1229f75d610
|
|
@ -11,6 +11,7 @@ settings:
|
||||||
colors.webpage.darkmode.enabled:
|
colors.webpage.darkmode.enabled:
|
||||||
global: false
|
global: false
|
||||||
content.notifications.enabled:
|
content.notifications.enabled:
|
||||||
|
https://www.facebook.com: true
|
||||||
https://www.netflix.com: true
|
https://www.netflix.com: true
|
||||||
content.register_protocol_handler:
|
content.register_protocol_handler:
|
||||||
https://mail.proton.me#mailto=%25s: true
|
https://mail.proton.me#mailto=%25s: true
|
||||||
|
|
|
@ -193,8 +193,8 @@ c.tabs.show = 'multiple'
|
||||||
|
|
||||||
# Setting default page for when opening new tabs or new windows with
|
# Setting default page for when opening new tabs or new windows with
|
||||||
# commands like :open -t and :open -w .
|
# commands like :open -t and :open -w .
|
||||||
c.url.default_page = 'google.com'
|
c.url.default_page = 'bonsai.cool'
|
||||||
c.url.start_pages = 'google.com'
|
c.url.start_pages = 'bonsai.cool'
|
||||||
|
|
||||||
# Search engines which can be used via the address bar. Maps a search
|
# Search engines which can be used via the address bar. Maps a search
|
||||||
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
|
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
|
||||||
|
@ -214,10 +214,10 @@ c.url.start_pages = 'google.com'
|
||||||
# the search engine name to the search term, e.g. `:open google
|
# the search engine name to the search term, e.g. `:open google
|
||||||
# qutebrowser`.
|
# qutebrowser`.
|
||||||
# Type: Dict
|
# Type: Dict
|
||||||
c.url.searchengines = {'DEFAULT': 'https://google.com/search?q={}',
|
c.url.searchengines = {'DEFAULT': "https://search.bonsai.cool/search?q={}",
|
||||||
'am': 'https://www.amazon.com/s?k={}',
|
'am': 'https://www.amazon.com/s?k={}',
|
||||||
'aw': 'https://wiki.archlinux.org/?search={}',
|
'aw': 'https://wiki.archlinux.org/?search={}',
|
||||||
'goog': 'https://www.google.com/search?q={}',
|
'g': 'https://www.google.com/search?q={}',
|
||||||
'hoog': 'https://hoogle.haskell.org/?hoogle={}',
|
'hoog': 'https://hoogle.haskell.org/?hoogle={}',
|
||||||
're': 'https://www.reddit.com/r/{}',
|
're': 'https://www.reddit.com/r/{}',
|
||||||
'ub': 'https://www.urbandictionary.com/define.php?term={}',
|
'ub': 'https://www.urbandictionary.com/define.php?term={}',
|
||||||
|
|
|
@ -1,91 +1,31 @@
|
||||||
{
|
[{
|
||||||
"height": 35,
|
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"output": "HDMI-A-1",
|
||||||
"modules-left": ["hyprland/workspaces"],
|
"width": 10,
|
||||||
"modules-center": [],
|
"position": "left",
|
||||||
"modules-right": ["cpu", "temperature", "battery", "network", "clock"],
|
"reload_style_on_change": true,
|
||||||
|
"modules-left": ["cpu", "temperature", ],
|
||||||
|
"modules-center": ["hyprland/workspaces"],
|
||||||
|
"modules-right": ["network", "clock"],
|
||||||
|
|
||||||
"wlr/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"disable-scroll": true,
|
|
||||||
"active-only": false,
|
"active-only": false,
|
||||||
"all-outputs": false,
|
|
||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
|
||||||
"on-scroll-down": "hyprctl dispatch workspace e-1",
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"custom/bar" : {
|
|
||||||
"interval" : "once",
|
|
||||||
"format" : "▊",
|
|
||||||
"tooltip" : false
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"custom/launcher": {
|
|
||||||
"interval": "once",
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/pkgs": {
|
|
||||||
"interval": "once",
|
|
||||||
"format": "{}",
|
|
||||||
"exec" : "hyprctl version -j | jq '.tag' -r | cut -d'-' -f1"
|
|
||||||
},
|
|
||||||
|
|
||||||
"custom/audio_idle_inhibitor": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"exec": "sway-audio-idle-inhibit --dry-print-both-waybar",
|
|
||||||
"exec-if": "which sway-audio-idle-inhibit",
|
|
||||||
"return-type": "json",
|
|
||||||
"format-icons": {
|
|
||||||
"output": "",
|
|
||||||
"input": "",
|
|
||||||
"output-input": " ",
|
|
||||||
"none": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"custom/cpu": {
|
|
||||||
"interval": "once",
|
|
||||||
"format": "",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"interval": 1,
|
"interval": 1,
|
||||||
"format": " \t{usage}%",
|
"format": "{usage}%",
|
||||||
"max-length": 10,
|
"max-length": 4,
|
||||||
"min-length": 4
|
"min-length": 4
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"custom/temp": {
|
|
||||||
"interval": "once",
|
|
||||||
"format": "",
|
|
||||||
},
|
|
||||||
|
|
||||||
"temperature": {
|
"temperature": {
|
||||||
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
|
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
|
||||||
"input-filename": "temp1_input",
|
"input-filename": "temp1_input",
|
||||||
"format": "{temperatureC}°C",
|
"format": "{temperatureC}°",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"backlight": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
|
||||||
"on-scroll-up": "light -A 1",
|
|
||||||
"on-scroll-down": "light -U 1"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"format-bluetooth": "{icon} {volume}% {format_source}",
|
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||||
|
@ -104,24 +44,10 @@
|
||||||
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"custom/net": {
|
|
||||||
"interval": "once",
|
|
||||||
"format": "",
|
|
||||||
},
|
|
||||||
|
|
||||||
"network": {
|
"network": {
|
||||||
"format-wifi": " {essid}",
|
"format-wifi": " ",
|
||||||
"format-ethernet": " ",
|
"format-ethernet": " ",
|
||||||
"format-disconnected": " ",
|
"format-disconnected": " ",
|
||||||
"max-length" : 20
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"custom/bat" : {
|
|
||||||
"interval" : "once",
|
|
||||||
"format" : ""
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"battery": {
|
"battery": {
|
||||||
|
@ -133,24 +59,175 @@
|
||||||
"critical": 15
|
"critical": 15
|
||||||
},
|
},
|
||||||
"max-length": 20,
|
"max-length": 20,
|
||||||
"format": " {icon} {capacity}%",
|
"format": "{icon}",
|
||||||
"format-warning": " {icon} {capacity}%",
|
"format-warning": "",
|
||||||
"format-critical": " {icon} {capacity}%",
|
"format-critical": "",
|
||||||
"format-charging": " {icon} {capacity}%",
|
"format-charging": "",
|
||||||
"format-plugged": " {icon} {capacity}%",
|
"format-plugged": "",
|
||||||
"format-alt": " {icon} {time} ",
|
"format-alt": " {icon} {time} ",
|
||||||
"format-full": "",
|
"format-full": "",
|
||||||
"format-icons": [" ", " ", " ", " ", " "]
|
"format-icons": ["", "", "", "", ""]
|
||||||
},
|
|
||||||
|
|
||||||
"custom/clock" : {
|
|
||||||
"format" : ""
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"clock": {
|
"clock": {
|
||||||
"format-alt": "<span> </span> {:%a %b %d}",
|
"format-alt": "<span> </span> {:%a %b %d}",
|
||||||
"format": " {:%H:%M}"
|
"format": "{:%H\n%M}"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"output": "DP-1",
|
||||||
|
"width": 10,
|
||||||
|
"position": "right",
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"modules-left": ["cpu", "temperature", ],
|
||||||
|
"modules-center": ["hyprland/workspaces"],
|
||||||
|
"modules-right": ["network", "clock"],
|
||||||
|
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"active-only": false,
|
||||||
|
"on-click": "activate",
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": "{usage}%",
|
||||||
|
"max-length": 4,
|
||||||
|
"min-length": 4
|
||||||
|
},
|
||||||
|
|
||||||
|
"temperature": {
|
||||||
|
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
|
||||||
|
"input-filename": "temp1_input",
|
||||||
|
"format": "{temperatureC}°",
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth-muted": "x {icon} {format_source}",
|
||||||
|
"format-muted": "婢",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click-right": "pavucontrol",
|
||||||
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||||
|
},
|
||||||
|
|
||||||
|
"network": {
|
||||||
|
"format-wifi": " ",
|
||||||
|
"format-ethernet": " ",
|
||||||
|
"format-disconnected": " ",
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"bat": "BAT0",
|
||||||
|
"adapter": "ADP0",
|
||||||
|
"interval": 60,
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"max-length": 20,
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-warning": "",
|
||||||
|
"format-critical": "",
|
||||||
|
"format-charging": "",
|
||||||
|
"format-plugged": "",
|
||||||
|
"format-alt": " {icon} {time} ",
|
||||||
|
"format-full": "",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
}
|
"clock": {
|
||||||
|
"format-alt": "<span> </span> {:%a %b %d}",
|
||||||
|
"format": "{:%H\n%M}"
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"output": "eDP-1",
|
||||||
|
"width": 10,
|
||||||
|
"position": "left",
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"modules-left": ["cpu", "temperature", ],
|
||||||
|
"modules-center": ["hyprland/workspaces"],
|
||||||
|
"modules-right": ["battery", "network", "clock"],
|
||||||
|
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"active-only": false,
|
||||||
|
"on-click": "activate",
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": "{usage}%",
|
||||||
|
"max-length": 4,
|
||||||
|
"min-length": 4
|
||||||
|
},
|
||||||
|
|
||||||
|
"temperature": {
|
||||||
|
"hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon",
|
||||||
|
"input-filename": "temp1_input",
|
||||||
|
"format": "{temperatureC}°",
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth-muted": "x {icon} {format_source}",
|
||||||
|
"format-muted": "婢",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click-right": "pavucontrol",
|
||||||
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle"
|
||||||
|
},
|
||||||
|
|
||||||
|
"network": {
|
||||||
|
"format-wifi": " ",
|
||||||
|
"format-ethernet": " ",
|
||||||
|
"format-disconnected": " ",
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"bat": "BAT0",
|
||||||
|
"adapter": "ADP0",
|
||||||
|
"interval": 60,
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"max-length": 20,
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-warning": "",
|
||||||
|
"format-critical": "",
|
||||||
|
"format-charging": "",
|
||||||
|
"format-plugged": "",
|
||||||
|
"format-alt": " {icon} {time} ",
|
||||||
|
"format-full": "",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock": {
|
||||||
|
"format-alt": "<span> </span> {:%a %b %d}",
|
||||||
|
"format": "{:%H\n%M}"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
|
|
@ -3,34 +3,49 @@
|
||||||
/* margin: top right bottom left */
|
/* margin: top right bottom left */
|
||||||
/* Spacing outside the element */
|
/* Spacing outside the element */
|
||||||
|
|
||||||
/* padding: top right bottom left */
|
|
||||||
/* Spacing inside the element */
|
/* Spacing inside the element */
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: FiraCode Mono Nerd Font;
|
font-family: FiraCode Mono Nerd Font;
|
||||||
font-size: 15px;
|
font-size: 13px;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 2px 0px;
|
||||||
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio {
|
||||||
|
color: @crust;
|
||||||
|
font-family: FiraCode Mono Nerd Font;
|
||||||
|
font-size: 13px;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 4px;
|
||||||
|
padding: 6px 1px;
|
||||||
|
background: #1B1B1B;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: #0A0A0A;
|
background-color: #070707;
|
||||||
color: @text;
|
color: @text;
|
||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
transition-duration: 0.5s;
|
transition-duration: 0.5s;
|
||||||
border-radius: 0px;
|
|
||||||
transition-duration: .5s;
|
transition-duration: .5s;
|
||||||
margin: 16px 16px;
|
border-radius: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
color: #A9A1E1;
|
color: #A9A1E1;
|
||||||
background: #191919;
|
background: #1B1B1B;
|
||||||
border-radius: 8px;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 10px 5px 10px 5px;
|
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,183 +55,36 @@ window#waybar.hidden {
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
color: #A9A1E1;
|
color: #1B1B1B;
|
||||||
background: #141414;
|
background: #A9A1E1;
|
||||||
border-bottom: 2px solid #A9A1E1;
|
padding: 0px;
|
||||||
border-radius: 8px;
|
margin: 7px;
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 10px 5px 10px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-launcher,
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-dunst,
|
|
||||||
#custom-powermenu{
|
|
||||||
padding: 20px 20px;
|
|
||||||
margin: 7px 0px 10px 0px;
|
|
||||||
border-radius: 10px;
|
|
||||||
color: @crust;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#custom-audio_idle_inhibitor {
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
background-color: #C678DD;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#custom-launcher {
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
background-color: #C678DD;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-pkgs {
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 0px;
|
|
||||||
background-color: @joksi-bg;
|
|
||||||
color: #C678DD;
|
|
||||||
border-radius: 0px 10px 10px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-cpu {
|
|
||||||
background-color: #51AFEF;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#cpu {
|
||||||
background: #141414;
|
|
||||||
color: #51AFEF;
|
color: #51AFEF;
|
||||||
border-radius: 8px 0px 0px 8px;
|
|
||||||
border-bottom: 2px solid #51AFEF;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 10px 0px 10px 0px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-temp {
|
|
||||||
background: #141414;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#temperature {
|
#temperature {
|
||||||
background: #141414;
|
|
||||||
color: #51AFEF;
|
color: #51AFEF;
|
||||||
border-bottom: 2px solid #51AFEF;
|
|
||||||
border-radius: 0px 8px 8px 0px;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 10px 5px 10px 0px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
background-color: #CCCCCC;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#pulseaudio {
|
#pulseaudio {
|
||||||
background-color: @joksi-bg;
|
background-color: @joksi-bg;
|
||||||
color:#A9A1E1;
|
color: #A9A1E1;
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#custom-net {
|
|
||||||
background-color: #A9A1E1;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#network {
|
||||||
color: #A9A1E1;
|
color: #A9A1E1;
|
||||||
background: #141414;
|
|
||||||
border-bottom: 2px solid #A9A1E1;
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 0px 5px 0px 5px;
|
|
||||||
margin: 10px 5px 10px 5px;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#custom-bat {
|
|
||||||
background-color: #EC5F67;
|
|
||||||
color: @joksi-bg;
|
|
||||||
border-radius: 10px 0px 0px 10px;
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#battery {
|
#battery {
|
||||||
background-color: @joksi-bg;
|
background-color: @joksi-bg;
|
||||||
color: #EC5F67;
|
color: #EC5F67;
|
||||||
border-radius: 0px 10px 10px 0px;
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#custom-clock {
|
|
||||||
color: @joksi-bg;
|
|
||||||
background-color: #98BE65;
|
|
||||||
font-size: 20px;
|
|
||||||
border-bottom: 2px solid #98BE65;
|
|
||||||
border-radius: 0px;
|
|
||||||
padding: 0px 15px 0px 10px;
|
|
||||||
margin: 7px 0px 10px 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 10px 5px 10px 5px;
|
|
||||||
color: #98BE65;
|
color: #98BE65;
|
||||||
border-bottom: 2px solid #98BE65;
|
|
||||||
border-radius: 8px;
|
|
||||||
background: #141414;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,300 +0,0 @@
|
||||||
# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config.
|
|
||||||
# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas.
|
|
||||||
"$schema" = "https://yazi-rs.github.io/schemas/keymap.json"
|
|
||||||
|
|
||||||
[manager]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<Esc>" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" },
|
|
||||||
{ on = [ "q" ], exec = "quit", desc = "Exit the process" },
|
|
||||||
{ on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" },
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" },
|
|
||||||
{ on = [ "<C-z>" ], exec = "suspend", desc = "Suspend the process" },
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
{ on = [ "<S-Up>" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "<S-Down>" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
{ on = [ "<C-u>" ], exec = "arrow -50%", desc = "Move cursor up half page" },
|
|
||||||
{ on = [ "<C-d>" ], exec = "arrow 50%", desc = "Move cursor down half page" },
|
|
||||||
{ on = [ "<C-b>" ], exec = "arrow -100%", desc = "Move cursor up one page" },
|
|
||||||
{ on = [ "<C-f>" ], exec = "arrow 100%", desc = "Move cursor down one page" },
|
|
||||||
|
|
||||||
{ on = [ "<C-PageUp>" ], exec = "arrow -50%", desc = "Move cursor up half page" },
|
|
||||||
{ on = [ "<C-PageDown>" ], exec = "arrow 50%", desc = "Move cursor down half page" },
|
|
||||||
{ on = [ "<PageUp>" ], exec = "arrow -100%", desc = "Move cursor up one page" },
|
|
||||||
{ on = [ "<PageDown>" ], exec = "arrow 100%", desc = "Move cursor down one page" },
|
|
||||||
|
|
||||||
{ on = [ "h" ], exec = [ "escape --visual", "leave" ], desc = "Go back to the parent directory" },
|
|
||||||
{ on = [ "l" ], exec = [ "escape --visual", "enter" ], desc = "Enter the child directory" },
|
|
||||||
|
|
||||||
{ on = [ "H" ], exec = "back", desc = "Go back to the previous directory" },
|
|
||||||
{ on = [ "L" ], exec = "forward", desc = "Go forward to the next directory" },
|
|
||||||
|
|
||||||
{ on = [ "<A-k>" ], exec = "seek -5", desc = "Seek up 5 units in the preview" },
|
|
||||||
{ on = [ "<A-j>" ], exec = "seek 5", desc = "Seek down 5 units in the preview" },
|
|
||||||
{ on = [ "<A-PageUp>" ], exec = "seek -5", desc = "Seek up 5 units in the preview" },
|
|
||||||
{ on = [ "<A-PageDown>" ], exec = "seek 5", desc = "Seek down 5 units in the preview" },
|
|
||||||
|
|
||||||
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
{ on = [ "<Left>" ], exec = "leave", desc = "Go back to the parent directory" },
|
|
||||||
{ on = [ "<Right>" ], exec = "enter", desc = "Enter the child directory" },
|
|
||||||
|
|
||||||
{ on = [ "g", "g" ], exec = "arrow -99999999", desc = "Move cursor to the top" },
|
|
||||||
{ on = [ "G" ], exec = "arrow 99999999", desc = "Move cursor to the bottom" },
|
|
||||||
|
|
||||||
# Selection
|
|
||||||
{ on = [ "<Space>" ], exec = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" },
|
|
||||||
{ on = [ "v" ], exec = "visual_mode", desc = "Enter visual mode (selection mode)" },
|
|
||||||
{ on = [ "V" ], exec = "visual_mode --unset", desc = "Enter visual mode (unset mode)" },
|
|
||||||
{ on = [ "<C-a>" ], exec = "select_all --state=true", desc = "Select all files" },
|
|
||||||
{ on = [ "<C-r>" ], exec = "select_all --state=none", desc = "Inverse selection of all files" },
|
|
||||||
|
|
||||||
# Operation
|
|
||||||
{ on = [ "o" ], exec = [ "escape --visual", "open" ], desc = "Open the selected files" },
|
|
||||||
{ on = [ "O" ], exec = [ "escape --visual", "open --interactive" ], desc = "Open the selected files interactively" },
|
|
||||||
{ on = [ "<Enter>" ], exec = [ "escape --visual", "open" ], desc = "Open the selected files" },
|
|
||||||
{ on = [ "<C-Enter>" ], exec = [ "escape --visual", "open --interactive" ], desc = "Open the selected files interactively" },
|
|
||||||
{ on = [ "y" ], exec = [ "escape --visual", "yank" ], desc = "Copy the selected files" },
|
|
||||||
{ on = [ "Y" ], exec = "unyank", desc = "Cancel the yank status of files" },
|
|
||||||
{ on = [ "x" ], exec = [ "escape --visual", "yank --cut" ], desc = "Cut the selected files" },
|
|
||||||
{ on = [ "p" ], exec = "paste", desc = "Paste the files" },
|
|
||||||
{ on = [ "P" ], exec = "paste --force", desc = "Paste the files (overwrite if the destination exists)" },
|
|
||||||
{ on = [ "-" ], exec = "link", desc = "Symlink the absolute path of files" },
|
|
||||||
{ on = [ "_" ], exec = "link --relative", desc = "Symlink the relative path of files" },
|
|
||||||
{ on = [ "d" ], exec = [ "escape --visual", "remove --permanently" ], desc = "Permanently delete the files" },
|
|
||||||
{ on = [ "D" ], exec = [ "escape --visual", "remove --permanently" ], desc = "Permanently delete the files" },
|
|
||||||
{ on = [ "a" ], exec = "create", desc = "Create a file or directory (ends with / for directories)" },
|
|
||||||
{ on = [ "r" ], exec = [ "escape --visual", "rename --cursor=before_ext" ], desc = "Rename a file or directory" },
|
|
||||||
{ on = [ ";" ], exec = [ "escape --visual", "shell" ], desc = "Run a shell command" },
|
|
||||||
{ on = [ ":" ], exec = [ "escape --visual", "shell --block" ], desc = "Run a shell command (block the UI until the command finishes)" },
|
|
||||||
{ on = [ "." ], exec = "hidden toggle", desc = "Toggle the visibility of hidden files" },
|
|
||||||
{ on = [ "s" ], exec = "search fd", desc = "Search files by name using fd" },
|
|
||||||
{ on = [ "S" ], exec = "search rg", desc = "Search files by content using ripgrep" },
|
|
||||||
{ on = [ "<C-s>" ], exec = "search none", desc = "Cancel the ongoing search" },
|
|
||||||
{ on = [ "z" ], exec = "jump zoxide", desc = "Jump to a directory using zoxide" },
|
|
||||||
{ on = [ "Z" ], exec = "jump fzf", desc = "Jump to a directory, or reveal a file using fzf" },
|
|
||||||
|
|
||||||
# Linemode
|
|
||||||
{ on = [ "m", "s" ], exec = "linemode size", desc = "Set linemode to size" },
|
|
||||||
{ on = [ "m", "p" ], exec = "linemode permissions", desc = "Set linemode to permissions" },
|
|
||||||
{ on = [ "m", "m" ], exec = "linemode mtime", desc = "Set linemode to mtime" },
|
|
||||||
{ on = [ "m", "n" ], exec = "linemode none", desc = "Set linemode to none" },
|
|
||||||
|
|
||||||
# Copy
|
|
||||||
{ on = [ "c", "c" ], exec = [ "escape --visual", "copy path" ], desc = "Copy the absolute path" },
|
|
||||||
{ on = [ "c", "d" ], exec = [ "escape --visual", "copy dirname" ], desc = "Copy the path of the parent directory" },
|
|
||||||
{ on = [ "c", "f" ], exec = [ "escape --visual", "copy filename" ], desc = "Copy the name of the file" },
|
|
||||||
{ on = [ "c", "n" ], exec = [ "escape --visual", "copy name_without_ext" ], desc = "Copy the name of the file without the extension" },
|
|
||||||
|
|
||||||
# Filter
|
|
||||||
{ on = [ "f" ], exec = "filter --smart", desc = "Filter the files" },
|
|
||||||
|
|
||||||
# Find
|
|
||||||
{ on = [ "/" ], exec = "find --smart", desc = "Find next file" },
|
|
||||||
{ on = [ "?" ], exec = "find --previous --smart", desc = "Find previous file" },
|
|
||||||
{ on = [ "n" ], exec = "find_arrow", desc = "Go to next found file" },
|
|
||||||
{ on = [ "N" ], exec = "find_arrow --previous", desc = "Go to previous found file" },
|
|
||||||
|
|
||||||
# Sorting
|
|
||||||
{ on = [ ",", "m" ], exec = "sort modified --dir-first", desc = "Sort by modified time" },
|
|
||||||
{ on = [ ",", "M" ], exec = "sort modified --reverse --dir-first", desc = "Sort by modified time (reverse)" },
|
|
||||||
{ on = [ ",", "c" ], exec = "sort created --dir-first", desc = "Sort by created time" },
|
|
||||||
{ on = [ ",", "C" ], exec = "sort created --reverse --dir-first", desc = "Sort by created time (reverse)" },
|
|
||||||
{ on = [ ",", "e" ], exec = "sort extension --dir-first", desc = "Sort by extension" },
|
|
||||||
{ on = [ ",", "E" ], exec = "sort extension --reverse --dir-first", desc = "Sort by extension (reverse)" },
|
|
||||||
{ on = [ ",", "a" ], exec = "sort alphabetical --dir-first", desc = "Sort alphabetically" },
|
|
||||||
{ on = [ ",", "A" ], exec = "sort alphabetical --reverse --dir-first", desc = "Sort alphabetically (reverse)" },
|
|
||||||
{ on = [ ",", "n" ], exec = "sort natural --dir-first", desc = "Sort naturally" },
|
|
||||||
{ on = [ ",", "N" ], exec = "sort natural --reverse --dir-first", desc = "Sort naturally (reverse)" },
|
|
||||||
{ on = [ ",", "s" ], exec = "sort size --dir-first", desc = "Sort by size" },
|
|
||||||
{ on = [ ",", "S" ], exec = "sort size --reverse --dir-first", desc = "Sort by size (reverse)" },
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
{ on = [ "t" ], exec = "tab_create --current", desc = "Create a new tab using the current path" },
|
|
||||||
|
|
||||||
{ on = [ "1" ], exec = "tab_switch 0", desc = "Switch to the first tab" },
|
|
||||||
{ on = [ "2" ], exec = "tab_switch 1", desc = "Switch to the second tab" },
|
|
||||||
{ on = [ "3" ], exec = "tab_switch 2", desc = "Switch to the third tab" },
|
|
||||||
{ on = [ "4" ], exec = "tab_switch 3", desc = "Switch to the fourth tab" },
|
|
||||||
{ on = [ "5" ], exec = "tab_switch 4", desc = "Switch to the fifth tab" },
|
|
||||||
{ on = [ "6" ], exec = "tab_switch 5", desc = "Switch to the sixth tab" },
|
|
||||||
{ on = [ "7" ], exec = "tab_switch 6", desc = "Switch to the seventh tab" },
|
|
||||||
{ on = [ "8" ], exec = "tab_switch 7", desc = "Switch to the eighth tab" },
|
|
||||||
{ on = [ "9" ], exec = "tab_switch 8", desc = "Switch to the ninth tab" },
|
|
||||||
|
|
||||||
{ on = [ "[" ], exec = "tab_switch -1 --relative", desc = "Switch to the previous tab" },
|
|
||||||
{ on = [ "]" ], exec = "tab_switch 1 --relative", desc = "Switch to the next tab" },
|
|
||||||
|
|
||||||
{ on = [ "{" ], exec = "tab_swap -1", desc = "Swap the current tab with the previous tab" },
|
|
||||||
{ on = [ "}" ], exec = "tab_swap 1", desc = "Swap the current tab with the next tab" },
|
|
||||||
|
|
||||||
# Tasks
|
|
||||||
{ on = [ "w" ], exec = "tasks_show", desc = "Show the tasks manager" },
|
|
||||||
|
|
||||||
# Goto
|
|
||||||
{ on = [ "g", "h" ], exec = "cd ~", desc = "Go to the home directory" },
|
|
||||||
{ on = [ "g", "c" ], exec = "cd ~/.config", desc = "Go to the config directory" },
|
|
||||||
{ on = [ "g", "d" ], exec = "cd ~/Downloads", desc = "Go to the downloads directory" },
|
|
||||||
{ on = [ "g", "t" ], exec = "cd /tmp", desc = "Go to the temporary directory" },
|
|
||||||
{ on = [ "g", "<Space>" ], exec = "cd --interactive", desc = "Go to a directory interactively" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = [ "~" ], exec = "help", desc = "Open help" },
|
|
||||||
]
|
|
||||||
|
|
||||||
[tasks]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<Esc>" ], exec = "close", desc = "Hide the task manager" },
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Hide the task manager" },
|
|
||||||
{ on = [ "w" ], exec = "close", desc = "Hide the task manager" },
|
|
||||||
|
|
||||||
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "<Enter>" ], exec = "inspect", desc = "Inspect the task" },
|
|
||||||
{ on = [ "x" ], exec = "cancel", desc = "Cancel the task" },
|
|
||||||
|
|
||||||
{ on = [ "~" ], exec = "help", desc = "Open help" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[select]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel selection" },
|
|
||||||
{ on = [ "<Esc>" ], exec = "close", desc = "Cancel selection" },
|
|
||||||
{ on = [ "<Enter>" ], exec = "close --submit", desc = "Submit the selection" },
|
|
||||||
|
|
||||||
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "<S-Up>" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "<S-Down>" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
{ on = [ "~" ], exec = "help", desc = "Open help" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[input]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel input" },
|
|
||||||
{ on = [ "<Enter>" ], exec = "close --submit", desc = "Submit the input" },
|
|
||||||
{ on = [ "<Esc>" ], exec = "escape", desc = "Go back the normal mode, or cancel input" },
|
|
||||||
|
|
||||||
# Mode
|
|
||||||
{ on = [ "i" ], exec = "insert", desc = "Enter insert mode" },
|
|
||||||
{ on = [ "a" ], exec = "insert --append", desc = "Enter append mode" },
|
|
||||||
{ on = [ "I" ], exec = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" },
|
|
||||||
{ on = [ "A" ], exec = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" },
|
|
||||||
{ on = [ "v" ], exec = "visual", desc = "Enter visual mode" },
|
|
||||||
{ on = [ "V" ], exec = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" },
|
|
||||||
|
|
||||||
# Character-wise movement
|
|
||||||
{ on = [ "h" ], exec = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = [ "l" ], exec = "move 1", desc = "Move forward a character" },
|
|
||||||
{ on = [ "<Left>" ], exec = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = [ "<Right>" ], exec = "move 1", desc = "Move forward a character" },
|
|
||||||
{ on = [ "<C-b>" ], exec = "move -1", desc = "Move back a character" },
|
|
||||||
{ on = [ "<C-f>" ], exec = "move 1", desc = "Move forward a character" },
|
|
||||||
|
|
||||||
# Word-wise movement
|
|
||||||
{ on = [ "b" ], exec = "backward", desc = "Move back to the start of the current or previous word" },
|
|
||||||
{ on = [ "w" ], exec = "forward", desc = "Move forward to the start of the next word" },
|
|
||||||
{ on = [ "e" ], exec = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
|
|
||||||
{ on = [ "<A-b>" ], exec = "backward", desc = "Move back to the start of the current or previous word" },
|
|
||||||
{ on = [ "<A-f>" ], exec = "forward --end-of-word", desc = "Move forward to the end of the current or next word" },
|
|
||||||
|
|
||||||
# Line-wise movement
|
|
||||||
{ on = [ "0" ], exec = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = [ "$" ], exec = "move 999", desc = "Move to the EOL" },
|
|
||||||
{ on = [ "<C-a>" ], exec = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = [ "<C-e>" ], exec = "move 999", desc = "Move to the EOL" },
|
|
||||||
{ on = [ "<Home>" ], exec = "move -999", desc = "Move to the BOL" },
|
|
||||||
{ on = [ "<End>" ], exec = "move 999", desc = "Move to the EOL" },
|
|
||||||
|
|
||||||
# Delete
|
|
||||||
{ on = [ "<Backspace>" ], exec = "backspace", desc = "Delete the character before the cursor" },
|
|
||||||
{ on = [ "<Delete>" ], exec = "backspace --under", desc = "Delete the character under the cursor" },
|
|
||||||
{ on = [ "<C-h>" ], exec = "backspace", desc = "Delete the character before the cursor" },
|
|
||||||
{ on = [ "<C-d>" ], exec = "backspace --under", desc = "Delete the character under the cursor" },
|
|
||||||
|
|
||||||
# Kill
|
|
||||||
{ on = [ "<C-u>" ], exec = "kill bol", desc = "Kill backwards to the BOL" },
|
|
||||||
{ on = [ "<C-k>" ], exec = "kill eol", desc = "Kill forwards to the EOL" },
|
|
||||||
{ on = [ "<C-w>" ], exec = "kill backward", desc = "Kill backwards to the start of the current word" },
|
|
||||||
{ on = [ "<A-d>" ], exec = "kill forward", desc = "Kill forwards to the end of the current word" },
|
|
||||||
|
|
||||||
# Cut/Yank/Paste
|
|
||||||
{ on = [ "d" ], exec = "delete --cut", desc = "Cut the selected characters" },
|
|
||||||
{ on = [ "D" ], exec = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" },
|
|
||||||
{ on = [ "c" ], exec = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" },
|
|
||||||
{ on = [ "C" ], exec = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" },
|
|
||||||
{ on = [ "x" ], exec = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" },
|
|
||||||
{ on = [ "y" ], exec = "yank", desc = "Copy the selected characters" },
|
|
||||||
{ on = [ "p" ], exec = "paste", desc = "Paste the copied characters after the cursor" },
|
|
||||||
{ on = [ "P" ], exec = "paste --before", desc = "Paste the copied characters before the cursor" },
|
|
||||||
|
|
||||||
# Undo/Redo
|
|
||||||
{ on = [ "u" ], exec = "undo", desc = "Undo the last operation" },
|
|
||||||
{ on = [ "<C-r>" ], exec = "redo", desc = "Redo the last operation" },
|
|
||||||
|
|
||||||
# Help
|
|
||||||
{ on = [ "~" ], exec = "help", desc = "Open help" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[completion]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Cancel completion" },
|
|
||||||
{ on = [ "<Tab>" ], exec = "close --submit", desc = "Submit the completion" },
|
|
||||||
{ on = [ "<Enter>" ], exec = [ "close --submit", "close_input --submit" ], desc = "Submit the completion and input" },
|
|
||||||
|
|
||||||
{ on = [ "<A-k>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<A-j>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "~" ], exec = "help", desc = "Open help" }
|
|
||||||
]
|
|
||||||
|
|
||||||
[help]
|
|
||||||
|
|
||||||
keymap = [
|
|
||||||
{ on = [ "<Esc>" ], exec = "escape", desc = "Clear the filter, or hide the help" },
|
|
||||||
{ on = [ "q" ], exec = "close", desc = "Exit the process" },
|
|
||||||
{ on = [ "<C-q>" ], exec = "close", desc = "Hide the help" },
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
{ on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
{ on = [ "<Up>" ], exec = "arrow -1", desc = "Move cursor up" },
|
|
||||||
{ on = [ "<Down>" ], exec = "arrow 1", desc = "Move cursor down" },
|
|
||||||
|
|
||||||
{ on = [ "<S-Up>" ], exec = "arrow -5", desc = "Move cursor up 5 lines" },
|
|
||||||
{ on = [ "<S-Down>" ], exec = "arrow 5", desc = "Move cursor down 5 lines" },
|
|
||||||
|
|
||||||
# Filtering
|
|
||||||
{ on = [ "/" ], exec = "filter", desc = "Apply a filter for the help items" },
|
|
||||||
]
|
|
|
@ -1,145 +0,0 @@
|
||||||
# vim:fileencoding=utf-8:foldmethod=marker
|
|
||||||
|
|
||||||
# : Manager {{{
|
|
||||||
|
|
||||||
[manager]
|
|
||||||
cwd = { fg = "#81c8be" }
|
|
||||||
|
|
||||||
# Hovered
|
|
||||||
hovered = { fg = "#303446", bg = "#8caaee" }
|
|
||||||
preview_hovered = { underline = true }
|
|
||||||
|
|
||||||
# Find
|
|
||||||
find_keyword = { fg = "#e5c890", italic = true }
|
|
||||||
find_position = { fg = "#f4b8e4", bg = "reset", italic = true }
|
|
||||||
|
|
||||||
# Marker
|
|
||||||
marker_selected = { fg = "#a6d189", bg = "#a6d189" }
|
|
||||||
marker_copied = { fg = "#e5c890", bg = "#e5c890" }
|
|
||||||
marker_cut = { fg = "#e78284", bg = "#e78284" }
|
|
||||||
|
|
||||||
# Tab
|
|
||||||
tab_active = { fg = "#303446", bg = "#8caaee" }
|
|
||||||
tab_inactive = { fg = "#c6d0f5", bg = "#51576d" }
|
|
||||||
tab_width = 1
|
|
||||||
|
|
||||||
# Border
|
|
||||||
border_symbol = "│"
|
|
||||||
border_style = { fg = "#838ba7" }
|
|
||||||
|
|
||||||
# Highlighting
|
|
||||||
syntect_theme = "~/.config/yazi/Catppuccin-frappe.tmTheme"
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Status {{{
|
|
||||||
|
|
||||||
[status]
|
|
||||||
separator_open = ""
|
|
||||||
separator_close = ""
|
|
||||||
separator_style = { fg = "#51576d", bg = "#51576d" }
|
|
||||||
|
|
||||||
# Mode
|
|
||||||
mode_normal = { fg = "#303446", bg = "#8caaee", bold = true }
|
|
||||||
mode_select = { fg = "#303446", bg = "#a6d189", bold = true }
|
|
||||||
mode_unset = { fg = "#303446", bg = "#eebebe", bold = true }
|
|
||||||
|
|
||||||
# Progress
|
|
||||||
progress_label = { fg = "#ffffff", bold = true }
|
|
||||||
progress_normal = { fg = "#8caaee", bg = "#51576d" }
|
|
||||||
progress_error = { fg = "#e78284", bg = "#51576d" }
|
|
||||||
|
|
||||||
# Permissions
|
|
||||||
permissions_t = { fg = "#8caaee" }
|
|
||||||
permissions_r = { fg = "#e5c890" }
|
|
||||||
permissions_w = { fg = "#e78284" }
|
|
||||||
permissions_x = { fg = "#a6d189" }
|
|
||||||
permissions_s = { fg = "#838ba7" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Input {{{
|
|
||||||
|
|
||||||
[input]
|
|
||||||
border = { fg = "#8caaee" }
|
|
||||||
title = {}
|
|
||||||
value = {}
|
|
||||||
selected = { reversed = true }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Select {{{
|
|
||||||
|
|
||||||
[select]
|
|
||||||
border = { fg = "#8caaee" }
|
|
||||||
active = { fg = "#f4b8e4" }
|
|
||||||
inactive = {}
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Tasks {{{
|
|
||||||
|
|
||||||
[tasks]
|
|
||||||
border = { fg = "#8caaee" }
|
|
||||||
title = {}
|
|
||||||
hovered = { underline = true }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Which {{{
|
|
||||||
|
|
||||||
[which]
|
|
||||||
mask = { bg = "#414559" }
|
|
||||||
cand = { fg = "#81c8be" }
|
|
||||||
rest = { fg = "#949cbb" }
|
|
||||||
desc = { fg = "#f4b8e4" }
|
|
||||||
separator = " "
|
|
||||||
separator_style = { fg = "#626880" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : Help {{{
|
|
||||||
|
|
||||||
[help]
|
|
||||||
on = { fg = "#f4b8e4" }
|
|
||||||
exec = { fg = "#81c8be" }
|
|
||||||
desc = { fg = "#949cbb" }
|
|
||||||
hovered = { bg = "#626880", bold = true }
|
|
||||||
footer = { fg = "#51576d", bg = "#c6d0f5" }
|
|
||||||
|
|
||||||
# : }}}
|
|
||||||
|
|
||||||
|
|
||||||
# : File-specific styles {{{
|
|
||||||
|
|
||||||
[filetype]
|
|
||||||
|
|
||||||
rules = [
|
|
||||||
# Images
|
|
||||||
{ mime = "image/*", fg = "#81c8be" },
|
|
||||||
|
|
||||||
# Videos
|
|
||||||
{ mime = "video/*", fg = "#e5c890" },
|
|
||||||
{ mime = "audio/*", fg = "#e5c890" },
|
|
||||||
|
|
||||||
# Archives
|
|
||||||
{ mime = "application/zip", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/gzip", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/x-tar", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/x-bzip", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/x-bzip2", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/x-7z-compressed", fg = "#f4b8e4" },
|
|
||||||
{ mime = "application/x-rar", fg = "#f4b8e4" },
|
|
||||||
|
|
||||||
# Fallback
|
|
||||||
{ name = "*", fg = "#c6d0f5" },
|
|
||||||
{ name = "*/", fg = "#8caaee" }
|
|
||||||
]
|
|
||||||
|
|
||||||
# : }}}
|
|
202
.config/yazi/yazi.toml
Executable file → Normal file
202
.config/yazi/yazi.toml
Executable file → Normal file
|
@ -3,21 +3,26 @@
|
||||||
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
|
"$schema" = "https://yazi-rs.github.io/schemas/yazi.json"
|
||||||
|
|
||||||
[manager]
|
[manager]
|
||||||
ratio = [ 1, 2, 3 ]
|
ratio = [ 1, 4, 3 ]
|
||||||
sort_by = "alphabetical"
|
sort_by = "alphabetical"
|
||||||
sort_sensitive = true
|
sort_sensitive = false
|
||||||
sort_reverse = false
|
sort_reverse = false
|
||||||
sort_dir_first = true
|
sort_dir_first = true
|
||||||
linemode = "size"
|
sort_translit = false
|
||||||
|
linemode = "none"
|
||||||
show_hidden = false
|
show_hidden = false
|
||||||
show_symlink = true
|
show_symlink = true
|
||||||
scrolloff = 5
|
scrolloff = 5
|
||||||
|
mouse_events = [ "click", "scroll" ]
|
||||||
|
title_format = "Yazi: {cwd}"
|
||||||
|
|
||||||
[preview]
|
[preview]
|
||||||
tab_size = 4
|
wrap = "no"
|
||||||
max_width = 900
|
tab_size = 2
|
||||||
|
max_width = 600
|
||||||
max_height = 900
|
max_height = 900
|
||||||
cache_dir = ""
|
cache_dir = ""
|
||||||
|
image_delay = 30
|
||||||
image_filter = "triangle"
|
image_filter = "triangle"
|
||||||
image_quality = 75
|
image_quality = 75
|
||||||
sixel_fraction = 15
|
sixel_fraction = 15
|
||||||
|
@ -26,116 +31,132 @@ ueberzug_offset = [ 0, 0, 0, 0 ]
|
||||||
|
|
||||||
[opener]
|
[opener]
|
||||||
edit = [
|
edit = [
|
||||||
{ exec = '${EDITOR:=nvim} "$@"', desc = "$EDITOR", block = true, for = "unix" },
|
{ run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" },
|
||||||
{ exec = 'code "%*"', orphan = true, for = "windows" },
|
{ run = 'code %*', orphan = true, desc = "code", for = "windows" },
|
||||||
|
{ run = 'code -w %*', block = true, desc = "code (block)", for = "windows" },
|
||||||
]
|
]
|
||||||
open = [
|
open = [
|
||||||
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" },
|
{ run = 'xdg-open "$1"', desc = "Open", for = "linux" },
|
||||||
{ exec = 'open "$@"', desc = "Open", for = "macos" },
|
{ run = 'open "$@"', desc = "Open", for = "macos" },
|
||||||
{ exec = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }
|
{ run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" },
|
||||||
]
|
]
|
||||||
reveal = [
|
reveal = [
|
||||||
{ exec = 'open -R "$1"', desc = "Reveal", for = "macos" },
|
{ run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" },
|
||||||
{ exec = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" },
|
{ run = 'open -R "$1"', desc = "Reveal", for = "macos" },
|
||||||
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" },
|
{ run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" },
|
||||||
|
{ run = '''exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" },
|
||||||
]
|
]
|
||||||
extract = [
|
extract = [
|
||||||
{ exec = 'unar "$1"', desc = "Extract here", for = "unix" },
|
{ run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" },
|
||||||
{ exec = 'unar "%1"', desc = "Extract here", for = "windows" },
|
{ run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" },
|
||||||
]
|
]
|
||||||
play = [
|
play = [
|
||||||
{ exec = 'mpv "$@"', orphan = true, for = "unix" },
|
{ run = 'mpv --force-window "$@"', orphan = true, for = "unix" },
|
||||||
{ exec = 'mpv "%1"', orphan = true, for = "windows" },
|
{ run = 'mpv --force-window %*', orphan = true, for = "windows" },
|
||||||
{ exec = '''mediainfo "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show media info", for = "unix" },
|
{ run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" },
|
||||||
]
|
]
|
||||||
imv = [ { exec = 'imv "$@"', orphan = true, for = "unix"} ]
|
|
||||||
zathura = [ { exec = 'zathura "$@"', orphan = true, for = "unix"} ]
|
|
||||||
|
|
||||||
[open]
|
[open]
|
||||||
rules = [
|
rules = [
|
||||||
|
# Folder
|
||||||
{ name = "*/", use = [ "edit", "open", "reveal" ] },
|
{ name = "*/", use = [ "edit", "open", "reveal" ] },
|
||||||
|
# Text
|
||||||
{ mime = "text/*", use = [ "edit", "reveal" ] },
|
{ mime = "text/*", use = [ "edit", "reveal" ] },
|
||||||
{ mime = "image/vnd.djvu", use = [ "zathura" ] },
|
# Image
|
||||||
{ mime = "image/vnd.djvu+multipage", use = [ "zathura" ] },
|
{ mime = "image/*", use = [ "open", "reveal" ] },
|
||||||
{ mime = "image/*", use = [ "imv" ] },
|
# Media
|
||||||
{ mime = "video/*", use = [ "play", "reveal" ] },
|
{ mime = "{audio,video}/*", use = [ "play", "reveal" ] },
|
||||||
{ mime = "audio/*", use = [ "play", "reveal" ] },
|
# Archive
|
||||||
{ mime = "inode/x-empty", use = [ "edit", "reveal" ] },
|
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] },
|
||||||
|
# JSON
|
||||||
{ mime = "application/json", use = [ "edit", "reveal" ] },
|
{ mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] },
|
||||||
{ mime = "application/pdf", use = [ "zathura" ] },
|
|
||||||
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
|
{ mime = "*/javascript", use = [ "edit", "reveal" ] },
|
||||||
|
# Empty file
|
||||||
{ mime = "application/zip", use = [ "extract", "reveal" ] },
|
{ mime = "inode/empty", use = [ "edit", "reveal" ] },
|
||||||
{ mime = "application/gzip", use = [ "extract", "reveal" ] },
|
# Fallback
|
||||||
{ mime = "application/x-tar", use = [ "extract", "reveal" ] },
|
{ name = "*", use = [ "open", "reveal" ] },
|
||||||
{ mime = "application/x-bzip", use = [ "extract", "reveal" ] },
|
|
||||||
{ mime = "application/x-bzip2", use = [ "extract", "reveal" ] },
|
|
||||||
{ mime = "application/x-7z-compressed", use = [ "extract", "reveal" ] },
|
|
||||||
{ mime = "application/x-rar", use = [ "extract", "reveal" ] },
|
|
||||||
{ mime = "application/xz", use = [ "extract", "reveal" ] },
|
|
||||||
|
|
||||||
{ mime = "*", use = [ "open", "reveal" ] },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tasks]
|
[tasks]
|
||||||
micro_workers = 20
|
micro_workers = 10
|
||||||
macro_workers = 40
|
macro_workers = 10
|
||||||
bizarre_retry = 5
|
bizarre_retry = 3
|
||||||
image_alloc = 536870912 # 512MB
|
image_alloc = 536870912 # 512MB
|
||||||
image_bound = [ 0, 0 ]
|
image_bound = [ 0, 0 ]
|
||||||
suppress_preload = false
|
suppress_preload = false
|
||||||
|
|
||||||
[plugin]
|
[plugin]
|
||||||
|
|
||||||
preloaders = [
|
fetchers = [
|
||||||
{ name = "*", cond = "!mime", exec = "mime", multi = true, prio = "high" },
|
# Mimetype
|
||||||
|
{ id = "mime", name = "*", run = "mime", if = "!mime", prio = "high" },
|
||||||
|
]
|
||||||
|
spotters = [
|
||||||
|
{ name = "*/", run = "folder" },
|
||||||
|
# Code
|
||||||
|
{ mime = "text/*", run = "code" },
|
||||||
|
{ mime = "*/{xml,javascript,wine-extension-ini}", run = "code" },
|
||||||
# Image
|
# Image
|
||||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
||||||
{ mime = "image/*", exec = "image" },
|
{ mime = "image/*", run = "image" },
|
||||||
# Video
|
# Video
|
||||||
{ mime = "video/*", exec = "video" },
|
{ mime = "video/*", run = "video" },
|
||||||
|
# Fallback
|
||||||
|
{ name = "*", run = "file" },
|
||||||
|
]
|
||||||
|
preloaders = [
|
||||||
|
# Image
|
||||||
|
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
||||||
|
{ mime = "image/*", run = "image" },
|
||||||
|
# Video
|
||||||
|
{ mime = "video/*", run = "video" },
|
||||||
# PDF
|
# PDF
|
||||||
{ mime = "application/pdf", exec = "pdf" },
|
{ mime = "application/pdf", run = "pdf" },
|
||||||
|
# Font
|
||||||
|
{ mime = "font/*", run = "font" },
|
||||||
|
{ mime = "application/ms-opentype", run = "font" },
|
||||||
]
|
]
|
||||||
previewers = [
|
previewers = [
|
||||||
{ name = "*/", exec = "folder", sync = true },
|
{ name = "*/", run = "folder", sync = true },
|
||||||
# Code
|
# Code
|
||||||
{ mime = "text/*", exec = "code" },
|
{ mime = "text/*", run = "code" },
|
||||||
{ mime = "*/xml", exec = "code" },
|
{ mime = "*/{xml,javascript,wine-extension-ini}", run = "code" },
|
||||||
{ mime = "*/javascript", exec = "code" },
|
|
||||||
{ mime = "*/x-wine-extension-ini", exec = "code" },
|
|
||||||
# JSON
|
# JSON
|
||||||
{ mime = "application/json", exec = "json" },
|
{ mime = "application/{json,ndjson}", run = "json" },
|
||||||
# Image
|
# Image
|
||||||
{ mime = "image/vnd.djvu", exec = "noop" },
|
{ mime = "image/{avif,hei?,jxl,svg+xml}", run = "magick" },
|
||||||
{ mime = "image/*", exec = "image" },
|
{ mime = "image/*", run = "image" },
|
||||||
# Video
|
# Video
|
||||||
{ mime = "video/*", exec = "video" },
|
{ mime = "video/*", run = "video" },
|
||||||
# PDF
|
# PDF
|
||||||
{ mime = "application/pdf", exec = "pdf" },
|
{ mime = "application/pdf", run = "pdf" },
|
||||||
# Archive
|
# Archive
|
||||||
{ mime = "application/zip", exec = "archive" },
|
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
|
||||||
{ mime = "application/gzip", exec = "archive" },
|
{ mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
|
||||||
{ mime = "application/x-tar", exec = "archive" },
|
{ name = "*.{AppImage,appimage}", run = "archive" },
|
||||||
{ mime = "application/x-bzip", exec = "archive" },
|
# Virtual Disk / Disk Image
|
||||||
{ mime = "application/x-bzip2", exec = "archive" },
|
{ mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },
|
||||||
{ mime = "application/x-7z-compressed", exec = "archive" },
|
{ mime = "application/virtualbox-{vhd,vhdx}", run = "archive" },
|
||||||
{ mime = "application/x-rar", exec = "archive" },
|
{ name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" },
|
||||||
{ mime = "application/xz", exec = "archive" },
|
# Font
|
||||||
|
{ mime = "font/*", run = "font" },
|
||||||
|
{ mime = "application/ms-opentype", run = "font" },
|
||||||
|
# Empty file
|
||||||
|
{ mime = "inode/empty", run = "empty" },
|
||||||
# Fallback
|
# Fallback
|
||||||
{ name = "*", exec = "file" },
|
{ name = "*", run = "file" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
cursor_blink = false
|
||||||
|
|
||||||
# cd
|
# cd
|
||||||
cd_title = "Change directory:"
|
cd_title = "Change directory:"
|
||||||
cd_origin = "top-center"
|
cd_origin = "top-center"
|
||||||
cd_offset = [ 0, 2, 50, 3 ]
|
cd_offset = [ 0, 2, 50, 3 ]
|
||||||
|
|
||||||
# create
|
# create
|
||||||
create_title = "Create:"
|
create_title = [ "Create:", "Create (dir):" ]
|
||||||
create_origin = "top-center"
|
create_origin = "top-center"
|
||||||
create_offset = [ 0, 2, 50, 3 ]
|
create_offset = [ 0, 2, 50, 3 ]
|
||||||
|
|
||||||
|
@ -144,16 +165,6 @@ rename_title = "Rename:"
|
||||||
rename_origin = "hovered"
|
rename_origin = "hovered"
|
||||||
rename_offset = [ 0, 1, 50, 3 ]
|
rename_offset = [ 0, 1, 50, 3 ]
|
||||||
|
|
||||||
# trash
|
|
||||||
trash_title = "Move {n} selected file{s} to trash? (y/N)"
|
|
||||||
trash_origin = "top-center"
|
|
||||||
trash_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# delete
|
|
||||||
delete_title = "Delete {n} selected file{s} permanently? (y/N)"
|
|
||||||
delete_origin = "top-center"
|
|
||||||
delete_offset = [ 0, 2, 50, 3 ]
|
|
||||||
|
|
||||||
# filter
|
# filter
|
||||||
filter_title = "Filter:"
|
filter_title = "Filter:"
|
||||||
filter_origin = "top-center"
|
filter_origin = "top-center"
|
||||||
|
@ -174,17 +185,30 @@ shell_title = [ "Shell:", "Shell (block):" ]
|
||||||
shell_origin = "top-center"
|
shell_origin = "top-center"
|
||||||
shell_offset = [ 0, 2, 50, 3 ]
|
shell_offset = [ 0, 2, 50, 3 ]
|
||||||
|
|
||||||
|
[confirm]
|
||||||
|
# trash
|
||||||
|
trash_title = "Trash {n} selected file{s}?"
|
||||||
|
trash_origin = "center"
|
||||||
|
trash_offset = [ 0, 0, 70, 20 ]
|
||||||
|
|
||||||
|
# delete
|
||||||
|
delete_title = "Permanently delete {n} selected file{s}?"
|
||||||
|
delete_origin = "center"
|
||||||
|
delete_offset = [ 0, 0, 70, 20 ]
|
||||||
|
|
||||||
# overwrite
|
# overwrite
|
||||||
overwrite_title = "Overwrite an existing file? (y/N)"
|
overwrite_title = "Overwrite file?"
|
||||||
overwrite_origin = "top-center"
|
overwrite_content = "Will overwrite the following file:"
|
||||||
overwrite_offset = [ 0, 2, 50, 3 ]
|
overwrite_origin = "center"
|
||||||
|
overwrite_offset = [ 0, 0, 50, 15 ]
|
||||||
|
|
||||||
# quit
|
# quit
|
||||||
quit_title = "{n} task{s} running, sure to quit? (y/N)"
|
quit_title = "Quit?"
|
||||||
quit_origin = "top-center"
|
quit_content = "The following task is still running, are you sure you want to quit?"
|
||||||
quit_offset = [ 0, 2, 50, 3 ]
|
quit_origin = "center"
|
||||||
|
quit_offset = [ 0, 0, 50, 15 ]
|
||||||
|
|
||||||
[select]
|
[pick]
|
||||||
open_title = "Open with:"
|
open_title = "Open with:"
|
||||||
open_origin = "hovered"
|
open_origin = "hovered"
|
||||||
open_offset = [ 0, 1, 50, 7 ]
|
open_offset = [ 0, 1, 50, 7 ]
|
||||||
|
@ -193,6 +217,4 @@ open_offset = [ 0, 1, 50, 7 ]
|
||||||
sort_by = "none"
|
sort_by = "none"
|
||||||
sort_sensitive = false
|
sort_sensitive = false
|
||||||
sort_reverse = false
|
sort_reverse = false
|
||||||
|
sort_translit = false
|
||||||
[log]
|
|
||||||
enabled = false
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
abbr -g "aur"="sudo aura"
|
|
||||||
abbr -g "aura"="sudo aura"
|
|
||||||
abbr -g "cat"="bat"
|
abbr -g "cat"="bat"
|
||||||
abbr -g "neo"="nvim +'Telescope oldfiles'"
|
abbr -g "neo"="nvim +'Telescope oldfiles'"
|
||||||
abbr -g "mann"="nvim +'Telescope man_pages'"
|
abbr -g "mann"="nvim +'Telescope man_pages'"
|
||||||
|
|
|
@ -84,3 +84,10 @@
|
||||||
|
|
||||||
[rebase]
|
[rebase]
|
||||||
updateRefs = true
|
updateRefs = true
|
||||||
|
[init]
|
||||||
|
defaultBranch = master
|
||||||
|
[filter "lfs"]
|
||||||
|
required = true
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
process = git-lfs filter-process
|
||||||
|
|
20
.mbsyncrc
Normal file
20
.mbsyncrc
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
IMAPStore bonsai-remote
|
||||||
|
Host mail.bonsai.cool
|
||||||
|
Port 993
|
||||||
|
User brk@bonsai.cool
|
||||||
|
PassCmd "gopass show -o bonsai/mail"
|
||||||
|
SSLType IMAPS
|
||||||
|
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
|
MaildirStore bonsai-local
|
||||||
|
Path ~/mail/bonsai/
|
||||||
|
Inbox ~/mail/bonsai/INBOX
|
||||||
|
Subfolders Verbatim
|
||||||
|
|
||||||
|
Channel bonsai
|
||||||
|
Far :bonsai-remote:
|
||||||
|
Near :bonsai-local:
|
||||||
|
Create Both
|
||||||
|
Expunge Both
|
||||||
|
Patterns % !Archive
|
||||||
|
SyncState *
|
27
.zshrc
27
.zshrc
|
@ -95,6 +95,7 @@ compdef _directories md
|
||||||
# Define aliases.
|
# Define aliases.
|
||||||
alias tree='tree -a -I .git'
|
alias tree='tree -a -I .git'
|
||||||
alias ls='exa -1 --icons=always --group-directories-first'
|
alias ls='exa -1 --icons=always --group-directories-first'
|
||||||
|
alias pacman='aura'
|
||||||
# Add flags to existing aliases.
|
# Add flags to existing aliases.
|
||||||
|
|
||||||
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html.
|
# Set shell options: http://zsh.sourceforge.net/Doc/Release/Options.html.
|
||||||
|
@ -109,11 +110,23 @@ autoload -Uz compinit
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
fpath+=~/.zfunc
|
fpath+=~/.zfunc
|
||||||
|
|
||||||
kat="
|
# kat="
|
||||||
/l、
|
# /l、
|
||||||
(゚、 。 7
|
# (゚、 。 7
|
||||||
l ~ヽ_
|
# l ~ヽ_
|
||||||
じしf_,)ノ
|
# じしf_,)ノ
|
||||||
"
|
# "
|
||||||
|
#
|
||||||
|
# printf $kat
|
||||||
|
eval "$(zoxide init zsh --cmd cd)"
|
||||||
|
|
||||||
echo $kat
|
# bun completions
|
||||||
|
[ -s "/home/brk/.bun/_bun" ] && source "/home/brk/.bun/_bun"
|
||||||
|
|
||||||
|
# bun
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
|
||||||
|
if uwsm check may-start && uwsm select; then
|
||||||
|
exec uwsm start default
|
||||||
|
fi
|
||||||
|
|
69
bin/1337x
Executable file
69
bin/1337x
Executable file
|
@ -0,0 +1,69 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# 1337x.to, if this domain is blocked for you try to use 1377x.to or 1337xx.to.
|
||||||
|
|
||||||
|
clear
|
||||||
|
mkdir -p $HOME/.cache/1337x
|
||||||
|
|
||||||
|
query=$*
|
||||||
|
|
||||||
|
baseurl="https://1337x.to"
|
||||||
|
cachedir="$HOME/.cache/1337x"
|
||||||
|
query="$(sed 's/ /+/g' <<<$query)"
|
||||||
|
|
||||||
|
# This is where default database can be chaned ie. Television, Movies, Music etc.
|
||||||
|
# See https://1337x.to/ for a list of query strings.
|
||||||
|
# curl -s https://www.1377x.to/category-search/$query/TV/1/ > $cachedir/tmp.html
|
||||||
|
# curl -s https://www.1377x.to/category-search/$query/Music/1/ > $cachedir/tmp.html
|
||||||
|
curl -s https://1337x.to/category-search/$query/Movies/1/ > $cachedir/tmp.html
|
||||||
|
|
||||||
|
# Get Titles
|
||||||
|
grep -o '<a href="/torrent/.*</a>' $cachedir/tmp.html |
|
||||||
|
sed 's/<[^>]*>//g' > $cachedir/titles.bw
|
||||||
|
|
||||||
|
result_count=$(wc -l $cachedir/titles.bw | awk '{print $1}')
|
||||||
|
if [ "$result_count" -lt 1 ]; then
|
||||||
|
notify-send "No Result found. Please try diffrent query."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Seeders and Leechers
|
||||||
|
grep -o '<td class="coll-2 seeds.*</td>\|<td class="coll-3 leeches.*</td>' $cachedir/tmp.html |
|
||||||
|
sed 's/<[^>]*>//g' | sed 'N;s/\n/ /' > $cachedir/seedleech.bw
|
||||||
|
|
||||||
|
# Size
|
||||||
|
grep -o '<td class="coll-4 size.*</td>' $cachedir/tmp.html |
|
||||||
|
sed 's/<span class="seeds">.*<\/span>//g' |
|
||||||
|
sed -e 's/<[^>]*>//g' > $cachedir/size.bw
|
||||||
|
|
||||||
|
# Links
|
||||||
|
grep -E '/torrent/' $cachedir/tmp.html |
|
||||||
|
sed -E 's#.*(/torrent/.*)/">.*/#\1#' |
|
||||||
|
sed 's/td>//g' > $cachedir/links.bw
|
||||||
|
|
||||||
|
# Clearning up some data to display.
|
||||||
|
sed 's/\./ /g; s/\-/ /g' $cachedir/titles.bw |
|
||||||
|
sed 's/[^A-Za-z0-9 ]//g' | tr -s " " > $cachedir/tmp && mv $cachedir/tmp $cachedir/titles.bw
|
||||||
|
|
||||||
|
awk '{print NR " - ["$0"]"}' $cachedir/size.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/size.bw
|
||||||
|
awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/seedleech.bw
|
||||||
|
|
||||||
|
# Getting the line number.
|
||||||
|
LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw |
|
||||||
|
fzf -i |
|
||||||
|
cut -d\- -f1 |
|
||||||
|
awk '{$1=$1; print}')
|
||||||
|
|
||||||
|
url=$(head -n $LINE $cachedir/links.bw 2> /dev/null | tail -n +$LINE 2> /dev/null)
|
||||||
|
fullURL="${baseurl}${url}/"
|
||||||
|
|
||||||
|
# Requesting page for magnet link.
|
||||||
|
curl -s $fullURL > $cachedir/tmp.html
|
||||||
|
magnet=$(grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" $cachedir/tmp.html | head -n 1 2> /dev/null)
|
||||||
|
|
||||||
|
if [[ $magnet == '' ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Default username:password passed by default.
|
||||||
|
transmission-remote -n transmission:transmission --add "$magnet" && notify-send "Torrent added to queue."
|
BIN
bin/GodotSharp/Api/Debug/GodotPlugins.dll
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotPlugins.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Debug/GodotPlugins.pdb
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotPlugins.pdb
Normal file
Binary file not shown.
13
bin/GodotSharp/Api/Debug/GodotPlugins.runtimeconfig.json
Normal file
13
bin/GodotSharp/Api/Debug/GodotPlugins.runtimeconfig.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net8.0",
|
||||||
|
"rollForward": "LatestMajor",
|
||||||
|
"framework": {
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"configProperties": {
|
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
bin/GodotSharp/Api/Debug/GodotSharp.dll
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotSharp.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Debug/GodotSharp.pdb
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotSharp.pdb
Normal file
Binary file not shown.
260491
bin/GodotSharp/Api/Debug/GodotSharp.xml
Normal file
260491
bin/GodotSharp/Api/Debug/GodotSharp.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
bin/GodotSharp/Api/Debug/GodotSharpEditor.dll
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotSharpEditor.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Debug/GodotSharpEditor.pdb
Normal file
BIN
bin/GodotSharp/Api/Debug/GodotSharpEditor.pdb
Normal file
Binary file not shown.
11968
bin/GodotSharp/Api/Debug/GodotSharpEditor.xml
Normal file
11968
bin/GodotSharp/Api/Debug/GodotSharpEditor.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
bin/GodotSharp/Api/Release/GodotPlugins.dll
Normal file
BIN
bin/GodotSharp/Api/Release/GodotPlugins.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Release/GodotPlugins.pdb
Normal file
BIN
bin/GodotSharp/Api/Release/GodotPlugins.pdb
Normal file
Binary file not shown.
14
bin/GodotSharp/Api/Release/GodotPlugins.runtimeconfig.json
Normal file
14
bin/GodotSharp/Api/Release/GodotPlugins.runtimeconfig.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net8.0",
|
||||||
|
"rollForward": "LatestMajor",
|
||||||
|
"framework": {
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"configProperties": {
|
||||||
|
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
bin/GodotSharp/Api/Release/GodotSharp.dll
Normal file
BIN
bin/GodotSharp/Api/Release/GodotSharp.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Release/GodotSharp.pdb
Normal file
BIN
bin/GodotSharp/Api/Release/GodotSharp.pdb
Normal file
Binary file not shown.
260491
bin/GodotSharp/Api/Release/GodotSharp.xml
Normal file
260491
bin/GodotSharp/Api/Release/GodotSharp.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
bin/GodotSharp/Api/Release/GodotSharpEditor.dll
Normal file
BIN
bin/GodotSharp/Api/Release/GodotSharpEditor.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Api/Release/GodotSharpEditor.pdb
Normal file
BIN
bin/GodotSharp/Api/Release/GodotSharpEditor.pdb
Normal file
Binary file not shown.
11968
bin/GodotSharp/Api/Release/GodotSharpEditor.xml
Normal file
11968
bin/GodotSharp/Api/Release/GodotSharpEditor.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
bin/GodotSharp/Tools/GodotTools.BuildLogger.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.BuildLogger.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.BuildLogger.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.BuildLogger.pdb
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.Core.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.Core.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.Core.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.Core.pdb
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.IdeMessaging.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.IdeMessaging.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.IdeMessaging.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.IdeMessaging.pdb
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.ProjectEditor.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.ProjectEditor.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.ProjectEditor.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.ProjectEditor.pdb
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.Shared.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.Shared.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.Shared.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.Shared.pdb
Normal file
Binary file not shown.
1300
bin/GodotSharp/Tools/GodotTools.deps.json
Normal file
1300
bin/GodotSharp/Tools/GodotTools.deps.json
Normal file
File diff suppressed because it is too large
Load diff
BIN
bin/GodotSharp/Tools/GodotTools.dll
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.dll
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/GodotTools.pdb
Normal file
BIN
bin/GodotSharp/Tools/GodotTools.pdb
Normal file
Binary file not shown.
14
bin/GodotSharp/Tools/GodotTools.runtimeconfig.json
Normal file
14
bin/GodotSharp/Tools/GodotTools.runtimeconfig.json
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net8.0",
|
||||||
|
"rollForward": "LatestMinor",
|
||||||
|
"framework": {
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
"configProperties": {
|
||||||
|
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
bin/GodotSharp/Tools/JetBrains.Rider.PathLocator.dll
Executable file
BIN
bin/GodotSharp/Tools/JetBrains.Rider.PathLocator.dll
Executable file
Binary file not shown.
BIN
bin/GodotSharp/Tools/Microsoft.Build.Locator.dll
Executable file
BIN
bin/GodotSharp/Tools/Microsoft.Build.Locator.dll
Executable file
Binary file not shown.
BIN
bin/GodotSharp/Tools/Newtonsoft.Json.dll
Executable file
BIN
bin/GodotSharp/Tools/Newtonsoft.Json.dll
Executable file
Binary file not shown.
BIN
bin/GodotSharp/Tools/NuGet.Frameworks.dll
Executable file
BIN
bin/GodotSharp/Tools/NuGet.Frameworks.dll
Executable file
Binary file not shown.
BIN
bin/GodotSharp/Tools/nupkgs/Godot.NET.Sdk.4.4.0-dev.7.nupkg
Normal file
BIN
bin/GodotSharp/Tools/nupkgs/Godot.NET.Sdk.4.4.0-dev.7.nupkg
Normal file
Binary file not shown.
Binary file not shown.
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharp.4.4.0-dev.7.nupkg
Normal file
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharp.4.4.0-dev.7.nupkg
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharp.4.4.0-dev.7.snupkg
Normal file
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharp.4.4.0-dev.7.snupkg
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharpEditor.4.4.0-dev.7.nupkg
Normal file
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharpEditor.4.4.0-dev.7.nupkg
Normal file
Binary file not shown.
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharpEditor.4.4.0-dev.7.snupkg
Normal file
BIN
bin/GodotSharp/Tools/nupkgs/GodotSharpEditor.4.4.0-dev.7.snupkg
Normal file
Binary file not shown.
BIN
bin/Godot_v4.4-dev7_mono_linux.x86_64
Executable file
BIN
bin/Godot_v4.4-dev7_mono_linux.x86_64
Executable file
Binary file not shown.
BIN
bin/bin/ghostty
Executable file
BIN
bin/bin/ghostty
Executable file
Binary file not shown.
7
bin/fix-hyprland
Executable file
7
bin/fix-hyprland
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
sleep 1
|
||||||
|
killall -9 -e xdg-desktop-portal-hyprland
|
||||||
|
killall -9 xdg-desktop-portal
|
||||||
|
/usr/lib/xdg-desktop-portal-hyprland &
|
||||||
|
sleep 1
|
||||||
|
/usr/lib/xdg-desktop-portal &
|
30
bin/msmtp-queue
Executable file
30
bin/msmtp-queue
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
##
|
||||||
|
## msmtp-queue : wrapper script for msmtpq
|
||||||
|
## to expose the management functions
|
||||||
|
## for the msmtp queue
|
||||||
|
## Copyright (C) 2011 Chris Gianniotis
|
||||||
|
##
|
||||||
|
## This program is free software: you can redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or, at
|
||||||
|
## your option, any later version.
|
||||||
|
##
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
|
||||||
|
## msmtp-queue
|
||||||
|
## is only a wrapper
|
||||||
|
## it invokes the queue management functions of msmtpq
|
||||||
|
## by calling it as msmtpq --q-mgmt
|
||||||
|
##
|
||||||
|
## all configuration and documentation is in the msmtpq script
|
||||||
|
|
||||||
|
## note that for 'special circumstances'
|
||||||
|
## e.g. embedded systems, etc.
|
||||||
|
## where the msmtpq script itself is not on the path
|
||||||
|
## change the below line to be
|
||||||
|
## exec /path/to/msmtpq --q-mgmt
|
||||||
|
|
||||||
|
exec msmtpq --q-mgmt "$1"
|
486
bin/msmtpq
Executable file
486
bin/msmtpq
Executable file
|
@ -0,0 +1,486 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
##
|
||||||
|
## msmtpq : queue funtions to both use & manage the msmtp queue,
|
||||||
|
## as it was defined by Martin Lambers
|
||||||
|
## Copyright (C) 2008, 2009, 2010, 2011 Chris Gianniotis
|
||||||
|
##
|
||||||
|
## This program is free software: you can redistribute it and/or modify
|
||||||
|
## it under the terms of the GNU General Public License as published by
|
||||||
|
## the Free Software Foundation, either version 3 of the License, or, at
|
||||||
|
## your option, any later version.
|
||||||
|
##
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
|
||||||
|
## msmtpq is meant to be used by an email client - in 'sendmail' mode
|
||||||
|
## for this purpose, it is invoked directly as 'msmtpq'
|
||||||
|
## it is also meant to be used to maintain the msmtp queue
|
||||||
|
## evoked by the wrapper script 'msmtp-queue'
|
||||||
|
## (which calls this script as msmtpq --q-mgmt)
|
||||||
|
|
||||||
|
## there is a queue log file, distinct from the msmtp log,
|
||||||
|
## for all events & operations on the msmtp queue
|
||||||
|
## that is defined below
|
||||||
|
|
||||||
|
## (mutt users, using msmtpq in 'sendmail' mode,
|
||||||
|
## should make at least the following two settings in their .muttrc
|
||||||
|
## set sendmail = /path/to/msmtpq
|
||||||
|
## set sendmail_wait = -1
|
||||||
|
##
|
||||||
|
## please see the msmtp man page and docs for further mutt settings
|
||||||
|
## and optimisations
|
||||||
|
## )
|
||||||
|
|
||||||
|
## msmtpq now uses the following environment variables :
|
||||||
|
## EMAIL_CONN_NOTEST if set will suppress any testing for a connection
|
||||||
|
## EMAIL_CONN_TEST if unset or =p will use a ping test (debian.org) for a connection
|
||||||
|
## if =P will use a fast ping test (8.8.8.8) for a connection
|
||||||
|
## if =n will use netcat (nc) to test for a connection
|
||||||
|
## if =s will use bash sockets to test for a connection
|
||||||
|
## EMAIL_QUEUE_QUIET if set will cause suppression of messages and 'chatter'
|
||||||
|
|
||||||
|
## two essential patches by Philipp Hartwig
|
||||||
|
## 19 Oct 2011 & 27 Oct 2011
|
||||||
|
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
## the msmtp queue contains unique filenames of the following form :
|
||||||
|
## two files for each mail in the queue
|
||||||
|
##
|
||||||
|
## creates new unique filenames of the form :
|
||||||
|
## MLF: ccyy-mm-dd-hh.mm.ss[-x].mail -- mail file
|
||||||
|
## MSF: ccyy-mm-dd-hh.mm.ss[-x].msmtp -- msmtp command line file
|
||||||
|
## where x is a consecutive number only appended for uniqueness
|
||||||
|
## if more than one mail per second is sent
|
||||||
|
##--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
dsp() { local L ; for L ; do [ -n "$L" ] && echo " $L" || echo ; done ; }
|
||||||
|
err() { dsp '' "$@" '' ; exit 1 ; }
|
||||||
|
|
||||||
|
|
||||||
|
## ======================================================================================
|
||||||
|
## !!! please define or confirm the following three vars !!!
|
||||||
|
## !!! before using the msmtpq or msmtp-queue scripts !!!
|
||||||
|
## ======================================================================================
|
||||||
|
##
|
||||||
|
## only if necessary (in unusual circumstances - e.g. embedded systems),
|
||||||
|
## enter the location of the msmtp executable (no quotes !!)
|
||||||
|
## e.g. ( MSMTP=/path/to/msmtp )
|
||||||
|
MSMTP=msmtp
|
||||||
|
#[ -x "$MSMTP" ] || \
|
||||||
|
# log -e 1 "msmtpq : can't find the msmtp executable [ $MSMTP ]" # if not found - complain ; quit
|
||||||
|
##
|
||||||
|
## set the queue var to the location of the msmtp queue directory
|
||||||
|
## if the queue dir doesn't yet exist, better to create it (0700)
|
||||||
|
## before using this routine
|
||||||
|
## e.g. ( mkdir msmtp.queue )
|
||||||
|
## ( chmod 0700 msmtp.queue )
|
||||||
|
##
|
||||||
|
## the queue dir - modify this to reflect where you'd like it to be (no quotes !!)
|
||||||
|
Q=~/.msmtp.queue
|
||||||
|
[ -d "$Q" ] || \
|
||||||
|
err '' "msmtpq : can't find msmtp queue directory [ $Q ]" '' # if not present - complain ; quit
|
||||||
|
##
|
||||||
|
## set the queue log file var to the location of the msmtp queue log file
|
||||||
|
## where it is or where you'd like it to be
|
||||||
|
## ( note that the LOG setting could be the same as the )
|
||||||
|
## ( 'logfile' setting in .msmtprc - but there may be )
|
||||||
|
## ( some advantage in keeping the two logs separate )
|
||||||
|
## if you don't want the log at all unset (comment out) this var
|
||||||
|
## LOG=~/log/msmtp.queue.log --> #LOG=~/log/msmtp.queue.log
|
||||||
|
## (doing so would be inadvisable under most conditions, however)
|
||||||
|
##
|
||||||
|
## the queue log file - modify (or comment out) to taste (but no quotes !!)
|
||||||
|
LOG=~/log/msmtp.queue.log
|
||||||
|
## ======================================================================================
|
||||||
|
|
||||||
|
umask 077 # set secure permissions on created directories and files
|
||||||
|
|
||||||
|
declare -i CNT # a count of mail(s) currently in the queue
|
||||||
|
declare -a Q_LST # queue list array ; used selecting a mail (to send or remove)
|
||||||
|
|
||||||
|
## do ; test this !
|
||||||
|
#for sig in INT TERM EXIT; do
|
||||||
|
# trap "rm -f \"\$TMPFILE\"; [[ $sig == EXIT ]] || kill -$sig $$" $sig
|
||||||
|
#done
|
||||||
|
trap on_exit INT TERM EXIT # run 'on_exit' on exit
|
||||||
|
on_exit() {
|
||||||
|
[ -n "$LKD" ] && lock_queue -u 2>/dev/null # unlock the queue on exit if the lock was set here
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
## ----------------------------------- common functions
|
||||||
|
#
|
||||||
|
|
||||||
|
## make an entry to the queue log file, possibly an error
|
||||||
|
## (log queue changes only ; not interactive chatter)
|
||||||
|
## usage : log [ -e errcode ] msg [ msg ... ]
|
||||||
|
## opts : -e <exit code> an error ; log msg & terminate w/prejudice
|
||||||
|
## display msg to user, as well
|
||||||
|
log() {
|
||||||
|
local ARG RC PFX="$('date' +'%Y %d %b %H:%M:%S')"
|
||||||
|
# time stamp prefix - "2008 13 Mar 03:59:45 "
|
||||||
|
if [ "$1" = '-e' ] ; then # there's an error exit code
|
||||||
|
RC="$2" # take it
|
||||||
|
shift 2 # shift opt & its arg off
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z "$EMAIL_QUEUE_QUIET" ] && dsp "$@" # display msg to user, as well as logging it
|
||||||
|
|
||||||
|
if [ -n "$LOG" ] ; then # log is defined and in use
|
||||||
|
for ARG ; do # each msg line out
|
||||||
|
[ -n "$ARG" ] && \
|
||||||
|
echo "$PFX : $ARG" >> "$LOG" # line has content ; send it to log
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$RC" ] ; then # an error ; leave w/error return
|
||||||
|
[ -n "$LKD" ] && lock_queue -u # unlock here (if locked)
|
||||||
|
[ -n "$LOG" ] && \
|
||||||
|
echo " exit code = $RC" >> "$LOG" # logging ok ; send exit code to log
|
||||||
|
exit $RC # exit w/return code
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## write/remove queue lockfile for a queue op
|
||||||
|
lock_queue() { # <-- '-u' to remove lockfile
|
||||||
|
local LOK="${Q}/.lock" # lock file name
|
||||||
|
local -i MAX=240 SEC=0 # max seconds to gain a lock ; seconds waiting
|
||||||
|
|
||||||
|
if [ -z "$1" ] ; then # lock queue
|
||||||
|
## Philipp Hartwig patch #2
|
||||||
|
'mkdir' "$LOK" 2>/dev/null && LKD='t'
|
||||||
|
while [ -z "$LKD" ] && (( SEC < MAX )) ; do # lock file present
|
||||||
|
sleep 1 # wait a second
|
||||||
|
(( ++SEC )) # accumulate seconds
|
||||||
|
'mkdir' "$LOK" 2>/dev/null && LKD='t' # make lockdir ; lock queue ; set flag
|
||||||
|
done # try again while locked for MAX secs
|
||||||
|
[ -z "$LKD" ] && \
|
||||||
|
err '' "cannot use queue $Q : waited $MAX seconds for"\
|
||||||
|
" lockdir [ $LOK ] to vanish ; giving up"\
|
||||||
|
'if you are certain that no other instance of this script'\
|
||||||
|
" is running, then 'rmdir' the lock dir manually" '' # lock file still there, give up
|
||||||
|
|
||||||
|
elif [ "$1" = '-u' ] ; then # unlock queue
|
||||||
|
'rmdir' "$LOK" # remove the lock
|
||||||
|
unset LKD # unset flag
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## test whether system is connected
|
||||||
|
## returns t/f (0/1)
|
||||||
|
connect_test() {
|
||||||
|
if [ -z "$EMAIL_CONN_TEST" ] || \
|
||||||
|
[ "$EMAIL_CONN_TEST" = 'p' ] ; then # use ping test (default)
|
||||||
|
# verify net connection - ping ip address of debian.org
|
||||||
|
# would ping -qnc2 -w4 be better ?
|
||||||
|
# would ping -qnc1 -w10 or -w20 be better ?
|
||||||
|
ping -qnc1 -w4 debian.org >/dev/null 2>&1 || return 1
|
||||||
|
elif [ "$EMAIL_CONN_TEST" = 'P' ] ; then # use quicker ping test
|
||||||
|
# I personally think that including a DNS lookup
|
||||||
|
# is a better connection test but some
|
||||||
|
# have found the above test too slow
|
||||||
|
ping -qnc1 -w4 8.8.8.8 >/dev/null 2>&1 || return 1
|
||||||
|
elif [ "$EMAIL_CONN_TEST" = 'n' ] ; then # use netcat (nc) test
|
||||||
|
# must, of course, have netcat (nc) installed
|
||||||
|
which nc >/dev/null 2>&1 || \
|
||||||
|
log -e 1 "msmtpq : can't find netcat executable [ nc ]" # if not found - complain ; quit
|
||||||
|
'nc' -vz www.debian.org 80 || return 1
|
||||||
|
elif [ "$EMAIL_CONN_TEST" = 's' ] ; then # use sh sockets test
|
||||||
|
# note that this does not work on debian systems
|
||||||
|
# where bash opened sockets are suppressed for security reasons
|
||||||
|
# this should be ok for single user systems (including embedded systems)
|
||||||
|
# test whether this is supported on your system before using
|
||||||
|
exec 3<>/dev/udp/debian.org/80 || return 1 # open socket on site ; use dns
|
||||||
|
exec 3<&- ; exec 3>&- # close socket
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
## ----------------------------------- functions for queue management
|
||||||
|
## ----------------------------------- queue maintenance mode - (msmtp-queue)
|
||||||
|
#
|
||||||
|
|
||||||
|
## show queue maintenance functions
|
||||||
|
usage() { # <-- error msg
|
||||||
|
dsp ''\
|
||||||
|
'usage : msmtp-queue functions' ''\
|
||||||
|
' msmtp-queue < op >'\
|
||||||
|
' ops : -r run (flush) mail queue - all mail in queue'\
|
||||||
|
' -R send selected individual mail(s) in queue'\
|
||||||
|
' -d display (list) queue contents (<-- default)'\
|
||||||
|
' -p purge individual mail(s) from queue'\
|
||||||
|
' -a purge all mail in queue'\
|
||||||
|
' -h this helpful blurt' ''\
|
||||||
|
' ( one op only ; any others ignored )' ''
|
||||||
|
[ -z "$1" ] && exit 0 || { dsp "$@" '' ; exit 1 ; }
|
||||||
|
}
|
||||||
|
|
||||||
|
## get user [y/n] acknowledgement
|
||||||
|
ok() {
|
||||||
|
local R YN='Y/n' # default to yes
|
||||||
|
|
||||||
|
[ "$1" = '-n' ] && \
|
||||||
|
{ YN='y/N' ; shift ; } # default to no ; change prompt ; shift off spec
|
||||||
|
|
||||||
|
dsp "$@"
|
||||||
|
while true ; do
|
||||||
|
echo -n " ok [${YN}] ..: "
|
||||||
|
read R
|
||||||
|
case $R in
|
||||||
|
y|Y) return 0 ;;
|
||||||
|
n|N) return 1 ;;
|
||||||
|
'') [ "$YN" = 'Y/n' ] && return 0 || return 1 ;;
|
||||||
|
*) echo 'yYnN<cr> only please' ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
## send a queued mail out via msmtp
|
||||||
|
send_queued_mail() { # <-- mail id
|
||||||
|
local FQP="${Q}/${1}" # fully qualified path name
|
||||||
|
local -i RC=0 # for msmtp exit code
|
||||||
|
|
||||||
|
if [ -f "${FQP}.msmtp" ] ; then # corresponding .msmtp file found
|
||||||
|
[ -z "$EMAIL_CONN_NOTEST" ] && { # connection test
|
||||||
|
connect_test || \
|
||||||
|
log "mail [ $2 ] [ $1 ] from queue ; couldn't be sent - host not connected"
|
||||||
|
}
|
||||||
|
|
||||||
|
if $MSMTP $(< "${FQP}.msmtp") < "${FQP}.mail" ; then # this mail goes out the door
|
||||||
|
log "mail [ $2 ] [ $1 ] from queue ; send was successful ; purged from queue" # good news to user
|
||||||
|
'rm' -f ${FQP}.* # nuke both queue mail files
|
||||||
|
ALT='t' # set queue changed flag
|
||||||
|
else # send was unsuccessful
|
||||||
|
RC=$? # take msmtp exit code
|
||||||
|
log "mail [ $2 ] [ $1 ] from queue ; send failed ; msmtp rc = $RC" # bad news ...
|
||||||
|
fi
|
||||||
|
return $RC # func returns exit code
|
||||||
|
else # corresponding MSF file not found
|
||||||
|
log "preparing to send .mail file [ $1 ] [ ${FQP}.mail ] but"\
|
||||||
|
" corresponding .msmtp file [ ${FQP}.msmtp ] was not found in queue"\
|
||||||
|
' skipping this mail ; this is worth looking into' # give user the bad news
|
||||||
|
fi # (but allow continuation)
|
||||||
|
}
|
||||||
|
|
||||||
|
## run (flush) queue
|
||||||
|
run_queue() { # <- 'sm' mode # run queue
|
||||||
|
local M LST="$('ls' $Q/*.mail 2>/dev/null)" # list of mails in queue
|
||||||
|
local -i NDX=0
|
||||||
|
|
||||||
|
if [ -n "$LST" ] ; then # something in queue
|
||||||
|
for M in $LST ; do # process all mails
|
||||||
|
((NDX++))
|
||||||
|
send_queued_mail "$(basename $M .mail)" "$NDX" # send mail - pass {id} only
|
||||||
|
done
|
||||||
|
else # queue is empty
|
||||||
|
[ -z "$1" ] && \
|
||||||
|
dsp '' 'mail queue is empty (nothing to send)' ''
|
||||||
|
fi # inform user (if not running in sendmail mode)
|
||||||
|
}
|
||||||
|
|
||||||
|
## display queue contents
|
||||||
|
display_queue() { # <-- { 'purge' | 'send' } (op label) ; { 'rec' } (record array of mail ids)
|
||||||
|
local M ID LST="$('ls' ${Q}/*.mail 2>/dev/null)" # list of mail ids in queue
|
||||||
|
|
||||||
|
CNT=0
|
||||||
|
if [ -n "$LST" ] ; then # list has contents (any mails in queue)
|
||||||
|
for M in $LST ; do # cycle through each
|
||||||
|
ID="$(basename $M .mail)" # take mail id from filename
|
||||||
|
((CNT++))
|
||||||
|
dsp '' "mail num=[ $CNT ] id=[ $ID ]" # show mail id ## patch in
|
||||||
|
'egrep' -s --colour -h '(^From:|^To:|^Subject:)' "$M" # show mail info
|
||||||
|
[ -n "$2" ] && Q_LST[$CNT]="$ID" # bang mail id into array (note 1-based array indexing)
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
else # no mails ; no contents
|
||||||
|
[ -z "$1" ] && \
|
||||||
|
dsp '' 'no mail in queue' '' || \
|
||||||
|
dsp '' "mail queue is empty (nothing to $1)" '' # inform user
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## delete all mail in queue, after confirmation
|
||||||
|
purge_queue() {
|
||||||
|
display_queue 'purge' # show queue contents
|
||||||
|
if ok -n 'remove (purge) all mail from the queue' ; then
|
||||||
|
lock_queue # lock here
|
||||||
|
'rm' -f "$Q"/*.*
|
||||||
|
log 'msmtp queue purged (all mail)'
|
||||||
|
lock_queue -u # unlock here
|
||||||
|
else
|
||||||
|
dsp '' 'nothing done ; queue is untouched' ''
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## select a single mail from queue ; delete it or send it
|
||||||
|
## select by mail index (position in queue) or mail id
|
||||||
|
select_mail() { # <-- < 'purge' | 'send' >
|
||||||
|
local OK ID # mail id
|
||||||
|
local -i I NDX # mail index (position in queue)
|
||||||
|
|
||||||
|
while true ; do # purge an individual mail from queue
|
||||||
|
display_queue "$1" 'rec' # show queue contents ; make mail ids array
|
||||||
|
|
||||||
|
## allow selection also by mail index
|
||||||
|
if [ $CNT -eq 1 ] ; then # only one mail in queue ; take its id
|
||||||
|
NDX=1
|
||||||
|
ID="${Q_LST[1]}"
|
||||||
|
else # more than one mail ; select its id
|
||||||
|
while true ; do # get mail id
|
||||||
|
OK='t' # optimistic to a fault
|
||||||
|
dsp "enter mail number or id to $1" # <-- num or file name (only, no suff)
|
||||||
|
echo -n ' ( <cr> alone to exit ) ..: '
|
||||||
|
read ID
|
||||||
|
[ -n "$ID" ] || return # entry made - or say good bye
|
||||||
|
|
||||||
|
if [ "${ID:4:1}" != '-' ] ; then # mail id *not* entered ; test index num
|
||||||
|
for (( I=0 ; I<${#ID} ; I++ )) ; do # test index number
|
||||||
|
if [[ "${ID:${I}:1}" < '0' || \
|
||||||
|
"${ID:${I}:1}" > '9' ]] ; then
|
||||||
|
dsp '' "[ $ID ] is neither a valid mail id"\
|
||||||
|
'nor a valid mail number' ''
|
||||||
|
unset OK
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ -z "$OK" ] && continue # format not ok (not all nums)
|
||||||
|
|
||||||
|
NDX=$ID
|
||||||
|
if [ $NDX -lt 1 ] || [ $NDX -gt $CNT ] ; then # test number range (1 - $CNT)
|
||||||
|
dsp '' "[ $NDX ] is out of range as a mail number"\
|
||||||
|
"validity is from 1 to $CNT"
|
||||||
|
continue # try again
|
||||||
|
fi
|
||||||
|
|
||||||
|
ID="${Q_LST[$NDX]}" # format & range were ok ; use it
|
||||||
|
break # valid mail selection
|
||||||
|
else # mail id entered
|
||||||
|
for (( NDX=1 ; NDX<=${#Q_LST[*]} ; NDX++ )) ; do # find entered id in queue list
|
||||||
|
[ "$ID" = "${Q_LST[$NDX]}" ] && break
|
||||||
|
done
|
||||||
|
[ $NDX -le ${#Q_LST[*]} ] && \
|
||||||
|
break || \
|
||||||
|
dsp '' "mail [ $ID ] not found ; invalid id" # mail selection valid (found) or
|
||||||
|
fi # fell through (not found) complain
|
||||||
|
done # and ask again
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ok '' "$1 :"\
|
||||||
|
" mail num=[ $NDX ]"\
|
||||||
|
" id=[ $ID ]" '' ; then # confirm mail op
|
||||||
|
if [ "$1" = 'purge' ] ; then # purging
|
||||||
|
lock_queue # lock here
|
||||||
|
'rm' -f "$Q"/"$ID".* # msmtp - nukes single mail (both files) in queue
|
||||||
|
log "mail [ $ID ] purged from queue" # log op
|
||||||
|
lock_queue -u # unlock here
|
||||||
|
ALT='t' # mark that a queue alteration has taken place
|
||||||
|
else # sending
|
||||||
|
lock_queue # lock here
|
||||||
|
send_queued_mail "$ID" "$NDX" # send out the mail
|
||||||
|
lock_queue -u # unlock here
|
||||||
|
fi
|
||||||
|
else # user opts out
|
||||||
|
dsp '' 'nothing done to this queued email' # soothe user
|
||||||
|
[ $CNT -eq 1 ] && break # single mail ; user opted out
|
||||||
|
fi
|
||||||
|
dsp '' "--------------------------------------------------"
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$ALT" ] ; then # queue was changed
|
||||||
|
dsp '' 'done' ''
|
||||||
|
else # queue is untouched
|
||||||
|
dsp '' 'nothing done ; queue is untouched' ''
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
## ----------------------------------- functions for directly sending mail
|
||||||
|
## ----------------------------------- 'sendmail' mode - (msmtpq)
|
||||||
|
#
|
||||||
|
|
||||||
|
## ('sendmail' mode only)
|
||||||
|
## make base filename id for queue
|
||||||
|
make_id() {
|
||||||
|
local -i INC # increment counter for (possible) base fqp name collision
|
||||||
|
|
||||||
|
ID="$(date +%Y-%m-%d-%H.%M.%S)" # make filename id for queue (global
|
||||||
|
FQP="${Q}/$ID" # make fully qualified pathname vars)
|
||||||
|
## Philipp Hartwig patch #1
|
||||||
|
if [ -f "${FQP}.mail" -o -f "${FQP}.msmtp" ] ; then # ensure fqp name is unique
|
||||||
|
INC=1 # initial increment
|
||||||
|
while [ -f "${FQP}-${INC}.mail" -o -f "${FQP}-${INC}.msmtp" ] ; do # fqp name w/incr exists
|
||||||
|
(( ++INC )) # bump increment
|
||||||
|
done
|
||||||
|
ID="${ID}-${INC}" # unique ; set id
|
||||||
|
FQP="${FQP}-${INC}" # unique ; set fqp name
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## ('sendmail' mode only)
|
||||||
|
## enqueue a mail
|
||||||
|
enqueue_mail() { # <-- all mail args ; mail text via TMP
|
||||||
|
if echo "$@" > "${FQP}.msmtp" ; then # write msmtp command line to queue .msmtp file
|
||||||
|
log "enqueued mail as : [ $ID ] ( $* ) : successful" # (queue .mail file is already there)
|
||||||
|
else # write failed ; bomb
|
||||||
|
log -e "$?" "queueing - writing msmtp cmd line { $* }"\
|
||||||
|
" to [ ${ID}.msmtp ] : failed"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## ('sendmail' mode only)
|
||||||
|
## send a mail (if possible, otherwise enqueue it)
|
||||||
|
## if send is successful, msmtp will also log it (if enabled in ~/.msmtprc)
|
||||||
|
send_mail() { # <-- all mail args ; mail text via TMP
|
||||||
|
[ -z "$EMAIL_CONN_NOTEST" ] && { # connection test
|
||||||
|
connect_test || {
|
||||||
|
log "mail for [ $* ] : couldn't be sent - host not connected"
|
||||||
|
enqueue_mail "$@" # enqueue the mail
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $MSMTP "$@" < "${FQP}.mail" > /dev/null ; then # send mail using queue .mail fil
|
||||||
|
log "mail for [ $* ] : send was successful" # log it
|
||||||
|
'rm' -f ${FQP}.* # remove all queue mail files .mail & .msmtp file
|
||||||
|
run_queue 'sm' # run/flush any other mails in queue
|
||||||
|
else # send failed - the mail stays in the queue
|
||||||
|
log "mail for [ $* ] : send was unsuccessful ; msmtp exit code was $?"\
|
||||||
|
"enqueued mail as : [ $ID ] ( $* )" # (queue .mail file is already there)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
## -- entry point
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ ! "$1" = '--q-mgmt' ] ; then # msmtpq - sendmail mode
|
||||||
|
lock_queue # lock here
|
||||||
|
make_id # make base queue filename id for this mail
|
||||||
|
# write mail body text to queue .mail file
|
||||||
|
cat > "${FQP}.mail" || \
|
||||||
|
log -e "$?" "creating mail body file [ ${FQP}.mail ] : failed" # test for error
|
||||||
|
# write msmtp command line to queue .msmtp file
|
||||||
|
echo "$@" > "${FQP}.msmtp" || \
|
||||||
|
log -e "$?" "creating msmtp cmd line file { $* }"\
|
||||||
|
" to [ ${ID}.msmtp ] : failed" # test for error
|
||||||
|
send_mail "$@" # send the mail if possible, queue it if not
|
||||||
|
lock_queue -u # unlock here
|
||||||
|
else # msmtp-queue - queue management mode
|
||||||
|
shift # trim off first (--q-mgmt) arg
|
||||||
|
OP=${1:1} # trim off first char of OP arg
|
||||||
|
case "$OP" in # sort ops ; run according to spec
|
||||||
|
r) lock_queue
|
||||||
|
run_queue
|
||||||
|
lock_queue -u ;; # run (flush) the queue
|
||||||
|
R) select_mail send ;; # send individual mail(s) in queue
|
||||||
|
d|'') display_queue ;; # display (list) all mail in queue (default)
|
||||||
|
p) select_mail purge ;; # purge individual mail(s) from queue
|
||||||
|
a) purge_queue ;; # purge all mail in queue
|
||||||
|
h) usage ;; # show help
|
||||||
|
*) usage "[ -$OP ] is an unknown msmtp-queue option" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
8
bin/secret.sh
Executable file
8
bin/secret.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
gopass show -o "$1" "$2"
|
||||||
|
# wait until the password is available
|
||||||
|
while [ $? != 0 ]; do
|
||||||
|
gopass show -o "$1" "$2"
|
||||||
|
done
|
||||||
|
|
16
bin/share/applications/com.mitchellh.ghostty.desktop
Normal file
16
bin/share/applications/com.mitchellh.ghostty.desktop
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Ghostty
|
||||||
|
Type=Application
|
||||||
|
Comment=A terminal emulator
|
||||||
|
Exec=ghostty
|
||||||
|
Icon=com.mitchellh.ghostty
|
||||||
|
Categories=System;TerminalEmulator;
|
||||||
|
Keywords=terminal;tty;pty;
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
Actions=new-window;
|
||||||
|
X-GNOME-UsesNotifications=true
|
||||||
|
|
||||||
|
[Desktop Action new-window]
|
||||||
|
Name=New Window
|
||||||
|
Exec=ghostty
|
440
bin/share/bash-completion/completions/ghostty.bash
Normal file
440
bin/share/bash-completion/completions/ghostty.bash
Normal file
|
@ -0,0 +1,440 @@
|
||||||
|
# -o nospace requires we add back a space when a completion is finished
|
||||||
|
# and not part of a --key= completion
|
||||||
|
addSpaces() {
|
||||||
|
for idx in "${!COMPREPLY[@]}"; do
|
||||||
|
[ -n "${COMPREPLY[idx]}" ] && COMPREPLY[idx]="${COMPREPLY[idx]} ";
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_fonts() {
|
||||||
|
local IFS=$'\n'
|
||||||
|
mapfile -t COMPREPLY < <( compgen -P '"' -S '"' -W "$($ghostty +list-fonts | grep '^[A-Z]' )" -- "$cur")
|
||||||
|
}
|
||||||
|
|
||||||
|
_themes() {
|
||||||
|
local IFS=$'\n'
|
||||||
|
mapfile -t COMPREPLY < <( compgen -P '"' -S '"' -W "$($ghostty +list-themes | sed -E 's/^(.*) \(.*$/\1/')" -- "$cur")
|
||||||
|
}
|
||||||
|
|
||||||
|
_files() {
|
||||||
|
mapfile -t COMPREPLY < <( compgen -o filenames -f -- "$cur" )
|
||||||
|
for i in "${!COMPREPLY[@]}"; do
|
||||||
|
if [[ -d "${COMPREPLY[i]}" ]]; then
|
||||||
|
COMPREPLY[i]="${COMPREPLY[i]}/";
|
||||||
|
fi
|
||||||
|
if [[ -f "${COMPREPLY[i]}" ]]; then
|
||||||
|
COMPREPLY[i]="${COMPREPLY[i]} ";
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_dirs() {
|
||||||
|
mapfile -t COMPREPLY < <( compgen -o dirnames -d -- "$cur" )
|
||||||
|
for i in "${!COMPREPLY[@]}"; do
|
||||||
|
if [[ -d "${COMPREPLY[i]}" ]]; then
|
||||||
|
COMPREPLY[i]="${COMPREPLY[i]}/";
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "${#COMPREPLY[@]}" == 0 && -d "$cur" ]]; then
|
||||||
|
COMPREPLY=( "$cur " )
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
config="--help"
|
||||||
|
config+=" --version"
|
||||||
|
config+=" --font-family="
|
||||||
|
config+=" --font-family-bold="
|
||||||
|
config+=" --font-family-italic="
|
||||||
|
config+=" --font-family-bold-italic="
|
||||||
|
config+=" --font-style="
|
||||||
|
config+=" --font-style-bold="
|
||||||
|
config+=" --font-style-italic="
|
||||||
|
config+=" --font-style-bold-italic="
|
||||||
|
config+=" --font-synthetic-style="
|
||||||
|
config+=" --font-feature="
|
||||||
|
config+=" --font-size="
|
||||||
|
config+=" --font-variation="
|
||||||
|
config+=" --font-variation-bold="
|
||||||
|
config+=" --font-variation-italic="
|
||||||
|
config+=" --font-variation-bold-italic="
|
||||||
|
config+=" --font-codepoint-map="
|
||||||
|
config+=" '--font-thicken '"
|
||||||
|
config+=" --adjust-cell-width="
|
||||||
|
config+=" --adjust-cell-height="
|
||||||
|
config+=" --adjust-font-baseline="
|
||||||
|
config+=" --adjust-underline-position="
|
||||||
|
config+=" --adjust-underline-thickness="
|
||||||
|
config+=" --adjust-strikethrough-position="
|
||||||
|
config+=" --adjust-strikethrough-thickness="
|
||||||
|
config+=" --adjust-overline-position="
|
||||||
|
config+=" --adjust-overline-thickness="
|
||||||
|
config+=" --adjust-cursor-thickness="
|
||||||
|
config+=" --adjust-box-thickness="
|
||||||
|
config+=" --grapheme-width-method="
|
||||||
|
config+=" --freetype-load-flags="
|
||||||
|
config+=" --theme="
|
||||||
|
config+=" --background="
|
||||||
|
config+=" --foreground="
|
||||||
|
config+=" --selection-foreground="
|
||||||
|
config+=" --selection-background="
|
||||||
|
config+=" '--selection-invert-fg-bg '"
|
||||||
|
config+=" --minimum-contrast="
|
||||||
|
config+=" --palette="
|
||||||
|
config+=" --cursor-color="
|
||||||
|
config+=" '--cursor-invert-fg-bg '"
|
||||||
|
config+=" --cursor-opacity="
|
||||||
|
config+=" --cursor-style="
|
||||||
|
config+=" '--cursor-style-blink '"
|
||||||
|
config+=" --cursor-text="
|
||||||
|
config+=" '--cursor-click-to-move '"
|
||||||
|
config+=" '--mouse-hide-while-typing '"
|
||||||
|
config+=" --mouse-shift-capture="
|
||||||
|
config+=" --mouse-scroll-multiplier="
|
||||||
|
config+=" --background-opacity="
|
||||||
|
config+=" --background-blur-radius="
|
||||||
|
config+=" --unfocused-split-opacity="
|
||||||
|
config+=" --unfocused-split-fill="
|
||||||
|
config+=" --command="
|
||||||
|
config+=" --initial-command="
|
||||||
|
config+=" '--wait-after-command '"
|
||||||
|
config+=" --abnormal-command-exit-runtime="
|
||||||
|
config+=" --scrollback-limit="
|
||||||
|
config+=" --link="
|
||||||
|
config+=" '--link-url '"
|
||||||
|
config+=" '--fullscreen '"
|
||||||
|
config+=" --title="
|
||||||
|
config+=" --class="
|
||||||
|
config+=" --x11-instance-name="
|
||||||
|
config+=" --working-directory="
|
||||||
|
config+=" --keybind="
|
||||||
|
config+=" --window-padding-x="
|
||||||
|
config+=" --window-padding-y="
|
||||||
|
config+=" '--window-padding-balance '"
|
||||||
|
config+=" --window-padding-color="
|
||||||
|
config+=" '--window-vsync '"
|
||||||
|
config+=" '--window-inherit-working-directory '"
|
||||||
|
config+=" '--window-inherit-font-size '"
|
||||||
|
config+=" '--window-decoration '"
|
||||||
|
config+=" --window-title-font-family="
|
||||||
|
config+=" --window-theme="
|
||||||
|
config+=" --window-colorspace="
|
||||||
|
config+=" --window-height="
|
||||||
|
config+=" --window-width="
|
||||||
|
config+=" --window-save-state="
|
||||||
|
config+=" '--window-step-resize '"
|
||||||
|
config+=" --window-new-tab-position="
|
||||||
|
config+=" --resize-overlay="
|
||||||
|
config+=" --resize-overlay-position="
|
||||||
|
config+=" --resize-overlay-duration="
|
||||||
|
config+=" '--focus-follows-mouse '"
|
||||||
|
config+=" --clipboard-read="
|
||||||
|
config+=" --clipboard-write="
|
||||||
|
config+=" '--clipboard-trim-trailing-spaces '"
|
||||||
|
config+=" '--clipboard-paste-protection '"
|
||||||
|
config+=" '--clipboard-paste-bracketed-safe '"
|
||||||
|
config+=" --image-storage-limit="
|
||||||
|
config+=" --copy-on-select="
|
||||||
|
config+=" --click-repeat-interval="
|
||||||
|
config+=" --config-file="
|
||||||
|
config+=" '--config-default-files '"
|
||||||
|
config+=" '--confirm-close-surface '"
|
||||||
|
config+=" '--quit-after-last-window-closed '"
|
||||||
|
config+=" --quit-after-last-window-closed-delay="
|
||||||
|
config+=" '--initial-window '"
|
||||||
|
config+=" --quick-terminal-position="
|
||||||
|
config+=" --quick-terminal-screen="
|
||||||
|
config+=" --quick-terminal-animation-duration="
|
||||||
|
config+=" --shell-integration="
|
||||||
|
config+=" --shell-integration-features="
|
||||||
|
config+=" --osc-color-report-format="
|
||||||
|
config+=" '--vt-kam-allowed '"
|
||||||
|
config+=" --custom-shader="
|
||||||
|
config+=" --custom-shader-animation="
|
||||||
|
config+=" --macos-non-native-fullscreen="
|
||||||
|
config+=" --macos-titlebar-style="
|
||||||
|
config+=" --macos-titlebar-proxy-icon="
|
||||||
|
config+=" --macos-option-as-alt="
|
||||||
|
config+=" '--macos-window-shadow '"
|
||||||
|
config+=" '--macos-auto-secure-input '"
|
||||||
|
config+=" '--macos-secure-input-indication '"
|
||||||
|
config+=" --linux-cgroup="
|
||||||
|
config+=" --linux-cgroup-memory-limit="
|
||||||
|
config+=" --linux-cgroup-processes-limit="
|
||||||
|
config+=" '--linux-cgroup-hard-fail '"
|
||||||
|
config+=" --gtk-single-instance="
|
||||||
|
config+=" '--gtk-titlebar '"
|
||||||
|
config+=" --gtk-tabs-location="
|
||||||
|
config+=" --adw-toolbar-style="
|
||||||
|
config+=" '--gtk-wide-tabs '"
|
||||||
|
config+=" '--gtk-adwaita '"
|
||||||
|
config+=" '--desktop-notifications '"
|
||||||
|
config+=" '--bold-is-bright '"
|
||||||
|
config+=" --term="
|
||||||
|
config+=" --enquiry-response="
|
||||||
|
config+=" --auto-update="
|
||||||
|
config+=" --auto-update-channel="
|
||||||
|
|
||||||
|
_handleConfig() {
|
||||||
|
case "$prev" in
|
||||||
|
--font-family) _fonts ;;
|
||||||
|
--font-family-bold) _fonts ;;
|
||||||
|
--font-family-italic) _fonts ;;
|
||||||
|
--font-family-bold-italic) _fonts ;;
|
||||||
|
--font-style) return ;;
|
||||||
|
--font-style-bold) return ;;
|
||||||
|
--font-style-italic) return ;;
|
||||||
|
--font-style-bold-italic) return ;;
|
||||||
|
--font-synthetic-style) mapfile -t COMPREPLY < <( compgen -W "bold no-bold italic no-italic bold-italic no-bold-italic" -- "$cur" ); addSpaces ;;
|
||||||
|
--font-feature) return ;;
|
||||||
|
--font-size) return ;;
|
||||||
|
--font-variation) return ;;
|
||||||
|
--font-variation-bold) return ;;
|
||||||
|
--font-variation-italic) return ;;
|
||||||
|
--font-variation-bold-italic) return ;;
|
||||||
|
--font-codepoint-map) return ;;
|
||||||
|
--font-thicken) return ;;
|
||||||
|
--adjust-cell-width) return ;;
|
||||||
|
--adjust-cell-height) return ;;
|
||||||
|
--adjust-font-baseline) return ;;
|
||||||
|
--adjust-underline-position) return ;;
|
||||||
|
--adjust-underline-thickness) return ;;
|
||||||
|
--adjust-strikethrough-position) return ;;
|
||||||
|
--adjust-strikethrough-thickness) return ;;
|
||||||
|
--adjust-overline-position) return ;;
|
||||||
|
--adjust-overline-thickness) return ;;
|
||||||
|
--adjust-cursor-thickness) return ;;
|
||||||
|
--adjust-box-thickness) return ;;
|
||||||
|
--grapheme-width-method) mapfile -t COMPREPLY < <( compgen -W "legacy unicode" -- "$cur" ); addSpaces ;;
|
||||||
|
--freetype-load-flags) mapfile -t COMPREPLY < <( compgen -W "hinting no-hinting force-autohint no-force-autohint monochrome no-monochrome autohint no-autohint" -- "$cur" ); addSpaces ;;
|
||||||
|
--theme) _themes ;;
|
||||||
|
--background) return ;;
|
||||||
|
--foreground) return ;;
|
||||||
|
--selection-foreground) return ;;
|
||||||
|
--selection-background) return ;;
|
||||||
|
--selection-invert-fg-bg) return ;;
|
||||||
|
--minimum-contrast) return ;;
|
||||||
|
--palette) return ;;
|
||||||
|
--cursor-color) return ;;
|
||||||
|
--cursor-invert-fg-bg) return ;;
|
||||||
|
--cursor-opacity) return ;;
|
||||||
|
--cursor-style) mapfile -t COMPREPLY < <( compgen -W "bar block underline block_hollow" -- "$cur" ); addSpaces ;;
|
||||||
|
--cursor-style-blink) return ;;
|
||||||
|
--cursor-text) return ;;
|
||||||
|
--cursor-click-to-move) return ;;
|
||||||
|
--mouse-hide-while-typing) return ;;
|
||||||
|
--mouse-shift-capture) mapfile -t COMPREPLY < <( compgen -W "false true always never" -- "$cur" ); addSpaces ;;
|
||||||
|
--mouse-scroll-multiplier) return ;;
|
||||||
|
--background-opacity) return ;;
|
||||||
|
--background-blur-radius) return ;;
|
||||||
|
--unfocused-split-opacity) return ;;
|
||||||
|
--unfocused-split-fill) return ;;
|
||||||
|
--command) return ;;
|
||||||
|
--initial-command) return ;;
|
||||||
|
--wait-after-command) return ;;
|
||||||
|
--abnormal-command-exit-runtime) return ;;
|
||||||
|
--scrollback-limit) return ;;
|
||||||
|
--link) return ;;
|
||||||
|
--link-url) return ;;
|
||||||
|
--fullscreen) return ;;
|
||||||
|
--title) return ;;
|
||||||
|
--class) return ;;
|
||||||
|
--x11-instance-name) return ;;
|
||||||
|
--working-directory) _dirs ;;
|
||||||
|
--keybind) return ;;
|
||||||
|
--window-padding-x) return ;;
|
||||||
|
--window-padding-y) return ;;
|
||||||
|
--window-padding-balance) return ;;
|
||||||
|
--window-padding-color) mapfile -t COMPREPLY < <( compgen -W "background extend extend-always" -- "$cur" ); addSpaces ;;
|
||||||
|
--window-vsync) return ;;
|
||||||
|
--window-inherit-working-directory) return ;;
|
||||||
|
--window-inherit-font-size) return ;;
|
||||||
|
--window-decoration) return ;;
|
||||||
|
--window-title-font-family) return ;;
|
||||||
|
--window-theme) mapfile -t COMPREPLY < <( compgen -W "auto system light dark ghostty" -- "$cur" ); addSpaces ;;
|
||||||
|
--window-colorspace) mapfile -t COMPREPLY < <( compgen -W "srgb display-p3" -- "$cur" ); addSpaces ;;
|
||||||
|
--window-height) return ;;
|
||||||
|
--window-width) return ;;
|
||||||
|
--window-save-state) mapfile -t COMPREPLY < <( compgen -W "default never always" -- "$cur" ); addSpaces ;;
|
||||||
|
--window-step-resize) return ;;
|
||||||
|
--window-new-tab-position) mapfile -t COMPREPLY < <( compgen -W "current end" -- "$cur" ); addSpaces ;;
|
||||||
|
--resize-overlay) mapfile -t COMPREPLY < <( compgen -W "always never after-first" -- "$cur" ); addSpaces ;;
|
||||||
|
--resize-overlay-position) mapfile -t COMPREPLY < <( compgen -W "center top-left top-center top-right bottom-left bottom-center bottom-right" -- "$cur" ); addSpaces ;;
|
||||||
|
--resize-overlay-duration) return ;;
|
||||||
|
--focus-follows-mouse) return ;;
|
||||||
|
--clipboard-read) mapfile -t COMPREPLY < <( compgen -W "allow deny ask" -- "$cur" ); addSpaces ;;
|
||||||
|
--clipboard-write) mapfile -t COMPREPLY < <( compgen -W "allow deny ask" -- "$cur" ); addSpaces ;;
|
||||||
|
--clipboard-trim-trailing-spaces) return ;;
|
||||||
|
--clipboard-paste-protection) return ;;
|
||||||
|
--clipboard-paste-bracketed-safe) return ;;
|
||||||
|
--image-storage-limit) return ;;
|
||||||
|
--copy-on-select) mapfile -t COMPREPLY < <( compgen -W "false true clipboard" -- "$cur" ); addSpaces ;;
|
||||||
|
--click-repeat-interval) return ;;
|
||||||
|
--config-file) _files ;;
|
||||||
|
--config-default-files) return ;;
|
||||||
|
--confirm-close-surface) return ;;
|
||||||
|
--quit-after-last-window-closed) return ;;
|
||||||
|
--quit-after-last-window-closed-delay) return ;;
|
||||||
|
--initial-window) return ;;
|
||||||
|
--quick-terminal-position) mapfile -t COMPREPLY < <( compgen -W "top bottom left right" -- "$cur" ); addSpaces ;;
|
||||||
|
--quick-terminal-screen) mapfile -t COMPREPLY < <( compgen -W "main mouse macos-menu-bar" -- "$cur" ); addSpaces ;;
|
||||||
|
--quick-terminal-animation-duration) return ;;
|
||||||
|
--shell-integration) mapfile -t COMPREPLY < <( compgen -W "none detect bash elvish fish zsh" -- "$cur" ); addSpaces ;;
|
||||||
|
--shell-integration-features) mapfile -t COMPREPLY < <( compgen -W "cursor no-cursor sudo no-sudo title no-title" -- "$cur" ); addSpaces ;;
|
||||||
|
--osc-color-report-format) mapfile -t COMPREPLY < <( compgen -W "none 8-bit 16-bit" -- "$cur" ); addSpaces ;;
|
||||||
|
--vt-kam-allowed) return ;;
|
||||||
|
--custom-shader) _files ;;
|
||||||
|
--custom-shader-animation) mapfile -t COMPREPLY < <( compgen -W "false true always" -- "$cur" ); addSpaces ;;
|
||||||
|
--macos-non-native-fullscreen) mapfile -t COMPREPLY < <( compgen -W "false true visible-menu" -- "$cur" ); addSpaces ;;
|
||||||
|
--macos-titlebar-style) mapfile -t COMPREPLY < <( compgen -W "native transparent tabs hidden" -- "$cur" ); addSpaces ;;
|
||||||
|
--macos-titlebar-proxy-icon) mapfile -t COMPREPLY < <( compgen -W "visible hidden" -- "$cur" ); addSpaces ;;
|
||||||
|
--macos-option-as-alt) return ;;
|
||||||
|
--macos-window-shadow) return ;;
|
||||||
|
--macos-auto-secure-input) return ;;
|
||||||
|
--macos-secure-input-indication) return ;;
|
||||||
|
--linux-cgroup) mapfile -t COMPREPLY < <( compgen -W "never always single-instance" -- "$cur" ); addSpaces ;;
|
||||||
|
--linux-cgroup-memory-limit) return ;;
|
||||||
|
--linux-cgroup-processes-limit) return ;;
|
||||||
|
--linux-cgroup-hard-fail) return ;;
|
||||||
|
--gtk-single-instance) mapfile -t COMPREPLY < <( compgen -W "desktop false true" -- "$cur" ); addSpaces ;;
|
||||||
|
--gtk-titlebar) return ;;
|
||||||
|
--gtk-tabs-location) mapfile -t COMPREPLY < <( compgen -W "top bottom left right hidden" -- "$cur" ); addSpaces ;;
|
||||||
|
--adw-toolbar-style) mapfile -t COMPREPLY < <( compgen -W "flat raised raised-border" -- "$cur" ); addSpaces ;;
|
||||||
|
--gtk-wide-tabs) return ;;
|
||||||
|
--gtk-adwaita) return ;;
|
||||||
|
--desktop-notifications) return ;;
|
||||||
|
--bold-is-bright) return ;;
|
||||||
|
--term) return ;;
|
||||||
|
--enquiry-response) return ;;
|
||||||
|
--auto-update) mapfile -t COMPREPLY < <( compgen -W "off check download" -- "$cur" ); addSpaces ;;
|
||||||
|
--auto-update-channel) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$config" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
list_fonts="--family= --style= '--bold ' '--italic ' --help"
|
||||||
|
list_keybinds="'--default ' '--docs ' '--plain ' --help"
|
||||||
|
list_themes="'--path ' '--plain ' --help"
|
||||||
|
list_actions="'--docs ' --help"
|
||||||
|
show_config="'--default ' '--changes-only ' '--docs ' --help"
|
||||||
|
validate_config="--config-file= --help"
|
||||||
|
|
||||||
|
_handleActions() {
|
||||||
|
case "${COMP_WORDS[1]}" in
|
||||||
|
+list-fonts)
|
||||||
|
case $prev in
|
||||||
|
--family) return;;
|
||||||
|
--style) return;;
|
||||||
|
--bold) return ;;
|
||||||
|
--italic) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$list_fonts" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
+list-keybinds)
|
||||||
|
case $prev in
|
||||||
|
--default) return ;;
|
||||||
|
--docs) return ;;
|
||||||
|
--plain) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$list_keybinds" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
+list-themes)
|
||||||
|
case $prev in
|
||||||
|
--path) return ;;
|
||||||
|
--plain) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$list_themes" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
+list-actions)
|
||||||
|
case $prev in
|
||||||
|
--docs) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$list_actions" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
+show-config)
|
||||||
|
case $prev in
|
||||||
|
--default) return ;;
|
||||||
|
--changes-only) return ;;
|
||||||
|
--docs) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$show_config" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
+validate-config)
|
||||||
|
case $prev in
|
||||||
|
--config-file) return ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "$validate_config" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "--help" -- "$cur" ) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
topLevel="-e"
|
||||||
|
topLevel+=" --help"
|
||||||
|
topLevel+=" --version"
|
||||||
|
topLevel+=" +list-fonts"
|
||||||
|
topLevel+=" +list-keybinds"
|
||||||
|
topLevel+=" +list-themes"
|
||||||
|
topLevel+=" +list-colors"
|
||||||
|
topLevel+=" +list-actions"
|
||||||
|
topLevel+=" +show-config"
|
||||||
|
topLevel+=" +validate-config"
|
||||||
|
topLevel+=" +crash-report"
|
||||||
|
|
||||||
|
_ghostty() {
|
||||||
|
cur=""; prev=""; prevWasEq=false; COMPREPLY=()
|
||||||
|
ghostty="$1"
|
||||||
|
|
||||||
|
# script assumes default COMP_WORDBREAKS of roughly $' \t\n"\'><=;|&(:'
|
||||||
|
# if = is missing this script will degrade to matching on keys only.
|
||||||
|
# eg: --key=
|
||||||
|
# this can be improved if needed see: https://github.com/ghostty-org/ghostty/discussions/2994
|
||||||
|
|
||||||
|
if [ "$2" = "=" ]; then cur=""
|
||||||
|
else cur="$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$3" = "=" ]; then prev="${COMP_WORDS[COMP_CWORD-2]}"; prevWasEq=true;
|
||||||
|
else prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# current completion is double quoted add a space so the curor progresses
|
||||||
|
if [[ "$2" == \"*\" ]]; then
|
||||||
|
COMPREPLY=( "$cur " );
|
||||||
|
return;
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$COMP_CWORD" in
|
||||||
|
1)
|
||||||
|
case "${COMP_WORDS[1]}" in
|
||||||
|
-e | --help | --version) return 0 ;;
|
||||||
|
--*) _handleConfig ;;
|
||||||
|
*) mapfile -t COMPREPLY < <( compgen -W "${topLevel}" -- "$cur" ); addSpaces ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
case "$prev" in
|
||||||
|
-e | --help | --version) return 0 ;;
|
||||||
|
*)
|
||||||
|
if [[ "=" != "${COMP_WORDS[COMP_CWORD]}" && $prevWasEq != true ]]; then
|
||||||
|
# must be completing with a space after the key eg: '--<key> '
|
||||||
|
# clear out prev so we don't run any of the key specific completions
|
||||||
|
prev=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${COMP_WORDS[1]}" in
|
||||||
|
--*) _handleConfig ;;
|
||||||
|
+*) _handleActions ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -o nospace -o bashdefault -F _ghostty ghostty
|
17
bin/share/bat/syntaxes/ghostty.sublime-syntax
Normal file
17
bin/share/bat/syntaxes/ghostty.sublime-syntax
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
# See http://www.sublimetext.com/docs/syntax.html
|
||||||
|
name: Ghostty Config
|
||||||
|
file_extensions:
|
||||||
|
- ghostty
|
||||||
|
scope: source.ghostty
|
||||||
|
|
||||||
|
contexts:
|
||||||
|
main:
|
||||||
|
# Comments
|
||||||
|
- match: '^\s*#.*$'
|
||||||
|
scope: comment.line.number-sign.ghostty
|
||||||
|
|
||||||
|
# Keywords
|
||||||
|
- match: '\b(font-family|font-family-bold|font-family-italic|font-family-bold-italic|font-style|font-style-bold|font-style-italic|font-style-bold-italic|font-synthetic-style|font-feature|font-size|font-variation|font-variation-bold|font-variation-italic|font-variation-bold-italic|font-codepoint-map|font-thicken|adjust-cell-width|adjust-cell-height|adjust-font-baseline|adjust-underline-position|adjust-underline-thickness|adjust-strikethrough-position|adjust-strikethrough-thickness|adjust-overline-position|adjust-overline-thickness|adjust-cursor-thickness|adjust-box-thickness|grapheme-width-method|freetype-load-flags|theme|background|foreground|selection-foreground|selection-background|selection-invert-fg-bg|minimum-contrast|palette|cursor-color|cursor-invert-fg-bg|cursor-opacity|cursor-style|cursor-style-blink|cursor-text|cursor-click-to-move|mouse-hide-while-typing|mouse-shift-capture|mouse-scroll-multiplier|background-opacity|background-blur-radius|unfocused-split-opacity|unfocused-split-fill|command|initial-command|wait-after-command|abnormal-command-exit-runtime|scrollback-limit|link|link-url|fullscreen|title|class|x11-instance-name|working-directory|keybind|window-padding-x|window-padding-y|window-padding-balance|window-padding-color|window-vsync|window-inherit-working-directory|window-inherit-font-size|window-decoration|window-title-font-family|window-theme|window-colorspace|window-height|window-width|window-save-state|window-step-resize|window-new-tab-position|resize-overlay|resize-overlay-position|resize-overlay-duration|focus-follows-mouse|clipboard-read|clipboard-write|clipboard-trim-trailing-spaces|clipboard-paste-protection|clipboard-paste-bracketed-safe|image-storage-limit|copy-on-select|click-repeat-interval|config-file|config-default-files|confirm-close-surface|quit-after-last-window-closed|quit-after-last-window-closed-delay|initial-window|quick-terminal-position|quick-terminal-screen|quick-terminal-animation-duration|shell-integration|shell-integration-features|osc-color-report-format|vt-kam-allowed|custom-shader|custom-shader-animation|macos-non-native-fullscreen|macos-titlebar-style|macos-titlebar-proxy-icon|macos-option-as-alt|macos-window-shadow|macos-auto-secure-input|macos-secure-input-indication|linux-cgroup|linux-cgroup-memory-limit|linux-cgroup-processes-limit|linux-cgroup-hard-fail|gtk-single-instance|gtk-titlebar|gtk-tabs-location|adw-toolbar-style|gtk-wide-tabs|gtk-adwaita|desktop-notifications|bold-is-bright|term|enquiry-response|auto-update|auto-update-channel)\b'
|
||||||
|
scope: keyword.other.ghostty
|
150
bin/share/fish/vendor_completions.d/ghostty.fish
Normal file
150
bin/share/fish/vendor_completions.d/ghostty.fish
Normal file
|
@ -0,0 +1,150 @@
|
||||||
|
set -l commands "+list-fonts +list-keybinds +list-themes +list-colors +list-actions +show-config +validate-config +crash-report"
|
||||||
|
complete -c ghostty -f
|
||||||
|
complete -c ghostty -s e -l help -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l version -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-family -r -f -a "(ghostty +list-fonts | grep '^[A-Z]')"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-family-bold -r -f -a "(ghostty +list-fonts | grep '^[A-Z]')"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-family-italic -r -f -a "(ghostty +list-fonts | grep '^[A-Z]')"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-family-bold-italic -r -f -a "(ghostty +list-fonts | grep '^[A-Z]')"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-style -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-style-bold -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-style-italic -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-style-bold-italic -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-synthetic-style -r -f -a "bold no-bold italic no-italic bold-italic no-bold-italic"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-feature -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-size -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-variation -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-variation-bold -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-variation-italic -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-variation-bold-italic -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-codepoint-map -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l font-thicken -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-cell-width -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-cell-height -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-font-baseline -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-underline-position -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-underline-thickness -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-strikethrough-position -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-strikethrough-thickness -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-overline-position -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-overline-thickness -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-cursor-thickness -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adjust-box-thickness -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l grapheme-width-method -r -f -a "legacy unicode"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l freetype-load-flags -r -f -a "hinting no-hinting force-autohint no-force-autohint monochrome no-monochrome autohint no-autohint"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l theme -r -f -a "(ghostty +list-themes | sed -E 's/^(.*) \(.*\$/\1/')"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l background -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l foreground -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l selection-foreground -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l selection-background -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l selection-invert-fg-bg -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l minimum-contrast -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l palette -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-color -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-invert-fg-bg -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-opacity -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-style -r -f -a "bar block underline block_hollow"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-style-blink -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-text -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l cursor-click-to-move -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l mouse-hide-while-typing -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l mouse-shift-capture -r -f -a "false true always never"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l mouse-scroll-multiplier -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l background-opacity -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l background-blur-radius -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l unfocused-split-opacity -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l unfocused-split-fill -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l command -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l initial-command -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l wait-after-command -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l abnormal-command-exit-runtime -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l scrollback-limit -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l link -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l link-url -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l fullscreen -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l title -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l class -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l x11-instance-name -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l working-directory -r -f -k -a "(__fish_complete_directories)"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l keybind -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-padding-x -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-padding-y -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-padding-balance -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-padding-color -r -f -a "background extend extend-always"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-vsync -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-inherit-working-directory -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-inherit-font-size -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-decoration -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-title-font-family -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-theme -r -f -a "auto system light dark ghostty"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-colorspace -r -f -a "srgb display-p3"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-height -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-width -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-save-state -r -f -a "default never always"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-step-resize -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l window-new-tab-position -r -f -a "current end"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l resize-overlay -r -f -a "always never after-first"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l resize-overlay-position -r -f -a "center top-left top-center top-right bottom-left bottom-center bottom-right"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l resize-overlay-duration -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l focus-follows-mouse -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l clipboard-read -r -f -a "allow deny ask"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l clipboard-write -r -f -a "allow deny ask"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l clipboard-trim-trailing-spaces -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l clipboard-paste-protection -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l clipboard-paste-bracketed-safe -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l image-storage-limit -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l copy-on-select -r -f -a "false true clipboard"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l click-repeat-interval -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l config-file -r -F
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l config-default-files -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l confirm-close-surface -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l quit-after-last-window-closed -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l quit-after-last-window-closed-delay -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l initial-window -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l quick-terminal-position -r -f -a "top bottom left right"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l quick-terminal-screen -r -f -a "main mouse macos-menu-bar"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l quick-terminal-animation-duration -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l shell-integration -r -f -a "none detect bash elvish fish zsh"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l shell-integration-features -r -f -a "cursor no-cursor sudo no-sudo title no-title"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l osc-color-report-format -r -f -a "none 8-bit 16-bit"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l vt-kam-allowed -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l custom-shader -r -F
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l custom-shader-animation -r -f -a "false true always"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-non-native-fullscreen -r -f -a "false true visible-menu"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-titlebar-style -r -f -a "native transparent tabs hidden"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-titlebar-proxy-icon -r -f -a "visible hidden"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-option-as-alt -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-window-shadow -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-auto-secure-input -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l macos-secure-input-indication -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l linux-cgroup -r -f -a "never always single-instance"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l linux-cgroup-memory-limit -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l linux-cgroup-processes-limit -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l linux-cgroup-hard-fail -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l gtk-single-instance -r -f -a "desktop false true"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l gtk-titlebar -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l gtk-tabs-location -r -f -a "top bottom left right hidden"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l adw-toolbar-style -r -f -a "flat raised raised-border"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l gtk-wide-tabs -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l gtk-adwaita -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l desktop-notifications -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l bold-is-bright -f -a "true false"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l term -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l enquiry-response -r -f
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l auto-update -r -f -a "off check download"
|
||||||
|
complete -c ghostty -n "not __fish_seen_subcommand_from $commands" -l auto-update-channel -r -f
|
||||||
|
complete -c ghostty -n "string match -q -- '+*' (commandline -pt)" -f -a "+list-fonts +list-keybinds +list-themes +list-colors +list-actions +show-config +validate-config +crash-report"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-fonts" -l family -r -f
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-fonts" -l style -r -f
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-fonts" -l bold -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-fonts" -l italic -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-keybinds" -l default -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-keybinds" -l docs -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-keybinds" -l plain -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-themes" -l path -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-themes" -l plain -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +list-actions" -l docs -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +show-config" -l default -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +show-config" -l changes-only -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +show-config" -l docs -f -a "true false"
|
||||||
|
complete -c ghostty -n "__fish_seen_subcommand_from +validate-config" -l config-file -r -F
|
2244
bin/share/ghostty/doc/ghostty.1.html
Normal file
2244
bin/share/ghostty/doc/ghostty.1.html
Normal file
File diff suppressed because it is too large
Load diff
2291
bin/share/ghostty/doc/ghostty.1.md
Normal file
2291
bin/share/ghostty/doc/ghostty.1.md
Normal file
File diff suppressed because it is too large
Load diff
2431
bin/share/ghostty/doc/ghostty.5.html
Normal file
2431
bin/share/ghostty/doc/ghostty.5.html
Normal file
File diff suppressed because it is too large
Load diff
2517
bin/share/ghostty/doc/ghostty.5.md
Normal file
2517
bin/share/ghostty/doc/ghostty.5.md
Normal file
File diff suppressed because it is too large
Load diff
386
bin/share/ghostty/shell-integration/bash/bash-preexec.sh
Normal file
386
bin/share/ghostty/shell-integration/bash/bash-preexec.sh
Normal file
|
@ -0,0 +1,386 @@
|
||||||
|
# bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions.
|
||||||
|
# https://github.com/rcaloras/bash-preexec
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# 'preexec' functions are executed before each interactive command is
|
||||||
|
# executed, with the interactive command as its argument. The 'precmd'
|
||||||
|
# function is executed before each prompt is displayed.
|
||||||
|
#
|
||||||
|
# Author: Ryan Caloras (ryan@bashhub.com)
|
||||||
|
# Forked from Original Author: Glyph Lefkowitz
|
||||||
|
#
|
||||||
|
# V0.5.0
|
||||||
|
#
|
||||||
|
|
||||||
|
# General Usage:
|
||||||
|
#
|
||||||
|
# 1. Source this file at the end of your bash profile so as not to interfere
|
||||||
|
# with anything else that's using PROMPT_COMMAND.
|
||||||
|
#
|
||||||
|
# 2. Add any precmd or preexec functions by appending them to their arrays:
|
||||||
|
# e.g.
|
||||||
|
# precmd_functions+=(my_precmd_function)
|
||||||
|
# precmd_functions+=(some_other_precmd_function)
|
||||||
|
#
|
||||||
|
# preexec_functions+=(my_preexec_function)
|
||||||
|
#
|
||||||
|
# 3. Consider changing anything using the DEBUG trap or PROMPT_COMMAND
|
||||||
|
# to use preexec and precmd instead. Preexisting usages will be
|
||||||
|
# preserved, but doing so manually may be less surprising.
|
||||||
|
#
|
||||||
|
# Note: This module requires two Bash features which you must not otherwise be
|
||||||
|
# using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. If you override
|
||||||
|
# either of these after bash-preexec has been installed it will most likely break.
|
||||||
|
|
||||||
|
# Tell shellcheck what kind of file this is.
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
# Make sure this is bash that's running and return otherwise.
|
||||||
|
# Use POSIX syntax for this line:
|
||||||
|
if [ -z "${BASH_VERSION-}" ]; then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We only support Bash 3.1+.
|
||||||
|
# Note: BASH_VERSINFO is first available in Bash-2.0.
|
||||||
|
if [[ -z "${BASH_VERSINFO-}" ]] || (( BASH_VERSINFO[0] < 3 || (BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 1) )); then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Avoid duplicate inclusion
|
||||||
|
if [[ -n "${bash_preexec_imported:-}" || -n "${__bp_imported:-}" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
bash_preexec_imported="defined"
|
||||||
|
|
||||||
|
# WARNING: This variable is no longer used and should not be relied upon.
|
||||||
|
# Use ${bash_preexec_imported} instead.
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
__bp_imported="${bash_preexec_imported}"
|
||||||
|
|
||||||
|
# Should be available to each precmd and preexec
|
||||||
|
# functions, should they want it. $? and $_ are available as $? and $_, but
|
||||||
|
# $PIPESTATUS is available only in a copy, $BP_PIPESTATUS.
|
||||||
|
# TODO: Figure out how to restore PIPESTATUS before each precmd or preexec
|
||||||
|
# function.
|
||||||
|
__bp_last_ret_value="$?"
|
||||||
|
BP_PIPESTATUS=("${PIPESTATUS[@]}")
|
||||||
|
__bp_last_argument_prev_command="$_"
|
||||||
|
|
||||||
|
__bp_inside_precmd=0
|
||||||
|
__bp_inside_preexec=0
|
||||||
|
|
||||||
|
# Initial PROMPT_COMMAND string that is removed from PROMPT_COMMAND post __bp_install
|
||||||
|
__bp_install_string=$'__bp_trap_string="$(trap -p DEBUG)"\ntrap - DEBUG\n__bp_install'
|
||||||
|
|
||||||
|
# Fails if any of the given variables are readonly
|
||||||
|
# Reference https://stackoverflow.com/a/4441178
|
||||||
|
__bp_require_not_readonly() {
|
||||||
|
local var
|
||||||
|
for var; do
|
||||||
|
if ! ( unset "$var" 2> /dev/null ); then
|
||||||
|
echo "bash-preexec requires write access to ${var}" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remove ignorespace and or replace ignoreboth from HISTCONTROL
|
||||||
|
# so we can accurately invoke preexec with a command from our
|
||||||
|
# history even if it starts with a space.
|
||||||
|
__bp_adjust_histcontrol() {
|
||||||
|
local histcontrol
|
||||||
|
histcontrol="${HISTCONTROL:-}"
|
||||||
|
histcontrol="${histcontrol//ignorespace}"
|
||||||
|
# Replace ignoreboth with ignoredups
|
||||||
|
if [[ "$histcontrol" == *"ignoreboth"* ]]; then
|
||||||
|
histcontrol="ignoredups:${histcontrol//ignoreboth}"
|
||||||
|
fi;
|
||||||
|
export HISTCONTROL="$histcontrol"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This variable describes whether we are currently in "interactive mode";
|
||||||
|
# i.e. whether this shell has just executed a prompt and is waiting for user
|
||||||
|
# input. It documents whether the current command invoked by the trace hook is
|
||||||
|
# run interactively by the user; it's set immediately after the prompt hook,
|
||||||
|
# and unset as soon as the trace hook is run.
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
|
||||||
|
# These arrays are used to add functions to be run before, or after, prompts.
|
||||||
|
declare -a precmd_functions
|
||||||
|
declare -a preexec_functions
|
||||||
|
|
||||||
|
# Trims leading and trailing whitespace from $2 and writes it to the variable
|
||||||
|
# name passed as $1
|
||||||
|
__bp_trim_whitespace() {
|
||||||
|
local var=${1:?} text=${2:-}
|
||||||
|
text="${text#"${text%%[![:space:]]*}"}" # remove leading whitespace characters
|
||||||
|
text="${text%"${text##*[![:space:]]}"}" # remove trailing whitespace characters
|
||||||
|
printf -v "$var" '%s' "$text"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Trims whitespace and removes any leading or trailing semicolons from $2 and
|
||||||
|
# writes the resulting string to the variable name passed as $1. Used for
|
||||||
|
# manipulating substrings in PROMPT_COMMAND
|
||||||
|
__bp_sanitize_string() {
|
||||||
|
local var=${1:?} text=${2:-} sanitized
|
||||||
|
__bp_trim_whitespace sanitized "$text"
|
||||||
|
sanitized=${sanitized%;}
|
||||||
|
sanitized=${sanitized#;}
|
||||||
|
__bp_trim_whitespace sanitized "$sanitized"
|
||||||
|
printf -v "$var" '%s' "$sanitized"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function is installed as part of the PROMPT_COMMAND;
|
||||||
|
# It sets a variable to indicate that the prompt was just displayed,
|
||||||
|
# to allow the DEBUG trap to know that the next command is likely interactive.
|
||||||
|
__bp_interactive_mode() {
|
||||||
|
__bp_preexec_interactive_mode="on";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# This function is installed as part of the PROMPT_COMMAND.
|
||||||
|
# It will invoke any functions defined in the precmd_functions array.
|
||||||
|
__bp_precmd_invoke_cmd() {
|
||||||
|
# Save the returned value from our last command, and from each process in
|
||||||
|
# its pipeline. Note: this MUST be the first thing done in this function.
|
||||||
|
# BP_PIPESTATUS may be unused, ignore
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
|
||||||
|
__bp_last_ret_value="$?" BP_PIPESTATUS=("${PIPESTATUS[@]}")
|
||||||
|
|
||||||
|
# Don't invoke precmds if we are inside an execution of an "original
|
||||||
|
# prompt command" by another precmd execution loop. This avoids infinite
|
||||||
|
# recursion.
|
||||||
|
if (( __bp_inside_precmd > 0 )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local __bp_inside_precmd=1
|
||||||
|
|
||||||
|
# Invoke every function defined in our function array.
|
||||||
|
local precmd_function
|
||||||
|
for precmd_function in "${precmd_functions[@]}"; do
|
||||||
|
|
||||||
|
# Only execute this function if it actually exists.
|
||||||
|
# Test existence of functions with: declare -[Ff]
|
||||||
|
if type -t "$precmd_function" 1>/dev/null; then
|
||||||
|
__bp_set_ret_value "$__bp_last_ret_value" "$__bp_last_argument_prev_command"
|
||||||
|
# Quote our function invocation to prevent issues with IFS
|
||||||
|
"$precmd_function"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
__bp_set_ret_value "$__bp_last_ret_value"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sets a return value in $?. We may want to get access to the $? variable in our
|
||||||
|
# precmd functions. This is available for instance in zsh. We can simulate it in bash
|
||||||
|
# by setting the value here.
|
||||||
|
__bp_set_ret_value() {
|
||||||
|
return ${1:+"$1"}
|
||||||
|
}
|
||||||
|
|
||||||
|
__bp_in_prompt_command() {
|
||||||
|
|
||||||
|
local prompt_command_array IFS=$'\n;'
|
||||||
|
read -rd '' -a prompt_command_array <<< "${PROMPT_COMMAND[*]:-}"
|
||||||
|
|
||||||
|
local trimmed_arg
|
||||||
|
__bp_trim_whitespace trimmed_arg "${1:-}"
|
||||||
|
|
||||||
|
local command trimmed_command
|
||||||
|
for command in "${prompt_command_array[@]:-}"; do
|
||||||
|
__bp_trim_whitespace trimmed_command "$command"
|
||||||
|
if [[ "$trimmed_command" == "$trimmed_arg" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# This function is installed as the DEBUG trap. It is invoked before each
|
||||||
|
# interactive prompt display. Its purpose is to inspect the current
|
||||||
|
# environment to attempt to detect if the current command is being invoked
|
||||||
|
# interactively, and invoke 'preexec' if so.
|
||||||
|
__bp_preexec_invoke_exec() {
|
||||||
|
|
||||||
|
# Save the contents of $_ so that it can be restored later on.
|
||||||
|
# https://stackoverflow.com/questions/40944532/bash-preserve-in-a-debug-trap#40944702
|
||||||
|
__bp_last_argument_prev_command="${1:-}"
|
||||||
|
# Don't invoke preexecs if we are inside of another preexec.
|
||||||
|
if (( __bp_inside_preexec > 0 )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
local __bp_inside_preexec=1
|
||||||
|
|
||||||
|
# Checks if the file descriptor is not standard out (i.e. '1')
|
||||||
|
# __bp_delay_install checks if we're in test. Needed for bats to run.
|
||||||
|
# Prevents preexec from being invoked for functions in PS1
|
||||||
|
if [[ ! -t 1 && -z "${__bp_delay_install:-}" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${COMP_POINT:-}" || -n "${READLINE_POINT:-}" ]]; then
|
||||||
|
# We're in the middle of a completer or a keybinding set up by "bind
|
||||||
|
# -x". This obviously can't be an interactively issued command.
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ -z "${__bp_preexec_interactive_mode:-}" ]]; then
|
||||||
|
# We're doing something related to displaying the prompt. Let the
|
||||||
|
# prompt set the title instead of me.
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# If we're in a subshell, then the prompt won't be re-displayed to put
|
||||||
|
# us back into interactive mode, so let's not set the variable back.
|
||||||
|
# In other words, if you have a subshell like
|
||||||
|
# (sleep 1; sleep 2)
|
||||||
|
# You want to see the 'sleep 2' as a set_command_title as well.
|
||||||
|
if [[ 0 -eq "${BASH_SUBSHELL:-}" ]]; then
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if __bp_in_prompt_command "${BASH_COMMAND:-}"; then
|
||||||
|
# If we're executing something inside our prompt_command then we don't
|
||||||
|
# want to call preexec. Bash prior to 3.1 can't detect this at all :/
|
||||||
|
__bp_preexec_interactive_mode=""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local this_command
|
||||||
|
this_command=$(
|
||||||
|
export LC_ALL=C
|
||||||
|
HISTTIMEFORMAT='' builtin history 1 | sed '1 s/^ *[0-9][0-9]*[* ] //'
|
||||||
|
)
|
||||||
|
|
||||||
|
# Sanity check to make sure we have something to invoke our function with.
|
||||||
|
if [[ -z "$this_command" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Invoke every function defined in our function array.
|
||||||
|
local preexec_function
|
||||||
|
local preexec_function_ret_value
|
||||||
|
local preexec_ret_value=0
|
||||||
|
for preexec_function in "${preexec_functions[@]:-}"; do
|
||||||
|
|
||||||
|
# Only execute each function if it actually exists.
|
||||||
|
# Test existence of function with: declare -[fF]
|
||||||
|
if type -t "$preexec_function" 1>/dev/null; then
|
||||||
|
__bp_set_ret_value "${__bp_last_ret_value:-}"
|
||||||
|
# Quote our function invocation to prevent issues with IFS
|
||||||
|
"$preexec_function" "$this_command"
|
||||||
|
preexec_function_ret_value="$?"
|
||||||
|
if [[ "$preexec_function_ret_value" != 0 ]]; then
|
||||||
|
preexec_ret_value="$preexec_function_ret_value"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Restore the last argument of the last executed command, and set the return
|
||||||
|
# value of the DEBUG trap to be the return code of the last preexec function
|
||||||
|
# to return an error.
|
||||||
|
# If `extdebug` is enabled a non-zero return value from any preexec function
|
||||||
|
# will cause the user's command not to execute.
|
||||||
|
# Run `shopt -s extdebug` to enable
|
||||||
|
__bp_set_ret_value "$preexec_ret_value" "$__bp_last_argument_prev_command"
|
||||||
|
}
|
||||||
|
|
||||||
|
__bp_install() {
|
||||||
|
# Exit if we already have this installed.
|
||||||
|
if [[ "${PROMPT_COMMAND[*]:-}" == *"__bp_precmd_invoke_cmd"* ]]; then
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
trap '__bp_preexec_invoke_exec "$_"' DEBUG
|
||||||
|
|
||||||
|
# Preserve any prior DEBUG trap as a preexec function
|
||||||
|
local prior_trap
|
||||||
|
# we can't easily do this with variable expansion. Leaving as sed command.
|
||||||
|
# shellcheck disable=SC2001
|
||||||
|
prior_trap=$(sed "s/[^']*'\(.*\)'[^']*/\1/" <<<"${__bp_trap_string:-}")
|
||||||
|
unset __bp_trap_string
|
||||||
|
if [[ -n "$prior_trap" ]]; then
|
||||||
|
eval '__bp_original_debug_trap() {
|
||||||
|
'"$prior_trap"'
|
||||||
|
}'
|
||||||
|
preexec_functions+=(__bp_original_debug_trap)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Adjust our HISTCONTROL Variable if needed.
|
||||||
|
#
|
||||||
|
# GHOSTTY: Don't modify HISTCONTROL. This hack is only needed to improve the
|
||||||
|
# accuracy of the command argument passed to the preexec functions, and we
|
||||||
|
# don't use that argument in our bash shell integration script (and nor does
|
||||||
|
# the __bp_original_debug_trap function above, which is the only other active
|
||||||
|
# preexec function).
|
||||||
|
#__bp_adjust_histcontrol
|
||||||
|
|
||||||
|
# Issue #25. Setting debug trap for subshells causes sessions to exit for
|
||||||
|
# backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash.
|
||||||
|
#
|
||||||
|
# Disabling this by default. It can be enabled by setting this variable.
|
||||||
|
if [[ -n "${__bp_enable_subshells:-}" ]]; then
|
||||||
|
|
||||||
|
# Set so debug trap will work be invoked in subshells.
|
||||||
|
set -o functrace > /dev/null 2>&1
|
||||||
|
shopt -s extdebug > /dev/null 2>&1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
local existing_prompt_command
|
||||||
|
# Remove setting our trap install string and sanitize the existing prompt command string
|
||||||
|
existing_prompt_command="${PROMPT_COMMAND:-}"
|
||||||
|
# Edge case of appending to PROMPT_COMMAND
|
||||||
|
existing_prompt_command="${existing_prompt_command//$__bp_install_string/:}" # no-op
|
||||||
|
existing_prompt_command="${existing_prompt_command//$'\n':$'\n'/$'\n'}" # remove known-token only
|
||||||
|
existing_prompt_command="${existing_prompt_command//$'\n':;/$'\n'}" # remove known-token only
|
||||||
|
__bp_sanitize_string existing_prompt_command "$existing_prompt_command"
|
||||||
|
if [[ "${existing_prompt_command:-:}" == ":" ]]; then
|
||||||
|
existing_prompt_command=
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install our hooks in PROMPT_COMMAND to allow our trap to know when we've
|
||||||
|
# actually entered something.
|
||||||
|
PROMPT_COMMAND='__bp_precmd_invoke_cmd'
|
||||||
|
PROMPT_COMMAND+=${existing_prompt_command:+$'\n'$existing_prompt_command}
|
||||||
|
if (( BASH_VERSINFO[0] > 5 || (BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 1) )); then
|
||||||
|
PROMPT_COMMAND+=('__bp_interactive_mode')
|
||||||
|
else
|
||||||
|
# shellcheck disable=SC2179 # PROMPT_COMMAND is not an array in bash <= 5.0
|
||||||
|
PROMPT_COMMAND+=$'\n__bp_interactive_mode'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add two functions to our arrays for convenience
|
||||||
|
# of definition.
|
||||||
|
precmd_functions+=(precmd)
|
||||||
|
preexec_functions+=(preexec)
|
||||||
|
|
||||||
|
# Invoke our two functions manually that were added to $PROMPT_COMMAND
|
||||||
|
__bp_precmd_invoke_cmd
|
||||||
|
__bp_interactive_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sets an installation string as part of our PROMPT_COMMAND to install
|
||||||
|
# after our session has started. This allows bash-preexec to be included
|
||||||
|
# at any point in our bash profile.
|
||||||
|
__bp_install_after_session_init() {
|
||||||
|
# bash-preexec needs to modify these variables in order to work correctly
|
||||||
|
# if it can't, just stop the installation
|
||||||
|
__bp_require_not_readonly PROMPT_COMMAND HISTCONTROL HISTTIMEFORMAT || return
|
||||||
|
|
||||||
|
local sanitized_prompt_command
|
||||||
|
__bp_sanitize_string sanitized_prompt_command "${PROMPT_COMMAND:-}"
|
||||||
|
if [[ -n "$sanitized_prompt_command" ]]; then
|
||||||
|
# shellcheck disable=SC2178 # PROMPT_COMMAND is not an array in bash <= 5.0
|
||||||
|
PROMPT_COMMAND=${sanitized_prompt_command}$'\n'
|
||||||
|
fi;
|
||||||
|
# shellcheck disable=SC2179 # PROMPT_COMMAND is not an array in bash <= 5.0
|
||||||
|
PROMPT_COMMAND+=${__bp_install_string}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run our install so long as we're not delaying it.
|
||||||
|
if [[ -z "${__bp_delay_install:-}" ]]; then
|
||||||
|
__bp_install_after_session_init
|
||||||
|
fi;
|
176
bin/share/ghostty/shell-integration/bash/ghostty.bash
Normal file
176
bin/share/ghostty/shell-integration/bash/ghostty.bash
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
# This is originally based on the recommended bash integration from
|
||||||
|
# the semantic prompts proposal as well as some logic from Kitty's
|
||||||
|
# bash integration.
|
||||||
|
#
|
||||||
|
# I'm not a bash expert so this probably has some major issues but for
|
||||||
|
# my simple bash usage this is working. If a bash expert wants to
|
||||||
|
# improve this please do!
|
||||||
|
|
||||||
|
# We need to be in interactive mode and we need to have the Ghostty
|
||||||
|
# resources dir set which also tells us we're running in Ghostty.
|
||||||
|
if [[ "$-" != *i* ]] ; then builtin return; fi
|
||||||
|
if [ -z "$GHOSTTY_RESOURCES_DIR" ]; then builtin return; fi
|
||||||
|
|
||||||
|
# When automatic shell integration is active, we need to manually
|
||||||
|
# load the normal bash startup files based on the injected state.
|
||||||
|
if [ -n "$GHOSTTY_BASH_INJECT" ]; then
|
||||||
|
builtin declare ghostty_bash_inject="$GHOSTTY_BASH_INJECT"
|
||||||
|
builtin unset GHOSTTY_BASH_INJECT ENV
|
||||||
|
|
||||||
|
# At this point, we're in POSIX mode and rely on the injected
|
||||||
|
# flags to guide is through the rest of the startup sequence.
|
||||||
|
|
||||||
|
# POSIX mode was requested by the user so there's nothing
|
||||||
|
# more to do that optionally source their original $ENV.
|
||||||
|
# No other startup files are read, per the standard.
|
||||||
|
if [[ "$ghostty_bash_inject" == *"--posix"* ]]; then
|
||||||
|
if [ -n "$GHOSTTY_BASH_ENV" ]; then
|
||||||
|
builtin source "$GHOSTTY_BASH_ENV"
|
||||||
|
builtin export ENV="$GHOSTTY_BASH_ENV"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Restore bash's default 'posix' behavior. Also reset 'inherit_errexit',
|
||||||
|
# which doesn't happen as part of the 'posix' reset.
|
||||||
|
builtin set +o posix
|
||||||
|
builtin shopt -u inherit_errexit 2>/dev/null
|
||||||
|
|
||||||
|
# Unexport HISTFILE if it was set by the shell integration code.
|
||||||
|
if [[ -n "$GHOSTTY_BASH_UNEXPORT_HISTFILE" ]]; then
|
||||||
|
builtin export -n HISTFILE
|
||||||
|
builtin unset GHOSTTY_BASH_UNEXPORT_HISTFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Manually source the startup files, respecting the injected flags like
|
||||||
|
# --norc and --noprofile that we parsed with the shell integration code.
|
||||||
|
#
|
||||||
|
# See also: run_startup_files() in shell.c in the Bash source code
|
||||||
|
if builtin shopt -q login_shell; then
|
||||||
|
if [[ $ghostty_bash_inject != *"--noprofile"* ]]; then
|
||||||
|
[ -r /etc/profile ] && builtin source "/etc/profile"
|
||||||
|
for rcfile in "$HOME/.bash_profile" "$HOME/.bash_login" "$HOME/.profile"; do
|
||||||
|
[ -r "$rcfile" ] && { builtin source "$rcfile"; break; }
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ $ghostty_bash_inject != *"--norc"* ]]; then
|
||||||
|
# The location of the system bashrc is determined at bash build
|
||||||
|
# time via -DSYS_BASHRC and can therefore vary across distros:
|
||||||
|
# Arch, Debian, Ubuntu use /etc/bash.bashrc
|
||||||
|
# Fedora uses /etc/bashrc sourced from ~/.bashrc instead of SYS_BASHRC
|
||||||
|
# Void Linux uses /etc/bash/bashrc
|
||||||
|
# Nixos uses /etc/bashrc
|
||||||
|
for rcfile in /etc/bash.bashrc /etc/bash/bashrc /etc/bashrc; do
|
||||||
|
[ -r "$rcfile" ] && { builtin source "$rcfile"; break; }
|
||||||
|
done
|
||||||
|
if [[ -z "$GHOSTTY_BASH_RCFILE" ]]; then GHOSTTY_BASH_RCFILE="$HOME/.bashrc"; fi
|
||||||
|
[ -r "$GHOSTTY_BASH_RCFILE" ] && builtin source "$GHOSTTY_BASH_RCFILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
builtin unset GHOSTTY_BASH_ENV GHOSTTY_BASH_RCFILE
|
||||||
|
builtin unset ghostty_bash_inject rcfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Import bash-preexec, safe to do multiple times
|
||||||
|
builtin source "$GHOSTTY_RESOURCES_DIR/shell-integration/bash/bash-preexec.sh"
|
||||||
|
|
||||||
|
# This is set to 1 when we're executing a command so that we don't
|
||||||
|
# send prompt marks multiple times.
|
||||||
|
_ghostty_executing=""
|
||||||
|
_ghostty_last_reported_cwd=""
|
||||||
|
|
||||||
|
function __ghostty_get_current_command() {
|
||||||
|
builtin local last_cmd
|
||||||
|
# shellcheck disable=SC1007
|
||||||
|
last_cmd=$(HISTTIMEFORMAT= builtin history 1)
|
||||||
|
last_cmd="${last_cmd#*[[:digit:]]*[[:space:]]}" # remove leading history number
|
||||||
|
last_cmd="${last_cmd#"${last_cmd%%[![:space:]]*}"}" # remove remaining leading whitespace
|
||||||
|
builtin printf "\e]2;%s\a" "${last_cmd//[[:cntrl:]]}" # remove any control characters
|
||||||
|
}
|
||||||
|
|
||||||
|
function __ghostty_precmd() {
|
||||||
|
local ret="$?"
|
||||||
|
if test "$_ghostty_executing" != "0"; then
|
||||||
|
_GHOSTTY_SAVE_PS0="$PS0"
|
||||||
|
_GHOSTTY_SAVE_PS1="$PS1"
|
||||||
|
_GHOSTTY_SAVE_PS2="$PS2"
|
||||||
|
|
||||||
|
# Marks
|
||||||
|
PS1=$PS1'\[\e]133;B\a\]'
|
||||||
|
PS2=$PS2'\[\e]133;B\a\]'
|
||||||
|
|
||||||
|
# bash doesn't redraw the leading lines in a multiline prompt so
|
||||||
|
# mark the last line as a secondary prompt (k=s) to prevent the
|
||||||
|
# preceding lines from being erased by ghostty after a resize.
|
||||||
|
if [[ "${PS1}" == *"\n"* || "${PS1}" == *$'\n'* ]]; then
|
||||||
|
PS1=$PS1'\[\e]133;A;k=s\a\]'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cursor
|
||||||
|
if test "$GHOSTTY_SHELL_INTEGRATION_NO_CURSOR" != "1"; then
|
||||||
|
PS1=$PS1'\[\e[5 q\]'
|
||||||
|
PS0=$PS0'\[\e[0 q\]'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Sudo
|
||||||
|
if [[ "$GHOSTTY_SHELL_INTEGRATION_NO_SUDO" != "1" ]] && [[ -n "$TERMINFO" ]]; then
|
||||||
|
# Wrap `sudo` command to ensure Ghostty terminfo is preserved
|
||||||
|
# shellcheck disable=SC2317
|
||||||
|
sudo() {
|
||||||
|
builtin local sudo_has_sudoedit_flags="no"
|
||||||
|
for arg in "$@"; do
|
||||||
|
# Check if argument is '-e' or '--edit' (sudoedit flags)
|
||||||
|
if [[ "$arg" == "-e" || $arg == "--edit" ]]; then
|
||||||
|
sudo_has_sudoedit_flags="yes"
|
||||||
|
builtin break
|
||||||
|
fi
|
||||||
|
# Check if argument is neither an option nor a key-value pair
|
||||||
|
if [[ "$arg" != -* && "$arg" != *=* ]]; then
|
||||||
|
builtin break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ "$sudo_has_sudoedit_flags" == "yes" ]]; then
|
||||||
|
builtin command sudo "$@";
|
||||||
|
else
|
||||||
|
builtin command sudo TERMINFO="$TERMINFO" "$@";
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$GHOSTTY_SHELL_INTEGRATION_NO_TITLE" != 1 ]]; then
|
||||||
|
# Command and working directory
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
PS0=$PS0'$(__ghostty_get_current_command)'
|
||||||
|
PS1=$PS1'\[\e]2;$PWD\a\]'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$_ghostty_executing" != ""; then
|
||||||
|
# End of current command. Report its status.
|
||||||
|
builtin printf "\e]133;D;%s;aid=%s\a" "$ret" "$BASHPID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# unfortunately bash provides no hooks to detect cwd changes
|
||||||
|
# in particular this means cwd reporting will not happen for a
|
||||||
|
# command like cd /test && cat. PS0 is evaluated before cd is run.
|
||||||
|
if [[ "$_ghostty_last_reported_cwd" != "$PWD" ]]; then
|
||||||
|
_ghostty_last_reported_cwd="$PWD"
|
||||||
|
builtin printf "\e]7;kitty-shell-cwd://%s%s\a" "$HOSTNAME" "$PWD"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fresh line and start of prompt.
|
||||||
|
builtin printf "\e]133;A;aid=%s\a" "$BASHPID"
|
||||||
|
_ghostty_executing=0
|
||||||
|
}
|
||||||
|
|
||||||
|
function __ghostty_preexec() {
|
||||||
|
PS0="$_GHOSTTY_SAVE_PS0"
|
||||||
|
PS1="$_GHOSTTY_SAVE_PS1"
|
||||||
|
PS2="$_GHOSTTY_SAVE_PS2"
|
||||||
|
builtin printf "\e]133;C;\a"
|
||||||
|
_ghostty_executing=1
|
||||||
|
}
|
||||||
|
|
||||||
|
preexec_functions+=(__ghostty_preexec)
|
||||||
|
precmd_functions+=(__ghostty_precmd)
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue