diff --git a/.gitignore b/.gitignore index 723d942..0303b30 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,16 @@ prismis/ # Git config (contains personal email/name) git/ +.env + +# OPSEC - machine-specific configs that reveal infrastructure/workflow +systemd-user/ +kde/ +applications/ +autostart/ +vicinae/ +whispertux/ + +# SSH keys (public or private) +*.pub +id_* diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 6897040..2c42ed5 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -1,6 +1,9 @@ -decorations = "None" -import = ["/home/folke/projects/tokyonight.nvim/extras/alacritty/tokyonight_storm.yml"] +[general] live_config_reload = true +# import = [] # Add theme files here if needed + +[window] +decorations = "None" [colors] draw_bold_text_with_bright_colors = true diff --git a/bash/bash.bash b/bash/bash.bash deleted file mode 100644 index da4eb5f..0000000 --- a/bash/bash.bash +++ /dev/null @@ -1,17 +0,0 @@ -# ---- TMUX-RECON bash.bash ---- - -# source custom aliases if exists -[ -f ~/.aliases.sh ] && source ~/.aliases.sh - -# add .scripts to path -export PATH="$HOME/.scripts:$PATH" - -# zoxide (if installed) -if command -v zoxide &> /dev/null; then - eval "$(zoxide init bash)" -fi - -# fzf (if installed) -[ -f ~/.fzf.bash ] && source ~/.fzf.bash - -# Custom prompt options or PS1 here if desired diff --git a/ghostty/.config/ghostty/bloom.glsl b/ghostty/.config/ghostty/bloom.glsl new file mode 100644 index 0000000..16eaa32 --- /dev/null +++ b/ghostty/.config/ghostty/bloom.glsl @@ -0,0 +1,52 @@ +// source: https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f +// credits: https://github.com/qwerasd205 +// Golden spiral samples, [x, y, weight] weight is inverse of distance. +const vec3[24] samples = { + vec3(0.1693761725038636, 0.9855514761735895, 1), + vec3(-1.333070830962943, 0.4721463328627773, 0.7071067811865475), + vec3(-0.8464394909806497, -1.51113870578065, 0.5773502691896258), + vec3(1.554155680728463, -1.2588090085709776, 0.5), + vec3(1.681364377589461, 1.4741145918052656, 0.4472135954999579), + vec3(-1.2795157692199817, 2.088741103228784, 0.4082482904638631), + vec3(-2.4575847530631187, -0.9799373355024756, 0.3779644730092272), + vec3(0.5874641440200847, -2.7667464429345077, 0.35355339059327373), + vec3(2.997715703369726, 0.11704939884745152, 0.3333333333333333), + vec3(0.41360842451688395, 3.1351121305574803, 0.31622776601683794), + vec3(-3.167149933769243, 0.9844599011770256, 0.30151134457776363), + vec3(-1.5736713846521535, -3.0860263079123245, 0.2886751345948129), + vec3(2.888202648340422, -2.1583061557896213, 0.2773500981126146), + vec3(2.7150778983300325, 2.5745586041105715, 0.2672612419124244), + vec3(-2.1504069972377464, 3.2211410627650165, 0.2581988897471611), + vec3(-3.6548858794907493, -1.6253643308191343, 0.25), + vec3(1.0130775986052671, -3.9967078676335834, 0.24253562503633297), + vec3(4.229723673607257, 0.33081361055181563, 0.23570226039551587), + vec3(0.40107790291173834, 4.340407413572593, 0.22941573387056174), + vec3(-4.319124570236028, 1.159811599693438, 0.22360679774997896), + vec3(-1.9209044802827355, -4.160543952132907, 0.2182178902359924), + vec3(3.8639122286635708, -2.6589814382925123, 0.21320071635561041), + vec3(3.3486228404946234, 3.4331800232609, 0.20851441405707477), + vec3(-2.8769733643574344, 3.9652268864187157, 0.20412414523193154) + }; + +float lum(vec4 c) { + return 0.299 * c.r + 0.587 * c.g + 0.114 * c.b; +} + +void mainImage(out vec4 fragColor, in vec2 fragCoord) { + vec2 uv = fragCoord.xy / iResolution.xy; + + vec4 color = texture(iChannel0, uv); + + vec2 step = vec2(1.414) / iResolution.xy; + + for (int i = 0; i < 24; i++) { + vec3 s = samples[i]; + vec4 c = texture(iChannel0, uv + s.xy * step); + float l = lum(c); + if (l > 0.2 && lum(color) < 0.75) { + color += l * s.z * c * 0.12; // reduced from 0.2 to balance glow intensity + } + } + + fragColor = clamp(color, 0.0, 1.12); // smooth highlighting +} diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config index 1bd9918..d7f57bb 100644 --- a/ghostty/.config/ghostty/config +++ b/ghostty/.config/ghostty/config @@ -1,50 +1,69 @@ -# Fonts -font-family = "Fira Code" -font-family-bold = "Fira Code" -font-family-italic = "Maple Mono" -font-family-bold-italic = "Maple Mono" -font-family = "Symbols Nerd Font Mono" -font-size = 10 -adjust-underline-position = 4 +# This is the configuration file for Ghostty. +# +# This template file has been automatically created at the following +# path since Ghostty couldn't find any existing config files on your system: +# +# /home/e/.config/ghostty/config +# +# The template does not set any default options, since Ghostty ships +# with sensible defaults for all options. Users should only need to set +# options that they want to change from the default. +# +# Run `ghostty +show-config --default --docs` to view a list of +# all available config options and their default values. +# +# Additionally, each config option is also explained in detail +# on Ghostty's website, at https://ghostty.org/docs/config. -# Mouse -mouse-hide-while-typing = true -# mouse-scroll-multiplier = 1 +# Config syntax crash course +# ========================== +# # The config file consists of simple key-value pairs, +# # separated by equals signs. +# font-family = Iosevka +# window-padding-x = 2 +# +# # Spacing around the equals sign does not matter. +# # All of these are identical: +# key=value +# key= value +# key =value +# key = value +# +# # Any line beginning with a # is a comment. It's not possible to put +# # a comment after a config option, since it would be interpreted as a +# # part of the value. For example, this will have a value of "#123abc": +# background = #123abc +# +# # Empty values are used to reset config keys to default. +# key = +# +# # Some config options have unique syntaxes for their value, +# # which is explained in the docs for that config option. +# # Just for example: +# resize-overlay-duration = 4s 200ms -# Theme -theme = /home/folke/projects/tokyonight.nvim/extras/ghostty/tokyonight_night -cursor-invert-fg-bg = true -background-opacity = 0.9 -window-theme = ghostty +background-opacity = .95 +background-blur = 15 -# keybindings -keybind = clear -keybind = ctrl+shift+h=goto_split:left -keybind = ctrl+shift+j=goto_split:bottom -keybind = ctrl+shift+k=goto_split:top -keybind = ctrl+shift+l=goto_split:right -keybind = super+shift+t=new_tab -keybind = super+shift+h=previous_tab -keybind = super+shift+l=next_tab -keybind = super+shift+comma=move_tab:-1 -keybind = super+shift+period=move_tab:1 -keybind = super+shift+c=copy_to_clipboard -keybind = super+shift+v=paste_from_clipboard -keybind = super+shift+enter=new_split:auto -keybind = super+shift+i=inspector:toggle -keybind = super+shift+m=toggle_split_zoom -keybind = super+shift+r=reload_config -keybind = super+shift+s=write_screen_file:open -keybind = super+shift+w=close_surface +keybind = global:ctrl+grave_accent=toggle_quick_terminal -# Window -gtk-single-instance = true -gtk-tabs-location = bottom -gtk-wide-tabs = false -window-padding-y = 2,0 -window-padding-balance = true -window-decoration = false +custom-shader = ~/.config/ghostty/bloom.glsl +#custom-shader = ~/.config/ghostty/crt.glsl +#custom-shader = ~/.config/ghostty/starfield.glsl -# Other -copy-on-select = clipboard -shell-integration-features = cursor,sudo,no-title +#custom-shader = ~/.config/ghostty/ghostty-shaders/bloom.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/galaxy.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/glitchy.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/glow-rgbsplit-twitchy.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/in-game-crt.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/matrix-hallway.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/negative.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/sparks-from-fire.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/starfield-colors.glsl +#custom-shader = ~/.config/ghostty/ghostty-shaders/starfield.glsl + + +keybind = shift+enter=text:\x1b\r + +# Use zsh as default shell +command = /usr/bin/zsh diff --git a/ghostty/.config/ghostty/config.default b/ghostty/.config/ghostty/config.default new file mode 100644 index 0000000..a53924a --- /dev/null +++ b/ghostty/.config/ghostty/config.default @@ -0,0 +1,50 @@ +# Fonts +font-family = "Fira Code" +font-family-bold = "Fira Code" +font-family-italic = "Maple Mono" +font-family-bold-italic = "Maple Mono" +font-family = "Symbols Nerd Font Mono" +font-size = 10 +adjust-underline-position = 4 + +# Mouse +mouse-hide-while-typing = true +# mouse-scroll-multiplier = 1 + +# Theme +# theme = /home/folke/projects/tokyonight.nvim/extras/ghostty/tokyonight_night +cursor-invert-fg-bg = true +background-opacity = 0.9 +window-theme = ghostty + +# keybindings +keybind = clear +keybind = ctrl+shift+h=goto_split:left +keybind = ctrl+shift+j=goto_split:bottom +keybind = ctrl+shift+k=goto_split:top +keybind = ctrl+shift+l=goto_split:right +keybind = super+shift+t=new_tab +keybind = super+shift+h=previous_tab +keybind = super+shift+l=next_tab +keybind = super+shift+comma=move_tab:-1 +keybind = super+shift+period=move_tab:1 +keybind = super+shift+c=copy_to_clipboard +keybind = super+shift+v=paste_from_clipboard +keybind = super+shift+enter=new_split:auto +keybind = super+shift+i=inspector:toggle +keybind = super+shift+m=toggle_split_zoom +keybind = super+shift+r=reload_config +keybind = super+shift+s=write_screen_file:open +keybind = super+shift+w=close_surface + +# Window +gtk-single-instance = true +gtk-tabs-location = bottom +gtk-wide-tabs = false +window-padding-y = 2,0 +window-padding-balance = true +window-decoration = true + +# Other +copy-on-select = clipboard +shell-integration-features = cursor,sudo,no-title diff --git a/ghostty/.config/ghostty/crt.glsl b/ghostty/.config/ghostty/crt.glsl new file mode 100644 index 0000000..31d1bec --- /dev/null +++ b/ghostty/.config/ghostty/crt.glsl @@ -0,0 +1,310 @@ +// source: https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f +// credits: https://github.com/qwerasd205 +//============================================================== +// +// [CRTS] PUBLIC DOMAIN CRT-STYLED SCALAR by Timothy Lottes +// +// [+] Adapted with alterations for use in Ghostty by Qwerasd. +// For more information on changes, see comment below license. +// +//============================================================== +// +// LICENSE = UNLICENSE (aka PUBLIC DOMAIN) +// +//-------------------------------------------------------------- +// This is free and unencumbered software released into the +// public domain. +//-------------------------------------------------------------- +// Anyone is free to copy, modify, publish, use, compile, sell, +// or distribute this software, either in source code form or as +// a compiled binary, for any purpose, commercial or +// non-commercial, and by any means. +//-------------------------------------------------------------- +// In jurisdictions that recognize copyright laws, the author or +// authors of this software dedicate any and all copyright +// interest in the software to the public domain. We make this +// dedication for the benefit of the public at large and to the +// detriment of our heirs and successors. We intend this +// dedication to be an overt act of relinquishment in perpetuity +// of all present and future rights to this software under +// copyright law. +//-------------------------------------------------------------- +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +// KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT +// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +//-------------------------------------------------------------- +// For more information, please refer to +// +//============================================================== + +// This shader is a modified version of the excellent +// FixingPixelArtFast by Timothy Lottes on Shadertoy. +// +// The original shader can be found at: +// https://www.shadertoy.com/view/MtSfRK +// +// Modifications have been made to reduce the verbosity, +// and many of the comments have been removed / reworded. +// Additionally, the license has been moved to the top of +// the file, and can be read above. I (Qwerasd) choose to +// release the modified version under the same license. + +// The appearance of this shader can be altered +// by adjusting the parameters defined below. + +// "Scanlines" per real screen pixel. +// e.g. SCALE 0.5 means each scanline is 2 pixels. +// Recommended values: +// o High DPI displays: 0.33333333 +// - Low DPI displays: 0.66666666 +#define SCALE 0.33333333 + +// "Tube" warp +#define CRTS_WARP 1 + +// Darkness of vignette in corners after warping +// 0.0 = completely black +// 1.0 = no vignetting +#define MIN_VIN 0.5 + +// Try different masks +// #define CRTS_MASK_GRILLE 1 +// #define CRTS_MASK_GRILLE_LITE 1 +// #define CRTS_MASK_NONE 1 +#define CRTS_MASK_SHADOW 1 + +// Scanline thinness +// 0.50 = fused scanlines +// 0.70 = recommended default +// 1.00 = thinner scanlines (too thin) +#define INPUT_THIN 0.75 + +// Horizonal scan blur +// -3.0 = pixely +// -2.5 = default +// -2.0 = smooth +// -1.0 = too blurry +#define INPUT_BLUR -2.75 + +// Shadow mask effect, ranges from, +// 0.25 = large amount of mask (not recommended, too dark) +// 0.50 = recommended default +// 1.00 = no shadow mask +#define INPUT_MASK 0.65 + +float FromSrgb1(float c) { + return (c <= 0.04045) ? c * (1.0 / 12.92) : + pow(c * (1.0 / 1.055) + (0.055 / 1.055), 2.4); +} +vec3 FromSrgb(vec3 c) { + return vec3( + FromSrgb1(c.r), FromSrgb1(c.g), FromSrgb1(c.b)); +} + +vec3 CrtsFetch(vec2 uv) { + return FromSrgb(texture(iChannel0, uv.xy).rgb); +} + +#define CrtsRcpF1(x) (1.0/(x)) +#define CrtsSatF1(x) clamp((x),0.0,1.0) + +float CrtsMax3F1(float a, float b, float c) { + return max(a, max(b, c)); +} + +vec2 CrtsTone( + float thin, + float mask) { + #ifdef CRTS_MASK_NONE + mask = 1.0; + #endif + + #ifdef CRTS_MASK_GRILLE_LITE + // Normal R mask is {1.0,mask,mask} + // LITE R mask is {mask,1.0,1.0} + mask = 0.5 + mask * 0.5; + #endif + + vec2 ret; + float midOut = 0.18 / ((1.5 - thin) * (0.5 * mask + 0.5)); + float pMidIn = 0.18; + ret.x = ((-pMidIn) + midOut) / ((1.0 - pMidIn) * midOut); + ret.y = ((-pMidIn) * midOut + pMidIn) / (midOut * (-pMidIn) + midOut); + + return ret; +} + +vec3 CrtsMask(vec2 pos, float dark) { + #ifdef CRTS_MASK_GRILLE + vec3 m = vec3(dark, dark, dark); + float x = fract(pos.x * (1.0 / 3.0)); + if (x < (1.0 / 3.0)) m.r = 1.0; + else if (x < (2.0 / 3.0)) m.g = 1.0; + else m.b = 1.0; + return m; + #endif + + #ifdef CRTS_MASK_GRILLE_LITE + vec3 m = vec3(1.0, 1.0, 1.0); + float x = fract(pos.x * (1.0 / 3.0)); + if (x < (1.0 / 3.0)) m.r = dark; + else if (x < (2.0 / 3.0)) m.g = dark; + else m.b = dark; + return m; + #endif + + #ifdef CRTS_MASK_NONE + return vec3(1.0, 1.0, 1.0); + #endif + + #ifdef CRTS_MASK_SHADOW + pos.x += pos.y * 3.0; + vec3 m = vec3(dark, dark, dark); + float x = fract(pos.x * (1.0 / 6.0)); + if (x < (1.0 / 3.0)) m.r = 1.0; + else if (x < (2.0 / 3.0)) m.g = 1.0; + else m.b = 1.0; + return m; + #endif +} + +vec3 CrtsFilter( + vec2 ipos, + vec2 inputSizeDivOutputSize, + vec2 halfInputSize, + vec2 rcpInputSize, + vec2 rcpOutputSize, + vec2 twoDivOutputSize, + float inputHeight, + vec2 warp, + float thin, + float blur, + float mask, + vec2 tone +) { + // Optional apply warp + vec2 pos; + #ifdef CRTS_WARP + // Convert to {-1 to 1} range + pos = ipos * twoDivOutputSize - vec2(1.0, 1.0); + + // Distort pushes image outside {-1 to 1} range + pos *= vec2( + 1.0 + (pos.y * pos.y) * warp.x, + 1.0 + (pos.x * pos.x) * warp.y); + + // TODO: Vignette needs optimization + float vin = 1.0 - ( + (1.0 - CrtsSatF1(pos.x * pos.x)) * (1.0 - CrtsSatF1(pos.y * pos.y))); + vin = CrtsSatF1((-vin) * inputHeight + inputHeight); + + // Leave in {0 to inputSize} + pos = pos * halfInputSize + halfInputSize; + #else + pos = ipos * inputSizeDivOutputSize; + #endif + + // Snap to center of first scanline + float y0 = floor(pos.y - 0.5) + 0.5; + // Snap to center of one of four pixels + float x0 = floor(pos.x - 1.5) + 0.5; + + // Inital UV position + vec2 p = vec2(x0 * rcpInputSize.x, y0 * rcpInputSize.y); + // Fetch 4 nearest texels from 2 nearest scanlines + vec3 colA0 = CrtsFetch(p); + p.x += rcpInputSize.x; + vec3 colA1 = CrtsFetch(p); + p.x += rcpInputSize.x; + vec3 colA2 = CrtsFetch(p); + p.x += rcpInputSize.x; + vec3 colA3 = CrtsFetch(p); + p.y += rcpInputSize.y; + vec3 colB3 = CrtsFetch(p); + p.x -= rcpInputSize.x; + vec3 colB2 = CrtsFetch(p); + p.x -= rcpInputSize.x; + vec3 colB1 = CrtsFetch(p); + p.x -= rcpInputSize.x; + vec3 colB0 = CrtsFetch(p); + + // Vertical filter + // Scanline intensity is using sine wave + // Easy filter window and integral used later in exposure + float off = pos.y - y0; + float pi2 = 6.28318530717958; + float hlf = 0.5; + float scanA = cos(min(0.5, off * thin) * pi2) * hlf + hlf; + float scanB = cos(min(0.5, (-off) * thin + thin) * pi2) * hlf + hlf; + + // Horizontal kernel is simple gaussian filter + float off0 = pos.x - x0; + float off1 = off0 - 1.0; + float off2 = off0 - 2.0; + float off3 = off0 - 3.0; + float pix0 = exp2(blur * off0 * off0); + float pix1 = exp2(blur * off1 * off1); + float pix2 = exp2(blur * off2 * off2); + float pix3 = exp2(blur * off3 * off3); + float pixT = CrtsRcpF1(pix0 + pix1 + pix2 + pix3); + + #ifdef CRTS_WARP + // Get rid of wrong pixels on edge + pixT *= max(MIN_VIN, vin); + #endif + + scanA *= pixT; + scanB *= pixT; + + // Apply horizontal and vertical filters + vec3 color = + (colA0 * pix0 + colA1 * pix1 + colA2 * pix2 + colA3 * pix3) * scanA + + (colB0 * pix0 + colB1 * pix1 + colB2 * pix2 + colB3 * pix3) * scanB; + + // Apply phosphor mask + color *= CrtsMask(ipos, mask); + + // Tonal control, start by protecting from /0 + float peak = max(1.0 / (256.0 * 65536.0), + CrtsMax3F1(color.r, color.g, color.b)); + // Compute the ratios of {R,G,B} + vec3 ratio = color * CrtsRcpF1(peak); + // Apply tonal curve to peak value + peak = peak * CrtsRcpF1(peak * tone.x + tone.y); + // Reconstruct color + return ratio * peak; +} + +float ToSrgb1(float c) { + return (c < 0.0031308 ? c * 12.92 : 1.055 * pow(c, 0.41666) - 0.055); +} +vec3 ToSrgb(vec3 c) { + return vec3( + ToSrgb1(c.r), ToSrgb1(c.g), ToSrgb1(c.b)); +} + +void mainImage(out vec4 fragColor, in vec2 fragCoord) { + float aspect = iResolution.x / iResolution.y; + fragColor.rgb = CrtsFilter( + fragCoord.xy, + vec2(1.0), + iResolution.xy * SCALE * 0.5, + 1.0 / (iResolution.xy * SCALE), + 1.0 / iResolution.xy, + 2.0 / iResolution.xy, + iResolution.y, + vec2(1.0 / (50.0 * aspect), 1.0 / 50.0), + INPUT_THIN, + INPUT_BLUR, + INPUT_MASK, + CrtsTone(INPUT_THIN, INPUT_MASK) + ); + + // Linear to SRGB for output. + fragColor.rgb = ToSrgb(fragColor.rgb); +} \ No newline at end of file diff --git a/ghostty/.config/ghostty/ghostty-shaders b/ghostty/.config/ghostty/ghostty-shaders new file mode 160000 index 0000000..a17573f --- /dev/null +++ b/ghostty/.config/ghostty/ghostty-shaders @@ -0,0 +1 @@ +Subproject commit a17573fb254e618f92a75afe80faa31fd5e09d6f diff --git a/ghostty/.config/ghostty/starfield.glsl b/ghostty/.config/ghostty/starfield.glsl new file mode 100644 index 0000000..f82b5d3 --- /dev/null +++ b/ghostty/.config/ghostty/starfield.glsl @@ -0,0 +1,135 @@ +// transparent background +const bool transparent = false; + +// terminal contents luminance threshold to be considered background (0.0 to 1.0) +const float threshold = 0.15; + +// divisions of grid +const float repeats = 30.; + +// number of layers +const float layers = 21.; + +// star colors +const vec3 white = vec3(1.0); // Set star color to pure white + +float luminance(vec3 color) { + return dot(color, vec3(0.2126, 0.7152, 0.0722)); +} + +float N21(vec2 p) { + p = fract(p * vec2(233.34, 851.73)); + p += dot(p, p + 23.45); + return fract(p.x * p.y); +} + +vec2 N22(vec2 p) { + float n = N21(p); + return vec2(n, N21(p + n)); +} + +mat2 scale(vec2 _scale) { + return mat2(_scale.x, 0.0, + 0.0, _scale.y); +} + +// 2D Noise based on Morgan McGuire +float noise(in vec2 st) { + vec2 i = floor(st); + vec2 f = fract(st); + + // Four corners in 2D of a tile + float a = N21(i); + float b = N21(i + vec2(1.0, 0.0)); + float c = N21(i + vec2(0.0, 1.0)); + float d = N21(i + vec2(1.0, 1.0)); + + // Smooth Interpolation + vec2 u = f * f * (3.0 - 2.0 * f); // Cubic Hermite Curve + + // Mix 4 corners percentages + return mix(a, b, u.x) + + (c - a) * u.y * (1.0 - u.x) + + (d - b) * u.x * u.y; +} + +float perlin2(vec2 uv, int octaves, float pscale) { + float col = 1.; + float initScale = 4.; + for (int l; l < octaves; l++) { + float val = noise(uv * initScale); + if (col <= 0.01) { + col = 0.; + break; + } + val -= 0.01; + val *= 0.5; + col *= val; + initScale *= pscale; + } + return col; +} + +vec3 stars(vec2 uv, float offset) { + float timeScale = -(iTime + offset) / layers; + float trans = fract(timeScale); + float newRnd = floor(timeScale); + vec3 col = vec3(0.); + + // Translate uv then scale for center + uv -= vec2(0.5); + uv = scale(vec2(trans)) * uv; + uv += vec2(0.5); + + // Create square aspect ratio + uv.x *= iResolution.x / iResolution.y; + + // Create boxes + uv *= repeats; + + // Get position + vec2 ipos = floor(uv); + + // Return uv as 0 to 1 + uv = fract(uv); + + // Calculate random xy and size + vec2 rndXY = N22(newRnd + ipos * (offset + 1.)) * 0.9 + 0.05; + float rndSize = N21(ipos) * 100. + 200.; + + vec2 j = (rndXY - uv) * rndSize; + float sparkle = 1. / dot(j, j); + + // Set stars to be pure white + col += white * sparkle; + + col *= smoothstep(1., 0.8, trans); + return col; // Return pure white stars only +} + +void mainImage(out vec4 fragColor, in vec2 fragCoord) +{ + // Normalized pixel coordinates (from 0 to 1) + vec2 uv = fragCoord / iResolution.xy; + + vec3 col = vec3(0.); + + for (float i = 0.; i < layers; i++) { + col += stars(uv, i); + } + + // Sample the terminal screen texture including alpha channel + vec4 terminalColor = texture(iChannel0, uv); + + if (transparent) { + col += terminalColor.rgb; + } + + // Make a mask that is 1.0 where the terminal content is not black + float mask = 1 - step(threshold, luminance(terminalColor.rgb)); + + vec3 blendedColor = mix(terminalColor.rgb, col, mask); + + // Apply terminal's alpha to control overall opacity + fragColor = vec4(blendedColor, terminalColor.a); +} diff --git a/helix/.config/helix/languages.toml b/helix/.config/helix/languages.toml index 35ec6c5..90d973e 100644 --- a/helix/.config/helix/languages.toml +++ b/helix/.config/helix/languages.toml @@ -32,10 +32,6 @@ language-servers = ["vscode-html-language-server"] name = "css" language-servers = ["vscode-css-language-server"] -[[language]] -name = "dockerfile" -language-servers = ["docker-langserver"] - [[language]] name = "go" language-servers = ["gopls"] @@ -59,7 +55,7 @@ file-types = ["tex", "sty", "cls", "dtx"] roots = ["main.tex", ".latexmkrc", "body-osr.md"] comment-token = "%" indent = { tab-width = 2, unit = " " } -language-server = { command = "texlab" } +language-servers = ["texlab"] [language.auto-pairs] '(' = ')' diff --git a/scripts/radio b/scripts/radio deleted file mode 100755 index 13946ce..0000000 --- a/scripts/radio +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Script Name: radio -# Description: Internet radio station wrapper with curated stations -# Source: Inspired by https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/ -# Usage: radio -# radio list - -# Check for mpv -if ! command -v mpv &>/dev/null; then - echo "Error: mpv not found. Install with: sudo apt install mpv" >&2 - exit 1 -fi - -# Curated radio stations -declare -A stations=( - # Rock & Metal - ["metal"]="http://listen.181fm.com/181-greatoldies_128k.mp3|Heavy Metal & Hard Rock" - ["rock"]="http://listen.181fm.com/181-rock_128k.mp3|Classic Rock" - - # Cyberpunk / Synthwave / Darkwave - ["cyberpunk"]="https://stream.nightride.fm/nightride.mp3|Nightride FM - Synthwave/Retrowave/Outrun" - ["darksynth"]="https://stream.nightride.fm/darksynth.mp3|Darksynth/Cyberpunk/Synthmetal" - ["chillsynth"]="https://stream.nightride.fm/chillsynth.mp3|Chillsynth/Chillwave/Instrumental" - ["datawave"]="https://stream.nightride.fm/datawave.mp3|Glitchy Synthwave/IDM" - ["spacesynth"]="https://stream.nightride.fm/spacesynth.mp3|Spacesynth/Space Disco" - ["horrorsynth"]="https://stream.nightride.fm/horrorsynth.mp3|Horrorsynth/Witch House" - ["industrial"]="https://stream.nightride.fm/ebsm.mp3|Industrial/EBM/Midtempo" - - # Electronic / Techno - ["techno"]="http://stream.laut.fm/technobase|Techno Base - Coding Beats" - ["dnb"]="https://stream.nightride.fm/rektfm.mp3|Drum & Bass/Dubstep/Techno/Trance" - ["lofi"]="https://stream.nightride.fm/chillsynth.mp3|Lo-Fi Chill Beats" - - # Meditation / Ambient / Relaxation - ["meditation"]="https://streaming.radionomy.com/-zenoflm-|Zen FM - Meditation & Relaxation" - ["ambient"]="https://somafm.com/dronezone130.pls|SomaFM Drone Zone - Ambient" - ["sleep"]="https://somafm.com/deepspaceone130.pls|SomaFM Deep Space One" - ["nature"]="https://streaming.radionomy.com/NatureSoundsRelaxation|Nature Sounds" - - # Classical - ["classical"]="https://stream.live.vc.bbcmedia.co.uk/bbc_radio_three|BBC Radio 3 - Classical" - ["piano"]="http://stream.laut.fm/piano-classics|Piano Classics" -) - -# List available stations -if [[ $# -eq 0 ]] || [[ "$1" == "list" ]]; then - echo "📻 Available Radio Stations:" - echo "" - echo "🤘 ROCK & METAL:" - echo " radio metal - Heavy Metal & Hard Rock" - echo " radio rock - Classic Rock" - echo "" - echo "🌃 CYBERPUNK / SYNTHWAVE:" - echo " radio cyberpunk - Nightride FM (Synthwave/Retrowave)" - echo " radio darksynth - Darksynth/Cyberpunk/Synthmetal" - echo " radio chillsynth - Chillsynth/Chillwave" - echo " radio datawave - Glitchy Synthwave/IDM" - echo " radio spacesynth - Spacesynth/Space Disco" - echo " radio horrorsynth- Horrorsynth/Witch House" - echo " radio industrial - Industrial/EBM" - echo "" - echo "🎧 ELECTRONIC / TECHNO:" - echo " radio techno - Techno Base (Coding Beats)" - echo " radio dnb - Drum & Bass/Dubstep/Trance" - echo " radio lofi - Lo-Fi Chill Beats" - echo "" - echo "🧘 MEDITATION / AMBIENT:" - echo " radio meditation - Zen FM" - echo " radio ambient - SomaFM Drone Zone" - echo " radio sleep - Deep Space Ambient" - echo " radio nature - Nature Sounds" - echo "" - echo "🎹 CLASSICAL:" - echo " radio classical - BBC Radio 3" - echo " radio piano - Piano Classics" - echo "" - exit 0 -fi - -station="$1" - -# Check if station exists -if [[ -z "${stations[$station]:-}" ]]; then - echo "Error: Station '$station' not found" >&2 - echo "Run 'radio list' to see available stations" >&2 - exit 1 -fi - -# Parse station URL and description -IFS='|' read -r url description <<< "${stations[$station]}" - -echo "📻 Tuning in to: $description" -echo "🔊 Playing... (Ctrl+C to stop)" -echo "" - -# Play with mpv (only fallback to VLC if mpv is not installed or stream fails to start) -if ! command -v mpv &>/dev/null; then - echo "mpv not found. Trying VLC..." >&2 - if command -v vlc &>/dev/null; then - vlc "$url" 2>/dev/null - exit $? - else - echo "Error: Neither mpv nor VLC is installed" >&2 - exit 1 - fi -fi - -# mpv will return non-zero for user interruption (Ctrl+C), which is normal -mpv --no-video --volume=50 "$url" diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..8c9c6d4 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,1554 @@ +# : << EOF +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). +# /!\ do not edit this file +# instead, override settings in ~/.tmux.conf.local, see README.md + + +# -- general ------------------------------------------------------------------- + +set -g default-terminal "screen-256color" + +setw -g xterm-keys on +set -s escape-time 10 # faster command sequences +set -sg repeat-time 600 # increase repeat timeout +set -s focus-events on + +# set -g prefix2 C-a # GNU-Screen compatible prefix (disabled - using Ctrl+B only) +# bind C-a send-prefix -2 + +set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2) +setw -q -g utf8 on + +set -g history-limit 999999 # boost history + +# edit configuration +bind e new-window -n "~/.tmux.conf.local" sh -c '${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"' + +# reload configuration +bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' + + +# -- custom -------------------------------------------------------------------- + +setenv -g py3 "python3 -c 'import pty;pty.spawn(\"bin/bash\")'" +setenv -g shellexports "export TERM=xterm;stty rows 38 columns 116" + +# stabilize reverse shell +bind C-q send $py3 Enter +bind -n C-q send C-z "stty raw -echo" Enter fg Enter reset Enter $shellexports Enter + +# This means you just need to hit Ctrl-aqq +# Ctrl-aq is the first binding +# Ctrl-q is the second part + +# kripto +# set -g status-right "#{kripto}" + +set -g @kripto_id "bitcoin" +set -g @kripto_currency_symbol " " +set -g @kripto_icon "₿ $" +set -g @kripto_ttl 150 +set -g @krypto_round "false" + + +# -- display ------------------------------------------------------------------- + +set -g base-index 1 # start windows numbering at 1 +setw -g pane-base-index 1 # make pane numbering consistent with windows + +setw -g automatic-rename on # rename window to reflect current program +set -g renumber-windows on # renumber windows when a window is closed + +set -g set-titles on # set terminal title + +set -g display-panes-time 800 # slightly longer pane indicators display time +set -g display-time 1000 # slightly longer status messages display time + +set -g status-interval 5 # redraw status line every 5 seconds + +# clear both screen and history +bind -n C-l send-keys C-l \; run 'sleep 0.2' \; clear-history + +# activity +set -g monitor-activity on +set -g visual-activity on + + +# -- navigation ---------------------------------------------------------------- + +# create session +bind C-c new-session + +# find session +bind C-f command-prompt -p find-session 'switch-client -t %%' + +# session navigation +bind BTab switch-client -l # move to last session + +# split current window horizontally +bind - split-window -v +# split current window vertically +bind | split-window -h +bind _ split-window -h + +# pane navigation +bind -r h select-pane -L # move left +bind -r j select-pane -D # move down +bind -r k select-pane -U # move up +bind -r l select-pane -R # move right +bind > swap-pane -D # swap current pane with the next one +bind < swap-pane -U # swap current pane with the previous one + +# switch panes using Alt-arrow without prefix +bind -n M-left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + + +# maximize current pane +bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' + +# pane resizing +bind -r H resize-pane -L 2 +bind -r J resize-pane -D 2 +bind -r K resize-pane -U 2 +bind -r L resize-pane -R 2 + +# window navigation +unbind n +unbind p +bind -r C-h previous-window # select previous window +bind -r C-l next-window # select next window +bind Tab last-window # move to last active window + +# toggle mouse +bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse" + + +# -- urlview ------------------------------------------------------------------- + +bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}" + + +# -- facebook pathpicker ------------------------------------------------------- + +bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id} #{pane_current_path}" + + +# -- copy mode ----------------------------------------------------------------- + +bind Enter copy-mode # enter copy mode + +bind -T copy-mode-vi v send -X begin-selection +bind -T copy-mode-vi C-v send -X rectangle-toggle +bind -T copy-mode-vi y send -X copy-selection-and-cancel +bind -T copy-mode-vi Escape send -X cancel +bind -T copy-mode-vi H send -X start-of-line +bind -T copy-mode-vi L send -X end-of-line + +# copy to X11 clipboard +if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"' +if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"' +# copy to Wayland clipboard +if -b 'command -v wl-copy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | wl-copy"' +# copy to macOS clipboard +if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"' +if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"' +# copy to Windows clipboard +if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"' +if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"' + + +# -- buffers ------------------------------------------------------------------- + +bind b list-buffers # list paste buffers +bind p paste-buffer -p # paste from the top paste buffer +bind P choose-buffer # choose which buffer to paste from + + +# -- 8< ------------------------------------------------------------------------ + +source -q ~/.tmux.conf.local +run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' + + +# EOF +# +# # exit the script if any statement returns a non-true return value +# set -e +# +# unset GREP_OPTIONS +# export LC_NUMERIC=C +# (set +H 2>/dev/null) && set +H || true +# +# if ! printf '' | sed -E 's///' 2>/dev/null; then +# if printf '' | sed -r 's///' 2>/dev/null; then +# sed () { +# n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done +# command sed "$@" +# } +# fi +# fi +# +# _uname_s=$(uname -s) +# +# _tmux_version=$(tmux -V | awk '{gsub(/[^0-9.]/, "", $2); print ($2+0) * 100}') +# +# _is_true() { +# [ x"$1" = x"true" ] || [ x"$1" = x"yes" ] || [ x"$1" = x"1" ] +# } +# +# _is_enabled() { +# [ x"$1" = x"enabled" ] +# } +# +# _is_disabled() { +# [ x"$1" = x"disabled" ] +# } +# +# _circled() { +# circled_digits='⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳' +# if [ "$1" -le 20 ] 2>/dev/null; then +# i=$(( $1 + 1 )) +# eval set -- "$circled_digits" +# eval echo "\${$i}" +# else +# echo "$1" +# fi +# } +# +# _decode_unicode_escapes() { +# printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null +# } +# +# if command -v pkill > /dev/null 2>&1; then +# _pkillf() { +# pkill -f "$@" || true +# } +# else +# case "$_uname_s" in +# *CYGWIN*) +# _pkillf() { +# while IFS= read -r pid; do +# kill "$pid" || true +# done << EOF +# $(grep -Eao "$@" /proc/*/cmdline | xargs -0 | sed -E -n 's,/proc/([0-9]+)/.+$,\1,pg') +# EOF +# } +# ;; +# *) +# _pkillf() { +# while IFS= read -r pid; do +# kill "$pid" || true +# done << EOF +# $(ps -x -o pid= -o command= | grep -E "$@" | cut -d' ' -f1) +# EOF +# } +# ;; +# esac +# fi +# +# _maximize_pane() { +# current_session=${1:-$(tmux display -p '#{session_name}')} +# current_pane=${2:-$(tmux display -p '#{pane_id}')} +# +# dead_panes=$(tmux list-panes -s -t "$current_session" -F '#{pane_dead} #{pane_id} #{pane_start_command}' | grep -E -o '^1 %.+maximized.+$' || true) +# restore=$(printf "%s" "$dead_panes" | sed -n -E -e "s/^1 $current_pane .+maximized.+'(%[0-9]+)'\"?$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t $current_pane/p"\ +# -e "s/^1 (%[0-9]+) .+maximized.+'$current_pane'\"?$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t \1/p") +# +# if [ -z "$restore" ]; then +# [ "$(tmux list-panes -t "$current_session:" | wc -l | sed 's/^ *//g')" -eq 1 ] && tmux display "Can't maximize with only one pane" && return +# current_pane_height=$(tmux display -t "$current_pane" -p "#{pane_height}") +# info=$(tmux new-window -t "$current_session:" -F "#{session_name}:#{window_index}.#{pane_id}" -P "maximized... 2>/dev/null & tmux setw -t \"$current_session:\" remain-on-exit on; printf \"\\033[\$(tput lines);0fPane has been maximized, press + to restore\n\" '$current_pane'") +# session_window=${info%.*} +# new_pane=${info#*.} +# +# retry=1000 +# while [ x"$(tmux list-panes -t "$session_window" -F '#{session_name}:#{window_index}.#{pane_id} #{pane_dead}' 2>/dev/null)" != x"$info 1" ] && [ "$retry" -ne 0 ]; do +# sleep 0.1 +# retry=$((retry - 1)) +# done +# if [ "$retry" -eq 0 ]; then +# tmux display 'Unable to maximize pane' +# fi +# +# tmux setw -t "$session_window" remain-on-exit off \; swap-pane -s "$current_pane" -t "$new_pane" +# else +# $restore || tmux kill-pane +# fi +# } +# +# _toggle_mouse() { +# old=$(tmux show -gv mouse) +# new="" +# +# if [ "$old" = "on" ]; then +# new="off" +# else +# new="on" +# fi +# +# tmux set -g mouse $new +# } +# +# _battery_info() { +# count=0 +# charge=0 +# case "$_uname_s" in +# *Darwin*) +# while IFS= read -r line; do +# [ -z "$line" ] && continue +# discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false") +# percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%' || echo "0%") +# charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }') +# count=$((count + 1)) +# done << EOF +# $(pmset -g batt | grep 'InternalBattery') +# EOF +# ;; +# *Linux*) +# while IFS= read -r batpath; do +# [ -z "$batpath" ] && continue +# grep -i -q device "$batpath/scope" 2> /dev/null && continue +# +# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false") +# bat_capacity="$batpath/capacity" +# if [ -r "$bat_capacity" ]; then +# charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + (capacity > 100 ? 100 : capacity) / 100 }') +# else +# bat_energy_full="$batpath/energy_full" +# bat_energy_now="$batpath/energy_now" +# if [ -r "$bat_energy_full" ] && [ -r "$bat_energy_now" ]; then +# charge=$(awk -v charge="$charge" -v energy_now="$(cat "$bat_energy_now")" -v energy_full="$(cat "$bat_energy_full")" 'BEGIN { print charge + energy_now / energy_full }') +# fi +# fi +# count=$((count + 1)) +# done << EOF +# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*') +# EOF +# ;; +# *CYGWIN*|*MSYS*|*MINGW*) +# while IFS= read -r line; do +# [ -z "$line" ] && continue +# discharging=$(printf '%s' "$line" | awk '{ s = ($1 == 1) ? "true" : "false"; print s }') +# charge=$(printf '%s' "$line" | awk -v charge="$charge" '{ print charge + $2 / 100 }') +# count=$((count + 1)) +# done << EOF +# $(wmic path Win32_Battery get BatteryStatus, EstimatedChargeRemaining 2> /dev/null | tr -d '\r' | tail -n +2 || true) +# EOF +# ;; +# *OpenBSD*) +# for batid in 0 1 2; do +# sysctl -n "hw.sensors.acpibat$batid.raw0" 2>&1 | grep -q 'not found' && continue +# discharging=$(sysctl -n "hw.sensors.acpibat$batid.raw0" | grep -q 1 && echo "true" || echo "false") +# if sysctl -n "hw.sensors.acpibat$batid" | grep -q amphour; then +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.amphour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.amphour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# else +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.watthour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.watthour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# fi +# count=$((count + 1)) +# done +# ;; +# esac +# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') || true +# } +# +# _battery_status() { +# _battery_info +# if [ "$charge" = 0 ]; then +# tmux set -ug '@battery_status' +# return +# fi +# +# battery_status_charging=$1 +# battery_status_discharging=$2 +# if [ x"$discharging" = x"true" ]; then +# battery_status="$battery_status_discharging" +# else +# battery_status="$battery_status_charging" +# fi +# +# tmux set -g '@battery_status' "$battery_status" +# } +# +# _battery_bar() { +# _battery_info +# if [ "$charge" = 0 ]; then +# tmux set -ug '@battery_bar' \;\ +# set -ug '@battery_hbar' \;\ +# set -ug '@battery_vbar' \;\ +# set -ug '@battery_percentage' +# return +# fi +# +# battery_bar_symbol_full=$1 +# battery_bar_symbol_empty=$2 +# battery_bar_length=$3 +# battery_bar_palette=$4 +# battery_hbar_palette=$5 +# battery_vbar_palette=$6 +# +# if [ x"$battery_bar_length" = x"auto" ]; then +# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80) +# if [ "$columns" -ge 80 ]; then +# battery_bar_length=10 +# else +# battery_bar_length=5 +# fi +# fi +# +# if echo "$battery_bar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# palette_style=$1 +# battery_bg=${2:-none} +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# battery_bar="#[bg=$battery_bg]" +# # shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_full" $(echo "$palette" | cut -d' ' -f1-"$full"))" +# # shellcheck disable=SC2046 +# empty=$((battery_bar_length - full)) +# # shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_empty" $(echo "$palette" | cut -d' ' -f$((full + 1))-$((full + empty))))" +# eval battery_bar="$battery_bar#[fg=colour\${$((full == 0 ? 1 : full))}]" +# elif echo "$battery_bar_palette" | grep -q -E '^(([#a-z0-9]{7,9}|none),?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# battery_full_fg=$1 +# battery_empty_fg=$2 +# battery_bg=$3 +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# [ x"$battery_bg" != x"none" ] && \ +# battery_bar="#[bg=$battery_bg]" +# #shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_full_fg]$(printf "%0.s$battery_bar_symbol_full" $(seq 1 "$full"))" +# empty=$((battery_bar_length - full)) +# #shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]$(printf "%0.s$battery_bar_symbol_empty" $(seq 1 "$empty"))" && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]" +# fi +# +# if echo "$battery_hbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_hbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_hbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▏ ▎ ▍ ▌ ▋ ▊ ▉ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_hbar="#[fg=${battery_hbar_fg?}]${battery_hbar_symbol?}" +# +# if echo "$battery_vbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_vbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_vbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▁ ▂ ▃ ▄ ▅ ▆ ▇ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_vbar="#[fg=${battery_vbar_fg?}]${battery_vbar_symbol?}" +# +# battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")" +# +# tmux set -g '@battery_bar' "$battery_bar" \;\ +# set -g '@battery_hbar' "$battery_hbar" \;\ +# set -g '@battery_vbar' "$battery_vbar" \;\ +# set -g '@battery_percentage' "$battery_percentage" +# } +# +# _pane_info() { +# pane_pid="$1" +# pane_tty="${2##/dev/}" +# case "$_uname_s" in +# *CYGWIN*) +# ps -al | tail -n +2 | awk -v pane_pid="$pane_pid" -v tty="$pane_tty" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ && $5 == tty { +# user[$1] = $6; if (!child[$2]) child[$2] = $1 +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# file = "/proc/" pid "/cmdline"; getline command < file; close(file) +# gsub(/\0/, " ", command) +# "id -un " user[pid] | getline username +# print pid":"username":"command +# } +# ' +# ;; +# *Linux*) +# ps -t "$pane_tty" --sort=lstart -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk -v pane_pid="$pane_pid" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ { +# user[$2] = $1; if (!child[$3]) child[$3] = $2; pid=$2; $1 = $2 = $3 = ""; command[pid] = substr($0,4) +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# print pid":"user[pid]":"command[pid] +# } +# ' +# ;; +# *) +# ps -t "$pane_tty" -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk -v pane_pid="$pane_pid" ' +# ((/ssh/ && !/-W/) || !/ssh/) && !/tee/ { +# user[$2] = $1; if (!child[$3]) child[$3] = $2; pid=$2; $1 = $2 = $3 = ""; command[pid] = substr($0,4) +# } +# END { +# pid = pane_pid +# while (child[pid]) +# pid = child[pid] +# +# print pid":"user[pid]":"command[pid] +# } +# ' +# ;; +# esac +# } +# +# _ssh_or_mosh_args() { +# case "$1" in +# *ssh*) +# args=$(printf '%s' "$1" | perl -n -e 'print if s/.*?\bssh[\w]*\s*((?:\s+-\w+)*)(\s+\w+)(\s\w+)?/\1\2/') +# ;; +# *mosh-client*) +# args=$(printf '%s' "$1" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g') +# ;; +# esac +# +# printf '%s' "$args" +# } +# +# _username() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# ssh_only=$3 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk '/^user / { print $2; exit }') +# # shellcheck disable=SC2086 +# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" 2>&1 | awk '/^%username% / { print $2; exit }') +# [ -z "$username" ] && username=$(ssh $ssh_or_mosh_args -v -T -o ControlPath=none -o ProxyCommand=false -o IdentityFile='%%username%%/%r' 2>&1 | awk '/%username%/ { print substr($4,12); exit }') +# else +# if ! _is_true "$ssh_only"; then +# username=${pane_info#*:} +# username=${username%%:*} +# fi +# fi +# +# printf '%s\n' "$username" +# } +# +# _hostname() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# ssh_only=$3 +# full=$4 +# h_or_H=$5 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# hostname=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk '/^hostname / { print $2; exit }') +# # shellcheck disable=SC2086 +# [ -z "$hostname" ] && hostname=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%hostname%% %h >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%hostname% / { print $2; exit }') +# +# if ! _is_true "$full"; then +# case "$hostname" in +# *[a-z-].*) +# hostname=${hostname%%.*} +# ;; +# 127.0.0.1) +# hostname="localhost" +# ;; +# esac +# fi +# else +# if ! _is_true "$ssh_only"; then +# hostname="$h_or_H" +# fi +# fi +# +# printf '%s\n' "$hostname" +# } +# +# _root() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# root=$3 +# +# username=$(_username "$pane_id" "$pane_tty" false) +# +# [ x"$username" = x"root" ] && echo "$root" +# } +# +# _uptime() { +# case "$_uname_s" in +# *Darwin*|*FreeBSD*) +# boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }') +# now=$(date +%s) +# ;; +# *Linux*|*CYGWIN*|*MSYS*|*MINGW*) +# boot=0 +# now=$(cut -d' ' -f1 < /proc/uptime) +# ;; +# *OpenBSD*) +# boot=$(sysctl -n kern.boottime) +# now=$(date +%s) +# esac +# # shellcheck disable=SC1004 +# awk -v boot="$boot" -v now="$now" ' +# BEGIN { +# uptime = now - boot +# y = int(uptime / 31536000) +# dy = int(uptime / 86400) % 365 +# d = int(uptime / 86400) +# h = int(uptime / 3600) % 24 +# m = int(uptime / 60) % 60 +# s = int(uptime) % 60 +# +# system("tmux set -g @uptime_y " y + 0 " \\; " \ +# "set -g @uptime_dy " dy + 0 " \\; " \ +# "set -g @uptime_d " d + 0 " \\; " \ +# "set -g @uptime_h " h + 0 " \\; " \ +# "set -g @uptime_m " m + 0 " \\; " \ +# "set -g @uptime_s " s + 0) +# }' +# } +# +# _loadavg() { +# case "$_uname_s" in +# *Darwin*|*FreeBSD*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)" +# ;; +# *Linux*|*CYGWIN*) +# tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)" +# ;; +# *OpenBSD*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)" +# ;; +# esac +# } +# +# _split_window_ssh() { +# pane_pid=${1:-$(tmux display -p '#{pane_pid}')} +# pane_tty=${2:-$(tmux display -p '#{b:pane_tty}')} +# shift 2 +# +# pane_info=$(_pane_info "$pane_pid" "$pane_tty") +# command=${pane_info#*:} +# command=${command#*:} +# +# case "$command" in +# *mosh-client*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" mosh $(echo "$command" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/') +# ;; +# *ssh*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" $(echo "$command" | sed -e 's/;/\\;/g') +# ;; +# *) +# tmux split-window "$@" +# esac +# } +# +# _split_window() { +# _split_window_ssh "$@" +# } +# +# _apply_tmux_256color() { +# # when tmux-256color is available, use it +# # on macOS though, make sure to use /usr/bin/infocmp to probe if it's availalbe system wide +# case "$_uname_s" in +# *Darwin*) +# if /usr/bin/infocmp -x tmux-256color > /dev/null 2>&1; then +# tmux set -g default-terminal 'tmux-256color' +# fi +# ;; +# *) +# if command infocmp -x tmux-256color > /dev/null 2>&1; then +# tmux set -g default-terminal 'tmux-256color' +# fi +# ;; +# esac +# } +# +# _apply_24b() { +# tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-auto} +# tmux_conf_24b_colour=${tmux_conf_24b_colour:-$tmux_conf_theme_24b_colour} +# if [ x"$tmux_conf_24b_colour" = x"auto" ]; then +# case "$COLORTERM" in +# truecolor|24bit) +# apply_24b=true +# ;; +# esac +# if [ x"$apply_24b" = x"" ] && [ x"$(tput colors)" = x"16777216" ]; then +# apply_24b=true +# fi +# elif _is_true "$tmux_conf_24b_colour"; then +# apply_24b=true +# fi +# if [ x"$apply_24b" = x"true" ]; then +# case "$TERM" in +# screen-*|tmux-*) +# ;; +# *) +# tmux set-option -ga terminal-overrides ",*256col*:Tc" +# ;; +# esac +# fi +# } +# +# _apply_bindings() { +# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# +# tmux list-keys | grep -vF 'tmux.conf.local' | grep -E 'new-window|split(-|_)window|new-session|copy-selection|copy-pipe' > "$cfg" +# +# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the +# # output of list-keys can be truncated +# perl -p -i -e "s/'#\{\?window_zoomed_flag,Unzoom,Zoom\}' 'z' \{resize-pane -$/'#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}\"/g" "$cfg" +# +# tmux_conf_new_window_retain_current_path=${tmux_conf_new_window_retain_current_path:-false} +# if ! _is_disabled "$tmux_conf_new_window_retain_current_path"; then +# perl -p -i -e " +# s/\bnew-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\2)/new-window\1/g" \ +# "$cfg" +# fi +# +# tmux_conf_new_pane_retain_current_path=${tmux_conf_new_pane_retain_current_path:-true} +# if ! _is_disabled "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e " +# s/\brun-shell\b\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{b:pane_tty\}([^\n\1]*)(\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\4)([^\n\1]*)\1/run-shell \1cut -c3- ~\/.tmux.conf | sh -s _split_window #{pane_pid} #{b:pane_tty}\2\5\1/g +# ; +# s/\brun-shell\b(\s+((?:\\\\\")?|\"?|'?)cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+((?:\\\\\")?|\"?|'?)#\{b:pane_tty\}\3)(.*?)\2/split-window\4/g +# ; +# s/\bsplit-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\\\\")?|\"?|'?)#\{pane_current_path\}\2)/split-window\1/g" \ +# "$cfg" +# fi +# +# if ! _is_disabled "$tmux_conf_new_window_retain_current_path"; then +# if _is_true "$tmux_conf_new_window_retain_current_path"; then +# perl -p -i -e " +# s/\bnew-window\b(?!\s+(?:-|}))/{$&}/g if /\bdisplay-menu\b/ +# ; +# s/\bnew-window\b/new-window -c '#\{pane_current_path\}'/g" \ +# "$cfg" +# fi +# fi +# +# perl -p -i -e " +# s/\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?(?:\s+(\bssh\b))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window_ssh #\{pane_pid\} #\{b:pane_tty\}\1'/g if /\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?(?:\s+(ssh))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?/"\ +# "$cfg" +# +# tmux_conf_new_pane_reconnect_ssh=${tmux_conf_new_pane_reconnect_ssh:-false} +# if ! _is_disabled "$tmux_conf_new_pane_reconnect_ssh" && _is_true "$tmux_conf_new_pane_reconnect_ssh"; then +# perl -p -i -e "s/\bsplit-window\b([^;}\n\"]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #\{pane_pid\} #\{b:pane_tty\}\1'/g" "$cfg" +# fi +# +# if ! _is_disabled "$tmux_conf_new_pane_retain_current_path" && _is_true "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e " +# s/\bsplit-window\b(?!\s+(?:-|}))/{$&}/g if /\bdisplay-menu\b/ +# ; +# s/\bsplit-window\b/split-window -c '#{pane_current_path}'\1/g +# ; +# s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c \\\\\"#\{pane_current_path\}\\\\\"\2'/g if /\bdisplay-menu\b/ +# ; +# s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c \"#\{pane_current_path\}\"\2'/g" \ +# "$cfg" +# fi +# +# tmux_conf_new_session_prompt=${tmux_conf_new_session_prompt:-false} +# if ! _is_disabled "$tmux_conf_new_session_prompt" && _is_true "$tmux_conf_new_session_prompt"; then +# perl -p -i \ +# -e "s/(? /dev/null 2>&1 && command='xsel -i -b' +# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1' +# command -v wl-copy > /dev/null 2>&1 && command='wl-copy' +# command -v pbcopy > /dev/null 2>&1 && command='pbcopy' +# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy' +# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe' +# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard' +# +# if [ -n "$command" ]; then +# if ! _is_disabled "$tmux_conf_copy_to_os_clipboard" && _is_true "$tmux_conf_copy_to_os_clipboard"; then +# perl -p -i -e "s/(?!.*?$command)\bcopy-(?:selection|pipe)(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg" +# else +# if [ $_tmux_version -ge 320 ]; then +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-pipe\1/g" "$cfg" +# else +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-selection\1/g" "$cfg" +# fi +# fi +# fi +# +# # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings +# awk < "$cfg" \ +# '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg.in" +# +# # ignore bindings with errors +# if ! tmux source-file "$cfg.in"; then +# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) +# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do +# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) +# perl -n -i -e "if ($. != $line) { print }" "$cfg.in" +# done +# fi +# } +# +# _apply_theme() { +# tmux_conf_theme=${tmux_conf_theme:-enabled} +# if ! _is_disabled "$tmux_conf_theme"; then +# +# # -- default theme ------------------------------------------------------- +# +# tmux_conf_theme_colour_1=${tmux_conf_theme_colour_1:-#080808} # dark gray +# tmux_conf_theme_colour_2=${tmux_conf_theme_colour_2:-#303030} # gray +# tmux_conf_theme_colour_3=${tmux_conf_theme_colour_3:-#8a8a8a} # light gray +# tmux_conf_theme_colour_4=${tmux_conf_theme_colour_4:-#00afff} # light blue +# tmux_conf_theme_colour_5=${tmux_conf_theme_colour_5:-#ffff00} # yellow +# tmux_conf_theme_colour_6=${tmux_conf_theme_colour_6:-#080808} # dark gray +# tmux_conf_theme_colour_7=${tmux_conf_theme_colour_7:-#e4e4e4} # white +# tmux_conf_theme_colour_8=${tmux_conf_theme_colour_8:-#080808} # dark gray +# tmux_conf_theme_colour_9=${tmux_conf_theme_colour_9:-#ffff00} # yellow +# tmux_conf_theme_colour_10=${tmux_conf_theme_colour_10:-#ff00af} # pink +# tmux_conf_theme_colour_11=${tmux_conf_theme_colour_11:-#5fff00} # green +# tmux_conf_theme_colour_12=${tmux_conf_theme_colour_12:-#8a8a8a} # light gray +# tmux_conf_theme_colour_13=${tmux_conf_theme_colour_13:-#e4e4e4} # white +# tmux_conf_theme_colour_14=${tmux_conf_theme_colour_14:-#080808} # dark gray +# tmux_conf_theme_colour_15=${tmux_conf_theme_colour_15:-#080808} # dark gray +# tmux_conf_theme_colour_16=${tmux_conf_theme_colour_16:-#d70000} # red +# tmux_conf_theme_colour_17=${tmux_conf_theme_colour_17:-#e4e4e4} # white +# +# # -- panes --------------------------------------------------------------- +# +# tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default} +# tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default} +# tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false} +# tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-default} +# tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-$tmux_conf_theme_colour_2} +# +# window_style="fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg" +# if _is_true "$tmux_conf_theme_highlight_focused_pane"; then +# window_active_style="fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg" +# else +# window_active_style="default" +# fi +# +# tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin} +# tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-$tmux_conf_theme_colour_2} +# tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border} +# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border} +# case "$tmux_conf_theme_pane_border_style" in +# fat) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg} +# ;; +# thin|*) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-default} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-default} +# ;; +# esac +# +# tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-$tmux_conf_theme_colour_4} +# +# # -- status line --------------------------------------------------------- +# +# tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}") +# tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}") +# tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}") +# tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}") +# +# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-bold} +# +# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-bold} +# +# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold} +# +# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-$tmux_conf_theme_colour_3} +# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-none} +# +# tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-#h ❐ #S ● #I #W} +# +# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-$tmux_conf_theme_colour_3} +# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-none} +# tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-#I #W} +# +# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-$tmux_conf_theme_colour_1} +# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-bold} +# tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-#I #W} +# +# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-default} +# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-default} +# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-underscore} +# +# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-$tmux_conf_theme_colour_5} +# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-default} +# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-blink,bold} +# +# tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-default} +# tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-none} +# +# if [ x"$tmux_conf_theme_window_status_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bg" = x"default" ]; then +# spacer='' +# spacer_current=' ' +# else +# spacer=' ' +# spacer_current=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_last_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_last_bg" = x"default" ] ; then +# spacer_last='' +# else +# spacer_last=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_activity_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_activity_bg" = x"default" ] ; then +# spacer_activity='' +# spacer_last_activity="$spacer_last" +# else +# spacer_activity=' ' +# spacer_last_activity=' ' +# fi +# if [ x"$tmux_conf_theme_window_status_bell_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bell_bg" = x"default" ] ; then +# spacer_bell='' +# spacer_last_bell="$spacer_last" +# spacer_activity_bell="$spacer_activity" +# spacer_last_activity_bell="$spacer_last_activity" +# else +# spacer_bell=' ' +# spacer_last_bell=' ' +# spacer_activity_bell=' ' +# spacer_last_activity_bell=' ' +# fi +# spacer="#{?window_last_flag,#{?window_activity_flag,#{?window_bell_flag,$spacer_last_activity_bell,$spacer_last_activity},#{?window_bell_flag,$spacer_last_bell,$spacer_last}},#{?window_activity_flag,#{?window_bell_flag,$spacer_activity_bell,$spacer_activity},#{?window_bell_flag,$spacer_bell,$spacer}}}" +# if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then +# if [ -z "$tmux_conf_theme_right_separator_main" ]; then +# window_status_separator=' ' +# else +# window_status_separator='' +# fi +# window_status_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag?,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#[none]$tmux_conf_theme_right_separator_main" +# window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main" +# else +# if [ -z "$tmux_conf_theme_left_separator_main" ]; then +# window_status_separator=' ' +# else +# window_status_separator='' +# fi +# window_status_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if /!default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main" +# window_status_current_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg]$tmux_conf_theme_left_separator_main" +# fi +# +# # -- indicators +# +# tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-⚇} # U+2687 +# tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-none} +# tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-none} +# tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-none} +# +# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-⌨} # U+2328 +# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-none} +# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-none} +# tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-none} +# +# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197 +# tmux_conf_theme_mouse_fg=${tmux_conf_theme_mouse_fg:-none} +# tmux_conf_theme_mouse_bg=${tmux_conf_theme_mouse_bg:-none} +# tmux_conf_theme_mouse_attr=${tmux_conf_theme_mouse_attr:-none} +# +# tmux_conf_theme_root=${tmux_conf_theme_root:-!} +# tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-none} +# tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-none} +# tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-bold,blink} +# +# tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-⚏} # U+268F +# tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-none} +# tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-none} +# tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-none} +# +# # -- status-left style +# +# tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '} +# tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8} +# tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11} +# tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-bold,none,none} +# +# if [ -n "$tmux_conf_theme_status_left" ]; then +# status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{pairing}/g" \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{prefix}/g" \ +# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{mouse}/g" \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{synchronized}%g" \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{root}#[inherit]%g") +# +# status_left=$(printf '%s' "$status_left" | awk \ +# -v status_bg="$tmux_conf_theme_status_bg" \ +# -v fg_="$tmux_conf_theme_status_left_fg" \ +# -v bg_="$tmux_conf_theme_status_left_bg" \ +# -v attr_="$tmux_conf_theme_status_left_attr" \ +# -v mainsep="$tmux_conf_theme_left_separator_main" \ +# -v subsep="$tmux_conf_theme_left_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open || open_ || open__) +# printf "|%s", subsplit($i) +# else +# { +# if (i > 1) +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# else +# printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i) +# } +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# printf "#[fg=%s,bg=%s,none]%s", bg[j_], status_bg, mainsep +# }') +# +# status_left="$status_left " +# fi +# +# # -- status-right style +# +# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-' #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '} +# tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14} +# tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17} +# tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-none,none,bold} +# +# if [ -n "$tmux_conf_theme_status_right" ]; then +# status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{pairing}/g" \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{prefix}/g" \ +# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{mouse}/g" \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{synchronized}%g" \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{root}#[inherit]%g") +# +# status_right=$(printf '%s' "$status_right" | awk \ +# -v status_bg="$tmux_conf_theme_status_bg" \ +# -v fg_="$tmux_conf_theme_status_right_fg" \ +# -v bg_="$tmux_conf_theme_status_right_bg" \ +# -v attr_="$tmux_conf_theme_status_right_attr" \ +# -v mainsep="$tmux_conf_theme_right_separator_main" \ +# -v subsep="$tmux_conf_theme_right_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open_ || open || open__) +# printf "|%s", subsplit($i) +# else +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? status_bg : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# }') +# fi +# +# # -- clock --------------------------------------------------------------- +# +# tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-$tmux_conf_theme_colour_4} +# tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-24} +# +# tmux setw -g window-style "$window_style" \; setw -g window-active-style "$window_active_style" \;\ +# setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg" \;\ +# set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator" \;\ +# set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr" \;\ +# set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr" \;\ +# setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr" \;\ +# set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\ +# setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\ +# setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr" \;\ +# setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr" \;\ +# setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr" \;\ +# setw -g window-status-separator "$window_status_separator" \;\ +# setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\ +# setw -g clock-mode-style "$tmux_conf_theme_clock_style" +# fi +# +# # -- variables ------------------------------------------------------------- +# +# set_titles_string=$(printf '%s' "${tmux_conf_theme_terminal_title:-$(tmux show -gv set-titles-string)}" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# +# window_status_format=$(printf '%s' "${window_status_format:-$(tmux show -gv window-status-format)}" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# +# window_status_current_format=$(printf '%s' "${window_status_current_format:-$(tmux show -gv window-status-current-format)}" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# +# status_left=$(printf '%s' "${status_left:-$(tmux show -gv status-left)}" | sed \ +# -e "s/#{pairing}/#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \ +# -e "s/#{prefix}/#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \ +# -e "s/#{mouse}/#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \ +# -e "s%#{synchronized}%#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \ +# -e "s%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g" \ +# -e "s%#{root}%#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}%g") +# +# status_right=$(printf '%s' "${status_right:-$(tmux show -gv status-right)}" | sed \ +# -e "s/#{pairing}/#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \ +# -e "s/#{prefix}/#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \ +# -e "s/#{mouse}/#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \ +# -e "s%#{synchronized}%#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \ +# -e "s%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g" \ +# -e "s%#{root}%#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}%g") +# +# tmux_conf_battery_bar_symbol_full=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_full:-◼}") +# tmux_conf_battery_bar_symbol_empty=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_empty:-◻}") +# tmux_conf_battery_bar_length=${tmux_conf_battery_bar_length:-auto} +# tmux_conf_battery_bar_palette=${tmux_conf_battery_bar_palette:-gradient} +# tmux_conf_battery_hbar_palette=${tmux_conf_battery_hbar_palette:-gradient} +# tmux_conf_battery_vbar_palette=${tmux_conf_battery_vbar_palette:-gradient} +# tmux_conf_battery_status_charging=$(_decode_unicode_escapes "${tmux_conf_battery_status_charging:-↑}") # U+2191 +# tmux_conf_battery_status_discharging=$(_decode_unicode_escapes "${tmux_conf_battery_status_discharging:-↓}") # U+2193 +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _battery_bar' +# _battery_info +# if [ "$charge" != 0 ]; then +# case "$status_left $status_right" in +# *'#{battery_'*|*'#{?battery_'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# status_right="#(echo; nice cut -c3- ~/.tmux.conf | sh -s _battery_status \"$tmux_conf_battery_status_charging\" \"$tmux_conf_battery_status_discharging\")$status_right" +# interval=60 +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -ge 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\"; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _battery_bar \"$tmux_conf_battery_bar_symbol_full\" \"$tmux_conf_battery_bar_symbol_empty\" \"$tmux_conf_battery_bar_length\" \"$tmux_conf_battery_bar_palette\" \"$tmux_conf_battery_hbar_palette\" \"$tmux_conf_battery_vbar_palette\")$status_right" +# fi +# ;; +# esac +# fi +# +# case "$status_left $status_right" in +# *'#{username}'*|*'#{hostname}'*|*'#{hostname_full}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*|*'#{hostname_full_ssh}'*) +# status_left=$(echo "$status_left" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# status_right=$(echo "$status_right" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \ +# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \ +# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g') +# ;; +# esac +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _uptime' +# case "$status_left $status_right" in +# *'#{uptime_'*|*'#{?uptime_'*) +# status_left=$(echo "$status_left" | perl -p -e ' +# ; s/#\{(\?)?uptime_y\b/#\{\1\@uptime_y/g +# ; s/#\{(\?)?uptime_d\b/#\{\1\@uptime_d/g +# ; s/\@uptime_d\b/\@uptime_dy/g if /\@uptime_y\b/ +# ; s/#\{(\?)?uptime_h\b/#\{\1\@uptime_h/g +# ; s/#\{(\?)?uptime_m\b/#\{\1\@uptime_m/g +# ; s/#\{(\?)?uptime_s\b/#\{\1\@uptime_s/g') +# status_right=$(echo "$status_right" | perl -p -e ' +# ; s/#\{(\?)?uptime_y\b/#\{\1\@uptime_y/g +# ; s/#\{(\?)?uptime_d\b/#\{\1\@uptime_d/g +# ; s/\@uptime_d\b/\@uptime_dy/g if /\@uptime_y\b/ +# ; s/#\{(\?)?uptime_h\b/#\{\1\@uptime_h/g +# ; s/#\{(\?)?uptime_m\b/#\{\1\@uptime_m/g +# ; s/#\{(\?)?uptime_s\b/#\{\1\@uptime_s/g') +# interval=60 +# case "$status_left $status_right" in +# *'#{@uptime_s}'*) +# interval=$(tmux show -gv status-interval) +# ;; +# esac +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -gt 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _uptime; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _uptime)$status_right" +# fi +# ;; +# esac +# +# _pkillf 'cut -c3- ~/\.tmux\.conf \| sh -s _loadavg' +# case "$status_left $status_right" in +# *'#{loadavg'*|*'#{?loadavg'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# interval=$(tmux show -gv status-interval) +# if [ $_tmux_version -ge 320 ]; then +# tmux run -b "trap '[ -n \"\$sleep_pid\" ] && kill -9 \$sleep_pid; exit 0' TERM; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval & sleep_pid=\$!; wait \$sleep_pid; sleep_pid=; done" +# elif [ $_tmux_version -gt 280 ]; then +# status_right="#(echo; while [ x\"\$(tmux -S '#{socket_path}' display -p '#{l:#{pid}}')\" = x\"#{pid}\" ]; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done)$status_right" +# elif [ $_tmux_version -gt 240 ]; then +# status_right="#(echo; while :; do nice cut -c3- ~/.tmux.conf | sh -s _loadavg; sleep $interval; done)$status_right" +# else +# status_right="#(nice cut -c3- ~/.tmux.conf | sh -s _loadavg)$status_right" +# fi +# ;; +# esac +# +# # -- custom variables ------------------------------------------------------ +# +# if [ -f ~/.tmux.conf.local ] && [ x"$(cut -c3- ~/.tmux.conf.local | sh 2>/dev/null -s printf probe)" = x"probe" ]; then +# replacements=$(perl -n -e 'print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*(?:#.*)?\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- ~/.tmux.conf.local | sh -s \1\\1)%g; !p' < ~/.tmux.conf.local) +# status_left=$(echo "$status_left" | perl -p -e "$replacements" || echo "$status_left") +# status_right=$(echo "$status_right" | perl -p -e "$replacements" || echo "$status_right") +# fi +# +# # -------------------------------------------------------------------------- +# +# tmux set -g set-titles-string "$(_decode_unicode_escapes "$set_titles_string")" \;\ +# setw -g window-status-format "$(_decode_unicode_escapes "$window_status_format")" \;\ +# setw -g window-status-current-format "$(_decode_unicode_escapes "$window_status_current_format")" \;\ +# set -g status-left-length 1000 \; set -g status-left "$(_decode_unicode_escapes "$status_left")" \;\ +# set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")" +# } +# +# __apply_plugins() { +# window_active="$1" +# tmux_conf_update_plugins_on_launch="$2" +# tmux_conf_update_plugins_on_reload="$3" +# tmux_conf_uninstall_plugins_on_reload="$4" +# +# TMUX_PLUGIN_MANAGER_PATH=${TMUX_PLUGIN_MANAGER_PATH:-~/.tmux/plugins} +# if [ -z "$(tmux show -gv '@plugin')" ] && [ -z "$(tmux show -gv '@tpm_plugins')" ]; then +# if _is_true "$tmux_conf_uninstall_plugins_on_reload" && [ -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then +# tmux display 'Uninstalling tpm and plugins...' +# rm -rf "$TMUX_PLUGIN_MANAGER_PATH" +# tmux display 'Done uninstalling tpm and plugins...' +# fi +# else +# if git ls-remote -hq https://github.com/gpakosz/.tmux.git master > /dev/null; then +# if [ ! -d "$TMUX_PLUGIN_MANAGER_PATH/tpm" ]; then +# install_tpm=true +# tmux display 'Installing tpm and plugins...' +# git clone --depth 1 https://github.com/tmux-plugins/tpm "$TMUX_PLUGIN_MANAGER_PATH/tpm" +# elif { [ -z "$window_active" ] && _is_true "$tmux_conf_update_plugins_on_launch"; } || { [ -n "$window_active" ] && _is_true "$tmux_conf_update_plugins_on_reload"; }; then +# update_tpm=true +# tmux display 'Updating tpm and plugins...' +# (cd "$TMUX_PLUGIN_MANAGER_PATH/tpm" && git fetch -q -p && git checkout -q master && git reset -q --hard origin/master) +# fi +# if [ x"$install_tpm" = x"true" ] || [ x"$update_tpm" = x"true" ]; then +# perl -0777 -p -i -e 's/git clone(?!\s+--depth\s+1)/git clone --depth 1/g +# ;s/(install_plugin(.(?!&))*)\n(\s+)done/\1&\n\3done\n\3wait/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/install_plugins.sh" +# perl -p -i -e 's/git submodule update --init --recursive(?!\s+--depth\s+1)/git submodule update --init --recursive --depth 1/g' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/update_plugin.sh" +# perl -p -i -e 's,\$tmux_file\s+>/dev/null\s+2>\&1,$& || { tmux display "Plugin \$(basename \${plugin_path}) failed" && false; },' "$TMUX_PLUGIN_MANAGER_PATH/tpm/scripts/source_plugins.sh" +# tmux set-environment -g TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGIN_MANAGER_PATH" +# fi +# if [ x"$update_tpm" = x"true" ]; then +# { +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/update_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins all ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/clean_plugins" all >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 &&\ +# tmux display 'Done updating tpm and plugins...' +# } || tmux display 'Failed updating tpm and plugins...' +# elif [ x"$install_tpm" = x"true" ]; then +# { +# echo "Invoking $TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins ..." > "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 && \ +# "$TMUX_PLUGIN_MANAGER_PATH/tpm/bin/install_plugins" >> "$TMUX_PLUGIN_MANAGER_PATH/tpm_log.txt" 2>&1 +# tmux display 'Done installing tpm and plugins...' +# } || tmux display 'Failed installing tpm and plugins...' +# fi +# else +# tmux display "GitHub doesn't seem to be reachable, skipping installing and/or updating tpm and plugins..." +# fi +# +# [ -z "$(tmux show -gqv '@tpm-install')" ] && tmux set -g '@tpm-install' 'I' +# [ -z "$(tmux show -gqv '@tpm-update')" ] && tmux set -g '@tpm-update' 'u' +# [ -z "$(tmux show -gqv '@tpm-clean')" ] && tmux set -g '@tpm-clean' 'M-u' +# [ -f "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" ] && "$TMUX_PLUGIN_MANAGER_PATH/tpm/tpm" || tmux display "One or more tpm plugin(s) failed" +# if [ $_tmux_version -gt 260 ]; then +# tmux set -gu '@tpm-install' \; set -gu '@tpm-update' \; set -gu '@tpm-clean' \; set -gu '@plugin' +# fi +# fi +# } +# +# _apply_plugins() { +# tmux_conf_update_plugins_on_launch=${tmux_conf_update_plugins_on_launch:-true} +# tmux_conf_update_plugins_on_reload=${tmux_conf_update_plugins_on_reload:-true} +# tmux_conf_uninstall_plugins_on_reload=${tmux_conf_uninstall_plugins_on_reload:-true} +# tmux run -b "cut -c3- ~/.tmux.conf | sh -s __apply_plugins \"$window_active\" \"$tmux_conf_update_plugins_on_launch\" \"$tmux_conf_update_plugins_on_reload\" \"$tmux_conf_uninstall_plugins_on_reload\"" +# } +# +# _apply_important() { +# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# +# if perl -n -e 'print if /^\s*(?:set|bind|unbind).+?#!important\s*$/' ~/.tmux.conf.local 2>/dev/null > "$cfg.local"; then +# if ! tmux source-file "$cfg.local"; then +# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) +# while ! out=$(tmux source-file "$verbose_flag" "$cfg.local"); do +# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) +# perl -n -i -e "if ($. != $line) { print }" "$cfg.local" +# done +# fi +# fi +# } +# +# _apply_configuration() { +# window_active="$(tmux display -p '#{window_active}' 2>/dev/null || true)" +# if [ -z "$window_active" ]; then +# if ! command -v perl > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires perl" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if ! command -v sed > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires sed" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if ! command -v awk > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# if [ $_tmux_version -lt 240 ]; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.4+" \; set -u display-time \; run "sleep 3" \; kill-server' +# return +# fi +# fi +# +# # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +# if command -v reattach-to-user-namespace > /dev/null 2>&1; then +# default_shell="$(tmux show -gv default-shell)" +# case "$default_shell" in +# *fish) +# tmux set -g default-command "reattach-to-user-namespace -l $default_shell" +# ;; +# *sh) +# tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace -l $default_shell" +# ;; +# esac +# fi +# +# case "$_uname_s" in +# *CYGWIN*|*MSYS*) +# # prevent Cygwin and MSYS2 from cd-ing into home directory when evaluating /etc/profile +# tmux setenv -g CHERE_INVOKING 1 +# ;; +# esac +# +# _apply_tmux_256color +# _apply_24b& +# _apply_theme& +# _apply_bindings& +# wait +# +# _apply_plugins +# _apply_important +# +# # shellcheck disable=SC2046 +# tmux setenv -gu tmux_conf_dummy $(printenv | grep -E -o '^tmux_conf_[^=]+' | awk '{printf "; setenv -gu %s", $0}') +# } +# +# _urlview() { +# tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1" +# tmux split-window "tmux show-buffer -b urlview-$1 | urlview || true; tmux delete-buffer -b urlview-$1" +# } +# +# _fpp() { +# tmux capture-pane -J -S - -E - -b "fpp-$1" -t "$1" +# tmux split-window -c $2 "tmux show-buffer -b fpp-$1 | fpp || true; tmux delete-buffer -b fpp-$1" +# } +# +# "$@" diff --git a/tmux/.tmux.conf.local b/tmux/.tmux.conf.local index d3a813e..e681411 100644 --- a/tmux/.tmux.conf.local +++ b/tmux/.tmux.conf.local @@ -297,7 +297,10 @@ tmux_conf_theme_status_left_fg="$tmux_conf_theme_colour_4,$tmux_conf_theme_colou tmux_conf_theme_status_left_bg="$tmux_conf_theme_colour_1,$tmux_conf_theme_colour_1,$tmux_conf_theme_colour_0" # right -tmux_conf_theme_status_right=" #[fg=#00afff,bg=#080808]#{prefix_highlight} #[fg=#00afff,bg=#080808]#{mouse} #[fg=#e4e4e4,bg=#080808]Online: #[fg=#5fff00,bg=#080808]#{online_status} #[fg=#f7931a,bg=#080808] #{kripto} #[fg=#5fff00,bg=#080808]%R #[fg=#e4e4e4,bg=#080808] %a %d %b #[fg=#e4e4e4,bg=#d70000,bold] #{?#{==:#{username},root},!, #{username}} #[fg=#e4e4e4,bg=#d70000,bold]#{?username_ssh, @ #{username_ssh},} #[fg=#080808,bg=#e4e4e4,bold] #{hostname} " +tmux_conf_theme_status_right=" #[fg=#00afff,bg=#080808]#{prefix_highlight} #[fg=#00afff,bg=#080808]#{mouse} #[fg=#e4e4e4,bg=#080808]Online: #[fg=#5fff00,bg=#080808]#{online_status} #[fg=#e4e4e4,bg=#080808]#(~/.tmux/scripts/tmux-vpn-status/vpn-status.sh) VPN #[fg=#f7931a,bg=#080808] #{kripto} #[fg=#5fff00,bg=#080808]%R #[fg=#e4e4e4,bg=#080808] %a %d %b #[fg=#e4e4e4,bg=#d70000,bold] #{?#{==:#{username},root},!, #{username}} #[fg=#e4e4e4,bg=#d70000,bold]#{?username_ssh, @ #{username_ssh},} #[fg=#080808,bg=#e4e4e4,bold] #{hostname} " + +# backup - working +# tmux_conf_theme_status_right=" #[fg=#00afff,bg=#080808]#{prefix_highlight} #[fg=#00afff,bg=#080808]#{mouse} #[fg=#e4e4e4,bg=#080808]Online: #[fg=#5fff00,bg=#080808]#{online_status} #[fg=#f7931a,bg=#080808] #{kripto} #[fg=#5fff00,bg=#080808]%R #[fg=#e4e4e4,bg=#080808] %a %d %b #[fg=#e4e4e4,bg=#d70000,bold] #{?#{==:#{username},root},!, #{username}} #[fg=#e4e4e4,bg=#d70000,bold]#{?username_ssh, @ #{username_ssh},} #[fg=#080808,bg=#e4e4e4,bold] #{hostname} " #tmux_conf_theme_status_right_attr="bold,bold,bold,bold,bold,bold,bold,bold,bold" # tmux_conf_theme_status_right=" @@ -634,7 +637,7 @@ set -g @fzf-open-bind 'u' # bind-key -T prefix u run-shell '~/.tmux/plugins/tmux-fzf-open/setup.tmux' set -g @fzf-open-open-cmd "brave-browser" - +set -g status-right "#(~/.tmux/scripts/tmux-vpn-status/vpn-status.sh) | %H:%M %d-%b-%y" # ---- End My Customizations ---- ################################## diff --git a/tmux/.tmux/scripts/tmux-vpn-status/vpn-status.sh b/tmux/.tmux/scripts/tmux-vpn-status/vpn-status.sh new file mode 100755 index 0000000..ab53667 --- /dev/null +++ b/tmux/.tmux/scripts/tmux-vpn-status/vpn-status.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# VPN status for tmux statusline +# Check for VPN connection via multiple methods: +# 1. ProtonVPN GUI (uses NetworkManager with pvpn- prefix or WireGuard) +# 2. Old WireGuard config (protonvpn interface) +# 3. Any active VPN connection via NetworkManager + +# Method 1: Check for ProtonVPN GUI WireGuard interface (pvpn-* or proton*) +if ip link 2>/dev/null | grep -qE "pvpn-|proton" | grep -qE "state UP"; then + echo "🛡️" + exit 0 +fi + +# Method 2: Check for any wireguard interface that's UP +if ip link 2>/dev/null | grep -E "wireguard|wg[0-9]+" | grep -qE "state UP"; then + echo "🛡️" + exit 0 +fi + +# Method 3: Check NetworkManager for active VPN connections +if nmcli -t -f TYPE,STATE connection show --active 2>/dev/null | grep -qE "vpn:activated|wireguard:activated"; then + echo "🛡️" + exit 0 +fi + +# Method 4: Check old protonvpn interface (legacy) +if ip link show protonvpn 2>/dev/null | grep -qE "<.*UP.*>"; then + echo "🛡️" + exit 0 +fi + +# Method 5: Check if default route goes through a VPN-like interface +if ip route show default 2>/dev/null | grep -qE "pvpn-|proton|wg[0-9]+|tun[0-9]+"; then + echo "🛡️" + exit 0 +fi + +# No VPN detected +echo "❌" diff --git a/tmux/.tmux/scripts/vpn-status-interactive.sh b/tmux/.tmux/scripts/vpn-status-interactive.sh new file mode 100755 index 0000000..7f43b31 --- /dev/null +++ b/tmux/.tmux/scripts/vpn-status-interactive.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Alternative: Check via ip addr instead of wg show (no sudo needed) + +if ip addr show protonvpn 2>/dev/null | grep -q "state UP"; then + echo "🛡️" +else + echo "❌" +fi diff --git a/tmux/.tmux/scripts/vpn-status.sh b/tmux/.tmux/scripts/vpn-status.sh new file mode 100755 index 0000000..deab281 --- /dev/null +++ b/tmux/.tmux/scripts/vpn-status.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# VPN status for tmux statusline +# Check WireGuard ProtonVPN connection via ip link (no sudo needed) + +if ip link show protonvpn 2>/dev/null | grep -qE "<.*UP.*>"; then + echo "🛡️" +else + echo "❌" +fi diff --git a/ulauncher/.config/ulauncher/ext_preferences/com.github.brpaz.ulauncher-faker.db b/ulauncher/.config/ulauncher/ext_preferences/com.github.brpaz.ulauncher-faker.db index 0a47446..9c520c7 100644 Binary files a/ulauncher/.config/ulauncher/ext_preferences/com.github.brpaz.ulauncher-faker.db and b/ulauncher/.config/ulauncher/ext_preferences/com.github.brpaz.ulauncher-faker.db differ diff --git a/ulauncher/.config/ulauncher/extensions.json b/ulauncher/.config/ulauncher/extensions.json index 35b5205..b830531 100644 --- a/ulauncher/.config/ulauncher/extensions.json +++ b/ulauncher/.config/ulauncher/extensions.json @@ -2,260 +2,253 @@ "com.github.igorvaryvoda.ulauncher-perplexity": { "id": "com.github.igorvaryvoda.ulauncher-perplexity", "url": "https://github.com/IgorVaryvoda/ulauncher-perplexity", - "updated_at": "2025-03-16T12:59:43.265383", + "updated_at": "2025-11-12T01:01:14.411833", "last_commit": "7320f7b1499417ad31d920688e600b80d8454f6d", "last_commit_time": "2024-12-10T15:31:41" }, "com.github.iboyperson.ulauncher-system": { "id": "com.github.iboyperson.ulauncher-system", "url": "https://github.com/iboyperson/ulauncher-system", - "updated_at": "2025-03-16T13:02:08.080929", + "updated_at": "2025-11-12T01:01:16.918329", "last_commit": "7dedd992709fa2297735cddf852404144d4da47c", "last_commit_time": "2023-11-14T16:53:20" }, "com.github.mikebarkmin.ulauncher-obsidian": { "id": "com.github.mikebarkmin.ulauncher-obsidian", "url": "https://github.com/mikebarkmin/ulauncher-obsidian", - "updated_at": "2025-03-16T13:02:43.173879", + "updated_at": "2025-11-12T01:01:18.864415", "last_commit": "a419cdc5e73453e4b284bb4905448ca60e4a3864", "last_commit_time": "2023-09-12T10:42:25" }, "com.github.ulauncher.ulauncher-timer": { "id": "com.github.ulauncher.ulauncher-timer", "url": "https://github.com/ulauncher/ulauncher-timer", - "updated_at": "2025-03-16T13:02:56.333635", + "updated_at": "2025-11-12T01:01:20.875288", "last_commit": "2d3fe82fe1e38670e6eb8887cd2a4b4d1c2baa79", "last_commit_time": "2023-03-25T08:07:41" }, "com.github.hillaryychan.ulauncher-fzf": { "id": "com.github.hillaryychan.ulauncher-fzf", "url": "https://github.com/hillaryychan/ulauncher-fzf", - "updated_at": "2025-03-16T13:03:21.728964", - "last_commit": "e8137dae6448041fc53ae418263501b068857073", - "last_commit_time": "2023-05-16T12:35:35" + "updated_at": "2025-11-12T01:01:22.765478", + "last_commit": "fad638127b2583d64ef3dac3cf3e94508e0b506a", + "last_commit_time": "2025-11-10T10:12:48" }, "com.github.beajeanm.ulauncher-windows-switcher": { "id": "com.github.beajeanm.ulauncher-windows-switcher", "url": "https://github.com/beajeanm/ulauncher-windows-switcher", - "updated_at": "2025-03-16T13:03:57.628011", + "updated_at": "2025-11-12T01:21:35.888712", "last_commit": "e746afcd1ae971294f983dadb6ad2c90a730ec39", "last_commit_time": "2022-08-04T22:59:46" }, "com.github.nastuzzisamy.ulauncher-youtube-search": { "id": "com.github.nastuzzisamy.ulauncher-youtube-search", "url": "https://github.com/NastuzziSamy/ulauncher-youtube-search", - "updated_at": "2025-03-16T13:04:51.043356", + "updated_at": "2025-11-12T01:21:37.836629", "last_commit": "fe855811358b2f15ec6ed69ca18e20639874fa28", "last_commit_time": "2021-03-27T11:29:18" }, "com.github.luispabon.ulauncher-virtualbox": { "id": "com.github.luispabon.ulauncher-virtualbox", "url": "https://github.com/luispabon/ulauncher-virtualbox", - "updated_at": "2025-03-16T13:06:10.014115", + "updated_at": "2025-11-12T01:21:41.117924", "last_commit": "d8f495df3c7f41ee8493b207d17f06fc0372c84e", "last_commit_time": "2020-09-23T01:29:15" }, "com.github.ralcaidev.ulauncher-extension-list": { "id": "com.github.ralcaidev.ulauncher-extension-list", "url": "https://github.com/ralcaidev/ulauncher-extension-list", - "updated_at": "2025-03-16T13:07:24.585415", + "updated_at": "2025-11-12T01:21:43.143563", "last_commit": "27d65fae4abc036e37a09792c8244287017dbc73", "last_commit_time": "2022-11-10T16:06:26" }, - "com.github.brpaz.ulauncher-faker": { - "id": "com.github.brpaz.ulauncher-faker", - "url": "https://github.com/brpaz/ulauncher-faker", - "updated_at": "2025-03-16T13:08:41.037197", - "last_commit": "58832c94acc671a9f603ea7fbf5d4405110bb902", - "last_commit_time": "2021-12-12T15:46:10" - }, "com.github.ultiblog.ulauncher-password-generator": { "id": "com.github.ultiblog.ulauncher-password-generator", "url": "https://github.com/Ultiblog/ULauncher-Password-Generator", - "updated_at": "2025-03-16T13:56:55.395064", + "updated_at": "2025-11-12T01:21:47.471889", "last_commit": "de08e6b3ce1c58e4f2b23321702ba40fa2110f73", "last_commit_time": "2022-11-11T12:05:05" }, "com.github.zachatrocity.ulauncher-ollama": { "id": "com.github.zachatrocity.ulauncher-ollama", "url": "https://github.com/zachatrocity/ulauncher-ollama", - "updated_at": "2025-05-02T01:42:52.911306", + "updated_at": "2025-11-12T01:21:50.721477", "last_commit": "1cb33ac391dc5650c8d1970c30249c159687853f", "last_commit_time": "2024-06-07T05:20:43" }, "com.github.pymustafa.ulauncher-shortn": { "id": "com.github.pymustafa.ulauncher-shortn", "url": "https://github.com/PyMustafa/ulauncher-shortn", - "updated_at": "2025-05-02T01:43:35.640643", + "updated_at": "2025-11-12T01:21:53.738885", "last_commit": "29caf53983cad40a4f28a6d0b743f6ec7fbc4d6b", "last_commit_time": "2024-08-20T13:13:07" }, "com.github.singhrobinkumar.ulauncher-brave-profiles": { "id": "com.github.singhrobinkumar.ulauncher-brave-profiles", "url": "https://github.com/SinghRobinKumar/ulauncher-brave-profiles", - "updated_at": "2025-05-02T01:47:33.174079", + "updated_at": "2025-11-12T01:21:56.178581", "last_commit": "6156a248e086eadc58e5e7445b56b38498120a5a", "last_commit_time": "2023-08-23T05:33:06" }, "com.github.devkleber.ulauncher-open-link": { "id": "com.github.devkleber.ulauncher-open-link", "url": "https://github.com/DevKleber/ulauncher-open-link", - "updated_at": "2025-05-03T22:04:15.599598", + "updated_at": "2025-11-12T01:21:58.809049", "last_commit": "de9b7e6144d974c06a7f218596a2db80b667fd5b", "last_commit_time": "2023-12-29T17:33:50" }, "com.github.ahaasler.ulauncher-tmux": { "id": "com.github.ahaasler.ulauncher-tmux", "url": "https://github.com/ahaasler/ulauncher-tmux", - "updated_at": "2025-05-03T22:08:36.345314", + "updated_at": "2025-11-12T01:22:00.645012", "last_commit": "dd631a2e5a1d8bf2ab21095b43afe068443f02b9", "last_commit_time": "2021-06-05T16:42:59" }, "com.github.seqizz.ulauncher-tmux-attach": { "id": "com.github.seqizz.ulauncher-tmux-attach", "url": "https://github.com/seqizz/ulauncher-tmux-attach", - "updated_at": "2025-05-03T22:27:52.092854", + "updated_at": "2025-11-12T01:22:02.604396", "last_commit": "b6a84559e128ceaa8255d4c08feead8604efecfe", "last_commit_time": "2021-04-14T05:49:52" }, "com.github.brpaz.ulauncher-raindrop": { "id": "com.github.brpaz.ulauncher-raindrop", "url": "https://github.com/brpaz/ulauncher-raindrop", - "updated_at": "2025-05-03T22:36:56.580319", + "updated_at": "2025-11-12T01:22:04.918216", "last_commit": "b5bdbc9915930a1da320728696576462737cb812", "last_commit_time": "2022-10-15T09:38:30" }, "com.github.kalligator.ulauncher-gemini-direct": { "id": "com.github.kalligator.ulauncher-gemini-direct", "url": "https://github.com/kalligator/ulauncher-gemini-direct", - "updated_at": "2025-05-04T00:13:05.568104", - "last_commit": "b0d8986644e2f28bdf4f9fa492675118fecf322f", - "last_commit_time": "2025-04-28T18:20:32" + "updated_at": "2025-11-12T01:22:07.504573", + "last_commit": "dd44c7032e60764f9da393427339d922170b2e1b", + "last_commit_time": "2025-09-20T12:18:05" }, "com.github.seofernando25.ulauncher-gpt": { "id": "com.github.seofernando25.ulauncher-gpt", "url": "https://github.com/SeoFernando25/ulauncher-gpt", - "updated_at": "2025-05-04T00:20:50.025070", - "last_commit": "2d51ff40fcbd501e64034f3c7be1cd35abc47d6b", - "last_commit_time": "2023-04-14T22:57:18" + "updated_at": "2025-11-12T01:22:09.658181", + "last_commit": "3b0f87aa58ad0d2bcb46011bc6fa0e75e912be37", + "last_commit_time": "2025-09-16T01:43:11" }, "com.github.tuanpham-dev.ulauncher-better-calculator": { "id": "com.github.tuanpham-dev.ulauncher-better-calculator", "url": "https://github.com/tuanpham-dev/ulauncher-better-calculator", - "updated_at": "2025-10-17T00:21:49.364925", + "updated_at": "2025-11-12T01:22:11.537539", "last_commit": "48f0592a2a8ac9ec2589a06b562141e1a2d9b25f", "last_commit_time": "2023-04-24T13:55:30" }, "com.github.troublor.ulauncher-numconverter": { "id": "com.github.troublor.ulauncher-numconverter", "url": "https://github.com/Troublor/ulauncher-numconverter", - "updated_at": "2025-05-04T00:25:02.819859", + "updated_at": "2025-11-12T01:22:13.535666", "last_commit": "98d5e01d82671eedc98c000053980ae7ceb4ea28", "last_commit_time": "2021-09-29T13:19:39" }, "com.github.tchar.ulauncher-albert-calculate-anything": { "id": "com.github.tchar.ulauncher-albert-calculate-anything", "url": "https://github.com/tchar/ulauncher-albert-calculate-anything", - "updated_at": "2025-05-04T01:31:51.665044", + "updated_at": "2025-11-12T01:22:16.271370", "last_commit": "037965a44e6f6f496e7ad71ec1651b9edfcde32d", "last_commit_time": "2024-05-29T21:57:26" }, "com.github.frdrk.ulauncher-dead-simple-convert": { "id": "com.github.frdrk.ulauncher-dead-simple-convert", "url": "https://github.com/frdrk/ulauncher-dead-simple-convert", - "updated_at": "2025-05-04T01:10:44.910294", + "updated_at": "2025-11-12T01:22:18.489577", "last_commit": "c0821e83b6c1d5a4984ef72c82e54eb21d0149ac", "last_commit_time": "2023-10-03T11:40:03" }, "com.github.sergius02.ulauncher-colorconverter": { "id": "com.github.sergius02.ulauncher-colorconverter", "url": "https://github.com/sergius02/ulauncher-colorconverter", - "updated_at": "2025-05-04T01:15:30.973722", + "updated_at": "2025-11-12T01:22:20.830905", "last_commit": "2d5e2bc17e89f1f1dc561f73e68ea574e0be844a", "last_commit_time": "2020-12-06T20:59:43" }, "com.github.kleber-swf.ulauncher-toggle-dnd": { "id": "com.github.kleber-swf.ulauncher-toggle-dnd", "url": "https://github.com/kleber-swf/ulauncher-toggle-dnd", - "updated_at": "2025-05-04T01:16:29.564322", + "updated_at": "2025-11-12T01:22:23.128706", "last_commit": "e2a14ba6eb7eb6771045e103a6f351585cdb8652", "last_commit_time": "2022-02-10T13:22:17" }, "com.github.nastuzzisamy.ulauncher-translate": { "id": "com.github.nastuzzisamy.ulauncher-translate", "url": "https://github.com/NastuzziSamy/ulauncher-translate", - "updated_at": "2025-05-04T01:18:38.337064", + "updated_at": "2025-11-12T01:22:25.086208", "last_commit": "f16b6eed05923e604bacafefdc40b7b7290e21da", "last_commit_time": "2021-03-27T11:43:48" }, "com.github.behrensger.thesaurus_cc_ulauncher": { "id": "com.github.behrensger.thesaurus_cc_ulauncher", "url": "https://github.com/behrensger/thesaurus_cc_ulauncher", - "updated_at": "2025-05-04T01:19:43.069288", + "updated_at": "2025-11-12T01:22:27.244248", "last_commit": "375575ce2790fbe40cdfae8fa7b471d06ead683a", "last_commit_time": "2020-12-22T20:33:18" }, "com.github.randomcharacter.ulauncher-meet": { "id": "com.github.randomcharacter.ulauncher-meet", "url": "https://github.com/randomCharacter/ulauncher-meet", - "updated_at": "2025-05-04T01:29:35.336482", + "updated_at": "2025-11-12T01:24:39.272128", "last_commit": "f2fe055b6e21e15ea4c65918a6f499d61d4cf4b0", "last_commit_time": "2021-02-26T22:04:21" }, "com.github.fajtak.ulauncher-weather": { "id": "com.github.fajtak.ulauncher-weather", "url": "https://github.com/fajtak/ulauncher-weather", - "updated_at": "2025-05-04T01:30:14.933475", + "updated_at": "2025-11-12T01:24:41.707690", "last_commit": "996da704e505776753f6340755d20f03075c2be8", "last_commit_time": "2022-04-05T18:23:30" }, "com.github.dhelmr.ulauncher-tldr": { "id": "com.github.dhelmr.ulauncher-tldr", "url": "https://github.com/dhelmr/ulauncher-tldr", - "updated_at": "2025-05-04T01:32:34.092229", + "updated_at": "2025-11-12T01:24:44.347536", "last_commit": "2e5904451bf89dfa155280dfb6fa3d45ed4cab4c", "last_commit_time": "2023-07-29T11:06:30" }, "com.github.carlosmape.ulauncher-calendar": { "id": "com.github.carlosmape.ulauncher-calendar", "url": "https://github.com/Carlosmape/ulauncher-calendar", - "updated_at": "2025-05-04T01:35:56.785814", + "updated_at": "2025-11-12T01:24:46.996590", "last_commit": "36e6d2f9b238a7723525522bd373a22626cf3be5", "last_commit_time": "2022-10-31T15:47:41" }, "com.github.lighttigerxiv.ulauncher-terminal-runner-extension": { "id": "com.github.lighttigerxiv.ulauncher-terminal-runner-extension", "url": "https://github.com/lighttigerXIV/ulauncher-terminal-runner-extension/", - "updated_at": "2025-05-04T01:36:37.619709", + "updated_at": "2025-11-12T01:24:50.236053", "last_commit": "d6bc2157e5c0ef2f812e3051ddde334c7b485c2e", "last_commit_time": "2023-05-02T22:50:12" }, "com.github.ulauncher.ulauncher-hash": { "id": "com.github.ulauncher.ulauncher-hash", "url": "https://github.com/Ulauncher/ulauncher-hash", - "updated_at": "2025-05-04T01:40:49.697043", + "updated_at": "2025-11-12T01:24:52.451555", "last_commit": "237dbb3610ff04df993c3223b12df42cb7df221f", "last_commit_time": "2022-09-04T14:29:55" }, "com.github.rayvega96.ulauncher-amazon-search": { "id": "com.github.rayvega96.ulauncher-amazon-search", "url": "https://github.com/rayvega96/ulauncher-amazon-search", - "updated_at": "2025-05-04T01:41:33.787276", + "updated_at": "2025-11-12T01:24:54.702757", "last_commit": "045551d899cf42bc99c85670bdf8e299e128275b", "last_commit_time": "2022-12-03T17:14:47" }, "com.github.pegoku.ulauncher-brave": { "id": "com.github.pegoku.ulauncher-brave", "url": "https://github.com/Pegoku/ulauncher-brave", - "updated_at": "2025-05-04T01:42:25.744568", + "updated_at": "2025-11-12T01:24:56.703470", "last_commit": "3166aad57ff0252271c0bfe72a0a2d37f37e3b0d", "last_commit_time": "2022-11-05T15:40:52" }, - "com.github.pegoku.ulauncher-searx": { - "id": "com.github.pegoku.ulauncher-searx", - "url": "https://github.com/Pegoku/ulauncher-searx", - "updated_at": "2025-05-04T01:42:41.604940", - "last_commit": "9047d246736a7a4cdf6c843cb26c987ccce36aae", - "last_commit_time": "2023-03-18T15:53:26" + "com.github.brpaz.ulauncher-faker": { + "id": "com.github.brpaz.ulauncher-faker", + "url": "https://github.com/brpaz/ulauncher-faker", + "updated_at": "2025-11-29T21:50:46.935500", + "last_commit": "58832c94acc671a9f603ea7fbf5d4405110bb902", + "last_commit_time": "2021-12-12T15:46:10" } } \ No newline at end of file diff --git a/ulauncher/.config/ulauncher/settings.json b/ulauncher/.config/ulauncher/settings.json index 602c720..1941567 100644 --- a/ulauncher/.config/ulauncher/settings.json +++ b/ulauncher/.config/ulauncher/settings.json @@ -3,7 +3,7 @@ "clear-previous-query": true, "disable-desktop-filters": false, "grab-mouse-pointer": false, - "hotkey-show-app": "space", + "hotkey-show-app": "", "render-on-screen": "mouse-pointer-monitor", "show-indicator-icon": true, "show-recent-apps": "0", diff --git a/ulauncher/.config/ulauncher/shortcuts.json b/ulauncher/.config/ulauncher/shortcuts.json index 548c08a..fc91cbc 100644 --- a/ulauncher/.config/ulauncher/shortcuts.json +++ b/ulauncher/.config/ulauncher/shortcuts.json @@ -14,7 +14,7 @@ "name": "Perplexity", "keyword": "p", "cmd": "https://www.perplexity.ai/search?q=%s", - "icon": "https://www.perplexity.ai/favicon.ico", + "icon": "~/Pictures/Logos/Perplexity-Brand-Assets/Boundless-Book/Pure White.svg", "is_default_search": true, "run_without_argument": false, "added": 1742151030.0001 @@ -44,7 +44,7 @@ "name": "Ghostty Terminal", "keyword": "g", "cmd": "ghostty", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/utilities-terminal.png", + "icon": "/usr/share/icons/hicolor/128x128/apps/com.mitchellh.ghostty.png", "is_default_search": false, "run_without_argument": true, "added": 1729026000.0001 @@ -54,7 +54,7 @@ "name": "Zen Browser", "keyword": "z", "cmd": "zen-browser", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "icon": "~/.tarball-installations/zen/browser/chrome/icons/default/default128.png", "is_default_search": false, "run_without_argument": true, "added": 1729026000.0002 @@ -64,7 +64,7 @@ "name": "n8n Workflows", "keyword": "n8n", "cmd": "xdg-open https://n8n.djeditech.com", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "icon": "~/Pictures/Logos/n8n.svg", "is_default_search": false, "run_without_argument": true, "added": 1729026000.0004 @@ -74,7 +74,7 @@ "name": "LazyDocker", "keyword": "d", "cmd": "ghostty -e lazydocker", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/utilities-terminal.png", + "icon": "~/Pictures/Logos/docker.svg", "is_default_search": false, "run_without_argument": true, "added": 1729026000.0005 @@ -84,7 +84,7 @@ "name": "ProtonVPN Connect", "keyword": "vpn", "cmd": "ghostty -e 'protonvpn-cli c US-CO#246'", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/utilities-terminal.png", + "icon": "~/Pictures/Logos/protonvpn-logo.png", "is_default_search": false, "run_without_argument": true, "added": 1729026000.0003 @@ -114,7 +114,7 @@ "name": "GitHub Search", "keyword": "gh", "cmd": "https://github.com/search?q=%s&type=repositories", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "icon": "~/Pictures/Logos/github-extracted/github-mark/github-mark.png", "is_default_search": true, "run_without_argument": false, "added": 1760740000.0001 @@ -124,7 +124,7 @@ "name": "LazyGit", "keyword": "lg", "cmd": "ghostty -e bash -c 'echo n | lazygit 2>/dev/null || lazygit'", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/utilities-terminal.png", + "icon": "~/Pictures/Logos/github-extracted/github-mark/github-mark.png", "is_default_search": false, "run_without_argument": true, "added": 1760740000.0002 @@ -134,7 +134,7 @@ "name": "Navi Cheatsheets", "keyword": "navi", "cmd": "ghostty -e navi", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/utilities-terminal.png", + "icon": "~/Pictures/Logos/navi-icon.svg", "is_default_search": false, "run_without_argument": true, "added": 1760741000.0001 @@ -144,7 +144,7 @@ "name": "Yazi File Manager", "keyword": "yazi", "cmd": "ghostty -e yazi", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/system-file-manager.png", + "icon": "~/Pictures/Logos/yazi-logo.png", "is_default_search": false, "run_without_argument": true, "added": 1760741000.0002 @@ -154,7 +154,7 @@ "name": "Yazi File Manager (short)", "keyword": "yz", "cmd": "ghostty -e yazi", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/system-file-manager.png", + "icon": "~/Pictures/Logos/yazi-logo.png", "is_default_search": false, "run_without_argument": true, "added": 1760741000.0003 @@ -234,7 +234,7 @@ "name": "Hugo Server", "keyword": "hugo", "cmd": "ghostty -e bash -c 'cd /home/e/github/hugo2/hugoplate && echo \"Starting Hugo server at http://localhost:1313\" && echo \"Press Ctrl+C to stop\" && hugo server --bind 0.0.0.0 --baseURL http://localhost:1313 -D; exec bash'", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "icon": "~/Pictures/Logos/hugo-logo-wide.svg", "is_default_search": false, "run_without_argument": true, "added": 1760743000.0005 @@ -244,7 +244,7 @@ "name": "Download YouTube Video", "keyword": "dl", "cmd": "ghostty -e bash -c 'cd ~/Videos/Downloaded && yt-dlp \"%s\" && echo && echo \"Download complete! Saved to ~/Videos/Downloaded\" && echo \"Press any key to exit...\" && read -r _key; exec bash'", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/folder-download.png", + "icon": "~/Pictures/Logos/youtube-color-svgrepo-com.svg", "is_default_search": true, "run_without_argument": false, "added": 1760743000.0006 @@ -254,7 +254,7 @@ "name": "Obsidian Fuzzy Search", "keyword": "o", "cmd": "ghostty -e zsh -c 'result=$(rg -l \"%s\" ~/Documents/Obsidian-Fabric ~/Documents/Kamrui_Obsidian --type md 2>/dev/null | fzf --header=\"Select note to open\" --preview=\"bat --color=always --style=numbers {}\"); [ -n \"$result\" ] && xdg-open \"$result\"'", - "icon": "/usr/share/icons/hicolor/scalable/apps/obsidian-icon.png", + "icon": "/usr/share/icons/hicolor/scalable/apps/obsidian-icon.svg", "is_default_search": true, "run_without_argument": false, "added": 1760744000.0002 @@ -284,7 +284,7 @@ "name": "WiFi Network Manager", "keyword": "wifi", "cmd": "ghostty -e nmtui", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/network-wireless.png", + "icon": "~/Pictures/Logos/wifi-1018-svgrepo-com.svg", "is_default_search": false, "run_without_argument": true, "added": 1760744000.0005 @@ -294,7 +294,7 @@ "name": "Bluetooth Manager", "keyword": "bt", "cmd": "ghostty -e bluetoothctl", - "icon": "/usr/share/icons/Adwaita/48x48/legacy/bluetooth.png", + "icon": "~/Pictures/Logos/Bluetooth.svg", "is_default_search": false, "run_without_argument": true, "added": 1760744000.0006 @@ -311,10 +311,10 @@ }, "d2433c00-43fd-424c-8e82-6f3d132708f2": { "id": "d2433c00-43fd-424c-8e82-6f3d132708f2", - "name": "weather-test", + "name": "Weather Report", "keyword": "w", - "cmd": "ghostty -e '/home/e/.bun/bin/bun /home/e/.claude/commands/weather-report.md && read \"Press Enter to exit...\"'", - "icon": null, + "cmd": "ghostty -e '/home/e/.claude/commands/weather-report.md && read \"Press Enter to exit...\"'", + "icon": "/usr/share/icons/Adwaita/48x48/legacy/weather-clear.png", "is_default_search": false, "run_without_argument": true, "added": 1760845029.8644536 @@ -323,20 +323,50 @@ "id": "17ff09ab-cd33-4900-9626-e18f81647d8f", "name": "Progress Bar", "keyword": "pb", - "cmd": "ghostty -e '/home/e/.bun/bin/bun /home/e/.claude/commands/progress.md && read \"Press Enter to exit...\"'", - "icon": null, + "cmd": "ghostty -e '/home/e/.claude/commands/progress.md && read \"Press Enter to exit...\"'", + "icon": "~/Pictures/Logos/progress-two-svgrepo-com.svg", "is_default_search": false, "run_without_argument": true, "added": 1761198481.905308 }, - "57fbe6b9-7da4-4e31-8d94-7128d4a071e4": { - "id": "57fbe6b9-7da4-4e31-8d94-7128d4a071e4", - "name": "SimpleX", - "keyword": "simplex", - "cmd": "ghostty -e 'nohup simplex &'", - "icon": null, + "genpass-quicklink": { + "id": "genpass-quicklink", + "name": "Generate Password", + "keyword": "genpass", + "cmd": "bash -c 'openssl rand -base64 32 | tr -d \"\\n\" | xclip -selection clipboard && notify-send \"Password Generated\" \"32-character password copied to clipboard\"'", + "icon": "/usr/share/icons/Adwaita/48x48/legacy/dialog-password.png", "is_default_search": false, "run_without_argument": true, - "added": 1762414155.4334407 + "added": 1762587447.0752816 + }, + "tabman-browse-quicklink": { + "id": "tabman-browse-quicklink", + "name": "Browse Saved Tabs (Fuzzy)", + "keyword": "tabs", + "cmd": "ghostty -e tabman browse", + "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "is_default_search": false, + "run_without_argument": true, + "added": 1762587977.874752 + }, + "tabman-recent-quicklink": { + "id": "tabman-recent-quicklink", + "name": "Recent Tabs (24h)", + "keyword": "tabnow", + "cmd": "ghostty -e 'tabman recent 24 && read \"Press Enter to exit...\"'", + "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "is_default_search": false, + "run_without_argument": true, + "added": 1762587977.8747525 + }, + "tabman-dashboard-quicklink": { + "id": "tabman-dashboard-quicklink", + "name": "Tab Analytics Dashboard", + "keyword": "tabdash", + "cmd": "ghostty -e 'tabman dashboard && read \"Press Enter to exit...\"'", + "icon": "/usr/share/icons/Adwaita/48x48/legacy/web-browser.png", + "is_default_search": false, + "run_without_argument": true, + "added": 1762587977.8747542 } } \ No newline at end of file diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE b/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE new file mode 100644 index 0000000..015d565 --- /dev/null +++ b/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Kalid Yasin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE-tmtheme b/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE-tmtheme new file mode 100644 index 0000000..ae4d59a --- /dev/null +++ b/yazi/.config/yazi/flavors/tokyonight-night.yazi/LICENSE-tmtheme @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Kristi Russell + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/README.md b/yazi/.config/yazi/flavors/tokyonight-night.yazi/README.md new file mode 100644 index 0000000..8460c6e --- /dev/null +++ b/yazi/.config/yazi/flavors/tokyonight-night.yazi/README.md @@ -0,0 +1,36 @@ +
+ Yazi logo +
+ +

+ Tokyonight Night Flavor for Yazi +

+ +## 👀 Preview + + + +## 🎨 Installation + +```sh +ya pack -a kalidyasin/yazi-flavors:tokyonight-night +``` + +## ⚙️ Usage + +Set the content of your `theme.toml` to enable it as your _dark_ flavor: + +```toml +[flavor] +dark = "tokyonight-night" +``` + +Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor. + +See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details. + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/flavor.toml b/yazi/.config/yazi/flavors/tokyonight-night.yazi/flavor.toml new file mode 100644 index 0000000..d9f03f3 --- /dev/null +++ b/yazi/.config/yazi/flavors/tokyonight-night.yazi/flavor.toml @@ -0,0 +1,212 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# : Manager {{{ + +[manager] +cwd = { fg = "#a9b1d6", italic = true } + +# Hovered +hovered = { bg = "#292e42" } +preview_hovered = { bg = "#292e42" } + +# Find +find_keyword = { fg = "#16161e", bg = "#ff9e64", bold = true } +find_position = { fg = "#0db9d7", bg = "#192b38", bold = true } + +# Marker +marker_copied = { fg = "#73daca", bg = "#73daca" } +marker_cut = { fg = "#f7768e", bg = "#f7768e" } +marker_marked = { fg = "#bb9af7", bg = "#bb9af7" } +marker_selected = { fg = "#7aa2f7", bg = "#7aa2f7" } + +# Tab +tab_active = { fg = "#c0caf5", bg = "#292e42" } +tab_inactive = { fg = "#3b4261", bg = "#1a1b26" } +tab_width = 1 + +# Count +count_copied = { fg = "#c0caf5", bg = "#41a6b5" } +count_cut = { fg = "#c0caf5", bg = "#db4b4b" } +count_selected = { fg = "#c0caf5", bg = "#3d59a1" } + +# Border +border_symbol = "│" +border_style = { fg = "#27a1b9" } + +# : }}} + + +# : Mode {{{ + +[mode] +normal_main = { fg = "#15161e", bg = "#7aa2f7", bold = true } +normal_alt = { fg = "#7aa2f7", bg = "#3b4261" } + +select_main = { fg = "#15161e", bg = "#bb9af7", bold = true } +select_alt = { fg = "#bb9af7", bg = "#3b4261" } + +unset_main = { fg = "#15161e", bg = "#9d7cd8", bold = true } +unset_alt = { fg = "#9d7cd8", bg = "#3b4261" } + +# : }}} + + +# : Status bar {{{ + +[status] +separator_open = "" +separator_close = "" + +# Progress +progress_label = { fg = "#a9b1d6", bold = true } +progress_normal = { fg = "#1a1b26" } +progress_error = { fg = "#f7768e" } + +# Permissions +perm_type = { fg = "#7aa2f7" } +perm_read = { fg = "#e0af68" } +perm_write = { fg = "#f7768e" } +perm_exec = { fg = "#9ece6a" } +perm_sep = { fg = "#414868" } + +# : }}} + + +# : Pick {{{ + +[pick] +border = { fg = "#27a1b9" } +active = { fg = "#c0caf5", bg = "#283457" } +inactive = { fg = "#c0caf5" } + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#0db9d7" } +title = { fg = "#0db9d7" } +value = { fg = "#9d7cd8" } +selected = { bg = "#283457" } + +# : }}} + + +# : Completion {{{ + +[completion] +border = { fg = "#0db9d7" } +active = { fg = "#c0caf5", bg = "#283457" } +inactive = { fg = "#c0caf5" } + +icon_file = "" +icon_folder = "" +icon_command = "" + +# : }}} + + +# : Tasks {{{ + +[tasks] +border = { fg = "#27a1b9" } +title = { fg = "#27a1b9" } +hovered = { fg = "#c0caf5", bg = "#283457" } + +# : }}} + + +# : Which {{{ + +[which] +cols = 3 +mask = { bg = "#16161e" } +cand = { fg = "#7dcfff" } +rest = { fg = "#7aa2f7" } +desc = { fg = "#bb9af7" } +separator = " ➜ " +separator_style = { fg = "#565f89" } + +# : }}} + + +# : Confirm {{{ + +[confirm] +border = { fg = "#0db9d7" } +title = { fg = "#27a1b9" } +content = {} +list = {} +btn_yes = { bg = "#283457" } +btn_no = {} +btn_labels = [ " [Y]es ", " (N)o " ] + +# : }}} + + +# : Spot {{{ + +[spot] +border = { fg = "#27a1b9" } +title = { fg = "#27a1b9" } + +# : }}} + + +# : Notify {{{ + +[notify] +title_info = { fg = "#0db9d7" } +title_warn = { fg = "#e0af68" } +title_error = { fg = "#db4b4b" } + +icon_error = "" +icon_warn = "" +icon_info = "" + +# : }}} + + +# : Help {{{ + +[help] +on = { fg = "#9ece6a" } +run = { fg = "#bb9af7" } +hovered = { bg = "#292e42" } +footer = { fg = "#c0caf5", bg = "#1a1b26" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] + +rules = [ + # Images + { mime = "image/*", fg = "#e0af68" }, + + # Media + { mime = "{audio,video}/*", fg = "#bb9af7" }, + + # Archives + { mime = "application/*zip", fg = "#f7768e" }, + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#f7768e" }, + + # Documents + { mime = "application/{pdf,doc,rtf,vnd.*}", fg = "#7dcfff" }, + + # Empty files + # { mime = "inode/x-empty", fg = "#f7768e" }, + + # Special files + { name = "*", is = "orphan", bg = "#f7768e" }, + { name = "*", is = "exec" , fg = "#9ece6a" }, + + # Fallback + { name = "*/", fg = "#7aa2f7" } +] + +# : }}} + diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/preview.png b/yazi/.config/yazi/flavors/tokyonight-night.yazi/preview.png new file mode 100644 index 0000000..ce8aebd Binary files /dev/null and b/yazi/.config/yazi/flavors/tokyonight-night.yazi/preview.png differ diff --git a/yazi/.config/yazi/flavors/tokyonight-night.yazi/tmtheme.xml b/yazi/.config/yazi/flavors/tokyonight-night.yazi/tmtheme.xml new file mode 100644 index 0000000..21d2163 --- /dev/null +++ b/yazi/.config/yazi/flavors/tokyonight-night.yazi/tmtheme.xml @@ -0,0 +1,1329 @@ + + + + + author + Kristi Russell (http://github.com/enkia) + colorSpaceName + sRGB + name + Enki-Tokyo-Night + semanticClass + enki.theme.tokyo + settings + + + settings + + activeGuide + #363b54 + background + #1d1f29 + caret + #DBC08A + findHighlight + #ffa300 + findHighlightForeground + #000000 + foreground + #AFBAD4ff + guide + #4f4f5e40 + gutterForeground + #3b415caa + inactiveSelection + #282833 + invisibles + #4f4f5e + lineHighlight + #00000030 + phantomCss + <![CDATA[ html { position: relative; } ]]> + popupCss + <![CDATA[ html { color: #B376B3; background-color: #2b2d3a; padding: 10px; } a { color: #6189BB; line-height: 1.2; text-decoration: none; } .error, .deleted { color: #50B4DC; } .success, .inserted { color: #9DBA72; } .warning, .modified { color: #ffa300; } ]]> + selection + #9D599D40 + selectionBorder + #9D599D + shadow + #00000010 + stackGuide + #4f4f5e60 + tagsOptions + underline + + + + name + Italics - Comments, Storage, Keyword Flow, Vue attributes, Decorators + scope + comment, meta.var.expr storage.type, keyword.control.flow, meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html, tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js, storage.modifier + settings + + fontStyle + italic + + + + name + Comment + scope + comment, comment.block.documentation, punctuation.definition.comment + settings + + foreground + #444b6a + + + + name + Comment Doc + scope + comment.block.documentation variable, comment.block.documentation storage, comment.block.documentation punctuation, comment.block.documentation keyword, comment.block.documentation support, comment.block.documentation markup, comment.block.documentation markup.inline.raw.string.markdown, keyword.other.phpdoc.php + settings + + foreground + #7982a9 + + + + name + Number, Boolean, Undefined, Null + scope + variable.other.constant, punctuation.definition.constant, constant.language, constant.numeric, support.constant + settings + + foreground + #ff9e64 + + + + name + String, Symbols, Markup Heading + scope + string, constant.other.symbol, constant.other.key, markup.heading, meta.attribute-selector + settings + + fontStyle + + foreground + #9ece6a + + + + name + Colors + scope + constant.other.color, constant.other.color.rgb-value.hex punctuation.definition.constant + settings + + foreground + #9aa5ce + + + + name + Invalid + scope + invalid, invalid.illegal + settings + + foreground + #ff5370 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + foreground + #bb9af7 + + + + name + Storage Type + scope + storage.type + settings + + foreground + #bb9af7 + + + + name + Storage - modifier, var, const, let + scope + meta.var.expr storage.type, storage.modifier + settings + + foreground + #9d7cd8 + + + + name + Interpolation + scope + punctuation.definition.template-expression, punctuation.section.embedded + settings + + foreground + #7dcfff + + + + name + Spread + scope + keyword.operator.spread, keyword.operator.rest + settings + + fontStyle + bold + foreground + #f7768e + + + + name + Operator, Misc + scope + keyword.operator, keyword.control.as, keyword.other, keyword.operator.bitwise.shift, punctuation, punctuation.definition.constant.markdown, punctuation.definition.string, punctuation.support.type.property-name, text.html.vue-html meta.tag, punctuation.definition.keyword, punctuation.terminator.rule, punctuation.definition.entity, punctuation.definition.tag, punctuation.separator.inheritance.php, punctuation.definition.tag.html, keyword.other.template, keyword.other.substitution, entity.name.operator, text.html.vue meta.tag.block.any.html, text.html.vue meta.tag.inline.any.html, text.html.vue meta.tag.other.html, text.html.twig meta.tag.inline.any.html, text.html.twig meta.tag.block.any.html, text.html.twig meta.tag.structure.any.html, text.html.twig meta.tag.any.html + settings + + foreground + #89ddff + + + + name + Import, Export, From, Default + scope + keyword.control.import, keyword.control.export, keyword.control.from, keyword.control.default, meta.import keyword.other + settings + + foreground + #7dcfff + + + + name + Keyword + scope + keyword, keyword.control, keyword.other.important + settings + + foreground + #bb9af7 + + + + name + Keyword SQL + scope + keyword.other.DML + settings + + foreground + #7dcfff + + + + name + Keyword Operator Logical, Arrow, Ternary, Comparison + scope + keyword.operator.logical, storage.type.function, keyword.operator.bitwise, keyword.operator.ternary, keyword.operator.comparison, keyword.operator.relational, keyword.operator.or.regexp + settings + + foreground + #bb9af7 + + + + name + Tag + scope + entity.name.tag, entity.name.tag support.class.component, meta.tag + settings + + foreground + #f7768e + + + + name + Tag Punctuation + scope + punctuation.definition.tag, punctuation.definition.tag.html, punctuation.definition.tag.begin.html, punctuation.definition.tag.end.html + settings + + foreground + #ba3c97 + + + + name + Blade + scope + keyword.blade, entity.name.function.blade + settings + + foreground + #7aa2f7 + + + + name + PHP - Embedded Tag + scope + punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php + settings + + foreground + #0db9d7 + + + + name + Smarty - Twig tag - Blade + scope + punctuation.definition.variable.smarty, punctuation.section.embedded.begin.smarty, punctuation.section.embedded.end.smarty, meta.tag.template.value.twig, punctuation.section.tag.twig, meta.tag.expression.twig, punctuation.definition.tag.expression.twig, punctuation.definition.tag.output.twig, variable.parameter.smarty + settings + + foreground + #7DCFFF + + + + name + Smarty - Twig variable - function + scope + variable.other.property.twig, support.function.twig, meta.function-call.twig, keyword.control.twig, keyword.control.smarty, keyword.operator.other.twig, keyword.operator.comparison.twig, support.function.functions.twig, support.function.functions.twig, keyword.operator.assignment.twig, support.function.filters.twig, support.function.built-in.smarty, keyword.operator.smarty, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php entity.name.tag.block.any.html, text.blade text.html.blade custom.compiler.blade.php punctuation.section.embedded.php constant.other.inline-data.html, text.blade text.html.blade custom.compiler.blade.php support.function constant.other.inline-data.html + settings + + foreground + #0db9d7 + + + + name + Globals - PHP Constants etc + scope + constant.other.php, variable.other.global.safer, variable.other.global.safer punctuation.definition.variable, variable.other.global, variable.other.global punctuation.definition.variable, constant.other + settings + + foreground + #e0af68 + + + + name + Variables + scope + variable, support.variable, string constant.other.placeholder + settings + + foreground + #c0caf5 + + + + name + Object Variable + scope + variable.other.object, support.module.node + settings + + foreground + #c0caf5 + + + + name + Object Key + scope + meta.object-literal.key, meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js, string.alias.graphql, string.unquoted.graphql, string.unquoted.alias.graphql, meta.field.declaration.ts variable.object.property + settings + + foreground + #73daca + + + + name + Object Property + scope + variable.other.property, support.variable.property, support.variable.property.dom, meta.function-call variable.other.object.property, variable.language.prototype, meta.property.object, variable.other.member + settings + + foreground + #7dcfff + + + + name + Object Property + scope + variable.other.object.property + settings + + foreground + #c0caf5 + + + + name + Object Literal Member lvl 3 (Vue Prop Validation) + scope + meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.objectliteral meta.object.member meta.object-literal.key + settings + + foreground + #41a6b5 + + + + name + C-related Block Level Variables + scope + source.cpp meta.block variable.other + settings + + foreground + #f7768e + + + + name + Other Variable + scope + support.other.variable + settings + + foreground + #f7768e + + + + name + Methods + scope + meta.class-method.js entity.name.function.js, entity.name.method.js, variable.function.constructor, keyword.other.special-method, storage.type.cs + settings + + foreground + #7aa2f7 + + + + name + Function Definition + scope + entity.name.function, meta.function-call, meta.function-call entity.name.function, variable.function, meta.definition.method entity.name.function, meta.object-literal entity.name.function + settings + + foreground + #7aa2f7 + + + + name + Function Argument + scope + variable.parameter.function.language.special, variable.parameter, meta.function.parameters punctuation.definition.variable, meta.function.parameter variable + settings + + foreground + #e0af68 + + + + name + Constant, Tag Attribute + scope + keyword.other.type.php, storage.type.php, constant.character, constant.escape, keyword.other.unit + settings + + foreground + #bb9af7 + + + + name + Variable Definition + scope + meta.definition.variable variable.other.constant, meta.definition.variable variable.other.readwrite, variable.other.declaration + settings + + foreground + #bb9af7 + + + + name + Inherited Class + scope + entity.other.inherited-class + settings + + fontStyle + + foreground + #bb9af7 + + + + name + Class, Support, DOM, etc + scope + support.class, support.type, variable.other.readwrite.alias, support.orther.namespace.use.php, meta.use.php, support.other.namespace.php, support.type.sys-types, support.variable.dom, support.constant.math, support.type.object.module, support.constant.json, entity.name.namespace, meta.import.qualifier, entity.name.class + settings + + foreground + #0db9d7 + + + + name + Class Name + scope + entity.name + settings + + foreground + #c0caf5 + + + + name + Support Function + scope + support.function + settings + + foreground + #0db9d7 + + + + name + CSS Class and Support + scope + source.css support.type.property-name, source.sass support.type.property-name, source.scss support.type.property-name, source.less support.type.property-name, source.stylus support.type.property-name, source.postcss support.type.property-name, support.type.property-name.css, support.type.vendored.property-name, support.type.map.key + settings + + foreground + #7aa2f7 + + + + name + CSS Font + scope + support.constant.font-name, meta.definition.variable + settings + + foreground + #9ece6a + + + + name + CSS Class + scope + entity.other.attribute-name.class, meta.at-rule.mixin.scss entity.name.function.scss + settings + + foreground + #9ece6a + + + + name + CSS ID + scope + entity.other.attribute-name.id + settings + + foreground + #fc7b7b + + + + name + CSS Tag + scope + entity.name.tag.css, entity.name.tag.reference, entity.name.tag.scss + settings + + foreground + #0db9d7 + + + + name + CSS Tag Reference + scope + entity.name.tag.reference + settings + + foreground + #e0af68 + + + + name + CSS Property Separator + scope + meta.property-list punctuation.separator.key-value + settings + + foreground + #9abdf5 + + + + name + CSS Punctuation + scope + meta.property-list, punctuation.definition.entity.css + settings + + foreground + #e0af68 + + + + name + SCSS @ + scope + meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.include entity.name.function.scss, meta.at-rule.include keyword.control.at-rule.include + settings + + foreground + #bb9af7 + + + + name + SCSS Mixins, Extends, Include Keyword + scope + keyword.control.at-rule.include punctuation.definition.keyword, keyword.control.at-rule.mixin punctuation.definition.keyword, meta.at-rule.include keyword.control.at-rule.include, keyword.control.at-rule.extend punctuation.definition.keyword, meta.at-rule.extend keyword.control.at-rule.extend, entity.other.attribute-name.placeholder.css punctuation.definition.entity.css, meta.at-rule.media keyword.control.at-rule.media, meta.at-rule.mixin keyword.control.at-rule.mixin, meta.at-rule.function keyword.control.at-rule.function, keyword.control punctuation.definition.keyword, meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss, meta.at-rule.import.scss keyword.control.at-rule.import.scss + settings + + foreground + #9d7cd8 + + + + name + SCSS Include Mixin Argument + scope + meta.property-list meta.at-rule.include + settings + + foreground + #c0caf5 + + + + name + CSS value + scope + support.constant.property-value + settings + + foreground + #ff9e64 + + + + name + Sub-methods + scope + entity.name.module.js, variable.import.parameter.js, variable.other.class.js + settings + + foreground + #c0caf5 + + + + name + Language methods + scope + variable.language + settings + + foreground + #f7768e + + + + name + Variable punctuation + scope + variable.other punctuation.definition.variable + settings + + foreground + #c0caf5 + + + + name + Keyword this with Punctuation, ES7 Bind Operator + scope + source.js constant.other.object.key.js string.unquoted.label.js, variable.language.this punctuation.definition.variable, keyword.other.this + settings + + foreground + #f7768e + + + + name + HTML Attributes + scope + entity.other.attribute-name, text.html.basic entity.other.attribute-name.html, text.html.basic entity.other.attribute-name, text.blade entity.other.attribute-name.class, text.html.smarty entity.other.attribute-name.class + settings + + foreground + #bb9af7 + + + + name + Vue Template attributes + scope + meta.directive.vue punctuation.separator.key-value.html, meta.directive.vue entity.other.attribute-name.html + settings + + foreground + #bb9af7 + + + + name + Vue Template attribute separator + scope + meta.directive.vue punctuation.separator.key-value.html + settings + + foreground + #89ddff + + + + name + CSS IDs + scope + source.sass keyword.control + settings + + foreground + #7aa2f7 + + + + name + CSS psuedo selectors + scope + entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element, entity.other.attribute-name.placeholder, meta.property-list meta.property-value + settings + + foreground + #bb9af7 + + + + name + Inserted + scope + markup.inserted + settings + + foreground + #449dab + + + + name + Deleted + scope + markup.deleted + settings + + foreground + #914c54 + + + + name + Changed + scope + markup.changed + settings + + foreground + #6183bb + + + + name + Regular Expressions + scope + string.regexp + settings + + foreground + #b4f9f8 + + + + name + Regular Expressions - Punctuation + scope + punctuation.definition.group + settings + + foreground + #f7768e + + + + name + Regular Expressions - Character Class + scope + constant.other.character-class.regexp + settings + + foreground + #bb9af7 + + + + name + Regular Expressions - Character Class Set + scope + constant.other.character-class.set.regexp, punctuation.definition.character-class.regexp + settings + + foreground + #e0af68 + + + + name + Regular Expressions - Quantifier + scope + keyword.operator.quantifier.regexp + settings + + foreground + #89ddff + + + + name + Regular Expressions - Backslash + scope + constant.character.escape.backslash + settings + + foreground + #c0caf5 + + + + name + Escape Characters + scope + constant.character.escape + settings + + foreground + #89ddff + + + + name + Decorators + scope + tag.decorator.js entity.name.tag.js, tag.decorator.js punctuation.definition.tag.js + settings + + foreground + #7aa2f7 + + + + name + CSS Units + scope + keyword.other.unit + settings + + foreground + #f7768e + + + + name + JSON Key - Level 0 + scope + source.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #7aa2f7 + + + + name + JSON Key - Level 1 + scope + source.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #0db9d7 + + + + name + JSON Key - Level 2 + scope + source.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #7dcfff + + + + name + JSON Key - Level 3 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #bb9af7 + + + + name + JSON Key - Level 4 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #e0af68 + + + + name + JSON Key - Level 5 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #0db9d7 + + + + name + JSON Key - Level 6 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json string.quoted.double.json + settings + + foreground + #73daca + + + + name + JSON Key - Level 7 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json + settings + + foreground + #f7768e + + + + name + JSON Key - Level 8 + scope + source.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.value.json meta.sequence.json meta.mapping.key.json string.quoted.double.json punctuation.definition.string.end.json + settings + + foreground + #9ece6a + + + + name + JSON Key - value + scope + source.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json, source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.array.json meta.structure.dictionary.json meta.structure.dictionary.value.json string.quoted.double.json + settings + + foreground + #9ece6a + + + + name + Plain Punctuation + scope + punctuation.definition.list_item.markdown + settings + + foreground + #9abdf5 + + + + name + Block Punctuation + scope + meta.block, meta.brace, punctuation.definition.block, punctuation.definition.use, punctuation.definition.group.shell, punctuation.definition.class, punctuation.definition.begin.bracket, punctuation.definition.end.bracket, punctuation.definition.parameters, punctuation.definition.arguments, punctuation.definition.dictionary, punctuation.definition.array, punctuation.section + settings + + foreground + #9abdf5 + + + + name + Markdown - Plain + scope + meta.jsx.children, meta.embedded.block + settings + + foreground + #c0caf5 + + + + name + HTML text + scope + text.html + settings + + foreground + #9aa5ce + + + + name + Markdown - Markup Raw Inline + scope + text.html.markdown markup.inline.raw.markdown + settings + + foreground + #bb9af7 + + + + name + Markdown - Markup Raw Inline Punctuation + scope + text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown + settings + + foreground + #4E5579 + + + + name + Markdown - Heading 1 + scope + heading.1.markdown entity.name, heading.1.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #89ddff + + + + name + Markdown - Heading 2 + scope + heading.2.markdown entity.name, heading.2.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #61bdf2 + + + + name + Markdown - Heading 3 + scope + heading.3.markdown entity.name, heading.3.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #7aa2f7 + + + + name + Markdown - Heading 4 + scope + heading.4.markdown entity.name, heading.4.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #6d91de + + + + name + Markdown - Heading 5 + scope + heading.5.markdown entity.name, heading.5.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #9aa5ce + + + + name + Markdown - Heading 6 + scope + heading.6.markdown entity.name, heading.6.markdown punctuation.definition.heading.markdown + settings + + fontStyle + bold + foreground + #747ca1 + + + + name + Markup - Italic + scope + markup.italic, markup.italic punctuation + settings + + fontStyle + italic + foreground + #c0caf5 + + + + name + Markup - Bold + scope + markup.bold, markup.bold punctuation + settings + + fontStyle + bold + foreground + #c0caf5 + + + + name + Markup - Bold-Italic + scope + markup.bold markup.italic, markup.bold markup.italic punctuation + settings + + fontStyle + bold italic + foreground + #c0caf5 + + + + name + Markup - Underline + scope + markup.underline, markup.underline punctuation + settings + + fontStyle + underline + + + + name + Markdown - Blockquote + scope + markup.quote punctuation.definition.blockquote.markdown + settings + + foreground + #4e5579 + + + + name + Markup - Quote + scope + markup.quote + settings + + fontStyle + italic + + + + name + Markdown - Link + scope + string.other.link, markup.underline.link, constant.other.reference.link.markdown, string.other.link.description.title.markdown + settings + + foreground + #73daca + + + + name + Markdown - Fenced Code Block + scope + markup.fenced_code.block.markdown, markup.inline.raw.string.markdown, variable.language.fenced.markdown + settings + + foreground + #89ddff + + + + name + Markdown - Separator + scope + meta.separator + settings + + fontStyle + bold + foreground + #444b6a + + + + name + Markup - Table + scope + markup.table + settings + + foreground + #c0cefc + + + + name + Token - Info + scope + token.info-token + settings + + foreground + #0db9d7 + + + + name + Token - Warn + scope + token.warn-token + settings + + foreground + #ffdb69 + + + + name + Token - Error + scope + token.error-token + settings + + foreground + #db4b4b + + + + name + Token - Debug + scope + token.debug-token + settings + + foreground + #b267e6 + + + + name + Apache Tag + scope + entity.tag.apacheconf + settings + + foreground + #f7768e + + + + name + Preprocessor + scope + meta.preprocessor + settings + + foreground + #73daca + + + + name + ENV value + scope + source.env + settings + + foreground + #7aa2f7 + + + + uuid + 06f855e3-9fb7-4fb1-b790-aef06065f34e + + diff --git a/yazi/.config/yazi/package.toml b/yazi/.config/yazi/package.toml new file mode 100644 index 0000000..82a32b4 --- /dev/null +++ b/yazi/.config/yazi/package.toml @@ -0,0 +1,7 @@ +[plugin] +deps = [] + +[[flavor.deps]] +use = "kalidyasin/yazi-flavors:tokyonight-night" +rev = "92a09a6" +hash = "845c5ee33e147b1a57f48728e42600ee" diff --git a/zsh/.aliases b/zsh/.aliases index bb1a738..89f6846 100644 --- a/zsh/.aliases +++ b/zsh/.aliases @@ -44,6 +44,10 @@ alias S='sudo env PATH="$PATH"' alias U='pipx upgrade-all' # Update all pipx packages alias P='pipx list' # List pipx packages +# --- GUI Applications (background + disown) --- +alias nemo='nemo . > /dev/null 2>&1 & disown' +alias hugo-serve='hugo server --bind 0.0.0.0 --baseURL http://localhost:1313 -D > /dev/null 2>&1 & disown' + # --- OpenCode --- ide() { @@ -239,9 +243,11 @@ fi alias t='task' alias tl='task list' alias twa='task add' -tm() { - task modify -} +# tm() { +# task modify +# } +# Commented out: conflicts with TabMan alias at line 731 +# Use 'task modify' directly or create 'tmod' alias if needed alias tb='task burndown.daily' # ---------------------------- @@ -433,6 +439,7 @@ alias evening='redshift -O 3500 -P && echo "🌅 Evening mode activated (3500K)" # WhisperTux quick launch aliases alias wt='systemctl --user start whispertux' +alias wtr='systemctl --user restart whispertux' alias wt-stop='systemctl --user stop whispertux' alias wt-status='systemctl --user status whispertux' alias wt-log='journalctl --user -u whispertux -f' @@ -679,3 +686,59 @@ msfl() { fi msfconsole -r "$HOME/scripts/multi_handler.rc" } + +# ================================================================ +# System Backup Workflow +# ================================================================ +# Full system backup to encrypted volume before major OS changes +# +# Usage: +# 1. Mount encrypted volume: +# sudo veracrypt -t /mnt/veracrypt1 +# 2. Run backup: +# run-backup +# 3. Unmount when complete: +# sudo veracrypt -t -d /mnt/veracrypt1 +# +# Notes: +# - Uses encrypted storage (VeraCrypt) for data at rest +# - Backup script is in ~/.claude/context/personal/scripts/ +# - Logs to /var/log/system-backup.log +# - For low /tmp space, set TMPDIR before mounting: +# mkdir -p /path/to/temp && sudo env TMPDIR=/path/to/temp veracrypt -t ... +# ================================================================ + +alias run-backup='sudo ~/.claude/context/personal/scripts/full-system-backup.sh /mnt/backup-vault' + +# ================================================================ +# ProtonVPN Automation - Quick Reference & Documentation +# +# Created: 2025-11-08 +# +# Quick reference for VPN server curation and automation system. +# See full docs: ~/.claude/skills/app-troubleshooting/SKILL.md (lines 2130-2369) +# +# Common commands: +# proton-connect-colorado - Connect to random top-quality server +# test-vpn-quality - Test current connection quality +# proton-rank-servers 20 - View top 20 servers by quality +# proton-discover-servers 1 50 - Discover new servers +# ================================================================ + +alias vpn-help='bat ~/.local/share/doc/protonvpn-automation-quickref.md 2>/dev/null || cat ~/.local/share/doc/protonvpn-automation-quickref.md' + + +# TabMan - Browser tab manager +alias tabman="bun ~/github/tabman/index.ts" +alias tm="bun ~/github/tabman/index.ts" + +# Port reference quick access +alias lp='cat ~/.claude/context/infrastructure/ports-reference.md | less' + +# Reddit video downloader for Redlib +alias reddit-dl="bun /home/e/opt/redlib/reddit-dl.ts" + +alias inotify-check='echo "Instances: $(find /proc/*/fd -lname "anon_inode:inotify" 2>/dev/null | wc -l) / $(cat /proc/sys/fs/inotify/max_user_instances)"' + +# SimpleX Bot - E2EE automation +alias simplex='~/opt/simplex-bot/simplex' diff --git a/zsh/.exports b/zsh/.exports index c43c482..a6192fc 100644 --- a/zsh/.exports +++ b/zsh/.exports @@ -5,8 +5,13 @@ export PAGER="${PAGER:-most}" # PAI3 Personal AI Infrastructure export PAI_HOME="/home/e" export PAI_DIR="$HOME/.claude" # Added for PAI v0.6.0 compatibility -export PATH=$PATH:"$HOME/.claude" -export PATH=$PATH:"$HOME/.claude/commands" + +# IMPORTANT: claude/scripts must come FIRST to override system binaries +# This allows our Firejail wrappers to be found before /usr/bin +export PATH="$HOME/.claude/scripts:$PATH" +export PATH="$HOME/.claude:$PATH" +export PATH="$HOME/.claude/commands:$PATH" +export PATH="$HOME/.claude/context/personal/scripts:$PATH" # export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'"\nman 2 select export BROWSER="${BROWSER:-brave}" export LANG=en_US.UTF-8 # avoid locale issues @@ -15,6 +20,7 @@ export GOROOT="/usr/local/go" export GOPATH="$HOME/go" export PATH=$PATH:$GOROOT/bin export PATH=$PATH:$HOME/.bun/bin +export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH" # export STOW_DIR="$HOME/.config" # --- fzf --- @@ -42,6 +48,7 @@ export FZF_CTRL_R_OPTS=" # Path +export PATH="$HOME/bin:$PATH" export PATH="$PATH:$HOME/go/bin" export PATH="$PATH:$HOME/.scripts:$HOME/scripts" export PATH="$PATH:$HOME/.cargo/bin" @@ -62,3 +69,16 @@ if command -v bat &> /dev/null; then export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -lman'" fi # Removed redundant PATH addition (already on line 50) +export PATH="/opt/zig:$PATH" +export YDOTOOL_SOCKET=/run/user/1000/.ydotool_socket + +# SSH agent socket (user systemd service, not system socket) +export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket" + +# XWayland support for legacy X11 apps on Wayland +# Only set XAUTHORITY if needed - let the system handle DISPLAY +# if [[ -z "$XAUTHORITY" && -n "$WAYLAND_DISPLAY" ]]; then +# _xauth=$(find /run/user/$UID -maxdepth 1 -name "xauth_*" 2>/dev/null | head -1) +# [[ -n "$_xauth" ]] && export XAUTHORITY="$_xauth" +# unset _xauth +# fi diff --git a/zsh/.zshrc b/zsh/.zshrc index 8dc3934..534910f 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -220,3 +220,8 @@ export PATH=$(echo "$PATH" | tr ':' '\n' | awk '!seen[$0]++' | paste -sd:) # Make PATH available to GUI applications (Ulauncher, etc.) # This ensures apps launched outside terminal sessions can find bun, custom bins, etc. systemctl --user import-environment PATH + +[ -f ~/.env ] && source ~/.env + +# Port reference quick access +alias ports='cat ~/.claude/context/infrastructure/ports-reference.md | less' diff --git a/zsh/zsh.zsh b/zsh/zsh.zsh deleted file mode 100644 index 8e1165c..0000000 --- a/zsh/zsh.zsh +++ /dev/null @@ -1,28 +0,0 @@ -# ---- TMUX-RECON zsh.zsh ---- - -# source custom aliases if exists -[ -f ~/.aliases.sh ] && source ~/.aliases.sh - -# add .scripts to path -export PATH="$HOME/.scripts:$PATH" - -# zoxide (if installed) -if command -v zoxide &> /dev/null; then - eval "$(zoxide init zsh)" -fi - -# fzf (if installed) -[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh - -# starship (optional fancy prompt) -[ -f ~/.config/starship.toml ] && eval "$(starship init zsh)" - -# cargo -source $HOME/.cargo/env - -alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' -alias -g -- --help='--help 2>&1 | bat --language=help --style=plain' - -# Custom prompt options or PS1 here if desired - -# You can add any shared settings, completions, etc.