aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDemonKingSwarn <rockingswarn@gmail.com>2026-04-20 02:16:52 +0530
committerDemonKingSwarn <rockingswarn@gmail.com>2026-04-20 02:16:52 +0530
commitcd5bb0c381987f434afc1f6a457f26df9697f196 (patch)
treea5b3579d4142f231f178a841bfd8519a94aa1a6d /config
downloadodysseus-cd5bb0c381987f434afc1f6a457f26df9697f196.zip
odysseus-cd5bb0c381987f434afc1f6a457f26df9697f196.tar.gz
initial config
Diffstat (limited to 'config')
-rw-r--r--config/niri.nix573
-rw-r--r--config/zsh.nix206
2 files changed, 779 insertions, 0 deletions
diff --git a/config/niri.nix b/config/niri.nix
new file mode 100644
index 0000000..91b5073
--- /dev/null
+++ b/config/niri.nix
@@ -0,0 +1,573 @@
+{ config, pkgs, inputs, ... }:
+
+{
+ imports = [ inputs.niri.homeModules.niri ];
+
+ programs.niri = {
+ enable = true;
+ config = ''
+ environment {
+ DISPLAY ":0"
+
+ SDL_VIDEODRIVER "wayland"
+ SDL_AUDIODRIVER "pipewire"
+ _JAVA_AWT_WM_NONREPARENTING "1"
+
+ XDG_CURRENT_DESKTOP "niri"
+ XDG_SESSION_DESKTOP "niri"
+ XDG_CURRENT_SESSION_TYPE "wayland"
+
+ GDK_BACKEND "wayland"
+ MOZ_ENABLE_WAYLAND "1"
+ MOZ_DISABLE_RDD_SANDBOX "1"
+ KITTY_ENABLE_WAYLAND "1"
+ EGL_PLATFORM "wayland"
+ GTK_USE_PORTAL "0"
+
+ QT_PLUGIN_PATH "/usr/lib/qt/plugins/"
+ QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
+ QT_QPA_PLATFORM "wayland"
+ QT_QPA_PLATFORMTHEME "gtk3"
+
+ HYPRCURSOR_THEME "Bibata-Modern-Ice"
+ HYPRCURSOR_SIZE "24"
+
+ __GLX_VENDOR_LIBRARY_NAME "nvidia"
+ __GL_VRR_ALLOWED "1"
+ WLR_NO_HARDWARE_CURSORS "1"
+ LIBVA_DRIVER_NAME "nvidia"
+ VDPAU_DRIVER "nvidia"
+ __GL_SYNC_TO_VBLANK "0"
+ NVD_BACKEND "direct"
+ }
+
+ binds {
+ Super+Shift+Slash { show-hotkey-overlay; }
+
+ Super+Return { spawn "wezterm"; }
+ Alt+Return { spawn "ghostty"; }
+ //Super+D { spawn "rofi" "-show" "drun"; }
+ Super+D { spawn "vicinae" "toggle"; }
+ Super+E { spawn "vicinae" "vicinae://launch/core/search-emojis"; }
+ Super+Shift+X { spawn "~/.scripts/system/waylock.sh"; }
+ Print { screenshot-screen; }
+ Super+Print { screenshot; }
+ Alt+Print { screenshot-window; }
+
+ // my new keyboard doesnt have print screen
+ Super+P { screenshot-screen; }
+ Super+Shift+P { screenshot; }
+
+ Super+N { spawn "nightmode"; }
+ Super+O { spawn "~/.scripts/0x0/share"; }
+ Super+W { spawn "~/.scripts/misc/wallmanager"; }
+ Super+G { spawn "nirifreeze"; }
+ Super+V { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; }
+ Alt+C { spawn "colpick"; }
+ Super+TAB repeat=false { toggle-overview; }
+
+ XF86AudioRaiseVolume { spawn "pamixer" "-i" "5"; }
+ XF86AudioLowerVolume { spawn "pamixer" "-d" "5"; }
+ XF86AudioMute { spawn "pamixer" "-t" "mute"; }
+
+ XF86MonBrightnessUp { spawn "brightnessctl" "set" "+5%"; }
+ XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
+ Super+F1 { spawn "brightnessctl" "set" "+5%"; }
+ Super+F2 { spawn "brightnessctl" "set" "5%-"; }
+
+ XF86AudioPlay { spawn "playerctl" "play-pause";}
+ XF86AudioPrev { spawn "playerctl" "previous";}
+ XF86AudioNext { spawn "playerctl" "next";}
+
+ XF86Explorer { spawn "thunar"; }
+ XF86Search { spawn "rofi" "-no-lazy-greb" "-show" "file-browser-extended" "-icon-theme" "'Cosmic'"; }
+ XF86Calculator { spawn "galculator"; }
+ XF86Tools { spawn "waterfox" "--new-window" "-kiosk" "https://music.youtube.com";}
+
+ Super+I { spawn "wezterm" "-e" "htop"; }
+
+ Super+Shift+Q { close-window; }
+
+ Super+Left { focus-column-left; }
+ Super+Down { focus-window-down; }
+ Super+Up { focus-window-up; }
+ Super+Right { focus-column-right; }
+
+ Super+H { focus-column-left; }
+ Super+J { focus-window-down; }
+ Super+K { focus-window-up; }
+ Super+L { focus-column-right; }
+
+ Super+Shift+Left { move-column-left; }
+ Super+Shift+Down { move-window-down; }
+ Super+Shift+Up { move-window-up; }
+ Super+Shift+Right { move-column-right; }
+ Super+Shift+H { move-column-left; }
+ Super+Shift+J { move-window-down; }
+ Super+Shift+K { move-window-up; }
+ Super+Shift+L { move-column-right; }
+
+ Super+Home { focus-column-first; }
+ Super+End { focus-column-last; }
+ Super+Shift+Home { move-column-to-first; }
+ Super+Shift+End { move-column-to-last; }
+
+ Super+Page_Down { focus-workspace-down; }
+ Super+Page_Up { focus-workspace-up; }
+ Super+U { focus-workspace-down; }
+ Super+Shift+Page_Down { move-column-to-workspace-down; }
+ Super+Shift+Page_Up { move-column-to-workspace-up; }
+ Super+Shift+U { move-column-to-workspace-down; }
+ Super+Shift+I { move-column-to-workspace-up; }
+
+ Super+1 { focus-workspace 1; }
+ Super+2 { focus-workspace 2; }
+ Super+3 { focus-workspace 3; }
+ Super+4 { focus-workspace 4; }
+ Super+5 { focus-workspace 5; }
+ Super+6 { focus-workspace 6; }
+ Super+7 { focus-workspace 7; }
+ Super+8 { focus-workspace 8; }
+ Super+9 { focus-workspace 9; }
+
+ Super+Shift+1 { move-window-to-workspace 1; }
+ Super+Shift+2 { move-window-to-workspace 2; }
+ Super+Shift+3 { move-window-to-workspace 3; }
+ Super+Shift+4 { move-window-to-workspace 4; }
+ Super+Shift+5 { move-window-to-workspace 5; }
+ Super+Shift+6 { move-window-to-workspace 6; }
+ Super+Shift+7 { move-window-to-workspace 7; }
+ Super+Shift+8 { move-window-to-workspace 8; }
+ Super+Shift+9 { move-window-to-workspace 9; }
+
+ Super+Comma { consume-window-into-column; }
+ Super+Period { expel-window-from-column; }
+
+ Super+R { switch-preset-column-width; }
+ Super+Shift+F { maximize-column; }
+ Super+F { fullscreen-window; }
+ Super+C { center-column; }
+
+ Super+Minus { set-column-width "-10%"; }
+ Super+Equal { set-column-width "+10%"; }
+
+ // Finer height adjustments when in column with other windows.
+ Super+Shift+Minus { set-window-height "-10%"; }
+ Super+Shift+Equal { set-window-height "+10%"; }
+
+ Super+Shift+M { quit; }
+
+ Super+Ctrl+Shift+T { toggle-debug-tint; }
+ }
+
+ input {
+
+ keyboard {
+ repeat-delay 300
+ repeat-rate 69
+ xkb {
+ layout "us"
+ options "compose:menu"
+ }
+ }
+
+ touchpad {
+ click-method "button-areas"
+ tap
+ natural-scroll
+ scroll-method "two-finger"
+ middle-emulation
+ scroll-factor 1
+ accel-speed 0.2
+ accel-profile "adaptive"
+ }
+
+ mouse {
+ accel-speed 0.3
+ accel-profile "flat"
+ //scroll-factor 1.0
+ scroll-method "no-scroll"
+ //scroll-button 274
+ //middle-emulation
+ }
+
+ focus-follows-mouse
+ warp-mouse-to-focus
+ workspace-auto-back-and-forth
+ }
+
+ output "eDP-1" {
+ scale 1
+
+ mode "1920x1080@60"
+ position x=1920 y=0
+ }
+
+
+ output "HDMI-A-2" {
+ scale 1
+
+ mode "1920x1080@74.973"
+ position x=0 y=0
+ }
+
+ animations {
+ workspace-switch {
+ // off
+ spring damping-ratio=0.75 stiffness=600 epsilon=0.001
+ }
+ horizontal-view-movement {
+ // off
+ spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
+ }
+
+ window-open {
+ //duration-ms 150
+ //curve "ease-out-expo"
+ //custom-shader "~/.config/niri/shaders/smooth.glsl"
+ /-custom-shader r"
+ vec4 open_color(vec3 coords_geo, vec3 size_geo) {
+ vec3 coords_tex = niri_geo_to_tex * coords_geo;
+ vec4 color = texture2D(niri_tex, coords_tex.st);
+
+ vec2 size = size_geo.xy;
+ vec2 coords = (coords_geo.xy - vec2(0.5, 0.5)) * size * 2.0;
+
+ // Some padding for borders and shadows.
+ float pad = 8.0;
+ coords = coords + vec2(pad, pad);
+ size = size + vec2(pad, pad) * 2.0;
+
+ coords = coords / length(size);
+ float p = niri_clamped_progress;
+ if (p * p <= dot(coords, coords))
+ color = vec4(0.0);
+
+ return color;
+ }
+ "
+
+ /-custom-shader r"
+ vec4 open_color(vec3 coords_geo, vec3 size_geo) {
+ vec3 coords_tex = niri_geo_to_tex * coords_geo;
+ vec4 color = texture2D(niri_tex, coords_tex.st);
+
+ return color;
+ }
+ "
+ duration-ms 200
+ curve "linear"
+ }
+
+ window-close {
+ //duration-ms 150
+ //curve "ease-out-quad"
+ //duration-ms 200
+ //curve "ease-out-quad"
+
+ custom-shader r"
+ mat2 rotate(float angle) {
+ return mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
+ }
+
+ vec4 close_color(vec3 coords_geo, vec3 size_geo) {
+ float progress = niri_clamped_progress * niri_clamped_progress;
+
+ vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
+
+ coords.y -= progress * 200.0;
+
+ float random = (niri_random_seed - 0.5) / 2.0;
+ random = sign(random) - random;
+ float max_angle = 0.05 * random;
+
+ float angle = progress * max_angle;
+ coords = rotate(angle) * coords;
+
+ coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
+
+ vec3 coords_tex = niri_geo_to_tex * coords_geo;
+ vec4 color = texture2D(niri_tex, coords_tex.st);
+
+ return color * (1.0 - niri_clamped_progress);
+ }
+ "
+
+ /-custom-shader r"
+ vec4 close_color(vec3 coords_geo, vec3 size_geo) {
+ vec3 coords_tex = niri_geo_to_tex * coords_geo;
+ vec4 color = texture2D(niri_tex, coords_tex.st);
+
+ return color;
+ }
+ "
+ }
+
+ overview-open-close {
+ spring damping-ratio=0.75 stiffness=650 epsilon=0.001
+ }
+
+ window-resize {
+ /-custom-shader r"
+ vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
+ vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo;
+ vec3 coords_prev_geo = niri_curr_geo_to_prev_geo * coords_curr_geo;
+
+ vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo;
+ vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo;
+ vec3 coords_stretch_prev = niri_geo_to_tex_prev * coords_curr_geo;
+
+ // We can crop if the current window size is smaller than the next window
+ // size. One way to tell is by comparing to 1.0 the X and Y scaling
+ // coefficients in the current-to-next transformation matrix.
+ bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0;
+ bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0;
+ bool crop = can_crop_by_x && can_crop_by_y;
+
+ vec4 color;
+
+ if (crop) {
+ // However, when we crop, we also want to crop out anything outside the
+ // current geometry. This is because the area of the shader is unspecified
+ // and usually bigger than the current geometry, so if we don't fill pixels
+ // outside with transparency, the texture will leak out.
+ if (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x ||
+ coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y) {
+ color = vec4(0.0);
+ } else {
+ color = texture2D(niri_tex_next, coords_crop.st);
+ }
+ } else {
+ // If we can't crop, then crossfade.
+ color = texture2D(niri_tex_next, coords_stretch.st);
+ vec4 color_prev = texture2D(niri_tex_prev, coords_stretch_prev.st);
+ color = mix(color_prev, color, niri_clamped_progress);
+ }
+
+ return color;
+ }
+ "
+ }
+
+ screenshot-ui-open {
+ // off
+ duration-ms 200
+ curve "ease-out-quad"
+ }
+ }
+
+ window-rule {
+ match app-id="waterfox" title=r#"^File Upload$"#
+ open-floating true
+ }
+
+ // Godot rules
+ window-rule {
+ match app-id="Godot" title="Create New Node"
+ match app-id="Godot" title="Godot Engine - Project Manager"
+ open-floating true
+ default-window-height { fixed 750; }
+ }
+
+ // terminals
+ window-rule {
+ match app-id=r#"^org\.wezfurlong\.wezterm$"#
+ match app-id=r#"^com\.mitchellh\.ghostty$"#
+ match app-id=r#"^foot|footclient$"#
+
+ background-effect {
+ blur { on; }
+ }
+ }
+
+ // browser and shit
+ window-rule {
+ match app-id=r#"^helium$"#
+ match app-id=r#"^thunar$"#
+ opacity 0.95
+ background-effect {
+ blur { on; }
+ }
+ }
+
+ window-rule {
+ match app-id="SuperPacker"
+ open-floating true
+ }
+
+ window-rule {
+ match app-id="" title="Picture-in-Picture"
+ open-floating true
+ //default-column-width { fixed 480; }
+ //default-window-height { fixed 270; }
+ default-floating-position x=50 y=50 relative-to="top-right"
+ }
+
+ window-rule {
+ geometry-corner-radius 20
+ clip-to-geometry true
+ }
+
+ window-rule {
+ match app-id="vesktop"
+ block-out-from "screen-capture"
+ }
+
+ window-rule {
+ match app-id="waterfox" title=r#"^Whatsapp"#
+ block-out-from "screen-capture"
+ }
+
+ window-rule {
+ match is-window-cast-target=true
+
+ focus-ring {
+ active-color "#f38ba8"
+ inactive-color "#7d0d2d"
+ }
+
+ border {
+ inactive-color "#7d0d2d"
+ }
+
+ shadow {
+ color "#7d0d2d70"
+ }
+
+ tab-indicator {
+ active-color "#f38ba8"
+ inactive-color "#7d0d2d"
+ }
+ }
+
+ layer-rule {
+ match namespace="^wallpaper$"
+ place-within-backdrop true
+ }
+
+ layer-rule {
+ match namespace="waybar"
+ opacity 0.99
+ }
+
+ layer-rule {
+ match namespace="swaync-notification-window"
+ block-out-from "screen-capture"
+ }
+
+
+ layer-rule {
+ match namespace="awww"
+ geometry-corner-radius 12
+ place-within-backdrop true
+ }
+
+ layer-rule {
+ match namespace="rofi"
+
+ background-effect {
+ blur { on; }
+ }
+ }
+
+ layout {
+ preset-column-widths {
+ proportion 0.25
+ proportion 0.33333
+ proportion 0.5
+ proportion 0.66667
+ proportion 0.75
+ fixed 1280
+ }
+
+ preset-window-heights {
+ proportion 0.5
+ proportion 0.66667
+ proportion 1.0
+ }
+
+ default-column-width { proportion 1.0; }
+
+ focus-ring {
+ off
+ }
+ border {
+ width 2
+ active-color "#C1CAF5"
+ inactive-color "transparent"
+ urgent-color "#9b0000"
+ }
+
+ shadow {
+ on
+ softness 30
+ spread 8
+ offset x=0 y=5
+ color "#00000040"
+ }
+
+ tab-indicator {
+ width 8
+ gap 8
+ length total-proportion=1.0
+ position "top"
+ place-within-column
+ }
+
+ background-color "transparent"
+ gaps 6
+ }
+
+ screenshot-path "~/pix/ss/shot_%y%m%d_%H-%M-%S.png"
+
+ prefer-no-csd
+
+ hotkey-overlay {
+ skip-at-startup
+ }
+
+ cursor {
+ xcursor-theme "Bibata-Modern-Ice"
+
+ xcursor-size 24
+
+ hide-when-typing
+ // hide-after-inactive-ms 1000
+ }
+
+ overview {
+ zoom 0.333
+ backdrop-color "#262626"
+
+ workspace-shadow {
+ off
+ softness 100
+ spread 50
+ offset x=20 y=20
+ color "#000a"
+ }
+ }
+
+ recent-windows {
+ highlight {
+ corner-radius 14
+ }
+
+ previews {
+ max-height 320
+ }
+ }
+
+ gestures {
+ hot-corners {
+ off
+ }
+ }
+
+ switch-events {
+ lid-close { spawn "systemctl" "suspend-then-hibernate"; }
+ lid-open { spawn "notify-send" "System resume complete"; }
+ }
+ '';
+ };
+}
diff --git a/config/zsh.nix b/config/zsh.nix
new file mode 100644
index 0000000..597b1a0
--- /dev/null
+++ b/config/zsh.nix
@@ -0,0 +1,206 @@
+{ config, pkgs, ... }:
+
+{
+ programs.zsh = {
+ enable = true;
+ dotDir = "${config.xdg.configHome}/zsh";
+
+ history = {
+ size = 10000;
+ save = 10000;
+ path = "${config.xdg.cacheHome}/zsh/history";
+ ignoreDups = true;
+ ignoreSpace = true;
+ share = true;
+ expireDuplicatesFirst = true;
+ };
+
+ shellAliases = {
+ sch = "sudo systemctl set-environment SCX_SCHEDULER_OVERRIDE=scx_lavd && sudo systemctl restart scx";
+
+ ".." = "cd ..";
+
+ zrc = "nvim $HOME/.config/zsh/.zshrc";
+
+ ga = "git add";
+ gc = "git commit";
+ gp = "git push";
+ gu = "git pull";
+ gd = "git diff";
+ gl = "git log --all --graph --pretty=format:'%C(magenta))%h %C(white) %an %ar%C(auto) %D%n%s%n'";
+ gb = "git branch";
+ gi = "git init";
+ gcl = "git clone";
+
+ swww = "awww";
+ weather = "curl -s 'https://wttr.in/?1n'";
+ pacgraph = "pacgraph --show-req-by -b '#232738' -l '#9778d3' -t '#cca9c6' -d '#b8d0eb'";
+ grep = "grep --color=auto";
+ stow = "stow --ignore='screenshot.png' --ignore='README.org' --ignore='.git' --ignore='.assets' --ignore='deploy.sh'";
+ yarn = "yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config";
+ diff = "diff --color=auto";
+ df = "duf -hide special";
+ neofetch = "fastfetch --kitty ~/.config/fastfetch/logos/arch-logo.png --logo-width 45";
+ irssi = "irssi --config=$XDG_CONFIG_HOME/irssi/config --home=$XDG_DATA_HOME/irssi";
+ cat = "bat --paging=never";
+ less = "bat --paging=always";
+ x = "exit";
+ logout = "pkill -u $USER";
+ dir = "dir --color=auto";
+ networkusage = "vnstat -i wlo1";
+ b = "brightnessctl set";
+ hostname = "uname -n";
+ wiki = "nvim $XDG_DATA_HOME/vimwiki/index_$(date '+%a-%d-%m-%y-%H:%M').wiki";
+ dosbox = "dosbox -conf $XDG_CONFIG_HOME/dosbox/dosbox.conf";
+ adb = "HOME=$XDG_DATA_HOME/android adb";
+ time = "hyperfine";
+ thumb = "yt-dlp --write-thumbnail --skip-download";
+ SS = "sudo systemctl";
+ j = "sudo journalctl";
+ lsusb = "cyme --headings --tree --hide-buses";
+ wget = "wcurl";
+ open = "xdg-open";
+ loc = "~/.local/share/go/bin/scc";
+ rtmp = "podman run -d -p 1935:1935 --name nginx docker.io/tiangolo/nginx-rtmp";
+ lf = "yazi";
+ dfm = "demonfm";
+
+ ls = "eza --icons --group-directories-first";
+ ll = "eza -lgh --icons --group-directories-first";
+ la = "eza -lagh --icons --group-directories-first";
+ tree = "eza -aT --icons";
+
+ mv = "mvg -ig";
+ rm = "rip -i --graveyard $HOME/.local/share/Trash";
+ ln = "ln -i";
+ cp = "cpg -ig";
+
+ "scheiße" = "bash";
+ e = "$EDITOR";
+ edit = "msedit";
+ c = "clear";
+
+ xcc = "xclip -selection clipboard";
+ xco = "xclip -selection clipboard -o";
+ pbcopy = "wl-copy";
+ pbpaste = "wl-paste";
+
+ install = "paru -Slq | fzf --multi --preview 'paru -Si {1}' | xargs -ro paru -S";
+ uninstall = "paru -Qq | fzf --multi --preview 'paru -Qi {1}' | xargs -ro paru -Rcns";
+ update = "paru -Syu --noconfirm";
+ garbage = "paru -Rcns $(paru -Qqdtt)";
+ };
+
+ initContent = ''
+ # global aliases
+ alias -g NE='2>/dev/null'
+ alias -g DN='> /dev/null'
+ alias -g NUL='>/dev/null 2>&1'
+ alias -g JQ='| jq'
+ alias -g C='| wl-copy'
+
+ # plugin manager
+ ZINIT_HOME="''${XDG_DATA_HOME:-''${HOME}/.local/share}/zinit/zinit.git"
+ if [ ! -d "$ZINIT_HOME" ]; then
+ mkdir -p "$(dirname $ZINIT_HOME)"
+ git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
+ fi
+ source "''${ZINIT_HOME}/zinit.zsh"
+
+ # plugins
+ zinit light zsh-users/zsh-syntax-highlighting
+ zinit light zsh-users/zsh-completions
+ zinit light zsh-users/zsh-autosuggestions
+ zinit light Aloxaf/fzf-tab
+ zinit light jeffreytse/zsh-vi-mode
+ autoload -U compinit && compinit
+
+ # keybindings
+ bindkey -v
+ bindkey '^f' autosuggest-accept
+ bindkey '^p' history-search-backward
+ bindkey '^n' history-search-forward
+ autoload -Uz edit-command-line
+ zle -N edit-command-line
+ bindkey '^X^e' edit-command-line
+ bindkey ' ' magic-space
+ bindkey -s '^o' 'lfcd\n'
+
+ # completion styling
+ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
+ zstyle ':completion:*' list-colors "''${(s.:.)LS_COLORS}"
+ zstyle ':completion:*' menu no
+ zstyle ':fzf-tab:complete:cd:*' fzf-preview "eza $realpath"
+ zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview "eza $realpath"
+
+ # sourcing
+ source "''${XDG_CONFIG_HOME:-''${HOME}/.config}/shell/profile"
+
+ # shell integration
+ eval "$(fzf --zsh)"
+ eval "$(zoxide init --cmd cd zsh)"
+ eval "$(starship init zsh)"
+ eval "$(atuin init zsh)"
+
+ # functions
+ function help() {
+ "$@" --help 2>&1 | bat --plain --language=help
+ }
+ function chst() {
+ [ -z $1 ] && echo "no args provided!" || (curl -s cheat.sh/$1 | bat --style=plain)
+ }
+ function gdown() {
+ agent="Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0"
+ uuid=$(curl -sL "$1" -A "$agent" | sed -nE 's|.*(uuid=[^"]*)".*|\1|p')
+ aria2c -x16 -s16 "$1&confirm=t&$uuid" -U "$agent" --summary-interval=0 -d "''${2:-.}"
+ }
+ function fshow() {
+ git log --graph --color=always \
+ --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
+ fzf --ansi --no-sort --reverse --tiebreak=index --bind=ctrl-s:toggle-sort \
+ --bind "ctrl-m:execute:
+ (grep -o '[a-f0-9]\{7\}' | head -1 |
+ xargs -I % sh -c 'git show --color=always % | less -R') << 'FZF-EOF'
+ {}
+ FZF-EOF"
+ }
+ function lfcd() {
+ tmp="$(mktemp)"
+ yazi -last-dir-path="$tmp" "$@"
+ if [ -f "$tmp" ]; then
+ dir="$(cat "$tmp")"
+ /usr/sbin/rm -f "$tmp"
+ [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
+ fi
+ }
+ function tm() {
+ tmux-sessionizer
+ }
+ function cheat() {
+ lang=$(curl -s cheat.sh/:list | fzf --reverse --height=50%)
+ curl -s cheat.sh/$lang | bat --paging=always
+ }
+ function supercat() {
+ if [ "$(printf '%s' "$1" | cut -d '.' -f2)" = "jai" ]; then
+ bat -l odin "$1"
+ else
+ bat "$1"
+ fi
+ }
+ function mkcd() {
+ mkdir -p "$1"
+ cd "$1"
+ }
+ function pdfmaker() {
+ pandoc --pdf-engine=pdfroff "$1" -o "$2.pdf"
+ }
+
+ # greeting
+ if [ "$TERM_PROGRAM" = "tmux" ]; then
+ figlet "tmux"
+ else
+ greet
+ fi
+ '';
+ };
+}