From 1ae13b9168495b57afbe5e6be7e188d059d35b6e Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 27 Jul 2023 15:05:57 +0700 Subject: [PATCH 001/126] chore: Proxy stuff, unused for now --- .config/zsh/.zshenv | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index dca22e5..07280ab 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -46,6 +46,14 @@ elif [[ "$OSTYPE" == "linux-gnu" ]]; then export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock fi +# -- Proxy +# export HTTP_PROXY="127.0.0.1:8080" +# export HTTPS_PROXY="$HTTP_PROXY" +# export FTP_PROXY="$HTTP_PROXY" +# export http_proxy="$HTTP_PROXY" +# export https_proxy="$HTTP_PROXY" +# export ftp_proxy="$HTTP_PROXY" + # -- DEFAULT export QT_QPA_PLATFORMTHEME="qt5ct" if [[ -n $SSH_CONNECTION ]]; then From 1f82964c65821c573a40b6a94a6dce7686d9b150 Mon Sep 17 00:00:00 2001 From: ziro Date: Sun, 27 Aug 2023 15:11:17 +0700 Subject: [PATCH 002/126] chore: XDG state --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 07280ab..c4e5007 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -2,6 +2,7 @@ # -- XDG export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" +export XDG_STATE_HOME="$HOME/.local/state" export XDG_CONFIG_HOME="$HOME/.config" if [[ "$OSTYPE" == "darwin"* ]]; then From cda9433be6c800059dda7d5e42417dea06a21a15 Mon Sep 17 00:00:00 2001 From: ziro Date: Sun, 27 Aug 2023 15:33:35 +0700 Subject: [PATCH 003/126] chore: Add treesitter It says I can use it for highlighting......... I have no idea how to use it, too lazy to figure it out rn --- .config/vim/vim_plug | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index a01e979..552575a 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -96,6 +96,9 @@ Plug 'GutenYe/json5.vim' " --- Project Fluent support Plug 'projectfluent/fluent.vim' +" --- AIO solution for highlighting +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + call plug#end() " ====================== @@ -408,3 +411,6 @@ lua < Date: Mon, 28 Aug 2023 16:51:58 +0700 Subject: [PATCH 004/126] refactor: Simplify vimrc --- .config/vim/vimrc | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 6b1ee4d..77496bd 100755 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -26,24 +26,18 @@ " Automatically source config for the correct OS " NOTE: By default the directory of Windows config will be located on " "C:\_config\vim" + if has('win64') || has('win32') || has('win16') - " Windows - so C:\_config\vim\vim_win - " Universal - so C:\_config\vim\vim_uni - - " ----- PlugIns - if !exists('g:vscode') - source C:\_config\vim\vim_plug - endif + let $ZVIM_CONFIG_DIR = "C:/_config/vim" + let $ZVIM_OS_TYPE = "win" else - " *nix (Linux/Mac) - so ~/.config/vim/vim_nix - " Universal - so ~/.config/vim/vim_uni - - " ----- PlugIns - if !exists('g:vscode') - source ~/.config/vim/vim_plug - endif + let $ZVIM_CONFIG_DIR = "~/.config/vim" + let $ZVIM_OS_TYPE = "nix" +endif + +so $ZVIM_CONFIG_DIR/vim_$ZVIM_OS_TYPE +so $ZVIM_CONFIG_DIR/vim_uni + +if !exists('g:vscode') + source $ZVIM_CONFIG_DIR/vim_plug endif From d1570bfe78c21416b887e660bbafa20dd053182a Mon Sep 17 00:00:00 2001 From: ziro Date: Mon, 11 Sep 2023 10:48:34 +0700 Subject: [PATCH 005/126] feat: Enable wayland for Firefox --- .config/zsh/.zshenv | 8 +++++++- .config/zsh/.zshrc | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index c4e5007..6f8618a 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -18,12 +18,18 @@ else export ANDROID_AVD_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/.android/avd" fi +# -- Wayland +if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then + export MOZ_ENABLE_WAYLAND=1 +fi + # -- Python if [[ "$OSTYPE" == "darwin"* ]]; then export PYTHONNOUSERSITE=1 fi # -- Path +export BUN_INSTALL="$HOME/.bun" if [[ "$OSTYPE" == "darwin"* ]]; then export PYTHONPATH="$HOME/Library/Python/3.10/lib:$PYTHONPATH" LOCAL_PATH=$(du "$HOME/.local/bin/" | cut -f2 > /tmp/path && paste -sd ':' /tmp/path) @@ -31,7 +37,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then elif [[ "$OSTYPE" == "linux-gnu" ]]; then LOCAL_PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" fi -PATH="$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$LOCAL_PATH${PATH:+:${PATH}}" +PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$LOCAL_PATH${PATH:+:${PATH}}" # export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library # -- IBus stuff (IME) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index d9b0be4..5213d07 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -59,3 +59,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" fi +export PATH=$PATH:/home/ziro/.spicetify + +# bun completions +[ -s "/home/ziro/.bun/_bun" ] && source "/home/ziro/.bun/_bun" From e756e1d77f07cb0252597c8464e70af3c92a05c7 Mon Sep 17 00:00:00 2001 From: ziro Date: Mon, 2 Oct 2023 08:25:14 +0700 Subject: [PATCH 006/126] fix: Hyprland breaking changes --- .config/hypr/hyprland.conf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ca58882..761ac86 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -40,10 +40,12 @@ general { decoration { rounding = 5 - blur = yes - blur_size = 3 - blur_passes = 1 - blur_new_optimizations = on + blur { + enabled = 1 + size = 3 + passes = 1 + new_optimizations = 1 + } drop_shadow = yes shadow_range = 4 From 926373c8a616a3ab528e52e4807d7a7f95838cd2 Mon Sep 17 00:00:00 2001 From: ziro Date: Mon, 2 Oct 2023 08:29:21 +0700 Subject: [PATCH 007/126] fix(waybar): Hyprland built-in support --- .config/waybar/config | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/waybar/config b/.config/waybar/config index f3c56eb..e99e0f4 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,15 +1,14 @@ -// For Arch users: Compile waybar with `-Dexperimental=true` flag! { "layer": "top", "height": 28, // Waybar height (to be removed for auto height) "spacing": 0, // Gaps between modules (4px) - "modules-left": ["wlr/workspaces", "custom/media"], + "modules-left": ["hyprland/workspaces", "custom/media"], "modules-center": ["hyprland/window"], "modules-right": ["idle_inhibitor", "pulseaudio", "network", "disk", "memory", "temperature", "clock", "tray"], - "wlr/workspaces": { - "format": "{icon}", + "hyprland/workspaces": { + "format": "{id}", "on-click": "activate", - "sort-by-number": true + "sort-by": "number" }, "keyboard-state": { "numlock": true, From 26a159fef4508db45ef10dca7128c841b0154e9a Mon Sep 17 00:00:00 2001 From: ziro Date: Sun, 26 Nov 2023 10:33:58 +0700 Subject: [PATCH 008/126] sync: hyprland, env --- .config/hypr/hyprland.conf | 2 +- .config/tdm/default | 2 +- .config/zsh/.zshenv | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 761ac86..2c3c23d 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,6 +1,6 @@ exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources -exec-once = waybar +exec-once = waybar-loop exec-once = unclutter exec-once = dunst exec-once = numlockx diff --git a/.config/tdm/default b/.config/tdm/default index 5ee27ce..77969e2 120000 --- a/.config/tdm/default +++ b/.config/tdm/default @@ -1 +1 @@ -/home/ziro/.config/tdm/extra/hyprland \ No newline at end of file +/home/ziro/.config/tdm/sessions/Gamescope \ No newline at end of file diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 6f8618a..d1bcbc9 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -77,10 +77,10 @@ export HTTPS="localhost:9050" export GOOGLE_APPLICATION_CREDENTIALS="$HOME/Downloads/youtube-9ab71578c563.json" # vim/nvim as manpager -if [[ "$OSTYPE" == "linux-gnu" ]]; then - export MANPAGER="nvimpager" +# if [[ "$OSTYPE" == "linux-gnu" ]]; then + # export MANPAGER="nvimpager" # export MANPAGER="/bin/sh -c \"col -b | vim --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\"" -fi +# fi # -- Wine problem workaround # - NOTE to self: this will prevent some (probably wine issue) games from launching From 12ce6c15fa237e161372d827e56c3acea27a96b0 Mon Sep 17 00:00:00 2001 From: ziro Date: Sun, 26 Nov 2023 10:34:48 +0700 Subject: [PATCH 009/126] feat: Add pkgbuilds repo to paru --- .config/paru/paru.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .config/paru/paru.conf diff --git a/.config/paru/paru.conf b/.config/paru/paru.conf new file mode 100644 index 0000000..2cb3913 --- /dev/null +++ b/.config/paru/paru.conf @@ -0,0 +1,10 @@ +[bin] +Sudo = doas + +[ziro] +URL = https://github.com/null2264/pkgbuilds/ + +# [ziro] +# Depth = 2 +# SkipReview +# Path = /home/ziro/Build/GIT/pkgbuilds/ From 373efef83c03171a45badfaa64e73d2c4819dcb7 Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 29 Nov 2023 08:26:25 +0700 Subject: [PATCH 010/126] chore: rename pkgbuild repo --- .config/paru/paru.conf | 12 ++++++------ .config/zsh/.zshenv | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.config/paru/paru.conf b/.config/paru/paru.conf index 2cb3913..7539c54 100644 --- a/.config/paru/paru.conf +++ b/.config/paru/paru.conf @@ -1,10 +1,10 @@ [bin] Sudo = doas -[ziro] -URL = https://github.com/null2264/pkgbuilds/ +[z] +Url = https://github.com/null2264/pkgbuilds/ -# [ziro] -# Depth = 2 -# SkipReview -# Path = /home/ziro/Build/GIT/pkgbuilds/ +[zl] +Depth = 2 +SkipReview +Path = /home/ziro/Build/GIT/pkgbuilds/ diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index d1bcbc9..202d3cc 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -70,7 +70,7 @@ else export VISUAL="nvim" export EDITOR="nvim" fi -export BROWSER="librewolf" +export BROWSER="pulse-browser" export TERMINAL="kitty" export READER="zathura" export HTTPS="localhost:9050" From a5ede6c6a70b6c235927989c4de4e752dfd7b0c7 Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 11:07:16 +0700 Subject: [PATCH 011/126] fix: IME on Wayland --- .config/zsh/.zshenv | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 202d3cc..0aec33b 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -41,10 +41,12 @@ PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_H # export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library # -- IBus stuff (IME) -export GTK_IM_MODULE="ibus" -export QT_IM_MODULE="ibus" -export GLFW_IM_MODULE="ibus" -export XMODIFIERS=@im="ibus" +if [[ "$XDG_SESSION_TYPE" != "wayland" ]]; then + export GTK_IM_MODULE="ibus" + export QT_IM_MODULE="ibus" + export GLFW_IM_MODULE="ibus" + export XMODIFIERS=@im="ibus" +fi # -- rootless docker if [[ "$OSTYPE" == "darwin"* ]]; then From 6206bbffb9b7da6935d955aa6ad382f8f24c531d Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 11:07:38 +0700 Subject: [PATCH 012/126] chore: Enable natural scrolling --- .config/hypr/hyprland.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 2c3c23d..712d320 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -21,9 +21,7 @@ input { follow_mouse = 1 - touchpad { - natural_scroll = no - } + natural_scroll = yes sensitivity = 0 # -1.0 - 1.0, 0 means no modification. } From e0409a66196a303c6fcb0e66aa79751d538c9bfc Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 13:48:26 +0700 Subject: [PATCH 013/126] chore: Migrate from waybar to eww Very early state --- .config/eww/eww.yuck | 37 +++++++++++++++++++++++++++++++++++++ .config/hypr/hyprland.conf | 3 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .config/eww/eww.yuck diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck new file mode 100644 index 0000000..10a53e6 --- /dev/null +++ b/.config/eww/eww.yuck @@ -0,0 +1,37 @@ +;; Listeners +(deflisten active-workspace + `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-active-workspace-listener`) + +(deflisten workspace-list :initial '[1]' + `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) + +;; Windows +(defwindow bar + :monitor 0 + :stacking "fg" + :exclusive true + :geometry (geometry :width "100%" :height "28px" :anchor "top center") + (bar)) + +(defwidget bar [] + (centerbox + (start) + (middle) + (end))) + +(defwidget start [] + (workspaces)) + +(defwidget middle [] + (literal :content "test")) + +(defwidget end [] + (literal :content "test")) + +(defwidget workspaces [] + (box :class "workspaces" + :space-evenly false + (for id in workspace-list + (button :class {active-workspace == id ? "active" : ""} + :onclick `hyprctl dispatch workspace ${id}` + id)))) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 712d320..2e04dd8 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,12 +1,13 @@ exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources -exec-once = waybar-loop +exec-once = eww daemon && eww open bar exec-once = unclutter exec-once = dunst exec-once = numlockx exec-once = lxpolkit exec-once = nitrogen --restore exec-once = fcitx5 -d +exec-once = xsettingsd & #exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & monitor=,preferred,auto,auto From 8150baf7fb1f272551cd311cadc7820b9bfaab44 Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 14:16:58 +0700 Subject: [PATCH 014/126] chore: Add datetime --- .config/eww/eww.yuck | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 10a53e6..d57cfab 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -5,6 +5,9 @@ (deflisten workspace-list :initial '[1]' `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) +(deflisten datetime + `stdbuf -oL $HOME/.local/bin/scripts/eww-datetime-listener`) + ;; Windows (defwindow bar :monitor 0 @@ -23,10 +26,13 @@ (workspaces)) (defwidget middle [] - (literal :content "test")) + (label :text "test")) (defwidget end [] - (literal :content "test")) + (box :halign "end" + :class "end" + :space-evenly false + (clock))) (defwidget workspaces [] (box :class "workspaces" @@ -35,3 +41,12 @@ (button :class {active-workspace == id ? "active" : ""} :onclick `hyprctl dispatch workspace ${id}` id)))) + +(defwidget clock [] + (pair :icon "a" :text {datetime.full}))) + +(defwidget pair [icon text] + (box :width 70 + :space-evenly false + (label :text icon) + (label :text text))) From 520902683d471d8392284ddce8101beaa07c717f Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 14:23:04 +0700 Subject: [PATCH 015/126] docs: Setup changes --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 63d8ce9..cec523a 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,14 @@ I'm still working on cleaning up some mess. My Setup: -- **WM**: bspwm / DWM*ʳ* -- **OS**: Arch Linux / macOS 12.x (Monterey)*ᵖ* +- **WM**: Hyprland +- **OS**: Arch Linux / macOS 13.x (Ventura)*ᵖ* - **Shell**: zsh - **Terminal**: st*ʳ* / kitty / iTerm2 -- **Editor**: Neovim / vim -- **File Manager**: Thunar / lf -- **Launcher**: rofi / dmenu / Sol -- **Browser**: Librewolf / Brave +- **Editor**: Neovim / VSCode / IDEA +- **File Manager**: Thunar / Nautilus / lf +- **Launcher**: tofi / Sol +- **Browser**: Pulse *info*: *ʳ* = *in separate repo*; *ᵖ* = *partially work* From a5c3fb65408e714be44ccff7ef9c46a46dbf0a52 Mon Sep 17 00:00:00 2001 From: ziro Date: Wed, 27 Dec 2023 18:40:46 +0700 Subject: [PATCH 016/126] fix: One too many `)` --- .config/eww/eww.yuck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index d57cfab..55d5aba 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -43,7 +43,7 @@ id)))) (defwidget clock [] - (pair :icon "a" :text {datetime.full}))) + (pair :icon "a" :text {datetime.full})) (defwidget pair [icon text] (box :width 70 From c11a8264ecaa508eaf0796ae22051053cc3c0aae Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 28 Dec 2023 14:21:08 +0700 Subject: [PATCH 017/126] feat: Add full and short date toggle --- .config/eww/eww.yuck | 58 +++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 55d5aba..ca34d43 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -1,52 +1,56 @@ +;; Variables +(defvar dtfull true) + ;; Listeners (deflisten active-workspace - `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-active-workspace-listener`) + `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-active-workspace-listener`) (deflisten workspace-list :initial '[1]' - `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) + `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) (deflisten datetime - `stdbuf -oL $HOME/.local/bin/scripts/eww-datetime-listener`) + `stdbuf -oL $HOME/.local/bin/scripts/eww-datetime-listener`) ;; Windows (defwindow bar - :monitor 0 - :stacking "fg" - :exclusive true - :geometry (geometry :width "100%" :height "28px" :anchor "top center") - (bar)) + :monitor 0 + :stacking "fg" + :exclusive true + :geometry (geometry :width "100%" :height "28px" :anchor "top center") + (bar)) (defwidget bar [] - (centerbox - (start) - (middle) - (end))) + (centerbox + (start) + (middle) + (end))) (defwidget start [] - (workspaces)) + (workspaces)) (defwidget middle [] - (label :text "test")) + (label :text "test")) (defwidget end [] - (box :halign "end" - :class "end" - :space-evenly false - (clock))) + (box :halign "end" + :class "end" + :space-evenly false + (clock))) (defwidget workspaces [] - (box :class "workspaces" - :space-evenly false - (for id in workspace-list + (box :class "workspaces" + :space-evenly false + (for id in workspace-list (button :class {active-workspace == id ? "active" : ""} :onclick `hyprctl dispatch workspace ${id}` - id)))) + id)))) (defwidget clock [] - (pair :icon "a" :text {datetime.full})) + (eventbox :onclick `eww update dtfull=${!dtfull}` + (label :text {dtfull ? datetime.full : datetime.date}))) (defwidget pair [icon text] - (box :width 70 - :space-evenly false - (label :text icon) - (label :text text))) + (box :width 70 + :space-evenly false + (label :text icon) + (label :text text))) From 929d7b985feb30b7aa3e6be736030be8562069d7 Mon Sep 17 00:00:00 2001 From: ziro Date: Fri, 29 Dec 2023 08:09:53 +0700 Subject: [PATCH 018/126] chore: Clean up $PATH env The original script adds way too much dirs to the PATH env variable --- .config/hypr/hyprland.conf | 2 +- .config/zsh/.zshenv | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 2e04dd8..0e4d0a6 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,6 +1,6 @@ exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources -exec-once = eww daemon && eww open bar +exec-once = eww-launch exec-once = unclutter exec-once = dunst exec-once = numlockx diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 0aec33b..43f1cf0 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -32,10 +32,10 @@ fi export BUN_INSTALL="$HOME/.bun" if [[ "$OSTYPE" == "darwin"* ]]; then export PYTHONPATH="$HOME/Library/Python/3.10/lib:$PYTHONPATH" - LOCAL_PATH=$(du "$HOME/.local/bin/" | cut -f2 > /tmp/path && paste -sd ':' /tmp/path) + LOCAL_PATH=$(du "$HOME/.local/bin/" -d 1 | cut -f2 > /tmp/ENV_PATH && paste -sd ':' /tmp/ENV_PATH) LOCAL_PATH="$HOME/Library/Python/3.10/bin:$LOCAL_PATH" elif [[ "$OSTYPE" == "linux-gnu" ]]; then - LOCAL_PATH="$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')${PATH:+:${PATH}}" + LOCAL_PATH=$(du "$HOME/.local/bin/" -d 1 | cut -f2 | paste -sd ':') fi PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$LOCAL_PATH${PATH:+:${PATH}}" # export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library From e68c4d7578127b247b67f5ae6ee42fe203bf1f6f Mon Sep 17 00:00:00 2001 From: ziro Date: Fri, 29 Dec 2023 17:39:44 +0700 Subject: [PATCH 019/126] fix: Stop discord from crying about updates --- .config/discord/settings.json | 3 +++ .config/discordcanary/settings.json | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 .config/discord/settings.json create mode 100644 .config/discordcanary/settings.json diff --git a/.config/discord/settings.json b/.config/discord/settings.json new file mode 100644 index 0000000..ff7ea0f --- /dev/null +++ b/.config/discord/settings.json @@ -0,0 +1,3 @@ +{ + "SKIP_HOST_UPDATE": true +} diff --git a/.config/discordcanary/settings.json b/.config/discordcanary/settings.json new file mode 100644 index 0000000..da8bd37 --- /dev/null +++ b/.config/discordcanary/settings.json @@ -0,0 +1,3 @@ +{ + "SKIP_HOST_UPDATE": true +} From 562e095080242a89bff5aa2d20d2ac0bcdc61d67 Mon Sep 17 00:00:00 2001 From: ziro Date: Fri, 29 Dec 2023 20:16:09 +0700 Subject: [PATCH 020/126] feat: Use mouseless REF: https://github.com/jbensmann/mouseless --- .config/mouseless/config.yaml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .config/mouseless/config.yaml diff --git a/.config/mouseless/config.yaml b/.config/mouseless/config.yaml new file mode 100644 index 0000000..0811110 --- /dev/null +++ b/.config/mouseless/config.yaml @@ -0,0 +1,47 @@ +# the keyboard devices it reads from, if no devices are specified, it reads from all +devices: + - "/dev/input/by-id/usb-SEMICO_USB_Gaming_Keyboard-event-kbd" + +# this is executed when mouseless starts, e.g. useful for setting the keyboard layout +# startCommand: "setxkbmap de" + +# the default speed for mouse movement and scrolling +baseMouseSpeed: 750.0 +baseScrollSpeed: 20.0 + +# the time it takes to accelerate to baseMouseSpeed (in ms), 0 to reach top speed immediately +mouseAccelerationTime: 200.0 +# the shape of the acceleration curve, 1.0 is linear, higher values have more time at low speeds +mouseAccelerationCurve: 2.0 +# speed of the mouse when it starts moving +startMouseSpeed: 0.0 +# same for deceleration +mouseDecelerationTime: 300.0 +mouseDecelerationCurve: 3.0 + +layers: +- name: initial + bindings: + pause: layer mouse + esc: capslock + capslock: esc +- name: mouse + passThrough: true + bindings: + # quit mouse layer + #q: layer initial + backspace: layer initial + # keep the mouse layer active + space: layer mouse + r: reload-config + l: move 1 0 + h: move -1 0 + j: move 0 1 + k: move 0 -1 + rightbrace: scroll up + leftbrace: scroll down + rightctrl: speed 4.0 + rightalt: speed 0.2 + enter: button left + backslash: button middle + rightshift: button right From 336d8e4dc131b8d251bd539e577932aca07814d2 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 30 Mar 2024 05:35:10 +0700 Subject: [PATCH 021/126] chore: Clean up --- .config/zsh/.zcompdump-zi-5.8 | 1807 --------------------------------- .gitignore | 1 + 2 files changed, 1 insertion(+), 1807 deletions(-) delete mode 100644 .config/zsh/.zcompdump-zi-5.8 create mode 100644 .gitignore diff --git a/.config/zsh/.zcompdump-zi-5.8 b/.config/zsh/.zcompdump-zi-5.8 deleted file mode 100644 index 30d6488..0000000 --- a/.config/zsh/.zcompdump-zi-5.8 +++ /dev/null @@ -1,1807 +0,0 @@ -#files: 795 version: 5.8 - -_comps=( -'-' '_precommand' -'-*-' '_bootctl' -'.' '_source' -'5g' '_go' -'5l' '_go' -'6g' '_go' -'6l' '_go' -'8g' '_go' -'8l' '_go' -'a2ps' '_a2ps' -'aaaa' '_hosts' -'aap' '_aap' -'abcde' '_abcde' -'ack' '_ack' -'ack2' '_ack' -'ack-grep' '_ack' -'ack-standalone' '_ack' -'acpi' '_acpi' -'acpitool' '_acpitool' -'acroread' '_acroread' -'adb' '_adb' -'add-zle-hook-widget' '_add-zle-hook-widget' -'add-zsh-hook' '_add-zsh-hook' -'admin' '_sccs' -'alacritty' '_alacritty' -'ali' '_mh' -'alias' '_alias' -'amaya' '_webbrowser' -'analyseplugin' '_analyseplugin' -'animate' '_imagemagick' -'anno' '_mh' -'ansible' '_ansible' -'ansible-config' '_ansible' -'ansible-console' '_ansible' -'ansible-doc' '_ansible' -'ansible-galaxy' '_ansible' -'ansible-inventory' '_ansible' -'ansible-playbook' '_ansible' -'ansible-pull' '_ansible' -'ansible-vault' '_ansible' -'ant' '_ant' -'antiword' '_antiword' -'aodh' '_openstack' -'aoss' '_precommand' -'apache2ctl' '_apachectl' -'apachectl' '_apachectl' -'aplay' '_alsa-utils' -'apm' '_apm' -'appletviewer' '_java' -'apropos' '_man' -'apvlv' '_pdf' -'arecord' '_alsa-utils' -'arena' '_webbrowser' -'arp' '_arp' -'arping' '_arping' -'-array-value-' '_value' -'asciidoctor' '_asciidoctor' -'asciinema' '_asciinema' -'ash' '_sh' -'-assign-parameter-' '_assign' -'at' '_at' -'atq' '_at' -'atrm' '_at' -'attr' '_attr' -'augtool' '_augeas' -'autoload' '_typeset' -'avahi-browse' '_avahi' -'avahi-browse-domains' '_avahi' -'avahi-resolve' '_avahi' -'avahi-resolve-address' '_avahi' -'avahi-resolve-host-name' '_avahi' -'awk' '_awk' -'b2sum' '_md5sum' -'barbican' '_openstack' -'base32' '_base64' -'base64' '_base64' -'basename' '_basename' -'bash' '_bash' -'batch' '_at' -'baz' '_baz' -'beep' '_beep' -'bg' '_jobs_bg' -'bibtex' '_bibtex' -'bindkey' '_bindkey' -'bison' '_bison' -'bmake' '_make' -'bogofilter' '_bogofilter' -'bogotune' '_bogofilter' -'bogoutil' '_bogofilter' -'bootctl' '_bootctl' -'bpython' '_bpython' -'bpython2' '_bpython' -'bpython2-gtk' '_bpython' -'bpython2-urwid' '_bpython' -'bpython3' '_bpython' -'bpython3-gtk' '_bpython' -'bpython3-urwid' '_bpython' -'bpython-gtk' '_bpython' -'bpython-urwid' '_bpython' -'-brace-parameter-' '_brace_parameter' -'brctl' '_brctl' -'bsdgrep' '_grep' -'bsdtar' '_tar' -'bspc' '_bspc' -'btdownloadcurses' '_bittorrent' -'btdownloadgui' '_bittorrent' -'btdownloadheadless' '_bittorrent' -'btlaunchmany' '_bittorrent' -'btlaunchmanycurses' '_bittorrent' -'btmakemetafile' '_bittorrent' -'btreannounce' '_bittorrent' -'btrename' '_bittorrent' -'btrfs' '_btrfs' -'btshowmetainfo' '_bittorrent' -'bttrack' '_bittorrent' -'buildhash' '_ispell' -'builtin' '_builtin' -'bunzip2' '_bzip2' -'burst' '_mh' -'busctl' '_busctl' -'bzcat' '_bzip2' -'bzegrep' '_grep' -'bzfgrep' '_grep' -'bzgrep' '_grep' -'bzip2' '_bzip2' -'bzip2recover' '_bzip2' -'bzr' '_bzr' -'c++' '_gcc' -'cabal' '_cabal' -'cal' '_cal' -'calendar' '_calendar' -'cat' '_cat' -'catchsegv' '_precommand' -'cc' '_gcc' -'ccal' '_ccal' -'cd' '_cd' -'cdc' '_sccs' -'cdcd' '_cdcd' -'cdr' '_cdr' -'cdrdao' '_cdrdao' -'cdrecord' '_cdrecord' -'ceilometer' '_openstack' -'certtool' '_gnutls' -'cftp' '_twisted' -'chage' '_users' -'chattr' '_chattr' -'chcon' '_chcon' -'chdir' '_cd' -'chfn' '_users' -'chgrp' '_chown' -'chimera' '_webbrowser' -'chkconfig' '_chkconfig' -'chkstow' '_stow' -'chmod' '_chmod' -'chown' '_chown' -'chpass' '_chsh' -'chroot' '_chroot' -'chrt' '_chrt' -'chsh' '_chsh' -'ci' '_rcs' -'cifsiostat' '_sysstat' -'cinder' '_openstack' -'ckeygen' '_twisted' -'cksum' '_cksum' -'clang' '_gcc' -'clang++' '_gcc' -'clay' '_clay' -'clear' '_nothing' -'cloudkitty' '_openstack' -'clusterdb' '_postgresql' -'cmp' '_cmp' -'cmus' '_cmus' -'cmus-remote' '_cmus' -'co' '_rcs' -'code' '_code' -'column' '_column' -'comb' '_sccs' -'combine' '_imagemagick' -'combinediff' '_patchutils' -'comm' '_comm' -'-command-' '_autocd' -'command' '_command' -'-command-line-' '_normal' -'comp' '_mh' -'compadd' '_compadd' -'compdef' '_compdef' -'composer' '_composer' -'composer.phar' '_composer' -'composite' '_imagemagick' -'compress' '_compress' -'conch' '_twisted' -'-condition-' '_condition' -'config.status' '_configure' -'configure' '_configure' -'convert' '_imagemagick' -'coredumpctl' '_coredumpctl' -'cowsay' '_cowsay' -'cowthink' '_cowsay' -'cp' '_cp' -'cpio' '_cpio' -'cplay' '_cplay' -'cpupower' '_cpupower' -'createdb' '_postgresql' -'createuser' '_postgresql' -'crontab' '_crontab' -'crsh' '_cssh' -'cryptsetup' '_cryptsetup' -'cscope' '_cscope' -'csh' '_sh' -'cssh' '_cssh' -'curl' '_curl' -'cut' '_cut' -'cvs' '_cvs' -'darcs' '_darcs' -'dash' '_sh' -'date' '_date' -'dbus-launch' '_dbus' -'dbus-monitor' '_dbus' -'dbus-send' '_dbus' -'dconf' '_dconf' -'dcop' '_dcop' -'dcopclient' '_dcop' -'dcopfind' '_dcop' -'dcopobject' '_dcop' -'dcopref' '_dcop' -'dcopstart' '_dcop' -'dd' '_dd' -'declare' '_typeset' -'-default-' '_default' -'delta' '_sccs' -'designate' '_openstack' -'devtodo' '_devtodo' -'df' '_df' -'dhclient' '_dhclient' -'dhclient3' '_dhclient' -'dict' '_dict' -'diff' '_diff' -'diff3' '_diff3' -'diffstat' '_diffstat' -'dig' '_dig' -'dillo' '_webbrowser' -'dircmp' '_directories' -'dirs' '_dirs' -'disable' '_disable' -'disown' '_jobs_fg' -'display' '_imagemagick' -'dist' '_mh' -'django-admin' '_django' -'django-admin.py' '_django' -'dkms' '_dkms' -'dmake' '_make' -'dmesg' '_dmesg' -'dmidecode' '_dmidecode' -'doas' '_doas' -'domainname' '_yp' -'dos2unix' '_dos2unix' -'drill' '_drill' -'dropdb' '_postgresql' -'dropuser' '_postgresql' -'dsh' '_dsh' -'dtruss' '_dtruss' -'du' '_du' -'dvibook' '_dvi' -'dviconcat' '_dvi' -'dvicopy' '_dvi' -'dvidvi' '_dvi' -'dvipdf' '_dvi' -'dvips' '_dvi' -'dviselect' '_dvi' -'dvitodvi' '_dvi' -'dvitype' '_dvi' -'dwb' '_webbrowser' -'e2label' '_e2label' -'eatmydata' '_precommand' -'ecasound' '_ecasound' -'echotc' '_echotc' -'echoti' '_echoti' -'ed' '_ed' -'egrep' '_grep' -'elfdump' '_elfdump' -'elinks' '_elinks' -'emulate' '_emulate' -'enable' '_enable' -'enscript' '_enscript' -'entr' '_entr' -'env' '_env' -'eog' '_eog' -'epdfview' '_pdf' -'epsffit' '_psutils' -'-equal-' '_equal' -'erb' '_ruby' -'espeak' '_espeak' -'etags' '_etags' -'ethtool' '_ethtool' -'eu-nm' '_nm' -'eu-objdump' '_objdump' -'eu-readelf' '_readelf' -'eu-strings' '_strings' -'eval' '_precommand' -'eview' '_vim' -'evim' '_vim' -'evince' '_evince' -'exa' '_exa' -'exec' '_exec' -'expand' '_unexpand' -'export' '_typeset' -'express' '_webbrowser' -'extcheck' '_java' -'extractres' '_psutils' -'fakeroot' '_fakeroot' -'false' '_nothing' -'fast-theme' '_fast-theme' -'fc' '_fc' -'fc-list' '_xft_fonts' -'fc-match' '_xft_fonts' -'feh' '_feh' -'fetchmail' '_fetchmail' -'ffmpeg' '_ffmpeg' -'fg' '_jobs_fg' -'fgrep' '_grep' -'figlet' '_figlet' -'filterdiff' '_patchutils' -'find' '_find' -'findaffix' '_ispell' -'findmnt' '_findmnt' -'finger' '_finger' -'firefox' '_mozilla' -'-first-' '_first' -'fixdlsrps' '_psutils' -'fixfmps' '_psutils' -'fixmacps' '_psutils' -'fixpsditps' '_psutils' -'fixpspps' '_psutils' -'fixscribeps' '_psutils' -'fixtpps' '_psutils' -'fixwfwps' '_psutils' -'fixwpps' '_psutils' -'fixwwps' '_psutils' -'flac' '_flac' -'flatpak' '_flatpak' -'flex' '_flex' -'flex++' '_flex' -'flipdiff' '_patchutils' -'flist' '_mh' -'flists' '_mh' -'float' '_typeset' -'fmt' '_fmt' -'fmttest' '_mh' -'fned' '_zed' -'fnext' '_mh' -'fold' '_fold' -'folder' '_mh' -'folders' '_mh' -'fortune' '_fortune' -'forw' '_mh' -'fprev' '_mh' -'free' '_free' -'freebsd-make' '_make' -'freezer' '_openstack' -'fsh' '_fsh' -'ftp' '_hosts' -'functions' '_typeset' -'fuser' '_fuser' -'fusermount' '_fusermount' -'fwhois' '_whois' -'g++' '_gcc' -'galeon' '_webbrowser' -'gawk' '_awk' -'gb2sum' '_md5sum' -'gbase32' '_base64' -'gbase64' '_base64' -'gbasename' '_basename' -'gcat' '_cat' -'gcc' '_gcc' -'gccgo' '_go' -'gchgrp' '_chown' -'gchmod' '_chmod' -'gchown' '_chown' -'gchroot' '_chroot' -'gcksum' '_cksum' -'gcmp' '_cmp' -'gcomm' '_comm' -'gcore' '_gcore' -'gcp' '_cp' -'gcut' '_cut' -'gdate' '_date' -'gdb' '_gdb' -'gdd' '_dd' -'gdf' '_df' -'gdiff' '_diff' -'gdu' '_du' -'geany' '_geany' -'gegrep' '_grep' -'gem' '_gem' -'genisoimage' '_genisoimage' -'genv' '_env' -'get' '_sccs' -'getafm' '_psutils' -'getconf' '_getconf' -'getent' '_getent' -'getfacl' '_getfacl' -'getfacl.exe' '_getfacl' -'getfattr' '_attr' -'getmail' '_getmail' -'getopt' '_getopt' -'getopts' '_vars' -'gex' '_vim' -'gexpand' '_unexpand' -'gfgrep' '_grep' -'gfind' '_find' -'gfmt' '_fmt' -'gfold' '_fold' -'ggetopt' '_getopt' -'ggrep' '_grep' -'ggv' '_gnome-gv' -'ghead' '_head' -'ghostscript' '_ghostscript' -'ghostview' '_pspdf' -'gid' '_id' -'ginstall' '_install' -'git' '_git' -'git-cvsserver' '_git' -'gitk' '_git' -'git-receive-pack' '_git' -'git-shell' '_git' -'git-upload-archive' '_git' -'git-upload-pack' '_git' -'gjoin' '_join' -'glance' '_openstack' -'gln' '_ln' -'global' '_global' -'glocate' '_locate' -'gls' '_ls' -'gm' '_graphicsmagick' -'gmake' '_make' -'gmd5sum' '_md5sum' -'gmkdir' '_mkdir' -'gmkfifo' '_mkfifo' -'gmknod' '_mknod' -'gmktemp' '_mktemp' -'gmplayer' '_mplayer' -'gmv' '_mv' -'gnl' '_nl' -'gnocchi' '_openstack' -'gnome-gv' '_gnome-gv' -'gnumfmt' '_numfmt' -'gnupod_addsong' '_gnupod' -'gnupod_addsong.pl' '_gnupod' -'gnupod_check' '_gnupod' -'gnupod_check.pl' '_gnupod' -'gnupod_INIT' '_gnupod' -'gnupod_INIT.pl' '_gnupod' -'gnupod_search' '_gnupod' -'gnupod_search.pl' '_gnupod' -'gnutls-cli' '_gnutls' -'gnutls-cli-debug' '_gnutls' -'gnutls-serv' '_gnutls' -'god' '_od' -'gofmt' '_go' -'gpasswd' '_gpasswd' -'gpaste' '_paste' -'gpatch' '_patch' -'gpg' '_gpg' -'gpg2' '_gpg' -'gpgv' '_gpg' -'gpg-zip' '_gpg' -'gphoto2' '_gphoto2' -'gprintenv' '_printenv' -'gprof' '_gprof' -'gqview' '_gqview' -'gradle' '_gradle' -'gradlew' '_gradle' -'grail' '_webbrowser' -'greadlink' '_readlink' -'grep' '_grep' -'grepdiff' '_patchutils' -'grm' '_rm' -'grmdir' '_rmdir' -'groff' '_groff' -'groupadd' '_user_admin' -'groupdel' '_groups' -'groupmod' '_user_admin' -'groups' '_users' -'growisofs' '_growisofs' -'gs' '_ghostscript' -'gsbj' '_pspdf' -'gsdj' '_pspdf' -'gsdj500' '_pspdf' -'gsed' '_sed' -'gseq' '_seq' -'gsettings' '_gsettings' -'gsha1sum' '_md5sum' -'gsha224sum' '_md5sum' -'gsha256sum' '_md5sum' -'gsha384sum' '_md5sum' -'gsha512sum' '_md5sum' -'gshred' '_shred' -'gshuf' '_shuf' -'gslj' '_pspdf' -'gslp' '_pspdf' -'gsnd' '_pspdf' -'gsort' '_sort' -'gsplit' '_split' -'gstat' '_stat' -'gstdbuf' '_stdbuf' -'gstrings' '_strings' -'gstty' '_stty' -'gsum' '_cksum' -'gtac' '_tac' -'gtail' '_tail' -'gtar' '_tar' -'gtee' '_tee' -'gtimeout' '_timeout' -'gtouch' '_touch' -'gtr' '_tr' -'gtty' '_tty' -'guilt' '_guilt' -'guilt-add' '_guilt' -'guilt-applied' '_guilt' -'guilt-delete' '_guilt' -'guilt-files' '_guilt' -'guilt-fold' '_guilt' -'guilt-fork' '_guilt' -'guilt-header' '_guilt' -'guilt-help' '_guilt' -'guilt-import' '_guilt' -'guilt-import-commit' '_guilt' -'guilt-init' '_guilt' -'guilt-new' '_guilt' -'guilt-next' '_guilt' -'guilt-patchbomb' '_guilt' -'guilt-pop' '_guilt' -'guilt-prev' '_guilt' -'guilt-push' '_guilt' -'guilt-rebase' '_guilt' -'guilt-refresh' '_guilt' -'guilt-rm' '_guilt' -'guilt-series' '_guilt' -'guilt-status' '_guilt' -'guilt-top' '_guilt' -'guilt-unapplied' '_guilt' -'guname' '_uname' -'gunexpand' '_unexpand' -'guniq' '_uniq' -'gunzip' '_gzip' -'guptime' '_uptime' -'gv' '_gv' -'gview' '_vim' -'gvim' '_vim' -'gvimdiff' '_vim' -'gwc' '_wc' -'gwho' '_who' -'gxargs' '_xargs' -'gzcat' '_gzip' -'gzegrep' '_grep' -'gzfgrep' '_grep' -'gzgrep' '_grep' -'gzilla' '_webbrowser' -'gzip' '_gzip' -'hash' '_hash' -'hd' '_hexdump' -'head' '_head' -'heat' '_openstack' -'help' '_sccs' -'hexdump' '_hexdump' -'hilite' '_precommand' -'history' '_fc' -'host' '_host' -'hostname' '_hostname' -'hostnamectl' '_hostnamectl' -'hotjava' '_webbrowser' -'htop' '_htop' -'iceweasel' '_mozilla' -'icombine' '_ispell' -'iconv' '_iconv' -'iconvconfig' '_iconvconfig' -'id' '_id' -'identify' '_imagemagick' -'ifconfig' '_ifconfig' -'ifdown' '_net_interfaces' -'iftop' '_iftop' -'ifup' '_net_interfaces' -'ijoin' '_ispell' -'import' '_imagemagick' -'inc' '_mh' -'includeres' '_psutils' -'info' '_texinfo' -'infocmp' '_terminals' -'initctl' '_initctl' -'initdb' '_postgresql' -'insmod' '_modutils' -'install' '_install' -'install-info' '_texinfo' -'integer' '_typeset' -'interdiff' '_patchutils' -'ionice' '_ionice' -'iostat' '_iostat' -'ip' '_ip' -'ip6tables' '_iptables' -'ip6tables-restore' '_iptables' -'ip6tables-save' '_iptables' -'ipkg' '_opkg' -'ipsec' '_ipsec' -'ipset' '_ipset' -'iptables' '_iptables' -'iptables-restore' '_iptables' -'iptables-save' '_iptables' -'irb' '_ruby' -'ironic' '_openstack' -'irssi' '_irssi' -'isag' '_sysstat' -'ispell' '_ispell' -'iwconfig' '_iwconfig' -'jadetex' '_tex' -'jar' '_java' -'jarsigner' '_java' -'java' '_java' -'javac' '_java' -'javadoc' '_java' -'javah' '_java' -'javap' '_java' -'jdb' '_java' -'jobs' '_jobs_builtin' -'joe' '_joe' -'join' '_join' -'journalctl' '_journalctl' -'jq' '_jq' -'kdeconnect-cli' '_kdeconnect' -'kernel-install' '_kernel-install' -'keystone' '_openstack' -'keytool' '_java' -'kfmclient' '_kfmclient' -'kill' '_kill' -'killall' '_killall' -'killall5' '_killall' -'kioclient' '_kfmclient' -'kitty' '_kitty' -'knock' '_knock' -'konqueror' '_webbrowser' -'kpartx' '_kpartx' -'kpdf' '_pdf' -'ksh' '_sh' -'ksh88' '_sh' -'ksh93' '_sh' -'kvno' '_kvno' -'last' '_last' -'lastb' '_last' -'latex' '_tex' -'latexmk' '_tex' -'ldconfig' '_ldconfig' -'ldconfig.real' '_ldconfig' -'ldd' '_ldd' -'less' '_less' -'let' '_math' -'lftp' '_ncftp' -'lha' '_lha' -'libinput' '_libinput' -'light' '_webbrowser' -'limit' '_limit' -'links' '_links' -'links2' '_links' -'linux' '_uml' -'lldb' '_lldb' -'llvm-g++' '_gcc' -'llvm-gcc' '_gcc' -'llvm-objdump' '_objdump' -'ln' '_ln' -'loadkeys' '_loadkeys' -'local' '_typeset' -'locale' '_locale' -'localectl' '_localectl' -'localedef' '_localedef' -'locate' '_locate' -'log' '_nothing' -'loginctl' '_loginctl' -'logname' '_nothing' -'look' '_look' -'losetup' '_losetup' -'lp' '_lp' -'lpadmin' '_lp' -'lpinfo' '_lp' -'lpoptions' '_lp' -'lpq' '_lp' -'lpr' '_lp' -'lprm' '_lp' -'lpstat' '_lp' -'ls' '_ls' -'lsattr' '_lsattr' -'lsblk' '_lsblk' -'lsdiff' '_patchutils' -'lsinitcpio' '_mkinitcpio' -'lsmod' '_modutils' -'lsof' '_lsof' -'lsusb' '_lsusb' -'ltrace' '_ltrace' -'lua' '_lua' -'luarocks' '_luarocks' -'lynx' '_lynx' -'lz4' '_lz4' -'lz4c' '_lz4' -'lz4c32' '_lz4' -'lz4cat' '_lz4' -'lzcat' '_xz' -'lzma' '_xz' -'lzop' '_lzop' -'mac2unix' '_dos2unix' -'machinectl' '_machinectl' -'magnum' '_openstack' -'mail' '_mail' -'Mail' '_mail' -'mailx' '_mail' -'make' '_make' -'makeinfo' '_texinfo' -'makepkg' '_pacman' -'man' '_man' -'manage.py' '_django' -'manila' '_openstack' -'mark' '_mh' -'-math-' '_math' -'matlab' '_matlab' -'mattrib' '_mtools' -'mcd' '_mtools' -'mcopy' '_mtools' -'md2' '_cksum' -'md4' '_cksum' -'md5' '_cksum' -'md5sum' '_md5sum' -'mdadm' '_mdadm' -'mdel' '_mtools' -'mdeltree' '_mtools' -'mdir' '_mtools' -'mdu' '_mtools' -'mencal' '_mencal' -'mere' '_mere' -'merge' '_rcs' -'meson' '_meson' -'mesonconf' '_meson' -'mesonintrospect' '_meson' -'mesontest' '_meson' -'metaflac' '_flac' -'mformat' '_mtools' -'mgv' '_pspdf' -'mhfixmsg' '_mh' -'mhlist' '_mh' -'mhmail' '_mh' -'mhn' '_mh' -'mhparam' '_mh' -'mhpath' '_mh' -'mhshow' '_mh' -'mhstore' '_mh' -'mii-tool' '_mii-tool' -'mistral' '_openstack' -'mkdir' '_mkdir' -'mkfifo' '_mkfifo' -'mkinitcpio' '_mkinitcpio' -'mkisofs' '_growisofs' -'mknod' '_mknod' -'mksh' '_sh' -'mktemp' '_mktemp' -'mktunes' '_gnupod' -'mktunes.pl' '_gnupod' -'mlabel' '_mtools' -'mlocate' '_locate' -'mmd' '_mtools' -'mmm' '_webbrowser' -'mmount' '_mtools' -'mmove' '_mtools' -'modinfo' '_modutils' -'modprobe' '_modutils' -'module' '_module' -'mogrify' '_imagemagick' -'monasca' '_openstack' -'mondoarchive' '_mondo' -'montage' '_imagemagick' -'moosic' '_moosic' -'Mosaic' '_webbrowser' -'mosh' '_mosh' -'mount' '_mount' -'mozilla' '_mozilla' -'mozilla-firefox' '_mozilla' -'mozilla-xremote-client' '_mozilla' -'mpc' '_mpc' -'mplayer' '_mplayer' -'mpstat' '_sysstat' -'mpv' '_mpv' -'mr' '_myrepos' -'mrd' '_mtools' -'mread' '_mtools' -'mren' '_mtools' -'msgchk' '_mh' -'mt' '_mt' -'mtn' '_monotone' -'mtoolstest' '_mtools' -'mtr' '_mtr' -'mtype' '_mtools' -'munchlist' '_ispell' -'mupdf' '_mupdf' -'murano' '_openstack' -'mush' '_mail' -'mutt' '_mutt' -'mv' '_mv' -'mvim' '_vim' -'mx' '_hosts' -'mysql' '_mysql_utils' -'mysqladmin' '_mysql_utils' -'mysqldiff' '_mysqldiff' -'mysqldump' '_mysql_utils' -'mysqlimport' '_mysql_utils' -'mysqlshow' '_mysql_utils' -'nail' '_mail' -'native2ascii' '_java' -'nautilus' '_nautilus' -'nawk' '_awk' -'nc' '_netcat' -'ncal' '_cal' -'ncftp' '_ncftp' -'ncl' '_nedit' -'nedit' '_nedit' -'nedit-nc' '_nedit' -'netcat' '_netcat' -'netrik' '_webbrowser' -'netscape' '_netscape' -'netstat' '_netstat' -'networkctl' '_networkctl' -'neutron' '_openstack' -'new' '_mh' -'newgrp' '_groups' -'next' '_mh' -'nginx' '_nginx' -'ngrep' '_ngrep' -'nice' '_nice' -'ninja' '_ninja' -'nkf' '_nkf' -'nl' '_nl' -'nm' '_nm' -'nmap' '_nmap' -'nmblookup' '_samba' -'nmcli' '_networkmanager' -'nocorrect' '_precommand' -'noglob' '_precommand' -'nohup' '_precommand' -'notmuch' '_notmuch' -'nova' '_openstack' -'npm' '_npm' -'ns' '_hosts' -'nslookup' '_nslookup' -'ntalk' '_other_accounts' -'numfmt' '_numfmt' -'nvim' '_vim' -'objdump' '_objdump' -'od' '_od' -'ogg123' '_vorbis' -'oggdec' '_vorbis' -'oggenc' '_vorbis' -'ogginfo' '_vorbis' -'oksh' '_sh' -'okular' '_okular' -'openstack' '_openstack' -'opera' '_webbrowser' -'opera-next' '_webbrowser' -'opkg' '_opkg' -'p4' '_perforce' -'p4d' '_perforce' -'pacat' '_pulseaudio' -'pack' '_pack' -'packf' '_mh' -'pacman' '_pacman' -'pacman-key' '_pacman' -'pacman.static' '_pacman' -'pacmd' '_pulseaudio' -'pactl' '_pulseaudio' -'padsp' '_pulseaudio' -'pandoc' '_pandoc' -'paplay' '_pulseaudio' -'-parameter-' '_parameter' -'parec' '_pulseaudio' -'parecord' '_pulseaudio' -'pass' '_pass' -'passwd' '_users' -'paste' '_paste' -'pasuspender' '_pulseaudio' -'patch' '_patch' -'pax' '_pax' -'pcat' '_pack' -'pcred' '_pids' -'pdf2dsc' '_pdf' -'pdf2ps' '_pdf' -'pdffonts' '_pdf' -'pdfimages' '_pdf' -'pdfinfo' '_pdf' -'pdfjadetex' '_tex' -'pdflatex' '_tex' -'pdfopt' '_pdf' -'pdftex' '_tex' -'pdftexi2dvi' '_texinfo' -'pdftk' '_pdftk' -'pdftopbm' '_pdf' -'pdftops' '_pdf' -'pdftotext' '_pdf' -'pdksh' '_sh' -'perl' '_perl' -'perldoc' '_perldoc' -'pfiles' '_pids' -'pflags' '_pids' -'pg_config' '_postgresql' -'pg_ctl' '_postgresql' -'pg_dump' '_postgresql' -'pg_dumpall' '_postgresql' -'pg_isready' '_postgresql' -'pgrep' '_pgrep' -'pg_restore' '_postgresql' -'pg_upgrade' '_postgresql' -'php' '_php' -'pick' '_mh' -'picocom' '_picocom' -'pidof' '_pidof' -'pidstat' '_sysstat' -'pigz' '_gzip' -'pine' '_pine' -'pinef' '_pine' -'pinfo' '_texinfo' -'ping' '_ping' -'ping6' '_ping' -'pkgadd' '_pkgadd' -'pkg-config' '_pkg-config' -'pkgfile' '_pkgfile' -'pkginfo' '_pkginfo' -'pkgrm' '_pkgrm' -'pkill' '_pgrep' -'pldd' '_pids' -'pmake' '_make' -'pman' '_perl_modules' -'pmap' '_pmap' -'pmcat' '_perl_modules' -'pmdesc' '_perl_modules' -'pmeth' '_perl_modules' -'pmexp' '_perl_modules' -'pmfunc' '_perl_modules' -'pmload' '_perl_modules' -'pmls' '_perl_modules' -'pmpath' '_perl_modules' -'pmvers' '_perl_modules' -'podgrep' '_perl_modules' -'podpath' '_perl_modules' -'podtoc' '_perl_modules' -'poff' '_pon' -'policytool' '_java' -'polybar' '_polybar' -'polybar-msg' '_polybar_msg' -'pon' '_pon' -'popd' '_directory_stack' -'postconf' '_postfix' -'postgres' '_postgresql' -'postmaster' '_postgresql' -'postqueue' '_postfix' -'postsuper' '_postfix' -'prev' '_mh' -'print' '_print' -'printenv' '_printenv' -'printf' '_print' -'prompt' '_prompt' -'prove' '_prove' -'prs' '_sccs' -'prt' '_sccs' -'prun' '_pids' -'ps' '_ps' -'ps2ascii' '_pspdf' -'ps2epsi' '_postscript' -'ps2pdf' '_postscript' -'ps2pdf12' '_postscript' -'ps2pdf13' '_postscript' -'ps2pdf14' '_postscript' -'ps2pdfwr' '_postscript' -'ps2ps' '_postscript' -'psbook' '_psutils' -'psed' '_sed' -'psig' '_pids' -'psmerge' '_psutils' -'psmulti' '_postscript' -'psnup' '_psutils' -'psql' '_postgresql' -'psresize' '_psutils' -'psselect' '_psutils' -'pstack' '_pids' -'pstoedit' '_pspdf' -'pstop' '_pids' -'pstops' '_psutils' -'pstotgif' '_pspdf' -'pswrap' '_postscript' -'pulseaudio' '_pulseaudio' -'pump' '_pump' -'pushd' '_cd' -'pv' '_pv' -'pwait' '_pids' -'pwdx' '_pids' -'pwgen' '_pwgen' -'pyhtmlizer' '_twisted' -'qdbus' '_qdbus' -'qiv' '_qiv' -'qpdf' '_qpdf' -'quilt' '_quilt' -'r' '_fc' -'rake' '_rake' -'ranlib' '_ranlib' -'rar' '_rar' -'rc' '_sh' -'_rclone' '_rclone' -'rclone' '_rclone' -'rcp' '_rlogin' -'rcs' '_rcs' -'rcsdiff' '_rcs' -'rdesktop' '_rdesktop' -'read' '_read' -'readelf' '_readelf' -'readlink' '_readlink' -'readonly' '_typeset' -'-redirect-' '_redirect' -'-redirect-,<,bunzip2' '_bzip2' -'-redirect-,<,bzip2' '_bzip2' -'-redirect-,>,bzip2' '_bzip2' -'-redirect-,<,compress' '_compress' -'-redirect-,>,compress' '_compress' -'-redirect-,-default-,-default-' '_files' -'-redirect-,<,gunzip' '_gzip' -'-redirect-,<,gzip' '_gzip' -'-redirect-,>,gzip' '_gzip' -'-redirect-,<,uncompress' '_compress' -'-redirect-,<,unxz' '_xz' -'-redirect-,<,xz' '_xz' -'-redirect-,>,xz' '_xz' -'refile' '_mh' -'rehash' '_hash' -'reindexdb' '_postgresql' -'reload' '_initctl' -'remsh' '_rlogin' -'renice' '_renice' -'repl' '_mh' -'resolvectl' '_resolvectl' -'restart' '_initctl' -'retawq' '_webbrowser' -'rg' '_rg' -'rgview' '_vim' -'rgvim' '_vim' -'ri' '_ri' -'rlogin' '_rlogin' -'rm' '_rm' -'rmd160' '_cksum' -'rmdel' '_sccs' -'rmdir' '_rmdir' -'rmf' '_mh' -'rmic' '_java' -'rmid' '_java' -'rmiregistry' '_java' -'rmm' '_mh' -'rmmod' '_modutils' -'route' '_route' -'rrdtool' '_rrdtool' -'rsh' '_rlogin' -'rsync' '_rsync' -'rtin' '_tin' -'rubber' '_rubber' -'rubber-info' '_rubber' -'rubber-pipe' '_rubber' -'ruby' '_ruby' -'ruby-mri' '_ruby' -'run-help' '_run-help' -'rup' '_hosts' -'rusage' '_precommand' -'rview' '_vim' -'rvim' '_vim' -'rwho' '_hosts' -'rxvt' '_urxvt' -'s2p' '_sed' -'sact' '_sccs' -'sadf' '_sysstat' -'sahara' '_openstack' -'sar' '_sysstat' -'scan' '_mh' -'sccs' '_sccs' -'sccsdiff' '_sccs' -'sched' '_sched' -'schedtool' '_schedtool' -'scons' '_scons' -'scp' '_ssh' -'screen' '_screen' -'script' '_script' -'scriptreplay' '_script' -'seaf-cli' '_seafile' -'sed' '_sed' -'senlin' '_openstack' -'seq' '_seq' -'serialver' '_java' -'service' '_service' -'set' '_set' -'setfacl' '_setfacl' -'setfacl.exe' '_setfacl' -'setfattr' '_attr' -'setopt' '_setopt' -'setsid' '_setsid' -'setxkbmap' '_setxkbmap' -'sftp' '_ssh' -'sh' '_sh' -'sha1' '_cksum' -'sha1sum' '_md5sum' -'sha224sum' '_md5sum' -'sha256' '_cksum' -'sha256sum' '_md5sum' -'sha384' '_cksum' -'sha384sum' '_md5sum' -'sha512' '_cksum' -'sha512sum' '_md5sum' -'sha512t256' '_cksum' -'shasum' '_shasum' -'shell-script' '_bootctl' -'shift' '_arrays' -'show' '_mh' -'showchar' '_psutils' -'showmount' '_showmount' -'shred' '_shred' -'shuf' '_shuf' -'shutdown' '_shutdown' -'sisu' '_sisu' -'skein1024' '_cksum' -'skein256' '_cksum' -'skein512' '_cksum' -'skipstone' '_webbrowser' -'slabtop' '_slabtop' -'slitex' '_tex' -'slocate' '_locate' -'slogin' '_ssh' -'slrn' '_slrn' -'smartctl' '_smartmontools' -'smbclient' '_samba' -'smbcontrol' '_samba' -'smbstatus' '_samba' -'soa' '_hosts' -'socket' '_socket' -'sort' '_sort' -'sortm' '_mh' -'source' '_source' -'spamassassin' '_spamassassin' -'split' '_split' -'splitdiff' '_patchutils' -'sqlite' '_sqlite' -'sqlite3' '_sqlite' -'sqsh' '_sqsh' -'sr' '_surfraw' -'srptool' '_gnutls' -'ss' '_ss' -'ssh' '_ssh' -'ssh-add' '_ssh' -'ssh-agent' '_ssh' -'ssh-copy-id' '_ssh' -'sshfs' '_sshfs' -'ssh-keygen' '_ssh' -'ssh-keyscan' '_ssh' -'star' '_tar' -'start' '_initctl' -'stat' '_stat' -'status' '_initctl' -'stdbuf' '_stdbuf' -'stg' '_stgit' -'stop' '_initctl' -'stow' '_stow' -'strace' '_strace' -'strace64' '_strace' -'strftime' '_strftime' -'strings' '_strings' -'strip' '_strip' -'strongswan' '_ipsec' -'stty' '_stty' -'su' '_su' -'subl' '_sublimetext' -'-subscript-' '_subscript' -'sudo' '_sudo' -'sudoedit' '_sudo' -'sum' '_cksum' -'surfraw' '_surfraw' -'sv' '_runit' -'svn' '_subversion' -'svnadmin' '_subversion' -'svnadmin-static' '_subversion' -'svnlite' '_subversion' -'swaks' '_swaks' -'swanctl' '_swanctl' -'swift' '_swift' -'swiftc' '_swift' -'sync' '_nothing' -'sysctl' '_sysctl' -'systemctl' '_systemctl' -'systemd-analyze' '_systemd-analyze' -'systemd-ask-password' '_systemd' -'systemd-cat' '_systemd' -'systemd-cgls' '_systemd' -'systemd-cgtop' '_systemd' -'systemd-delta' '_systemd-delta' -'systemd-detect-virt' '_systemd' -'systemd-inhibit' '_systemd-inhibit' -'systemd-machine-id-setup' '_systemd' -'systemd-notify' '_systemd' -'systemd-nspawn' '_systemd-nspawn' -'systemd-resolve' '_resolvectl' -'systemd-run' '_systemd-run' -'systemd-tmpfiles' '_systemd-tmpfiles' -'systemd-tty-ask-password-agent' '_systemd' -'tac' '_tac' -'tacker' '_openstack' -'tail' '_tail' -'talk' '_other_accounts' -'tar' '_tar' -'tardy' '_tardy' -'tcpdump' '_tcpdump' -'tcp_open' '_tcpsys' -'tcptraceroute' '_tcptraceroute' -'tcsh' '_sh' -'tda' '_devtodo' -'tdd' '_devtodo' -'tde' '_devtodo' -'tdmctl' '_tdmctl' -'tdr' '_devtodo' -'tee' '_tee' -'telnet' '_telnet' -'tex' '_tex' -'texi2any' '_texinfo' -'texi2dvi' '_texinfo' -'texi2pdf' '_texinfo' -'texindex' '_texinfo' -'tg' '_topgit' -'tidy' '_tidy' -'tig' '_git' -'-tilde-' '_tilde' -'time' '_precommand' -'timedatectl' '_timedatectl' -'timeout' '_timeout' -'times' '_nothing' -'tin' '_tin' -'tkconch' '_twisted' -'tkinfo' '_texinfo' -'tla' '_tla' -'tload' '_tload' -'tmux' '_tmux' -'todo' '_devtodo' -'todo.sh' '_todo.sh' -'toilet' '_toilet' -'top' '_top' -'totdconfig' '_totd' -'touch' '_touch' -'tpb' '_tpb' -'tput' '_tput' -'tr' '_tr' -'tracepath' '_tracepath' -'tracepath6' '_tracepath' -'traceroute' '_hosts' -'transmission-remote' '_transmission' -'trap' '_trap' -'tree' '_tree' -'trial' '_twisted' -'trove' '_openstack' -'true' '_nothing' -'truss' '_truss' -'tryaffix' '_ispell' -'tty' '_tty' -'ttyctl' '_ttyctl' -'tunctl' '_uml' -'tune2fs' '_tune2fs' -'tunes2pod' '_gnupod' -'tunes2pod.pl' '_gnupod' -'twidge' '_twidge' -'twist' '_twisted' -'twistd' '_twisted' -'txt' '_hosts' -'type' '_which' -'typeset' '_typeset' -'udevadm' '_udevadm' -'ulimit' '_ulimit' -'uml_mconsole' '_uml' -'uml_moo' '_uml' -'uml_switch' '_uml' -'umount' '_mount' -'unace' '_unace' -'unalias' '_aliases' -'uname' '_uname' -'uncompress' '_compress' -'unexpand' '_unexpand' -'unfunction' '_functions' -'unget' '_sccs' -'unhash' '_unhash' -'uniq' '_uniq' -'unison' '_unison' -'units' '_units' -'unix2dos' '_dos2unix' -'unix2mac' '_dos2unix' -'unlimit' '_limits' -'unlz4' '_lz4' -'unlzma' '_xz' -'unpack' '_pack' -'unpigz' '_gzip' -'unrar' '_rar' -'unset' '_vars' -'unsetopt' '_setopt' -'unwrapdiff' '_patchutils' -'unxz' '_xz' -'unzip' '_zip' -'uptime' '_uptime' -'urxvt' '_urxvt' -'urxvt256c' '_urxvt' -'urxvt256cc' '_urxvt' -'urxvt256c-ml' '_urxvt' -'urxvt256c-mlc' '_urxvt' -'urxvtc' '_urxvt' -'useradd' '_user_admin' -'userdel' '_users' -'usermod' '_user_admin' -'vacuumdb' '_postgresql' -'val' '_sccs' -'valgrind' '_valgrind' -'-value-' '_value' -'-value-,ADB_TRACE,-default-' '_adb' -'-value-,ANDROID_LOG_TAGS,-default-' '_adb' -'-value-,ANDROID_SERIAL,-default-' '_adb' -'-value-,ANSIBLE_STDOUT_CALLBACK,-default-' '_ansible' -'-value-,ANT_ARGS,-default-' '_ant' -'-value-,CFLAGS,-default-' '_gcc' -'-value-,CPPFLAGS,-default-' '_gcc' -'-value-,CXXFLAGS,-default-' '_gcc' -'-value-,-default-,-command-' '_zargs' -'-value-,-default-,-default-' '_value' -'-value-,DISPLAY,-default-' '_x_display' -'-value-,GREP_OPTIONS,-default-' '_grep' -'-value-,GZIP,-default-' '_gzip' -'-value-,LANG,-default-' '_locales' -'-value-,LANGUAGE,-default-' '_locales' -'-value-,LD_DEBUG,-default-' '_ld_debug' -'-value-,LDFLAGS,-default-' '_gcc' -'-value-,LESSCHARSET,-default-' '_less' -'-value-,LESS,-default-' '_less' -'-value-,LOOPDEV_DEBUG,-default-' '_losetup' -'-value-,LPDEST,-default-' '_printers' -'-value-,MPD_HOST,-default' '_mpc' -'-value-,P4CLIENT,-default-' '_perforce' -'-value-,P4MERGE,-default-' '_perforce' -'-value-,P4PORT,-default-' '_perforce' -'-value-,P4USER,-default-' '_perforce' -'-value-,PERLDOC,-default-' '_perldoc' -'-value-,PRINTER,-default-' '_printers' -'-value-,PROMPT2,-default-' '_ps1234' -'-value-,PROMPT3,-default-' '_ps1234' -'-value-,PROMPT4,-default-' '_ps1234' -'-value-,PROMPT,-default-' '_ps1234' -'-value-,PS1,-default-' '_ps1234' -'-value-,PS2,-default-' '_ps1234' -'-value-,PS3,-default-' '_ps1234' -'-value-,PS4,-default-' '_ps1234' -'-value-,RPROMPT2,-default-' '_ps1234' -'-value-,RPROMPT,-default-' '_ps1234' -'-value-,RPS1,-default-' '_ps1234' -'-value-,RPS2,-default-' '_ps1234' -'-value-,SPROMPT,-default-' '_ps1234' -'-value-,TERM,-default-' '_terminals' -'-value-,TERMINFO_DIRS,-default-' '_dir_list' -'-value-,TZ,-default-' '_time_zone' -'-value-,VALGRIND_OPTS,-default-' '_valgrind' -'-value-,WWW_HOME,-default-' '_urls' -'-value-,XML_CATALOG_FILES,-default-' '_xmlsoft' -'-value-,XZ_DEFAULTS,-default-' '_xz' -'-value-,XZ_OPT,-default-' '_xz' -'-vared-' '_in_vared' -'vared' '_vared' -'vcsh' '_vcsh' -'vifm' '_vifm' -'vim' '_vim' -'vimdiff' '_vim' -'virsh' '_libvirt' -'virt-admin' '_libvirt' -'virt-host-validate' '_libvirt' -'virt-pki-validate' '_libvirt' -'virt-xml-validate' '_libvirt' -'visudo' '_visudo' -'vitrage' '_openstack' -'vmstat' '_vmstat' -'vncserver' '_vnc' -'vncviewer' '_vnc' -'vorbiscomment' '_vorbis' -'vpnc' '_vpnc' -'vpnc-connect' '_vpnc' -'vserver' '_vserver' -'w' '_w' -'w3m' '_w3m' -'wait' '_wait' -'watch' '_watch' -'watcher' '_openstack' -'wc' '_wc' -'wget' '_wget' -'what' '_sccs' -'whatis' '_man' -'whence' '_which' -'where' '_which' -'whereis' '_whereis' -'which' '_which' -'who' '_who' -'whoami' '_nothing' -'whois' '_whois' -'whom' '_mh' -'wiggle' '_wiggle' -'wipefs' '_wipefs' -'wodim' '_cdrecord' -'wpa_cli' '_wpa_cli' -'write' '_users_on' -'www' '_webbrowser' -'xargs' '_xargs' -'xattr' '_attr' -'xauth' '_xauth' -'xautolock' '_xautolock' -'xclip' '_xclip' -'xdpyinfo' '_x_utils' -'xdvi' '_xdvi' -'xelatex' '_tex' -'xetex' '_tex' -'xev' '_x_utils' -'xfd' '_x_utils' -'xfig' '_xfig' -'xfontsel' '_x_utils' -'xfreerdp' '_rdesktop' -'xhost' '_x_utils' -'xkill' '_x_utils' -'xli' '_xloadimage' -'xloadimage' '_xloadimage' -'xlsatoms' '_x_utils' -'xlsclients' '_x_utils' -'xml' '_xmlstarlet' -'xmllint' '_xmlsoft' -'xmlstarlet' '_xmlstarlet' -'xmms2' '_xmms2' -'xmodmap' '_xmodmap' -'xmosaic' '_webbrowser' -'xon' '_x_utils' -'xournal' '_xournal' -'xpdf' '_xpdf' -'xping' '_hosts' -'xprop' '_x_utils' -'xrandr' '_xrandr' -'xrdb' '_x_utils' -'xscreensaver-command' '_xscreensaver' -'xset' '_xset' -'xsetbg' '_xloadimage' -'xsetroot' '_x_utils' -'xsltproc' '_xmlsoft' -'xterm' '_xterm' -'xtightvncviewer' '_vnc' -'xtp' '_imagemagick' -'xv' '_xv' -'xview' '_xloadimage' -'xvnc4viewer' '_vnc' -'xvncviewer' '_vnc' -'xwd' '_x_utils' -'xwininfo' '_x_utils' -'xwit' '_xwit' -'xwud' '_x_utils' -'xxd' '_xxd' -'xz' '_xz' -'xzcat' '_xz' -'yafc' '_yafc' -'yash' '_sh' -'yay' '_yay' -'youtube-dl' '_youtube-dl' -'ypbind' '_yp' -'ypcat' '_yp' -'ypmatch' '_yp' -'yppasswd' '_yp' -'yppoll' '_yp' -'yppush' '_yp' -'ypserv' '_yp' -'ypset' '_yp' -'ypwhich' '_yp' -'ypxfr' '_yp' -'ytalk' '_other_accounts' -'zargs' '_zargs' -'zathura' '_zathura' -'zcalc' '_zcalc' -'-zcalc-line-' '_zcalc_line' -'zcat' '_zcat' -'zcompile' '_zcompile' -'zcp' '_zmv' -'zdelattr' '_zattr' -'zdump' '_zdump' -'zeal' '_zeal' -'zed' '_zed' -'zegrep' '_grep' -'zen' '_webbrowser' -'zf_chgrp' '_chown' -'zf_chmod' '_chmod' -'zf_chown' '_chown' -'zfgrep' '_grep' -'zf_ln' '_ln' -'zf_mkdir' '_mkdir' -'zf_mv' '_mv' -'zf_rm' '_rm' -'zf_rmdir' '_rmdir' -'zfs' '_zfs' -'zgetattr' '_zattr' -'zgrep' '_grep' -'zip' '_zip' -'zipinfo' '_zip' -'zle' '_zle' -'zlistattr' '_zattr' -'zln' '_zmv' -'zmail' '_mail' -'zmodload' '_zmodload' -'zmv' '_zmv' -'zone' '_hosts' -'zparseopts' '_zparseopts' -'zpool' '_zpool' -'zpty' '_zpty' -'zsetattr' '_zattr' -'zsh' '_zsh' -'zsh-mime-handler' '_zsh-mime-handler' -'zsocket' '_zsocket' -'zstat' '_stat' -'zstyle' '_zstyle' -'ztodo' '_ztodo' -'zun' '_openstack' -'zxpdf' '_xpdf' -) - -_services=( -'bzcat' 'bunzip2' -'gchgrp' 'chgrp' -'gchown' 'chown' -'gnupod_addsong.pl' 'gnupod_addsong' -'gnupod_check.pl' 'gnupod_check' -'gnupod_INIT.pl' 'gnupod_INIT' -'gnupod_search.pl' 'gnupod_search' -'gpg2' 'gpg' -'gzcat' 'gunzip' -'iceweasel' 'firefox' -'lzcat' 'unxz' -'lzma' 'xz' -'Mail' 'mail' -'mailx' 'mail' -'mesonconf' 'meson-configure' -'mesonintrospect' 'meson-introspect' -'mesontest' 'meson-test' -'mktunes.pl' 'mktunes' -'nail' 'mail' -'ncl' 'nc' -'nedit-nc' 'nc' -'pacman.static' 'pacman' -'pcat' 'unpack' -'-redirect-,<,bunzip2' 'bunzip2' -'-redirect-,<,bzip2' 'bzip2' -'-redirect-,>,bzip2' 'bunzip2' -'-redirect-,<,compress' 'compress' -'-redirect-,>,compress' 'uncompress' -'-redirect-,<,gunzip' 'gunzip' -'-redirect-,<,gzip' 'gzip' -'-redirect-,>,gzip' 'gunzip' -'-redirect-,<,uncompress' 'uncompress' -'-redirect-,<,unxz' 'unxz' -'-redirect-,<,xz' 'xz' -'-redirect-,>,xz' 'unxz' -'remsh' 'rsh' -'slogin' 'ssh' -'svnadmin-static' 'svnadmin' -'svnlite' 'svn' -'tunes2pod.pl' 'tunes2pod' -'unlzma' 'unxz' -'xelatex' 'latex' -'xetex' 'tex' -'xzcat' 'unxz' -'zf_chgrp' 'chgrp' -'zf_chown' 'chown' -) - -_patcomps=( -'*/(init|rc[0-9S]#).d/*' '_init_d' -'notmuch-*' '_notmuch' -) - -_postpatcomps=( -'c++-*' '_gcc' -'g++-*' '_gcc' -'gcc-*' '_gcc' -'gem[0-9.]#' '_gem' -'lua[0-9.-]##' '_lua' -'(p[bgpn]m*|*top[bgpn]m)' '_pbm' -'php[0-9.-]' '_php' -'pydoc[0-9.]#' '_pydoc' -'python[0-9.]#' '_python' -'qemu(|-system-*)' '_qemu' -'(ruby|[ei]rb)[0-9.]#' '_ruby' -'shasum(|5).*' '_shasum' -'(texi(2*|ndex))' '_texi' -'(tiff*|*2tiff|pal2rgb)' '_tiff' -'-value-,(ftp|http(|s))_proxy,-default-' '_urls' -'-value-,LC_*,-default-' '_locales' -'-value-,*path,-default-' '_directories' -'-value-,*PATH,-default-' '_dir_list' -'-value-,RUBY(LIB|OPT|PATH),-default-' '_ruby' -'*/X11(|R<4->)/*' '_x_arguments' -'yodl(|2*)' '_yodl' -'zf*' '_zftp' -) - -_compautos=( -'_call_program' '+X' -) - -zle -C _bash_complete-word .complete-word _bash_completions -zle -C _bash_list-choices .list-choices _bash_completions -zle -C _complete_debug .complete-word _complete_debug -zle -C _complete_help .complete-word _complete_help -zle -C _complete_tag .complete-word _complete_tag -zle -C _correct_filename .complete-word _correct_filename -zle -C _correct_word .complete-word _correct_word -zle -C _expand_alias .complete-word _expand_alias -zle -C _expand_word .complete-word _expand_word -zle -C _history-complete-newer .complete-word _history_complete_word -zle -C _history-complete-older .complete-word _history_complete_word -zle -C _list_expansions .list-choices _expand_word -zle -C _most_recent_file .complete-word _most_recent_file -zle -C _next_tags .list-choices _next_tags -zle -C _read_comp .complete-word _read_comp -bindkey '^X^R' _read_comp -bindkey '^X?' _complete_debug -bindkey '^XC' _correct_filename -bindkey '^Xa' _expand_alias -bindkey '^Xc' _correct_word -bindkey '^Xd' _list_expansions -bindkey '^Xe' _expand_word -bindkey '^Xh' _complete_help -bindkey '^Xm' _most_recent_file -bindkey '^Xn' _next_tags -bindkey '^Xt' _complete_tag -bindkey '^X~' _bash_list-choices -bindkey '^[,' _history-complete-newer -bindkey '^[/' _history-complete-older -bindkey '^[~' _bash_complete-word - -autoload -Uz _fast-theme _alacritty _bootctl _bspc _busctl \ - _cmus _coredumpctl _curl _email-notmuch _exa \ - _flatpak _hostnamectl _journalctl _kernel-install _kitty \ - _libinput _localectl _loginctl _machinectl _meson \ - _mkinitcpio _mpv _networkctl _ninja _notmuch \ - _pacman _pass _pkgfile _polybar _polybar_msg \ - _pulseaudio _qpdf _rclone _resolvectl _rg \ - _sd_hosts_or_user_at_host _sd_machines _sd_outputmodes _sd_unit_files _systemctl \ - _systemd _systemd-analyze _systemd-delta _systemd-inhibit _systemd-nspawn \ - _systemd-run _systemd-tmpfiles _tdmctl _timedatectl _udevadm \ - _vifm _yay _youtube-dl _zathura _cdr \ - _all_labels _all_matches _alternative _approximate _arg_compile \ - _arguments _bash_completions _cache_invalid _call_function _combination \ - _complete _complete_debug _complete_help _complete_help_generic _complete_tag \ - _comp_locale _correct _correct_filename _correct_word _describe \ - _description _dispatch _expand _expand_alias _expand_word \ - _extensions _external_pwds _generic _guard _history \ - _history_complete_word _ignored _list _main_complete _match \ - _menu _message _most_recent_file _multi_parts _next_label \ - _next_tags _normal _nothing _oldlist _pick_variant \ - _prefix _read_comp _regex_arguments _regex_words _requested \ - _retrieve_cache _sep_parts _sequence _set_command _setup \ - _store_cache _sub_commands _tags _user_expand _values \ - _wanted _acpi _acpitool _alsa-utils _analyseplugin \ - _brctl _btrfs _chattr _chcon _chrt \ - _cpupower _cryptsetup _dkms _e2label _ethtool \ - _findmnt _free _fuse_arguments _fusermount _fuse_values \ - _gpasswd _htop _iconvconfig _ionice _ipset \ - _iptables _iwconfig _kpartx _losetup _lsattr \ - _lsblk _lsusb _ltrace _mdadm _mii-tool \ - _modutils _mondo _networkmanager _opkg _pidof \ - _pmap _qdbus _schedtool _selinux_contexts _selinux_roles \ - _selinux_types _selinux_users _setsid _slabtop _ss \ - _sshfs _strace _sysstat _tload _tpb \ - _tracepath _tune2fs _uml _valgrind _vserver \ - _wakeup_capable_devices _wipefs _wpa_cli _a2ps _aap \ - _abcde _absolute_command_paths _ack _adb _ansible \ - _ant _antiword _apachectl _apm _arch_archives \ - _arch_namespace _arp _arping _asciidoctor _asciinema \ - _at _attr _augeas _avahi _awk \ - _base64 _basename _bash _baudrates _baz \ - _beep _bibtex _bind_addresses _bison _bittorrent \ - _bogofilter _bpf_filters _bpython _bzip2 _bzr \ - _cabal _cal _calendar _canonical_paths _cat \ - _ccal _cdcd _cdrdao _cdrecord _chkconfig \ - _chmod _chown _chroot _chsh _cksum \ - _clay _cmdambivalent _cmdstring _cmp _column \ - _comm _composer _compress _configure _cowsay \ - _cp _cpio _cplay _crontab _cscope \ - _cssh _ctags_tags _curl _cut _cvs \ - _darcs _date _date_formats _dates _dbus \ - _dconf _dd _devtodo _df _dhclient \ - _dict _dict_words _diff _diff3 _diff_options \ - _diffstat _dig _directories _dir_list _django \ - _dmesg _dmidecode _dns_types _doas _domains \ - _dos2unix _drill _dsh _dtruss _du \ - _dvi _ecasound _ed _elfdump _elinks \ - _email_addresses _enscript _entr _env _espeak \ - _etags _fakeroot _feh _fetchmail _ffmpeg \ - _figlet _file_modes _files _file_systems _find \ - _find_net_interfaces _finger _flac _flex _fmt \ - _fold _fortune _fsh _fuser _gcc \ - _gcore _gdb _gem _genisoimage _getconf \ - _getent _getfacl _getmail _getopt _ghostscript \ - _git _global _global_tags _gnu_generic _gnupod \ - _gnutls _go _gpg _gphoto2 _gprof \ - _gradle _graphicsmagick _grep _groff _groups \ - _growisofs _gsettings _guilt _gzip _have_glob_qual \ - _head _hexdump _host _hostname _hosts \ - _iconv _id _ifconfig _iftop _imagemagick \ - _initctl _init_d _install _iostat _ip \ - _ipsec _irssi _ispell _java _java_class \ - _joe _join _jq _killall _knock \ - _kvno _last _ldconfig _ldd _ld_debug \ - _less _lha _libvirt _links _list_files \ - _lldb _ln _loadkeys _locale _localedef \ - _locales _locate _look _lp _ls \ - _lsof _lua _luarocks _lynx _lz4 \ - _lzop _mail _mailboxes _make _man \ - _md5sum _mencal _mh _mime_types _mkdir \ - _mkfifo _mknod _mktemp _module _monotone \ - _moosic _mosh _mount _mpc _mt \ - _mtools _mtr _mutt _mv _my_accounts \ - _myrepos _mysqldiff _mysql_utils _ncftp _netcat \ - _net_interfaces _netstat _newsgroups _nginx _ngrep \ - _nice _nkf _nl _nm _nmap \ - _npm _nslookup _numfmt _objdump _object_files \ - _od _openstack _other_accounts _pack _pandoc \ - _paste _patch _patchutils _path_commands _path_files \ - _pax _pbm _pdf _perforce _perl \ - _perl_basepods _perldoc _perl_modules _pgrep _php \ - _picocom _pids _pine _ping _pkgadd \ - _pkg-config _pkginfo _pkg_instance _pkgrm _pon \ - _ports _postfix _postgresql _postscript _printenv \ - _printers _process_names _prove _ps _pspdf \ - _psutils _pump _pv _pwgen _pydoc \ - _python _python_modules _qemu _quilt _rake \ - _ranlib _rar _rclone _rcs _readelf \ - _readlink _remote_files _renice _ri _rlogin \ - _rm _rmdir _route _rrdtool _rsync \ - _rubber _ruby _runit _samba _sccs \ - _scons _screen _script _seafile _sed \ - _seq _service _services _setfacl _sh \ - _shasum _showmount _shred _shuf _shutdown \ - _signals _sisu _slrn _smartmontools _socket \ - _sort _spamassassin _split _sqlite _sqsh \ - _ssh _ssh_hosts _stat _stdbuf _stgit \ - _stow _strings _strip _stty _su \ - _subversion _sudo _surfraw _swaks _swanctl \ - _swift _sys_calls _sysctl _tac _tail \ - _tar _tar_archive _tardy _tcpdump _tcptraceroute \ - _tee _telnet _terminals _tex _texi \ - _texinfo _tidy _tiff _tilde_files _timeout \ - _time_zone _tin _tla _tmux _todo.sh \ - _toilet _top _topgit _totd _touch \ - _tput _tr _transmission _tree _truss \ - _tty _ttys _twidge _twisted _umountable \ - _unace _uname _unexpand _uniq _unison \ - _units _uptime _urls _user_admin _user_at_host \ - _users _users_on _vcsh _vim _visudo \ - _vmstat _vorbis _vpnc _w _w3m \ - _watch _wc _webbrowser _wget _whereis \ - _who _whois _wiggle _xargs _xmlsoft \ - _xmlstarlet _xmms2 _xxd _xz _yafc \ - _yodl _yp _zcat _zdump _zfs \ - _zfs_dataset _zfs_keysource_props _zfs_pool _zip _zpool \ - _zsh _acroread _code _dcop _eog \ - _evince _geany _gnome-gv _gqview _gv \ - _kdeconnect _kfmclient _matlab _mozilla _mplayer \ - _mupdf _nautilus _nedit _netscape _okular \ - _pdftk _qiv _rdesktop _setxkbmap _sublimetext \ - _urxvt _vnc _x_arguments _xauth _xautolock \ - _x_borderwidth _xclip _x_color _x_colormapid _x_cursor \ - _x_display _xdvi _x_extension _xfig _x_font \ - _xft_fonts _x_geometry _x_keysym _xloadimage _x_locale \ - _x_modifier _xmodmap _x_name _xournal _xpdf \ - _xrandr _x_resource _xscreensaver _x_selection_timeout _xset \ - _xt_arguments _xterm _x_title _xt_session_id _x_utils \ - _xv _x_visual _x_window _xwit _zeal \ - _add-zle-hook-widget _add-zsh-hook _alias _aliases _arrays \ - _assign _autocd _bindkey _brace_parameter _builtin \ - _cd _command _command_names _compadd _compdef \ - _completers _condition _default _delimiters _directory_stack \ - _dirs _disable _dynamic_directory_name _echotc _echoti \ - _emulate _enable _equal _exec _fc \ - _file_descriptors _first _functions _globflags _globqual_delims \ - _globquals _hash _history_modifiers _in_vared _jobs \ - _jobs_bg _jobs_builtin _jobs_fg _kill _limit \ - _limits _math _math_params _mere _module_math_func \ - _options _options_set _options_unset _parameter _parameters \ - _precommand _print _prompt _ps1234 _read \ - _redirect _run-help _sched _set _setopt \ - _source _strftime _subscript _suffix_alias_files _tcpsys \ - _tilde _trap _ttyctl _typeset _ulimit \ - _unhash _user_math_func _value _vared _vars \ - _wait _which _widgets _zargs _zattr \ - _zcalc _zcalc_line _zcompile _zed _zftp \ - _zle _zmodload _zmv _zparseopts _zpty \ - _zsh-mime-handler _zsocket _zstyle _ztodo -autoload -Uz +X _call_program - -typeset -gUa _comp_assocs -_comp_assocs=( '' ) - -#omz revision: 94e784360e2ad34faa6a4a648c67a5c6ed6c987f -#omz fpath: /home/ziro/.local/share/oh-my-zsh/custom/plugins/zsh-autosuggestions /home/ziro/.local/share/oh-my-zsh/custom/plugins/fast-syntax-highlighting /home/ziro/.local/share/oh-my-zsh/plugins/git /home/ziro/.local/share/oh-my-zsh/functions /home/ziro/.local/share/oh-my-zsh/completions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh/functions/Calendar /usr/share/zsh/functions/Chpwd /usr/share/zsh/functions/Completion /usr/share/zsh/functions/Completion/Base /usr/share/zsh/functions/Completion/Linux /usr/share/zsh/functions/Completion/Unix /usr/share/zsh/functions/Completion/X /usr/share/zsh/functions/Completion/Zsh /usr/share/zsh/functions/Exceptions /usr/share/zsh/functions/Math /usr/share/zsh/functions/MIME /usr/share/zsh/functions/Misc /usr/share/zsh/functions/Newuser /usr/share/zsh/functions/Prompts /usr/share/zsh/functions/TCP /usr/share/zsh/functions/VCS_Info /usr/share/zsh/functions/VCS_Info/Backends /usr/share/zsh/functions/Zftp /usr/share/zsh/functions/Zle diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dea2d4f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.zcompdump From bfb3ded59c5825bb70ac21979f775bff854630a8 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 30 Mar 2024 05:38:37 +0700 Subject: [PATCH 022/126] chore: Migrate from TDM to TBSM --- .config/xinitrc | 3 ++- .config/zsh/.zprofile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/xinitrc b/.config/xinitrc index bdfaf97..deef614 100644 --- a/.config/xinitrc +++ b/.config/xinitrc @@ -2,5 +2,6 @@ [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/xprofile" if [[ "$OSTYPE" == "linux-gnu" ]]; then - exec tdm --xstart + # exec tdm --xstart + [[ -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && exec tbsm fi diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index d921174..d60ed2f 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -5,7 +5,7 @@ #fi if [[ "$OSTYPE" == "linux-gnu"* ]]; then - bash /usr/bin/tdm + [[ -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && bash /usr/bin/tbsm [[ -f ~/.zshrc ]] && . ~/.zshrc [ ! -s ~/.config/mpd/pid ] && mpd From a6c4f28006673409b19c7390f61924cef01ea8b4 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 30 Mar 2024 05:39:04 +0700 Subject: [PATCH 023/126] fix: Use monospace This makes it easier to handle fallback font since kitty doesn't have a real fallback font feature --- .config/kitty/kitty.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 0c4d725..9f613f5 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -1,6 +1,6 @@ -font_family IosevkaNerdFontComplete-Term -bold_font IosevkaNerdFontComplete-Bold -italic_font IosevkaNerdFontComplete-Italic +font_family monospace +bold_font auto +italic_font auto bold_italic_font auto font_size 10 adjust_line_height 0 From 0dc05132a58a3c8a777b994ade9f2b962ed57ae5 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 30 Mar 2024 06:19:04 +0700 Subject: [PATCH 024/126] chore: Ignore more zsh junk --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index dea2d4f..bff516a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .zcompdump +.zcompcache/ From d9fd9da3907ffcbc420206909a0e6c1b19309433 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 30 Mar 2024 06:19:27 +0700 Subject: [PATCH 025/126] enhance: Move gpg data to local/share --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 43f1cf0..5b85fed 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -113,6 +113,7 @@ export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/pyrc" +export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" # vimrc (this will init/source ~/.config/vim/vimrc instead of ~/.vimrc) export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' From 1426150732598e7d5fbdbecc9fab9de070181878 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 05:52:15 +0700 Subject: [PATCH 026/126] enhance: `pass` completion --- .config/zsh/completion | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/completion b/.config/zsh/completion index 100100e..9f42d1e 100644 --- a/.config/zsh/completion +++ b/.config/zsh/completion @@ -73,3 +73,4 @@ if [[ $COMPLETION_WAITING_DOTS = true ]]; then bindkey "^I" expand-or-complete-with-dots fi +[ -s "/usr/share/zsh/site-functions/_pass" ] && zstyle ':completion:*' "/usr/share/zsh/site-functions/_pass" From 4a385ca23106253c3938c11065e84a1876575dd0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 05:52:58 +0700 Subject: [PATCH 027/126] chore(zshenv): Clean up - Disable python startup - Remove leftover OMZ relic --- .config/zsh/.zshenv | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 5b85fed..70a864d 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -112,16 +112,14 @@ export ADB_VENDOR_KEY="$XDG_CONFIG_HOME/android" export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" -export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/pyrc" +#export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/pyrc" export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" # vimrc (this will init/source ~/.config/vim/vimrc instead of ~/.vimrc) export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' -# Path to oh-my-zsh installation -export ZSH="${XDG_DATA_HOME:-$HOME/.local/share}/oh-my-zsh" -export ZSH_CUSTOM="$ZSH/custom" -export ZSH_PLUGINS="$ZSH_CUSTOM/plugins" +# zsh +export ZSH_PLUGINS="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" # -- LF # icon for lf From d0fa91c95bf6f68bf4269b90b5886e7337db3d6a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 05:54:45 +0700 Subject: [PATCH 028/126] chore: Reorganize zshrc --- .config/zsh/.zshrc | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 5213d07..61c8e18 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -40,26 +40,32 @@ export KEYTIMEOUT=1 # Keybindings [ -f ~/.config/zsh/keybinds ] && source ~/.config/zsh/keybinds -# ----- Plugins +# [[ Plugins ZSH_PLUGINS="$XDG_DATA_HOME/zsh/plugins" -# source $ZSH/oh-my-zsh.sh -# emulate -R zsh -c 'source $ZSH_PLUGINS/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' -# eval $(thefuck --alias) # thefuck - fix your stupid typo :) -source $ZSH_PLUGINS/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null -source $ZSH_PLUGINS/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh 2>/dev/null -#source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null -#source $ZSH_CUSTOM/plugins/fsh/fast-syntax-highlighting.plugin.zsh +[ ! -d $ZSH_PLUGINS ] && mkdir -p $ZSH_PLUGINS + +# >> INSTALL: #!/bin/zsh +# cd $ZSH_PLUGINS && git clone +# << INSTALL + +# >> ENABLED: silently fail if not installed +source $ZSH_PLUGINS/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null # https://github.com/zdharma-continuum/fast-syntax-highlighting +source $ZSH_PLUGINS/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh 2>/dev/null # https://github.com/zsh-users/zsh-autosuggestions +#source $ZSH_CUSTOM/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh 2>/dev/null # https://github.com/zsh-users/zsh-syntax-highlighting +# << ENABLED + +# ]] Plugins + +export PATH=$PATH:/home/ziro/.spicetify + +# bun completions +[ -s "/home/ziro/.bun/_bun" ] && source "/home/ziro/.bun/_bun" if [[ "$OSTYPE" == "darwin"* ]]; then test -e "${ZDOTDIR}/.iterm2_shell_integration.zsh" && source "${ZDOTDIR}/.iterm2_shell_integration.zsh" - #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" fi -export PATH=$PATH:/home/ziro/.spicetify - -# bun completions -[ -s "/home/ziro/.bun/_bun" ] && source "/home/ziro/.bun/_bun" From aef150790666ca8757593a7485a59de713792ab5 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 05:55:12 +0700 Subject: [PATCH 029/126] fix: Broken aliases - config now cd to dotfiles dir - added cdgit --- .config/zsh/aliases | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 472debb..c39c6ca 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -76,6 +76,7 @@ alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' #alias mpv='mpv --geometry=1280x720' #config shortcuts +alias config='cd $HOME/Build/GIT/dotfiles' alias cfvim='vim $XDG_CONFIG_HOME/vim/vimrc' alias cfvimplug='vim $XDG_CONFIG_HOME/vim/vim_plug' alias cfvimnix='vim $XDG_CONFIG_HOME/vim/vim_nix' @@ -112,6 +113,7 @@ alias cdclg='cd "$HOME/my Files/Kuliah/"' alias cdwine='cd "$HOME/.local/share/wineprefixes/"' #Git Aliases +alias cdgit='cd $HOME/Build/GIT' alias gaa='git add -A' alias gci='git commit' alias gca='git commit --all' @@ -121,7 +123,7 @@ alias gs='git status' alias gp='git push' alias gP='git pull' alias gcl='git clone' -alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' +#alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' alias qn='vim $HOME/Documents/QuickNote' From 0314abd56505fde51e53e5a615fba2dea9d13ad4 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 07:31:03 +0700 Subject: [PATCH 030/126] feat: mouseless --- .config/hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 0e4d0a6..8e035be 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -8,6 +8,7 @@ exec-once = lxpolkit exec-once = nitrogen --restore exec-once = fcitx5 -d exec-once = xsettingsd & +exec-once = mouseless & #exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & monitor=,preferred,auto,auto From d7f4dd32376a3cd6196d37e99ac72f046e53275b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 07:31:18 +0700 Subject: [PATCH 031/126] feat: systray Fixes #3 --- .config/eww/eww.yuck | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index ca34d43..1462bda 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -35,7 +35,8 @@ (box :halign "end" :class "end" :space-evenly false - (clock))) + (clock) + (systray :icon-size "16" :pack-direction "rtl"))) (defwidget workspaces [] (box :class "workspaces" From c1aeea0d73274f91f0e56bcb2c673c064aa4139f Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 07:33:10 +0700 Subject: [PATCH 032/126] style: Move clock to the middle --- .config/eww/eww.yuck | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 1462bda..f3cfb82 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -29,13 +29,12 @@ (workspaces)) (defwidget middle [] - (label :text "test")) + (clock)) (defwidget end [] (box :halign "end" :class "end" :space-evenly false - (clock) (systray :icon-size "16" :pack-direction "rtl"))) (defwidget workspaces [] From 2e1da896d4866e84061f15f3f1f5eaaacb6f7593 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 31 Mar 2024 08:28:27 +0700 Subject: [PATCH 033/126] enhance: Use swww --- .config/hypr/hyprland.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 8e035be..394f490 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,11 +5,13 @@ exec-once = unclutter exec-once = dunst exec-once = numlockx exec-once = lxpolkit -exec-once = nitrogen --restore exec-once = fcitx5 -d exec-once = xsettingsd & exec-once = mouseless & #exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & +exec-once = swww-daemon --format xrgb +exec-once = swww img $HOME/Wallpaper/HoloLive/Torii\ Gate/preview.png # load the preview while we wait for the gif to load +exec-once = sleep 3 && swww img $HOME/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.gif monitor=,preferred,auto,auto From 6a7f25fff947148ea5f54f2c5243bff6171519e4 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 1 Apr 2024 18:32:10 +0700 Subject: [PATCH 034/126] enhance: Adjustments - Trying to fix swww slow load (doesn't work...) - Use KDE Polkit Agent - XtMapper window rules --- .config/hypr/hyprland.conf | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 394f490..ab58c49 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,3 +1,4 @@ +exec-once = /usr/lib/polkit-kde-authentication-agent-1 exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources exec-once = eww-launch @@ -7,11 +8,8 @@ exec-once = numlockx exec-once = lxpolkit exec-once = fcitx5 -d exec-once = xsettingsd & -exec-once = mouseless & #exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & -exec-once = swww-daemon --format xrgb -exec-once = swww img $HOME/Wallpaper/HoloLive/Torii\ Gate/preview.png # load the preview while we wait for the gif to load -exec-once = sleep 3 && swww img $HOME/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.gif +exec-once = swww query || sleep 1; swww init --format xrgb && swww img -t none $HOME/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.gif monitor=,preferred,auto,auto @@ -43,7 +41,7 @@ general { decoration { rounding = 5 blur { - enabled = 1 + enabled = 0 size = 3 passes = 1 new_optimizations = 1 @@ -95,6 +93,15 @@ master { # ======================== #windowrule = unset,^(Spotify)$ #windowrule = tile,^(Spotify)$ +# >> Waydroid bullshit +windowrulev2 = stayfocused,title:^(XtMapper)$ +windowrulev2 = noblur,title:^(XtMapper)$ +windowrulev2 = float,title:^(XtMapper)$ +windowrulev2 = move 0 34,title:^(XtMapper)$ +windowrulev2 = rounding 0,title:^(XtMapper)$ +windowrulev2 = maxsize 1366 734,title:^(XtMapper)$ +windowrulev2 = minsize 1366 734,title:^(XtMapper)$ +# << # Alt Key = Mostly for terminals only $mainMod = SUPER # Super Key = General MOD for WM From 6e327704bc3299c03a47159873fa749e6b7b4192 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 1 Apr 2024 18:33:56 +0700 Subject: [PATCH 035/126] feat: Bindings for gaming with XtMapper --- .config/mouseless/config.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.config/mouseless/config.yaml b/.config/mouseless/config.yaml index 0811110..3414489 100644 --- a/.config/mouseless/config.yaml +++ b/.config/mouseless/config.yaml @@ -1,6 +1,7 @@ # the keyboard devices it reads from, if no devices are specified, it reads from all devices: - - "/dev/input/by-id/usb-SEMICO_USB_Gaming_Keyboard-event-kbd" + #- "/dev/input/by-id/usb-SEMICO_USB_Gaming_Keyboard-event-kbd" + #- "/dev/input/by-id/usb-1bcf_08a0-event-kbd" # this is executed when mouseless starts, e.g. useful for setting the keyboard layout # startCommand: "setxkbmap de" @@ -32,7 +33,7 @@ layers: #q: layer initial backspace: layer initial # keep the mouse layer active - space: layer mouse + space: layer game r: reload-config l: move 1 0 h: move -1 0 @@ -45,3 +46,10 @@ layers: enter: button left backslash: button middle rightshift: button right +- name: game + passThrough: true + bindings: + esc: layer initial + up: w + down: s + s: k0 From d03aa4c38238652a970f9ac378ec1a09e7933126 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 1 Apr 2024 18:34:43 +0700 Subject: [PATCH 036/126] chore: Sync config --- .config/xinitrc | 2 +- .config/zsh/.zprofile | 4 ++-- .config/zsh/.zshenv | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/xinitrc b/.config/xinitrc index deef614..de15264 100644 --- a/.config/xinitrc +++ b/.config/xinitrc @@ -3,5 +3,5 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then # exec tdm --xstart - [[ -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && exec tbsm + #[[ -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && exec tbsm fi diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index d60ed2f..b09c294 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -5,10 +5,10 @@ #fi if [[ "$OSTYPE" == "linux-gnu"* ]]; then - [[ -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && bash /usr/bin/tbsm + [[ ! $DISPLAY && -n "$XDG_VTNR" && $XDG_VTNR -le 2 ]] && bash /usr/bin/tbsm [[ -f ~/.zshrc ]] && . ~/.zshrc - [ ! -s ~/.config/mpd/pid ] && mpd + #[ ! -s ~/.config/mpd/pid ] && mpd export PATH="$HOME/.poetry/bin:$PATH" fi diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 70a864d..2211453 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -114,6 +114,8 @@ export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" #export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/pyrc" export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" +unset SSH_AGENT_PID +export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" # vimrc (this will init/source ~/.config/vim/vimrc instead of ~/.vimrc) export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' From 43401eeb1e74f1ec63d29cccdf1145aa9735ec00 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 3 Apr 2024 06:49:47 +0700 Subject: [PATCH 037/126] feat: Store dotfiles path --- .config/zsh/aliases | 2 +- .config/zsh/dotfiles | 5 +++++ .local/bin/setup-dotfiles | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .config/zsh/dotfiles create mode 100755 .local/bin/setup-dotfiles diff --git a/.config/zsh/aliases b/.config/zsh/aliases index c39c6ca..66d8778 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -76,7 +76,7 @@ alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' #alias mpv='mpv --geometry=1280x720' #config shortcuts -alias config='cd $HOME/Build/GIT/dotfiles' +alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' alias cfvim='vim $XDG_CONFIG_HOME/vim/vimrc' alias cfvimplug='vim $XDG_CONFIG_HOME/vim/vim_plug' alias cfvimnix='vim $XDG_CONFIG_HOME/vim/vim_nix' diff --git a/.config/zsh/dotfiles b/.config/zsh/dotfiles new file mode 100644 index 0000000..494bd2f --- /dev/null +++ b/.config/zsh/dotfiles @@ -0,0 +1,5 @@ +#!/bin/zsh + +export DOTFILES="" + +[ ! $DOTFILES ] && unset DOTFILES diff --git a/.local/bin/setup-dotfiles b/.local/bin/setup-dotfiles new file mode 100755 index 0000000..edb68a7 --- /dev/null +++ b/.local/bin/setup-dotfiles @@ -0,0 +1,25 @@ +#!/bin/zsh + +printf "Experimental script! Run it anyway? (y/N) " +read choice +[ "$choice" = "y" ] || exit 1 + +[ ! $1 ] && >&2 echo "Usage: setup-dotfiles [PATH]" && exit 1 + +cd $1 || { >&2 echo "Invalid path" && exit 1 } + +git status 2>/dev/null || { >&2 echo "Directory is not a git directory!" && exit 1 } + +cat << EOF +#!/bin/zsh + +export DOTFILES="${PWD}" + +[ ! \$DOTFILES ] && unset DOTFILES +EOF + +echo "" +echo "##############################################################" +echo "# Please replace ~/.config/zsh/dotfiles with the code above. #" +echo "# TIPS: Run 'setup-dotfiles > ~/.config/zsh/dotfiles' #" +echo "##############################################################" From ad1a8dbd1e0801dc435e188fd2a32a5174eeb918 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani <46041660+null2264@users.noreply.github.com> Date: Wed, 3 Apr 2024 07:17:29 +0700 Subject: [PATCH 038/126] docs: Setup --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cec523a..f98942a 100644 --- a/README.md +++ b/README.md @@ -26,24 +26,26 @@ My Setup: *info*: *ʳ* = *in separate repo*; *ᵖ* = *partially work* ## Setup -Currently there's no automatic installer for my dotfiles. -~~I'm working on Luke Smith's LARBS fork to be able to install my dotfiles~~ (Too lazy lol) +> [!WARNING] +> This section is still WIP! + +First time setup only: run `setup-dotfiles > ~/.config/zsh/dotfiles`, e.g. `setup-dotfiles ~/Build/GIT/dotfiles > ~/.config/zsh/dotfiles`. ## Recommended Project/Software -- LARBS -- Console-TDM -- Nerd Fonts +- TBSM +- Fonts - Iosevka - Fira - Sarasa Font -- Feather / Lucide (Font) -- st (st-zi build) + - Feather / Lucide (for Icons) +- kitty - Tiling WM - - Qtile - - BSPWM - - DWM - - yabai + - Qtile (Linux - X11) + - BSPWM (Linux - X11) + - DWM (Linux - X11) + - Hyprland (Linux - Wayland) + - yabai (macOS) - [dortania](https://github.com/dortania) (A great hackintosh guide) ## Tips From 83d3495e5bc54e8cc016aa378538064d456ff501 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 4 Apr 2024 10:26:46 +0700 Subject: [PATCH 039/126] feat: Support bin inside scripts dir --- .config/hypr/hyprland.conf | 4 ++-- .config/zsh/.zshenv | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index ab58c49..bbbbfde 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -99,8 +99,8 @@ windowrulev2 = noblur,title:^(XtMapper)$ windowrulev2 = float,title:^(XtMapper)$ windowrulev2 = move 0 34,title:^(XtMapper)$ windowrulev2 = rounding 0,title:^(XtMapper)$ -windowrulev2 = maxsize 1366 734,title:^(XtMapper)$ -windowrulev2 = minsize 1366 734,title:^(XtMapper)$ +#windowrulev2 = maxsize 1366 734,title:^(XtMapper)$ +#windowrulev2 = minsize 1366 734,title:^(XtMapper)$ # << # Alt Key = Mostly for terminals only diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 2211453..fee15ef 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -4,6 +4,8 @@ export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state" export XDG_CONFIG_HOME="$HOME/.config" +export BINARY_HOME="$HOME/.local/bin" +export SCRIPTS_HOME="$HOME/.local/bin/scripts" if [[ "$OSTYPE" == "darwin"* ]]; then export JAVA_HOME="$HOME/.sdkman/candidates/java/current" @@ -32,12 +34,12 @@ fi export BUN_INSTALL="$HOME/.bun" if [[ "$OSTYPE" == "darwin"* ]]; then export PYTHONPATH="$HOME/Library/Python/3.10/lib:$PYTHONPATH" - LOCAL_PATH=$(du "$HOME/.local/bin/" -d 1 | cut -f2 > /tmp/ENV_PATH && paste -sd ':' /tmp/ENV_PATH) + LOCAL_PATH=$(du "$BINARY_HOME" -d 1 | cut -f2 > /tmp/ENV_PATH && paste -sd ':' /tmp/ENV_PATH) LOCAL_PATH="$HOME/Library/Python/3.10/bin:$LOCAL_PATH" elif [[ "$OSTYPE" == "linux-gnu" ]]; then - LOCAL_PATH=$(du "$HOME/.local/bin/" -d 1 | cut -f2 | paste -sd ':') + LOCAL_PATH=$(du "$BINARY_HOME" -d 1 | cut -f2 | paste -sd ':') fi -PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$LOCAL_PATH${PATH:+:${PATH}}" +PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$SCRIPTS_HOME/bin:$LOCAL_PATH${PATH:+:${PATH}}" # export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library # -- IBus stuff (IME) From 83d06da2335e76e6176d47e55292acae8d01fc4b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 7 Apr 2024 06:46:13 +0700 Subject: [PATCH 040/126] style: Eww styling Stolen from https://github.com/Mango0x45/dotfiles/blob/master/.config/eww/eww.scss Because I lost mine :P Change later --- .config/eww/eww.scss | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .config/eww/eww.scss diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss new file mode 100644 index 0000000..a27cb7a --- /dev/null +++ b/.config/eww/eww.scss @@ -0,0 +1,71 @@ +* { + all: unset; + font-family: 'monospace'; + font-size: 16px; + font-feature-settings: 'tnum'; + color: #FFF; +} + +/** tooltip!! **/ +tooltip.background { + background-color: #0f0f17; + font-size: 18; + border-radius: 10px; + color: #bfc9db; +} + +tooltip label { + margin: 6px; +} + +.csd.background.popup { /* SysTray popup */ + background-color: black; + + separator { + padding-bottom: 8px; + } + + menuitem:hover { + background-color: red; + } +} + +.bar { + background-color: rgba(43, 48, 59, 1); +} + +.end { + > box { + padding: 0 8px; + + > label:first-child { + padding-right: 16px; + } + } + + label:last-child { + margin-right: 12px; + } + + box label:last-child { + margin-left: 12px; + } +} + +.workspaces button { + label { + padding: 0 13px; + } + + &:hover { + background: rgba(0, 0, 0, 0.2); + } + + &.active { + background: rgba(0, 0, 0, 0.4); + } + + &:hover, &.active { + box-shadow: inset 0 -3px #FAA14F; + } +} From 1197835da470334d08175f629b1486b547e29ccd Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 7 Apr 2024 06:49:08 +0700 Subject: [PATCH 041/126] chore: Wayland junk --- .config/hypr/hyprland.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index bbbbfde..2d359eb 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -156,3 +156,27 @@ bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow + +env = GDK_BACKEND,wayland,x11 +env = SDL_VIDEODRIVER,wayland +env = CLUTTER_BACKEND,wayland +env = MOZ_ENABLE_WAYLAND,1 +env = MOZ_DISABLE_RDD_SANDBOX,1 +env = _JAVA_AWT_WM_NONREPARENTING=1 +env = QT_AUTO_SCREEN_SCALE_FACTOR,1 +env = QT_QPA_PLATFORM,wayland +env = LIBVA_DRIVER_NAME,nvidia +env = GBM_BACKEND,nvidia-drm +env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = WLR_NO_HARDWARE_CURSORS,1 +env = __NV_PRIME_RENDER_OFFLOAD,1 +env = __VK_LAYER_NV_optimus,NVIDIA_only +env = PROTON_ENABLE_NGX_UPDATER,1 +env = NVD_BACKEND,direct +env = __GL_GSYNC_ALLOWED,1 +env = __GL_VRR_ALLOWED,1 +env = WLR_DRM_NO_ATOMIC,1 +env = WLR_USE_LIBINPUT,1 +env = XWAYLAND_NO_GLAMOR,1 # with this you'll need to use gamescope for gaming +env = __GL_MaxFramesAllowed,1 +env = WLR_RENDERER_ALLOW_SOFTWARE,1 From 8a6051b017fef3e0ad57fd6e213d27d197aeb34b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 7 Apr 2024 06:49:23 +0700 Subject: [PATCH 042/126] feat: Bind w to 6 on gamemode --- .config/mouseless/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/mouseless/config.yaml b/.config/mouseless/config.yaml index 3414489..8fa0f33 100644 --- a/.config/mouseless/config.yaml +++ b/.config/mouseless/config.yaml @@ -53,3 +53,4 @@ layers: up: w down: s s: k0 + w: k6 From 20400cf82f0ec4981a6bb5ea102c557acbd0ae99 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 14 Apr 2024 07:40:19 +0700 Subject: [PATCH 043/126] fix: Use filetype instead of filename Using filename caused autocmd called after modeline, caused it to overwrite whatever setting is set through modeline --- .config/vim/vim_uni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 5d557b0..e962d16 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -90,7 +90,7 @@ augroup END " ----- indent for corresponding extension autocmd BufEnter *.py set ai sw=4 ts=4 sta et fo=croql " in C files, tabs looks like 4 spaces, but it's actually tabs -autocmd BufEnter *.c set ai sw=4 ts=4 sta noet fo=croql +autocmd Filetype c set ai sw=4 ts=4 sta noet fo=croql autocmd BufEnter *.md set ai sw=3 ts=3 sta et fo=croql autocmd Filetype html* set ai sw=4 ts=4 sta et fo=croql autocmd Filetype *css set ai sw=4 ts=4 sta et fo=croql From a43c472e54c1682309626ad487aed292cae4354e Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 14 Apr 2024 08:07:04 +0700 Subject: [PATCH 044/126] chore(vimrc): Drop vim and windows I haven't used vim for years, neovim seems to be the future. And vim on Windows barely usable for me. --- .config/vim/vimrc | 66 +++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 77496bd..7dca3f7 100755 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -1,43 +1,37 @@ " vim: filetype=vim -" ============================== -" ________ ++ ________ -" /VVVVVVVV\++++ /VVVVVVVV\ -" \VVVVVVVV/++++++\VVVVVVVV/ -" |VVVVVV|++++++++/VVVVV/' -" |VVVVVV|++++++/VVVVV/' -" +|VVVVVV|++++/VVVVV/'+ -" +++|VVVVVV|++/VVVVV/'+++++ -"+++++|VVVVVV|/VVVVV/'+++++++++ -" +++|VVVVVVVVVVV/'+++++++++ -" +|VVVVVVVVV/'+++++++++ -" |VVVVVVV/'+++++++++ -" |VVVVV/'+++++++++ -" |VVV/'+++++++++ -" 'V/' ++++++ -" ++ -" ============================== -" null2264's VIMRC -" ============================== -" NeoVIM is recommended! This vimrc created inside NeoVIM and not tested on -" VIM +" +" ======================================== +" ::-----------------------: +" .--------------------------: +" :---------------:--------: +" :------. +" :------. +" .------: .::: +" ------: :----- +" :------. -----. +" .------: ... +" .------: .::. +" :------. :----: +" .------. :------. +" .------: .------. +" .------: .------: +" :-------:::::::::::------. +" :-----------------------: +" .---------------------: +" ======================================== +" null2264's NeoVim Config +" ======================================== -" ----- Sourcing Mapping/Config - -" Automatically source config for the correct OS -" NOTE: By default the directory of Windows config will be located on -" "C:\_config\vim" - -if has('win64') || has('win32') || has('win16') - let $ZVIM_CONFIG_DIR = "C:/_config/vim" - let $ZVIM_OS_TYPE = "win" -else +if !has('nvim') || !has('win64') || !has('win32') || !has('win16') let $ZVIM_CONFIG_DIR = "~/.config/vim" let $ZVIM_OS_TYPE = "nix" -endif -so $ZVIM_CONFIG_DIR/vim_$ZVIM_OS_TYPE -so $ZVIM_CONFIG_DIR/vim_uni + so $ZVIM_CONFIG_DIR/vim_$ZVIM_OS_TYPE + so $ZVIM_CONFIG_DIR/vim_uni -if !exists('g:vscode') - source $ZVIM_CONFIG_DIR/vim_plug + if !exists('g:vscode') + source $ZVIM_CONFIG_DIR/vim_plug + endif +else + echoerr "Only NeoVim on POSIX OS is supported!" endif From 6579ade92d946cd8faa16bfcb5a70d7ea36558ca Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 14 Apr 2024 08:28:30 +0700 Subject: [PATCH 045/126] chore: Initial LUA migration --- .config/nvim/init.lua | 4 ++++ .config/zsh/.zshenv | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .config/nvim/init.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..a402235 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,4 @@ +-- FIXME: Turn all these to LUA +vim.cmd('source ~/.config/vim/vim_nix') +vim.cmd('source ~/.config/vim/vim_uni') +vim.cmd('source ~/.config/vim/vim_plug') diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index fee15ef..e2af12b 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -120,7 +120,7 @@ unset SSH_AGENT_PID export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" # vimrc (this will init/source ~/.config/vim/vimrc instead of ~/.vimrc) -export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' +#export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' # zsh export ZSH_PLUGINS="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" From ca2cb0fb11a3cc4c26f3137d6e7eeffbfbbbb616 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 08:57:51 +0700 Subject: [PATCH 046/126] chore: More vimscript to lua migration stuff --- .config/nvim/init.lua | 30 +++++++++++++++++++++++++++--- .config/nvim/lua/null/config.lua | 0 .config/nvim/lua/null/init.lua | 6 ++++++ .config/nvim/lua/null/nix.lua | 0 .config/nvim/lua/null/plug.lua | 0 .config/vim/vim_nix | 6 +++++- .config/vim/vim_uni | 1 + 7 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .config/nvim/lua/null/config.lua create mode 100644 .config/nvim/lua/null/init.lua create mode 100644 .config/nvim/lua/null/nix.lua create mode 100644 .config/nvim/lua/null/plug.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index a402235..5844566 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,4 +1,28 @@ +--========================================-- +-- ::-----------------------: -- +-- .--------------------------: -- +-- :---------------:--------: -- +-- :------. -- +-- :------. -- +-- .------: .::: -- +-- ------: :----- -- +-- :------. -----. -- +-- .------: ... -- +-- .------: .::. -- +-- :------. :----: -- +-- .------. :------. -- +-- .------: .------. -- +-- .------: .------: -- +-- :-------:::::::::::------. -- +-- :-----------------------: -- +-- .---------------------: -- +--========================================-- +-- null2264's NeoVim Config -- +--========================================-- + +require("null") + -- FIXME: Turn all these to LUA -vim.cmd('source ~/.config/vim/vim_nix') -vim.cmd('source ~/.config/vim/vim_uni') -vim.cmd('source ~/.config/vim/vim_plug') +vim.cmd("source ~/.config/vim/vim_nix") +vim.cmd("source ~/.config/vim/vim_uni") +vim.cmd("source ~/.config/vim/vim_plug") diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/lua/null/init.lua b/.config/nvim/lua/null/init.lua new file mode 100644 index 0000000..b56700e --- /dev/null +++ b/.config/nvim/lua/null/init.lua @@ -0,0 +1,6 @@ +-- vim_uni +require("null.config") +-- vim_plug +require("null.plug") +-- vim_nix +require("null.nix") -- n*x specific stuff diff --git a/.config/nvim/lua/null/nix.lua b/.config/nvim/lua/null/nix.lua new file mode 100644 index 0000000..e69de29 diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua new file mode 100644 index 0000000..e69de29 diff --git a/.config/vim/vim_nix b/.config/vim/vim_nix index 0dfe915..8d1bc2d 100644 --- a/.config/vim/vim_nix +++ b/.config/vim/vim_nix @@ -14,7 +14,11 @@ else set viminfo+='1000,n$XDG_DATA_HOME/nvim/nviminfo endif set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after -let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" +if !has('nvim') + let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" +else + let $MYVIMRC="$XDG_CONFIG_HOME/nvim/init.lua" +endif " ----- Mutt au BufRead /tmp/mutt-* set tw=72 diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index e962d16..63aec03 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -11,6 +11,7 @@ set ignorecase set smartcase set mouse=a set background=dark +set ffs=unix " set complete+=kspell " set completeopt=menuone,longest " set list lcs=trail:·,tab:··\|,nbsp:· From 57e226d2db43ffe77e0f0e9c6cd552801651d5d8 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 09:42:33 +0700 Subject: [PATCH 047/126] chore(vim): Converted some config and remapping to lua --- .config/nvim/init.lua | 3 ++- .config/nvim/lazy-lock.json | 6 ++++++ .config/nvim/lua/null/config.lua | 12 ++++++++++++ .config/nvim/lua/null/init.lua | 4 ++-- .config/nvim/lua/null/plug.lua | 21 +++++++++++++++++++++ .config/nvim/lua/null/remap.lua | 23 +++++++++++++++++++++++ .config/vim/vim_uni | 14 +++++++------- 7 files changed, 73 insertions(+), 10 deletions(-) create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/null/remap.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 5844566..7b9038b 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -20,7 +20,8 @@ -- null2264's NeoVim Config -- --========================================-- -require("null") +-- TODO: Uncomment once we done migrating +-- require("null") -- FIXME: Turn all these to LUA vim.cmd("source ~/.config/vim/vim_nix") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..e653b0d --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,6 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, + "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, + "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, + "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" } +} \ No newline at end of file diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index e69de29..206d0a3 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -0,0 +1,12 @@ +require("null.remap") + +local o = vim.opt +local g = vim.g + +o.nu = true +o.relativenumber = true + +g.mapleader = " " +g.guifont = { "Sarasa UI J", ":h16" } + +require("oil").setup() diff --git a/.config/nvim/lua/null/init.lua b/.config/nvim/lua/null/init.lua index b56700e..68d388d 100644 --- a/.config/nvim/lua/null/init.lua +++ b/.config/nvim/lua/null/init.lua @@ -1,6 +1,6 @@ --- vim_uni -require("null.config") -- vim_plug require("null.plug") +-- vim_uni +require("null.config") -- vim_nix require("null.nix") -- n*x specific stuff diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index e69de29..17bab1a 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -0,0 +1,21 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup({ + { + "stevearc/oil.nvim", + opts = {}, + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + "tpope/vim-commentary", -- shortcut to comment a line +}) diff --git a/.config/nvim/lua/null/remap.lua b/.config/nvim/lua/null/remap.lua new file mode 100644 index 0000000..1c0f3d8 --- /dev/null +++ b/.config/nvim/lua/null/remap.lua @@ -0,0 +1,23 @@ +-- Loaded by `null.config` +local remap = function(mode, key, target, opts) + vim.api.nvim_set_keymap(mode, key, target, opts or { + noremap = true, + silent = true, + }) +end + +-- Map Ctrl+U as U so it can be used as redo +remap("n", "", "U") +-- Map U as redo +remap("n", "U", "") + +-- Yank and Put +remap("n", "", '"+y') +remap("n", "", '"+p') +remap("n", "", '"+y') +remap("n", "", '"+p') + +-- Comment a line like how it is on VSC (using vim-commentary) +remap("n", "", "gcc", { noremap = false }) +remap("v", "", "gc", { noremap = false }) +remap("i", "", "gcc", { noremap = false }) diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 63aec03..b486137 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -6,7 +6,7 @@ " ----- Vim Initial Config set encoding=utf-8 set hls -set number relativenumber +set number relativenumber " -- converted set ignorecase set smartcase set mouse=a @@ -24,8 +24,8 @@ set fillchars=eob:\ syntax on filetype indent plugin on map :NERDTreeToggle -let mapleader=" " -set guifont=Iosevka:h15 +let mapleader=" " " -- converted +set guifont=Iosevka:h15 " -- converted " ----- Folding stuff set foldnestmax=10 @@ -40,19 +40,19 @@ autocmd FileType python setlocal foldmethod=indent " Norm but in shortcut vnoremap . :normal . -" Map ctrl + u as U +" Map ctrl + u as U -- converted noremap U -" Map U as redo (ctrl + r) +" Map U as redo (ctrl + r) -- converted noremap U -" Yank and Put to/from clipboard/primary +" Yank and Put to/from clipboard/primary -- converted noremap "+y noremap "+p noremap "+y noremap "+P -" Shortcut to comment a line +" Shortcut to comment a line -- converted map gcc vmap gc imap gc From 7d10d909fac3c09a1b9fd69abc2a3e47a6fd4d9d Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 09:46:59 +0700 Subject: [PATCH 048/126] docs(vim): Note for myself on how to do lazy loading --- .config/nvim/lua/null/plug.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index 17bab1a..f2a614f 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -1,3 +1,4 @@ +-- << Getting lazy.nvim for the first time local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then vim.fn.system({ @@ -10,6 +11,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then }) end vim.opt.rtp:prepend(lazypath) +-- >> require("lazy").setup({ { @@ -17,5 +19,11 @@ require("lazy").setup({ opts = {}, dependencies = { "nvim-tree/nvim-web-devicons" }, }, - "tpope/vim-commentary", -- shortcut to comment a line + { + "tpope/vim-commentary", -- shortcut to comment a line + cmd = "StartupTime", -- Note to self: lazy load on command + init = function() + -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function + end, + }, }) From b9c32dfd52d035291c151b33833d224258ca40c0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 10:52:38 +0700 Subject: [PATCH 049/126] fix(nvim): Wrong plugin --- .config/nvim/lazy-lock.json | 3 ++- .config/nvim/lua/null/plug.lua | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index e653b0d..a7016b5 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -2,5 +2,6 @@ "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, - "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" } + "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, + "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" } } \ No newline at end of file diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index f2a614f..bb746e7 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -19,8 +19,9 @@ require("lazy").setup({ opts = {}, dependencies = { "nvim-tree/nvim-web-devicons" }, }, + "tpope/vim-commentary", -- shortcut to comment a line { - "tpope/vim-commentary", -- shortcut to comment a line + "dstein64/vim-startuptime", cmd = "StartupTime", -- Note to self: lazy load on command init = function() -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function From 0261c07d0a41bd65d51a85aa8d832491465a7589 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 10:54:02 +0700 Subject: [PATCH 050/126] chore(nvim): Converted normal command shortcut to Lua --- .config/nvim/lua/null/remap.lua | 37 ++++++++++++++++++++------------- .config/vim/vim_uni | 2 +- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.config/nvim/lua/null/remap.lua b/.config/nvim/lua/null/remap.lua index 1c0f3d8..027c659 100644 --- a/.config/nvim/lua/null/remap.lua +++ b/.config/nvim/lua/null/remap.lua @@ -1,23 +1,32 @@ -- Loaded by `null.config` -local remap = function(mode, key, target, opts) - vim.api.nvim_set_keymap(mode, key, target, opts or { - noremap = true, - silent = true, - }) +local map = function(modes, key, target, opts) + local mt = {} + + for mode in modes:gmatch"." do + table.insert(mt, mode) + end + + vim.keymap.set(mt, key, target, opts or { + noremap = true, + silent = true, + }) end -- Map Ctrl+U as U so it can be used as redo -remap("n", "", "U") +map("n", "", "U") -- Map U as redo -remap("n", "U", "") +map("n", "U", "") -- Yank and Put -remap("n", "", '"+y') -remap("n", "", '"+p') -remap("n", "", '"+y') -remap("n", "", '"+p') +map("n", "", '"+y') +map("n", "", '"+p') +map("n", "", '"+y') +map("n", "", '"+p') -- Comment a line like how it is on VSC (using vim-commentary) -remap("n", "", "gcc", { noremap = false }) -remap("v", "", "gc", { noremap = false }) -remap("i", "", "gcc", { noremap = false }) +map("n", "", "gcc", { remap = true }) +map("v", "", "gc", { remap = true }) +map("i", "", "gcc", { remap = true }) + +-- Normal command shortcut for VISUAL mode +map("v", ".", ":normal .") diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index b486137..94244b0 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -37,7 +37,7 @@ set foldlevel=1 autocmd FileType python setlocal foldmethod=indent " ----- Mapping -" Norm but in shortcut +" Norm but in shortcut -- converted vnoremap . :normal . " Map ctrl + u as U -- converted From 06ec5fcda47c7511b97e79e761fe2cf57ef28433 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 11:08:14 +0700 Subject: [PATCH 051/126] refactor(nvim): Move functions to `null.util` --- .config/nvim/lua/null/plug.lua | 17 ++--------------- .config/nvim/lua/null/remap.lua | 13 +------------ .config/nvim/lua/null/util.lua | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 .config/nvim/lua/null/util.lua diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index bb746e7..f42a005 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -1,19 +1,6 @@ --- << Getting lazy.nvim for the first time -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) --- >> +local util = require("null.util") -require("lazy").setup({ +util.getch_lazy_nvim().setup({ { "stevearc/oil.nvim", opts = {}, diff --git a/.config/nvim/lua/null/remap.lua b/.config/nvim/lua/null/remap.lua index 027c659..9244c31 100644 --- a/.config/nvim/lua/null/remap.lua +++ b/.config/nvim/lua/null/remap.lua @@ -1,16 +1,5 @@ -- Loaded by `null.config` -local map = function(modes, key, target, opts) - local mt = {} - - for mode in modes:gmatch"." do - table.insert(mt, mode) - end - - vim.keymap.set(mt, key, target, opts or { - noremap = true, - silent = true, - }) -end +local map = require("null.util").map -- Map Ctrl+U as U so it can be used as redo map("n", "", "U") diff --git a/.config/nvim/lua/null/util.lua b/.config/nvim/lua/null/util.lua new file mode 100644 index 0000000..17a8018 --- /dev/null +++ b/.config/nvim/lua/null/util.lua @@ -0,0 +1,33 @@ +local RT = {} + +function RT.getch_lazy_nvim() -- Get or Fetch lazy.nvim + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) + end + vim.opt.rtp:prepend(lazypath) + + return require("lazy") +end + +function RT.map(modes, key, target, opts) + local mt = {} + + for mode in modes:gmatch"." do + table.insert(mt, mode) + end + + vim.keymap.set(mt, key, target, opts or { + noremap = true, + silent = true, + }) +end + +return RT From 88ec2ffdd75eaaecbc833ac70e23521ff6435cf0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 11:47:40 +0700 Subject: [PATCH 052/126] chore(zsh): Explicitly tell git which file/dir to push --- .config/zsh/.iterm2/imgcat | 157 ----- .config/zsh/.iterm2/imgls | 80 --- .config/zsh/.iterm2/it2api | 722 ---------------------- .config/zsh/.iterm2/it2attention | 82 --- .config/zsh/.iterm2/it2check | 81 --- .config/zsh/.iterm2/it2copy | 78 --- .config/zsh/.iterm2/it2dl | 36 -- .config/zsh/.iterm2/it2getvar | 95 --- .config/zsh/.iterm2/it2git | 117 ---- .config/zsh/.iterm2/it2profile | 170 ----- .config/zsh/.iterm2/it2setcolor | 116 ---- .config/zsh/.iterm2/it2setkeylabel | 123 ---- .config/zsh/.iterm2/it2tip | 401 ------------ .config/zsh/.iterm2/it2ul | 98 --- .config/zsh/.iterm2/it2universion | 104 ---- .config/zsh/.iterm2_shell_integration.zsh | 179 ------ .gitignore | 11 +- 17 files changed, 9 insertions(+), 2641 deletions(-) delete mode 100755 .config/zsh/.iterm2/imgcat delete mode 100755 .config/zsh/.iterm2/imgls delete mode 100755 .config/zsh/.iterm2/it2api delete mode 100755 .config/zsh/.iterm2/it2attention delete mode 100755 .config/zsh/.iterm2/it2check delete mode 100755 .config/zsh/.iterm2/it2copy delete mode 100755 .config/zsh/.iterm2/it2dl delete mode 100755 .config/zsh/.iterm2/it2getvar delete mode 100755 .config/zsh/.iterm2/it2git delete mode 100755 .config/zsh/.iterm2/it2profile delete mode 100755 .config/zsh/.iterm2/it2setcolor delete mode 100755 .config/zsh/.iterm2/it2setkeylabel delete mode 100755 .config/zsh/.iterm2/it2tip delete mode 100755 .config/zsh/.iterm2/it2ul delete mode 100755 .config/zsh/.iterm2/it2universion delete mode 100755 .config/zsh/.iterm2_shell_integration.zsh diff --git a/.config/zsh/.iterm2/imgcat b/.config/zsh/.iterm2/imgcat deleted file mode 100755 index 15acf4d..0000000 --- a/.config/zsh/.iterm2/imgcat +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. We use TERM instead of TMUX because TERM -# gets passed through ssh. -function print_osc() { - if [[ $TERM == screen* ]]; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]]; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function load_version() { - if [ -z ${IMGCAT_BASE64_VERSION+x} ]; then - IMGCAT_BASE64_VERSION=$(base64 --version 2>&1) - export IMGCAT_BASE64_VERSION - fi -} - -function b64_encode() { - load_version - if [[ $IMGCAT_BASE64_VERSION =~ GNU ]]; then - # Disable line wrap - base64 -w0 - else - base64 - fi -} - -function b64_decode() { - load_version - if [[ $IMGCAT_BASE64_VERSION =~ fourmilab ]]; then - BASE64ARG=-d - elif [[ $IMGCAT_BASE64_VERSION =~ GNU ]]; then - BASE64ARG=-di - else - BASE64ARG=-D - fi - base64 $BASE64ARG -} - -# print_image filename inline base64contents print_filename -# filename: Filename to convey to client -# inline: 0 or 1 -# base64contents: Base64-encoded contents -# print_filename: If non-empty, print the filename -# before outputting the image -function print_image() { - print_osc - printf '1337;File=' - if [[ -n $1 ]]; then - printf "name=%s;" "$(printf "%s" "$1" | b64_encode)" - fi - - printf "%s" "$3" | b64_decode | wc -c | awk '{printf "size=%d",$1}' - printf ";inline=%s" "$2" - printf ":" - printf "%s" "$3" - print_st - printf '\n' - if [[ -n $4 ]]; then - echo "$1" - fi -} - -function error() { - echo "ERROR: $*" 1>&2 -} - -function show_help() { - echo "Usage: imgcat [-p] filename ..." 1>&2 - echo " or: cat filename | imgcat" 1>&2 -} - -function check_dependency() { - if ! (builtin command -V "$1" >/dev/null 2>&1); then - echo "imgcat: missing dependency: can't find $1" 1>&2 - exit 1 - fi -} - -## Main - -if [ -t 0 ]; then - has_stdin=f -else - has_stdin=t -fi - -# Show help if no arguments and no stdin. -if [ $has_stdin = f ] && [ $# -eq 0 ]; then - show_help - exit -fi - -check_dependency awk -check_dependency base64 -check_dependency wc - -# Look for command line flags. -while [ $# -gt 0 ]; do - case "$1" in - -h | --h | --help) - show_help - exit - ;; - -p | --p | --print) - print_filename=1 - ;; - -u | --u | --url) - check_dependency curl - encoded_image=$(curl -s "$2" | b64_encode) || ( - error "No such file or url $2" - exit 2 - ) - has_stdin=f - print_image "$2" 1 "$encoded_image" "$print_filename" - set -- "${@:1:1}" "-u" "${@:3}" - if [ "$#" -eq 2 ]; then - exit - fi - ;; - -*) - error "Unknown option flag: $1" - show_help - exit 1 - ;; - *) - if [ -r "$1" ]; then - has_stdin=f - print_image "$1" 1 "$(b64_encode <"$1")" "$print_filename" - else - error "imgcat: $1: No such file or directory" - exit 2 - fi - ;; - esac - shift -done - -# Read and print stdin -if [ $has_stdin = t ]; then - print_image "" 1 "$(cat | b64_encode)" "" -fi - -exit 0 diff --git a/.config/zsh/.iterm2/imgls b/.config/zsh/.iterm2/imgls deleted file mode 100755 index bf424b2..0000000 --- a/.config/zsh/.iterm2/imgls +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [ x"$TERM" = "xscreen" ] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -function check_dependency() { - if ! (builtin command -V "$1" > /dev/null 2>& 1); then - echo "imgcat: missing dependency: can't find $1" 1>& 2 - exit 1 - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [ x"$TERM" = "xscreen" ] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function list_file() { - fn=$1 - test -f "$fn" || return 0 - dims=$(php -r 'if (!is_file($argv[1])) exit(1); $a = getimagesize($argv[1]); if ($a==FALSE) exit(1); else { echo $a[0] . "x" .$a[1]; exit(0); }' -- "$fn") - rc=$? - if [[ $rc == 0 ]] ; then - print_osc - printf '1337;File=name='`echo -n "$fn" | base64`";" - wc -c -- "$fn" | awk '{printf "size=%d",$1}' - printf ";inline=1;height=3;width=3;preserveAspectRatio=true" - printf ":" - base64 < "$fn" - print_st - if [ x"$TERM" == "xscreen" ] ; then - # This works in plain-old tmux but does the wrong thing in iTerm2's tmux - # integration mode. tmux doesn't know that the cursor moves when the - # image code is sent, while iTerm2 does. I had to pick one, since - # integration mode is undetectable, so I picked the failure mode that at - # least produces useful output (there is just too much whitespace in - # integration mode). This could be fixed by not moving the cursor while - # in integration mode. A better fix would be for tmux to interpret the - # image sequence, though. - # - # tl;dr: If you use tmux in integration mode, replace this with the printf - # from the else clause. - printf '\033[4C\033[Bx' - else - printf '\033[A' - fi - echo -n "$dims " - ls -ld -- "$fn" - else - ls -ld -- "$fn" - fi -} - -check_dependency php -check_dependency base64 -check_dependency wc - -if [ $# -eq 0 ]; then - for fn in * - do - list_file "$fn" - done < <(ls -ls) -else - for fn in "$@" - do - list_file "$fn" - done -fi - diff --git a/.config/zsh/.iterm2/it2api b/.config/zsh/.iterm2/it2api deleted file mode 100755 index dff3bd0..0000000 --- a/.config/zsh/.iterm2/it2api +++ /dev/null @@ -1,722 +0,0 @@ -#!/usr/bin/env python3.7 - -import argparse -import asyncio -import iterm2 -import logging -import re -import sys -import traceback - -async def list_sessions(connection, args): - a = await iterm2.async_get_app(connection) - for w in a.terminal_windows: - for t in w.tabs: - sessions = t.sessions - for s in sessions: - print(s.pretty_str(), end='') - print("") - print("Buried sessions:") - for s in a.buried_sessions: - print(s.pretty_str(), end='') - -async def show_hierarchy(connection, args): - a = await iterm2.async_get_app(connection) - print(a.pretty_str()) - -async def send_text(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - await s.async_send_text(args.text) - -async def create_tab(connection, args): - a = await iterm2.async_get_app(connection) - if args.window is not None: - window_id = args.window - try: - window = next(window for window in a.terminal_windows if window.window_id == window_id) - tab = await window.async_create_tab(profile=args.profile, command=args.command, index=args.index) - except: - print("bad window id {}".format(window_id)) - sys.exit(1) - else: - window = await iterm2.Window.async_create(connection, profile=args.profile, command=args.command) - if not window: - return - tab = window.tabs[0] - session = tab.sessions[0] - print(session.pretty_str()) - -async def split_pane(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - session = await s.async_split_pane(vertical=args.vertical, before=args.before, profile=args.profile) - print(session.pretty_str()) - -async def get_buffer(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - contents = await s.async_get_screen_contents() - for i in range(contents.number_of_lines): - line = contents.line(i) - print(line.string) - -async def get_prompt(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - result = await iterm2.async_get_last_prompt(connection, s.session_id) - print("working_directory: \"{}\"".format(result.working_directory)) - print("command: \"{}\"".format(result.command)) - -def profile_property_type_map(): - map = { - "allow_title_reporting": "bool", - "allow_title_setting": "bool", - "ambiguous_double_width": "bool", - "ansi_0_color": "color", - "ansi_10_color": "color", - "ansi_11_color": "color", - "ansi_12_color": "color", - "ansi_13_color": "color", - "ansi_14_color": "color", - "ansi_15_color": "color", - "ansi_1_color": "color", - "ansi_2_color": "color", - "ansi_3_color": "color", - "ansi_4_color": "color", - "ansi_5_color": "color", - "ansi_6_color": "color", - "ansi_7_color": "color", - "ansi_8_color": "color", - "ansi_9_color": "color", - "answerback_string": "str", - "application_keypad_allowed": "bool", - "ascii_anti_aliased": "bool", - "ascii_ligatures": "bool", - "background_color": "color", - "background_image_is_tiled": "bool", - "badge_color": "color", - "badge_text": "str", - "blend": "float", - "blink_allowed": "bool", - "blinking_cursor": "bool", - "blur": "float", - "blur_radius": "float", - "bm_growl": "bool", - "bold_color": "color", - "character_encoding": "int", - "close_sessions_on_end": "bool", - "cursor_boost": "float", - "cursor_color": "color", - "cursor_guide_color": "color", - "cursor_text_color": "color", - "cursor_type": "int", - "disable_printing": "bool", - "disable_smcup_rmcup": "bool", - "disable_window_resizing": "bool", - "flashing_bell": "bool", - "foreground_color": "color", - "horizontal_spacing": "float", - "idle_code": "int", - "idle_period": "float", - "link_color": "color", - "minimum_contrast": "float", - "mouse_reporting": "bool", - "mouse_reporting_allow_mouse_wheel": "bool", - "name": "str", - "non_ascii_anti_aliased": "bool", - "non_ascii_ligatures": "bool", - "only_the_default_bg_color_uses_transparency": "bool", - "left_option_key_sends": "int", - "place_prompt_at_first_column": "bool", - "prompt_before_closing": "bool", - "reduce_flicker": "bool", - "right_option_key_sends": "int", - "scrollback_in_alternate_screen": "bool", - "scrollback_lines": "int", - "scrollback_with_status_bar": "bool", - "selected_text_color": "color", - "selection_color": "color", - "send_bell_alert": "bool", - "send_code_when_idle": "bool", - "send_idle_alert": "bool", - "send_new_output_alert": "bool", - "send_session_ended_alert": "bool", - "send_terminal_generated_alerts": "bool", - "session_close_undo_timeout": "float", - "show_mark_indicators": "bool", - "silence_bell": "bool", - "smart_cursor_color": "color", - "smart_cursor_color": "color", - "sync_title": "str", - "tab_color": "color", - "thin_strokes": "int", - "transparency": "float", - "underline_color": "color", - "unicode_normalization": "int", - "unicode_version": "int", - "unlimited_scrollback": "bool", - "use_bold_font": "bool", - "use_bright_bold": "bool", - "use_cursor_guide": "bool", - "use_italic_font": "bool", - "use_non_ascii_font": "bool", - "use_tab_color": "bool", - "use_underline_color": "bool", - "vertical_spacing": "float", - "visual_bell": "bool", - "triggers": "dict", - "smart_selection_rules": "list", - "semantic_history": "dict", - "automatic_profile_switching_rules": "list", - "advanced_working_directory_window_setting": "string", - "advanced_working_directory_window_directory": "string", - "advanced_working_directory_tab_setting": "string", - "advanced_working_directory_tab_directory": "string", - "advanced_working_directory_pane_setting": "string", - "advanced_working_directory_pane_directory": "string", - "normal_font": "string", - "non_ascii_font": "string", - "background_image_location": "string", - "key_mappings": "dict", - "touchbar_mappings": "dict" } - return map - -def profile_properties(): - return list(profile_property_type_map().keys()) - -def profile_property_type(key): - return profile_property_type_map()[key] - -async def get_profile_property(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - profile = await s.async_get_profile() - if args.keys is not None: - keys = args.keys.split(",") - else: - keys = profile_properties() - for prop in keys: - fname = prop - value = getattr(profile, fname) - print("{}: {}".format(prop, value)) - -def encode_property_value(key, value): - type = profile_property_type(key) - if type == "bool": - assert value == "true" or value == "false" - return value == "true" - elif type == "str": - return value - elif type == "float": - return float(value) - elif type == "int": - return int(value) - elif type == "dict" or type == "list": - class TypeNotSupportedException(Exception): Pass - raise TypeNotSupportedException("this property's type is not supported") - elif type == "color": - # Accepted values look like: "(0,0,0,255 sRGB)" - regex = r"\(([0-9]+), *([0-9]+), *([0-9]+), *([0-9]+) *([A-Za-z]+)\)" - match = re.search(regex, value) - assert match is not None - return iterm2.Color( - float(match.group(1)), - float(match.group(2)), - float(match.group(3)), - float(match.group(4)), - iterm2.ColorSpace(match.group(5))) - -async def set_profile_property(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - - encoded_value = encode_property_value(args.key, args.value) - profile = await s.async_get_profile() - fname = "async_set_" + args.key - f = getattr(profile, fname) - await f(encoded_value) - -async def read(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - if args.mode == "char": - async with iterm2.KeystrokeMonitor(connection) as mon: - keystroke = await mon.async_get() - print(keystroke) - elif args.mode == "line": - async with s.get_keystroke_reader() as reader: - eol = False - line = "" - while not eol: - k = await reader.get() - for e in k: - c = e.characters - if c == "\r" or c == "\n": - eol = True - break - line += c - - print(line) - -async def get_window_property(connection, args): - a = await iterm2.async_get_app(connection) - w = a.get_window_by_id(args.id) - if w is None: - print("bad window ID") - else: - if args.name == "frame": - frame = await w.async_get_frame() - print("{},{},{},{}".format(frame.origin.x,frame.origin.y,frame.size.width,frame.size.height)) - elif args.name == "fullscreen": - print(await w.async_get_fullscreen(connection)) - -async def set_window_property(connection, args): - a = await iterm2.async_get_app(connection) - w = a.get_window_by_id(args.id) - if w is None: - print("bad window ID") - else: - if args.name == "frame": - parts = args.value.split(",") - frame = iterm2.Frame(iterm2.Point(int(parts[0]), int(parts[1])), iterm2.Size(int(parts[2]), int(parts[3]))) - await w.async_set_frame(frame) - elif args.name == "fullscreen": - await w.async_set_fullscreen(args.value == "true") - -async def inject(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - if s is None: - print("bad session ID") - else: - await s.async_inject(args.data.encode()) - -async def activate(connection, args): - a = await iterm2.async_get_app(connection) - if args.mode == "session": - s = a.get_session_by_id(args.id) - if s is None: - print("bad session ID") - else: - await s.async_activate() - elif args.mode == "tab": - t = a.get_tab_by_id(args.id) - if t is None: - print("bad tab ID") - else: - await t.async_select() - elif args.mode == "window": - w = a.get_window_by_id(args.id) - if w is None: - print("bad window ID") - else: - await w.async_activate() - -async def activate_app(connection, args): - a = await iterm2.async_get_app(connection) - await a.async_activate(raise_all_windows=args.raise_all_windows, ignoring_other_apps=args.ignoring_other_apps) - -async def set_variable(connection, args): - a = await iterm2.async_get_app(connection) - if args.session: - s = a.get_session_by_id(args.session) - if s is None: - print("bad session ID") - return - await s.async_set_variable(args.name, args.value) - elif args.tab: - t = a.get_tab_by_id(args.tab) - if t is None: - print("bad tab ID") - return - await t.async_set_variable(args.name, args.value) - else: - await a.async_set_variable(args.name, args.value) - -async def get_variable(connection, args): - a = await iterm2.async_get_app(connection) - if args.session: - s = a.get_session_by_id(args.session) - if s is None: - print("bad session ID") - return - value = await s.async_get_variable(args.name) - print(value) - elif args.tab: - t = a.get_tab_by_id(args.tab) - if t is None: - print("bad tab ID") - return - value = await t.async_get_variable(args.name) - print(value) - else: - value = await a.async_get_variable(args.name) - print(value) - -async def list_variables(connection, args): - a = await iterm2.async_get_app(connection) - if args.session: - s = a.get_session_by_id(args.session) - if s is None: - print("bad session ID") - return - value = await s.async_get_variable("*") - for name in value: - print(name) - elif args.tab: - t = a.get_tab_by_id(args.tab) - if t is None: - print("bad tab ID") - return - value = await t.async_get_variable("*") - for name in value: - print(name) - else: - value = await a.async_get_variable("*") - for name in value: - print(name) - -async def saved_arrangement(connection, args): - if args.window is not None: - a = await iterm2.async_get_app(connection) - w = a.get_window_by_id(args.window) - if w is None: - print("bad window ID") - return - if args.action == "save": - await w.async_save_window_as_arrangement(args.name) - elif args.action == "restore": - await w.async_restore_window_arrangement(args.name) - else: - if args.action == "save": - await iterm2.Arrangement.async_save(connection, args.name) - elif args.action == "restore": - await iterm2.Arrangement.async_restore(connection, args.name) - -async def show_focus(connection, args): - a = await iterm2.async_get_app(connection) - if a.app_active: - print("App is active") - w = a.current_terminal_window - print("Key window: {}".format(w.window_id)) - print("") - for w in a.terminal_windows: - t = a.get_tab_by_id(w.selected_tab_id) - print("Selected tab in {}: {}".format(w.window_id, t.tab_id)) - s = a.get_session_by_id(t.active_session_id) - print(" Active session is: {}".format(s.pretty_str())) - -async def list_profiles(connection, args): - guids = args.guids.split(",") if args.guids is not None else None - properties = args.properties.split(",") if args.properties is not None else None - profiles = await iterm2.PartialProfile.async_query(connection, guids=guids, properties=properties) - for profile in profiles: - keys = list(profile.all_properties.keys()) - keys.sort() - for k in keys: - v = profile.all_properties[k] - print("{}: {}".format(k, v)) - print("") - -async def set_grid_size(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - await s.async_set_grid_size(iterm2.Size(args.width, args.height)) - -async def list_tmux_connections(connection, args): - connections = await iterm2.async_get_tmux_connections(connection) - for connection in connections: - print("Connection ID: {}\nOwning session: {}".format(connection.connection_id, connection.owning_session)) - -async def send_tmux_command(connection, args): - connections = await iterm2.async_get_tmux_connections(connection) - ids = [] - for connection in connections: - if connection.connection_id == args.connection_id: - print(await connection.async_send_command(args.command)) - return; - ids.append(connection.connection_id) - print("No connection with id {} found. Have: {}".format(args.connection_id, ", ".join(ids))) - -async def set_tmux_window_visible(connection, args): - connections = await iterm2.async_get_tmux_connections(connection) - ids = [] - for connection in connections: - if connection.connection_id == args.connection_id: - await connection.async_set_tmux_window_visible(args.window_id, args.visible) - return; - ids.append(connection.connection_id) - print("No connection with id {} found. Have: {}".format(args.connection_id, ", ".join(ids))) - -async def sort_tabs(connection, args): - app = await iterm2.async_get_app(connection) - for w in app.terminal_windows: - tabs = w.tabs - for t in tabs: - t.tab_name = await t.async_get_variable("currentSession.session.name") - def tab_name(t): - return t.tab_name - sorted_tabs = sorted(tabs, key=tab_name) - await w.async_set_tabs(sorted_tabs) - -async def list_color_presets(connection, args): - presets = await iterm2.ColorPreset.async_get_list(connection) - for preset in presets: - print(preset) - -async def set_color_preset(connection, args): - preset = await iterm2.ColorPreset.async_get(connection, args.preset) - profiles = await iterm2.PartialProfile.async_query(connection, properties=['Guid', 'Name']) - for partial in profiles: - if partial.name == args.profile: - profile = await partial.async_get_full_profile() - await profile.async_set_color_preset(preset) - -async def monitor_variable(connection, args): - if args.session: - scope = iterm2.VariableScopes.SESSION - identifier = args.session - elif args.tab: - scope = iterm2.VariableScopes.TAB - identifier = args.tab - elif args.window: - scope = iterm2.VariableScopes.WINDOW - identifier = args.window - elif args.app: - scope = iterm2.VariableScopes.APP - identifier = '' - else: - assert False - async with iterm2.VariableMonitor(connection, scope, args.name, identifier) as monitor: - value = await monitor.async_get() - print(f"New value: {value}") - -async def monitor_focus(connection, args): - async with iterm2.FocusMonitor(connection) as monitor: - update = await monitor.async_get_next_update() - print("Update: {}".format(update)) - -async def set_cursor_color(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - partial = iterm2.LocalWriteOnlyProfile() - r, g, b = list(map(int, args.color.split(","))) - c = iterm2.Color(r, g, b) - partial.set_cursor_color(c) - await s.async_set_profile_properties(partial) - -async def monitor_screen(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - async with s.get_screen_streamer() as streamer: - done = False - while not done: - contents = await streamer.async_get() - for i in range(contents.number_of_lines): - line = contents.line(i) - if args.query in line.string: - return - -async def show_selection(connection, args): - a = await iterm2.async_get_app(connection) - s = a.get_session_by_id(args.session) - selection = await s.async_get_selection() - for sub in selection.subSelections: - print("Sub selection: {}".format(await sub.async_get_string(connection, s.session_id))) - print("Text: {}".format(await selection.async_get_string(connection, s.session_id, s.grid_size.width))) - -def make_parser(): - parser = argparse.ArgumentParser(description='iTerm2 CLI') - subparsers = parser.add_subparsers(help='Commands') - - list_sessions_parser = subparsers.add_parser("list-sessions", help="List sessions") - list_sessions_parser.set_defaults(func=list_sessions) - - show_hierarchy_parser = subparsers.add_parser("show-hierarchy", help="Show all windows, tabs, and sessions") - show_hierarchy_parser.set_defaults(func=show_hierarchy) - - send_text_parser = subparsers.add_parser("send-text", help="Send text as though the user had typed it") - send_text_parser.add_argument('session', type=str, help='Session ID') - send_text_parser.add_argument("text", type=str, help='Text to send') - send_text_parser.set_defaults(func=send_text) - - create_tab_parser = subparsers.add_parser("create-tab", help="Create a new tab or window") - create_tab_parser.add_argument('--profile', type=str, nargs='?', help='Profile name') - create_tab_parser.add_argument('--window', type=str, nargs='?', help='Window ID') - create_tab_parser.add_argument('--index', type=int, nargs='?', help='Desired tab index') - create_tab_parser.add_argument('--command', type=str, nargs='?', help='Command') - create_tab_parser.set_defaults(func=create_tab) - - split_pane_parser = subparsers.add_parser("split-pane", help="Split a pane into two") - split_pane_parser.add_argument('session', type=str, help='Session ID') - split_pane_parser.add_argument('--vertical', action='store_true', help='Split vertically?', default=False) - split_pane_parser.add_argument('--before', action='store_true', help='Spilt left or above target', default=False) - split_pane_parser.add_argument('--profile', type=str, nargs='?', help='Profile name') - split_pane_parser.set_defaults(func=split_pane) - - get_buffer_parser = subparsers.add_parser("get-buffer", help="Get screen contents") - get_buffer_parser.add_argument("session", type=str, help="Session ID") - get_buffer_parser.set_defaults(func=get_buffer) - - get_prompt_parser = subparsers.add_parser("get-prompt", help="Get info about prompt, if available. Gives either the current prompt or the last prompt if a command is being run. Requires shell integration for prompt detection.") - get_prompt_parser.add_argument("session", type=str, help="Session ID") - get_prompt_parser.set_defaults(func=get_prompt) - - get_profile_property_parser = subparsers.add_parser("get-profile-property", help="Get a session's profile settings") - get_profile_property_parser.add_argument("session", type=str, help="Session ID") - get_profile_property_parser.add_argument("keys", type=str, nargs='?', help="Comma separated keys. Omit to get all. Valid keys are: " + ", ".join(profile_properties())) - get_profile_property_parser.set_defaults(func=get_profile_property) - - set_profile_parser = subparsers.add_parser("set-profile-property", help="Set a session's profile setting") - set_profile_parser.add_argument("session", type=str, help="Session ID") - set_profile_parser.add_argument("key", type=str, help="Key to set. Valid keys are: " + ", ".join(profile_properties())) - set_profile_parser.add_argument("value", type=str, help="New value.") - set_profile_parser.set_defaults(func=set_profile_property) - - read_parser = subparsers.add_parser("read", help="Wait for a input.") - read_parser.add_argument("session", type=str, help="Session ID") - read_parser.add_argument("mode", type=str, help="What to read", choices=[ "char", "line" ]) - read_parser.set_defaults(func=read) - - get_window_property_parser = subparsers.add_parser("get-window-property", help="Get a property of a window") - get_window_property_parser.add_argument("id", type=str, help="Window ID") - get_window_property_parser.add_argument("name", type=str, help="Property name", choices=["frame", "fullscreen"]) - get_window_property_parser.set_defaults(func=get_window_property) - - set_window_property_parser = subparsers.add_parser("set-window-property", help="Set a property of a window") - set_window_property_parser.add_argument("id", type=str, help="Window ID") - set_window_property_parser.add_argument("name", type=str, help="Property name", choices=["frame", "fullscreen"]) - set_window_property_parser.add_argument("value", type=str, help="New value. For frame: x,y,width,height; for fullscreen: true or false") - set_window_property_parser.set_defaults(func=set_window_property) - - inject_parser = subparsers.add_parser("inject", help="Inject a string as though it were program output") - inject_parser.add_argument("session", type=str, help="Session ID") - inject_parser.add_argument("data", type=str, help="Data to inject") - inject_parser.set_defaults(func=inject) - - activate_parser = subparsers.add_parser("activate", help="Activate a session, tab, or window.") - activate_parser.add_argument("mode", type=str, help="What kind of object to activate", choices=["session", "tab", "window"]) - activate_parser.add_argument("id", type=str, help="ID of object to activate") - activate_parser.set_defaults(func=activate) - - activate_app_parser = subparsers.add_parser("activate-app", help="Activate the app") - activate_app_parser.add_argument('--raise_all_windows', action='store_true', help='Raise all windows?', default=False) - activate_app_parser.add_argument('--ignoring_other_apps', action='store_true', help='Activate ignoring other apps (may steal focus)', default=False) - activate_app_parser.set_defaults(func=activate_app) - - set_variable_parser = subparsers.add_parser("set-variable", help="Set a user-defined variable in a session. See Badges documentation for details.") - set_variable_parser.add_argument("--session", type=str, nargs='?', help="Session ID") - set_variable_parser.add_argument("--tab", type=str, nargs='?', help="Tab ID") - set_variable_parser.add_argument("name", type=str, help="Variable name. Starts with \"user.\"") - set_variable_parser.add_argument("value", type=str, help="New value") - set_variable_parser.set_defaults(func=set_variable) - - get_variable_parser = subparsers.add_parser("get-variable", help="Get a variable in a session. See Badges documentation for details.") - get_variable_parser.add_argument("--session", type=str, nargs='?', help="Session ID") - get_variable_parser.add_argument("--tab", type=str, nargs='?', help="Tab ID") - get_variable_parser.add_argument("name", type=str, help="Variable name. Starts with \"user.\"") - get_variable_parser.set_defaults(func=get_variable) - - list_variables_parser = subparsers.add_parser("list-variables", help="Lists variable names available in a session.") - list_variables_parser.add_argument("--session", type=str, nargs='?', help="Session ID") - list_variables_parser.add_argument("--tab", type=str, nargs='?', help="Tab ID") - list_variables_parser.set_defaults(func=list_variables) - - saved_arrangement_parser = subparsers.add_parser("saved-arrangement", help="Saves and restores window arrangements") - saved_arrangement_parser.add_argument("action", type=str, help="Action to perform", choices=["save", "restore"]) - saved_arrangement_parser.add_argument("name", type=str, help="Arrangement name") - saved_arrangement_parser.add_argument('--window', type=str, nargs='?', help='Window ID to save/restore to') - saved_arrangement_parser.set_defaults(func=saved_arrangement) - - show_focus_parser = subparsers.add_parser("show-focus", help="Show active windows, tabs, and panes") - show_focus_parser.set_defaults(func=show_focus) - - list_profiles_parser = subparsers.add_parser("list-profiles", help="List profiles") - list_profiles_parser.add_argument("--guids", type=str, nargs='?', help="Comma-delimited list of profiles to list. Omit to get all of them.") - list_profiles_parser.add_argument("--properties", type=str, nargs='?', help="Comma-delimited list of properties to request. Omit to get all of them.") - list_profiles_parser.set_defaults(func=list_profiles) - - set_grid_size_parser = subparsers.add_parser("set-grid-size", help="Set size of session") - set_grid_size_parser.add_argument("session", type=str, help="Session ID") - set_grid_size_parser.add_argument("width", type=int, help="Width in columns") - set_grid_size_parser.add_argument("height", type=int, help="Height in rows") - set_grid_size_parser.set_defaults(func=set_grid_size) - - list_tmux_connections_parser = subparsers.add_parser("list-tmux-connections", help="List tmux integration connections") - list_tmux_connections_parser.set_defaults(func=list_tmux_connections) - - send_tmux_command_parser = subparsers.add_parser("send-tmux-command", help="Send a tmux command to a tmux integration connection") - send_tmux_command_parser.add_argument("connection_id", type=str, help="tmux connection ID") - send_tmux_command_parser.add_argument("command", type=str, help="Command to send") - send_tmux_command_parser.set_defaults(func=send_tmux_command) - - set_tmux_window_visible_parser = subparsers.add_parser("set-tmux-window-visible", help="Show or hide a tmux integration window (represented as a tab in iTerm2)") - set_tmux_window_visible_parser.add_argument("connection_id", type=str, help="tmux connection ID") - set_tmux_window_visible_parser.add_argument("window_id", type=str, help="tmux window ID (number)") - set_tmux_window_visible_parser.add_argument('--visible', dest='visible', action='store_true') - set_tmux_window_visible_parser.add_argument('--no-visible', dest='visible', action='store_false') - set_tmux_window_visible_parser.set_defaults(visible=True) - set_tmux_window_visible_parser.set_defaults(func=set_tmux_window_visible) - - sort_tabs_parser = subparsers.add_parser("sort-tabs", help="Sort tabs alphabetically by name") - sort_tabs_parser.set_defaults(func=sort_tabs) - - list_color_presets_parser = subparsers.add_parser("list-color-presets", help="Lists names of color presets") - list_color_presets_parser.set_defaults(func=list_color_presets) - - set_color_preset_parser = subparsers.add_parser("set-color-preset", help="Lists names of color presets") - set_color_preset_parser.add_argument("profile", type=str, help="Profile name") - set_color_preset_parser.add_argument("preset", type=str, help="Color preset name") - set_color_preset_parser.set_defaults(func=set_color_preset) - - monitor_variable_parser = subparsers.add_parser("monitor-variable", help="Monitor changes to a variable") - monitor_variable_parser.add_argument("name", type=str, help="variable name") - monitor_variable_parser.add_argument('--session', type=str, nargs='?', help='Session ID for the variable scope') - monitor_variable_parser.add_argument('--tab', type=str, nargs='?', help='Tab ID for the variable scope') - monitor_variable_parser.add_argument('--window', type=str, nargs='?', help='Window ID for the variable scope') - monitor_variable_parser.add_argument('--app', action='store_true', help='App scope', default=False) - monitor_variable_parser.set_defaults(func=monitor_variable) - - monitor_focus_parser = subparsers.add_parser("monitor-focus", help="Monitor changes to focus") - monitor_focus_parser.set_defaults(func=monitor_focus) - - set_cursor_color_parser = subparsers.add_parser("set-cursor-color", help="Set cursor color") - set_cursor_color_parser.add_argument("session", type=str, help="Session ID") - set_cursor_color_parser.add_argument("color", type=str, help="Color as red,green,blue where each value is in 0-255") - set_cursor_color_parser.set_defaults(func=set_cursor_color) - - monitor_screen_parser = subparsers.add_parser("monitor-screen", help="Monitor screen contents") - monitor_screen_parser.add_argument("session", type=str, help="Session ID") - monitor_screen_parser.add_argument("query", type=str, help="Stop when this text is seen") - monitor_screen_parser.set_defaults(func=monitor_screen) - - show_selection_parser = subparsers.add_parser("show-selection", help="Shows the selected text in a session") - show_selection_parser.add_argument("session", type=str, help="Session ID") - show_selection_parser.set_defaults(func=show_selection) - - return parser - -def main(argv): - logging.basicConfig() - - parser = make_parser() - args = parser.parse_args(argv[1:]) - if "func" not in args: - print(parser.format_help()) - raise argparse.ArgumentTypeError('Missing command') - - async def wrapper(connection): - try: - await args.func(connection, args) - except Exception as e: - print(traceback.format_exc()) - - iterm2.run_until_complete(wrapper) - -if __name__ == "__main__": - try: - main(sys.argv) - except Exception as e: - print(traceback.format_exc()) - sys.exit(1) diff --git a/.config/zsh/.iterm2/it2attention b/.config/zsh/.iterm2/it2attention deleted file mode 100755 index 6947a7e..0000000 --- a/.config/zsh/.iterm2/it2attention +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function show_help() { - echo "Usage:" 1>& 2 - echo " $(basename $0) start" 1>& 2 - echo " Begin bouncing the dock icon if another app is active" 1>& 2 - echo " $(basename $0) stop" 1>& 2 - echo " Stop bouncing the dock icon if another app is active" 1>& 2 - echo " $(basename $0) once" 1>& 2 - echo " Bounce the dock icon once if another app is active" 1>& 2 - echo " $(basename $0) fireworks" 1>& 2 - echo " Show an explosion animation at the cursor" 1>& 2 -} - -function start_bounce() { - print_osc - printf "1337;RequestAttention=1" - print_st -} - -function stop_bounce() { - print_osc - printf "1337;RequestAttention=0" - print_st -} - -function bounce_once() { - print_osc - printf "1337;RequestAttention=once" - print_st -} - -function fireworks() { - print_osc - printf "1337;RequestAttention=fireworks" - print_st -} - -## Main -if [[ $# == 0 ]] -then - show_help - exit 1 -fi - -if [[ $1 == start ]] -then - start_bounce -elif [[ $1 == stop ]] -then - stop_bounce -elif [[ $1 == once ]] -then - bounce_once -elif [[ $1 == fireworks ]] -then - fireworks -else - show_help - exit 1 -fi - diff --git a/.config/zsh/.iterm2/it2check b/.config/zsh/.iterm2/it2check deleted file mode 100755 index 39acf4e..0000000 --- a/.config/zsh/.iterm2/it2check +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# Make sure stdin and stdout are a tty. -if [ ! -t 0 ] ; then - exit 1 -fi -if [ ! -t 1 ] ; then - exit 1 -fi - -# Read some bytes from stdin. Pass the number of bytes to read as the first argument. -function read_bytes() -{ - numbytes=$1 - dd bs=1 count=$numbytes 2>/dev/null -} - -function read_dsr() { - # Reading response to DSR. - dsr="" - spam=$(read_bytes 2) - byte=$(read_bytes 1) - while [ "${byte}" != "n" ]; do - dsr=${dsr}${byte} - byte=$(read_bytes 1) - done - echo ${dsr} -} - -# Extract the terminal name from DSR 1337 -function terminal { - echo -n "$1" | sed -e 's/ .*//' -} - -# Extract the version number from DSR 1337 -function version { - echo -n "$1" | sed -e 's/.* //' -} - -trap clean_up EXIT -_STTY=$(stty -g) ## Save current terminal setup - -function clean_up() { - stty "$_STTY" ## Restore terminal settings -} - -# Enter raw mode and turn off echo so the terminal and I can chat quietly. -stty -echo -icanon raw - -# Support for the extension first appears in this version of iTerm2: -MIN_VERSION=2.9.20160304 -if [ $# -eq 1 ]; then - MIN_VERSION=$1 -fi - -# Send iTerm2-proprietary code. Other terminals ought to ignore it (but are -# free to use it respectfully). The response won't start with a 0 so we can -# distinguish it from the response to DSR 5. It should contain the terminal's -# name followed by a space followed by its version number and be terminated -# with an n. -echo -n '' - -# Report device status. Responds with esc [ 0 n. All terminals support this. We -# do this because if the terminal will not respond to iTerm2's custom escape -# sequence, we can still read from stdin without blocking indefinitely. -echo -n '' - -version_string=$(read_dsr) -if [ "${version_string}" != "0" -a "${version_string}" != "3" ]; then - # Already read DSR 1337. Read DSR 5 and throw it away. - dsr=$(read_dsr) -else - # Terminal didn't respond to the DSR 1337. The response we read is from DSR 5. - version_string="" -fi - -# Extract the terminal name and version number from the response. -version=$(version "${version_string}") -term=$(terminal "${version_string}") - -# Check if they match what we're looking for. This becomes the return code of the script. -test "$term" = ITERM2 -a \( "$version" \> "$MIN_VERSION" -o "$version" = "$MIN_VERSION" \) diff --git a/.config/zsh/.iterm2/it2copy b/.config/zsh/.iterm2/it2copy deleted file mode 100755 index e045952..0000000 --- a/.config/zsh/.iterm2/it2copy +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -trap clean_up EXIT -trap clean_up INT - -inosc=0 - -function clean_up() { - if [[ $inosc == 1 ]] - then - print_st - fi -} - -function show_help() { - echo "Usage: $(basename $0)" 1>& 2 - echo " Copies to clipboard from standard input" 1>& 2 - echo " $(basename $0) filename" 1>& 2 - echo " Copies to clipboard from file" 1>& 2 -} - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -# Look for command line flags. -while [ $# -gt 0 ]; do - case "$1" in - -h|--h|--help) - show_help - exit - ;; - -*) - error "Unknown option flag: $1" - show_help - exit 1 - ;; - *) - if [ -r "$1" ] ; then - data=$(base64 < "$1") - print_osc - inosc=1 - printf '1337;Copy=:%s' "$data" - print_st - inosc=0 - exit 0 - else - error "it2copy: $1: No such file or directory" - exit 2 - fi - ;; - esac - shift -done - -data=$(base64) -print_osc -inosc=1 -printf '1337;Copy=:%s' "$data" -print_st -inosc=0 - diff --git a/.config/zsh/.iterm2/it2dl b/.config/zsh/.iterm2/it2dl deleted file mode 100755 index 8be4462..0000000 --- a/.config/zsh/.iterm2/it2dl +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -if [ $# -lt 1 ]; then - echo "Usage: $(basename $0) file ..." - exit 1 -fi - -function load_version() { - if [ -z ${IT2DL_BASE64_VERSION+x} ]; then - export IT2DL_BASE64_VERSION=$(base64 --version 2>&1) - fi -} - -function b64_encode() { - load_version - if [[ "$IT2DL_BASE64_VERSION" =~ GNU ]]; then - # Disable line wrap - base64 -w0 - else - base64 - fi -} - - -for fn in "$@" -do - if [ -r "$fn" ] ; then - [ -d "$fn" ] && { echo "$fn is a directory"; continue; } - printf '\033]1337;File=name=%s;' $(echo -n "$fn" | b64_encode) - wc -c "$fn" | awk '{printf "size=%d",$1}' - printf ":" - base64 < "$fn" - printf '\a' - else - echo File $fn does not exist or is not readable. - fi -done diff --git a/.config/zsh/.iterm2/it2getvar b/.config/zsh/.iterm2/it2getvar deleted file mode 100755 index 94c4795..0000000 --- a/.config/zsh/.iterm2/it2getvar +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then printf "\033Ptmux;\033\033]" - else - printf "\033]" >& 2 - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" >& 2 - else - printf "\a" >& 2 - fi -} - -function show_help() { - echo "Usage:" 1>& 2 - echo " $(basename $0) name" 1>& 2 -} - -# Read some bytes from stdin. Pass the number of bytes to read as the first argument. -function read_bytes() { - numbytes=$1 - dd bs=1 count=$numbytes 2>/dev/null -} - -# read_until c -# Returns bytes read from stdin up to but not including the fist one equal to c -function read_until() { - result="" - while : - do - b=$(read_bytes 1) - if [[ $b == $1 ]] - then - echo "$result" - return - fi - result="$result$b" - done -} - -## Main -if [[ $# != 1 ]] -then - show_help - exit 1 -fi - -if ! test -t 1 -then - echo "Standard error not a terminal" - exit 1 -fi - -trap clean_up EXIT -_STTY=$(stty -g) ## Save current terminal setup - -function clean_up() { - stty "$_STTY" ## Restore terminal settings -} - -# Enter raw mode and turn off echo so the terminal and I can chat quietly. -stty -echo -icanon raw - -print_osc -printf "1337;ReportVariable=%s" "$(printf "%s" "$1" | base64)" >& 2 -print_st - -VERSION=$(base64 --version 2>&1) -if [[ "$VERSION" =~ fourmilab ]]; then - BASE64ARG=-d -elif [[ "$VERSION" =~ GNU ]]; then - BASE64ARG=-di -else - BASE64ARG=-D -fi - -ignore=$(read_bytes 1) -name=$(read_until ) -re='^]1337;ReportVariable=(.*)' -if [[ $name =~ $re ]] -then - printf "%s" $(base64 $BASE64ARG <<< ${BASH_REMATCH[1]}) - exit 0 -else - exit 1 -fi - diff --git a/.config/zsh/.iterm2/it2git b/.config/zsh/.iterm2/it2git deleted file mode 100755 index 2d3805a..0000000 --- a/.config/zsh/.iterm2/it2git +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -# This script sets iTerm2 user-defined variables describing the state of the git -# repo in the current directory. -# -# For more information on the status bar, see: -# https://www.iterm2.com/3.3/documentation-status-bar.html -# -# Installation instructions for this script: -# -# bash: Place this in .bashrc. -# -------------------------------------------------------------------------------------- -# function iterm2_print_user_vars() { -# it2git -# } - -# fish: Place this in ~/.config/fish/config.fish after the line -# "source ~/.iterm2_shell_integration.fish". -# -------------------------------------------------------------------------------------- -# function iterm2_print_user_vars -# it2git -# end - -# tcsh: Place this in .tcshrc -# -------------------------------------------------------------------------------------- -# alias get_current_branch "bash -c '((git branch 2> /dev/null) | grep \* | cut -c3-)'" -# alias _iterm2_user_defined_vars 'it2git' - -# zsh:Place this in .zshrc after "source /Users/georgen/.iterm2_shell_integration.zsh". -# -------------------------------------------------------------------------------------- -# iterm2_print_user_vars() { -# it2git -# } - -GIT_BINARY=/usr/bin/git - -dirty() { - # Outputs "dirty" or "clean" - OUTPUT=$("$GIT_BINARY" status --porcelain --ignore-submodules -unormal 2>/dev/null) - if (($?)); then - echo "clean" - return - fi - if [ -z "$OUTPUT" ]; then - echo "clean" - else - echo "dirty" - fi -} - -counts() { - OUTPUT=$("$GIT_BINARY" rev-list --left-right --count HEAD...@'{u}' 2>/dev/null) - if (($?)); then - echo "error" - return - fi - echo "$OUTPUT" -} - -branch() { - OUTPUT=$("$GIT_BINARY" symbolic-ref -q --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null) - if (($?)); then - return - fi - echo "$OUTPUT" -} - -adds() { - "${GIT_BINARY}" ls-files --others --exclude-standard | wc -l -} - -deletes() { - "${GIT_BINARY}" ls-files --deleted --exclude-standard | wc -l -} -function iterm2_begin_osc { - printf "\033]" -} - -function iterm2_end_osc { - printf "\007" -} - -function iterm2_set_user_var() { - iterm2_begin_osc - printf "1337;SetUserVar=%s=%s" "$1" $(printf "%s" "$2" | base64 | tr -d '\n') - iterm2_end_osc -} - -git_poll () { - DIRECTORY="$1" - cd "$DIRECTORY" - DIRTY=$(dirty) - COUNTS=$(counts) - PUSH_COUNT=$(cut -f1 <<< "$COUNTS") - PULL_COUNT=$(cut -f2 <<< "$COUNTS") - BRANCH=$(branch) - - iterm2_set_user_var gitBranch "$BRANCH" - iterm2_set_user_var gitDirty "$DIRTY" - iterm2_set_user_var gitPushCount "$PUSH_COUNT" - iterm2_set_user_var gitPullCount "$PULL_COUNT" - iterm2_set_user_var gitAdds "$ADDS" - iterm2_set_user_var gitDeletes "$DELETES" -} - -"$GIT_BINARY" rev-parse --git-dir 2>/dev/null >/dev/null -if (($?)); then - iterm2_set_user_var gitBranch "" - iterm2_set_user_var gitDirty "" - iterm2_set_user_var gitPushCount "" - iterm2_set_user_var gitPullCount "" - iterm2_set_user_var gitAdds "" - iterm2_set_user_var gitDeletes "" -else - git_poll "$PWD" -fi - - diff --git a/.config/zsh/.iterm2/it2profile b/.config/zsh/.iterm2/it2profile deleted file mode 100755 index cd8516b..0000000 --- a/.config/zsh/.iterm2/it2profile +++ /dev/null @@ -1,170 +0,0 @@ -#!/bin/bash - -set -o pipefail - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function get_b64_version() { - if [[ -z "${BASE64_VERSION+x}" ]]; then - BASE64_VERSION=$(base64 --version 2>&1) - export BASE64_VERSION - fi -} - -function b64_encode() { - get_b64_version - if [[ $BASE64_VERSION =~ GNU ]]; then - # Disable line wrap - base64 -w0 - else - base64 - fi -} - -function b64_decode() { - get_b64_version - if [[ $BASE64_VERSION =~ fourmilab ]]; then - BASE64_ARG=-d - elif [[ $BASE64_VERSION =~ GNU ]]; then - BASE64_ARG=-di - else - BASE64_ARG=-D - fi - base64 $BASE64_ARG -} - -function error() { - errcho "ERROR: $*" -} - -function errcho() { - echo "$@" >&2 -} - -function show_help() { - errcho - errcho "Usage: it2profile -s profile_name" - errcho " it2profile -g" - errcho - errcho "Change iTerm2 session profile on the fly" - errcho - errcho "Options:" - errcho - errcho " -s Set current iTerm2 session profile to specified profile name" - errcho " empty string refers to profile marked as Default" - errcho " -g Get current iTerm2 session profile name" - errcho " -r Reset to the session initial profile" - errcho -} - -function check_dependency() { - if ! (builtin command -V "$1" >/dev/null 2>&1); then - error "missing dependency: can't find $1" - exit 1 - fi -} - -# get_profile / set_profile -# -# These functions uses POSIX standard synonym for the controlling terminal -# associated with the current process group - /dev/tty. It is useful for programs -# that wish to be sure of writing or reading data from the terminal -# no matter how STDIN/STDOUT/STDERR has been redirected. -# -# get_profile uses iTerm2 Session Context variable "profileName" to -# get currently active profile name. -# -function get_profile() { - trap 'cleanup' EXIT - stty -f /dev/tty -echo 2&> /dev/null || stty -F /dev/tty -echo - exec 9<> /dev/tty - print_osc >&9 - printf "1337;ReportVariable=cHJvZmlsZU5hbWU=" >&9 - print_st >&9 - read -r -t 5 -d $'\a' iterm_response <&9 - exec 9>&- - stty -f /dev/tty -echo 2&> /dev/null || stty -F /dev/tty -echo - [[ "$iterm_response" =~ ReportVariable= ]] || { - error "Failed to read response from iTerm2" - exit 2 - } - echo "$(b64_decode <<< ${iterm_response#*=})" -} - -function cleanup() { - stty -f /dev/tty echo 2&> /dev/null || stty -F /dev/tty echo -} - -function set_profile() { - exec 9> /dev/tty - print_osc >&9 - printf '1337;SetProfile=%s' "$1" >&9 - print_st >&9 - exec 9>&- -} - -# Show help if no arguments -if [ $# -eq 0 ]; then - show_help - exit -fi - -check_dependency stty -check_dependency base64 - -# Process command line arguments -case "$1" in - -h|--h|--help) - show_help - exit - ;; - -s|--s|--set) - [[ $# -eq 2 ]] || { - error "-s option requires exactly 1 argument - profile name" - show_help - exit 1 - } - set_profile "$2" - ;; - -g|--g|--get) - [[ $# -eq 1 ]] || { - error "-g option does not accept any argument" - show_help - exit 1 - } - get_profile - ;; - -r|--r|--reset) - [[ $# -eq 1 ]] || { - error "-r option does not accept any argument" - show_help - exit 1 - } - set_profile "${ITERM_PROFILE:-}" - ;; - *) - error "Unknown option: $1" - show_help - exit 1 - ;; -esac - -exit 0 diff --git a/.config/zsh/.iterm2/it2setcolor b/.config/zsh/.iterm2/it2setcolor deleted file mode 100755 index 7871d6f..0000000 --- a/.config/zsh/.iterm2/it2setcolor +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/bash -open=0 - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -# set_color key rgb -function set_color() { - print_osc - printf '1337;SetColors=%s=%s' "$1" "$2" - print_st -} - -function error() { - echo "ERROR: $*" 1>&2 -} - -function show_help() { - if [ $open = 1 ]; then - print_st - fi - echo "Usage" - echo "" - echo "1) To set a specific color to an RGB value:" - echo " it2setcolor name color [name color...]" 1>& 2 - echo "For example:" - echo " it2setcolor fg fff" - echo "" - echo "name is one of:" - echo " fg bg bold link selbg selfg curbg curfg underline tab" - echo " black red green yellow blue magenta cyan white" - echo " br_black br_red br_green br_yellow br_blue br_magenta br_cyan br_white" - echo "" - echo "color is of the format:" - echo " RGB (three hex digits, like fff)" - echo " RRGGBB (six hex digits, like f0f0f0)" - echo " cs:RGB (cs is a color space name)" - echo " cs:RRGGBB (cs is a color space name)" - echo "" - echo " The color space names accepted in the color are:" - echo " srgb (sRGB, the default if none is specified)" - echo " rgb (Apple's old device-independent colorspace)" - echo " p3 (Apple's fancy large-gamut colorspace)" - echo "" - echo "2) To switch to a named color preset:" - echo " it2setcolor preset name" - echo "For example:" - echo " it2setcolor preset 'Light Background'" - echo "" - echo "3) To reset the current tab's color to the system default:" - echo " it2setcolor tab default" -} - -# Show help if no arguments and no stdin. -if [ $# -eq 0 ]; then - show_help - exit -fi - -# Look for command line flags. -while [ $# -gt 0 ]; do - case "$1" in - -h|--h|--help) - show_help - exit - ;; - -*) - error "Unknown option flag: $1" - show_help - exit 1 - ;; - *) - if [ $# -lt 2 ]; then - show_help - exit - fi - if [ $open = 0 ]; then - open=1 - print_osc - printf '1337;SetColors=' - else - printf "," - fi - # name is not checked for validity because we'd like this to work with future colors, too. - printf "%s=%s" "$1" "$2" - shift - ;; - esac - shift -done - -if [ $open = 1 ]; then - print_st -else - show_help -fi - -exit 0 - diff --git a/.config/zsh/.iterm2/it2setkeylabel b/.config/zsh/.iterm2/it2setkeylabel deleted file mode 100755 index c8320e4..0000000 --- a/.config/zsh/.iterm2/it2setkeylabel +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/bash - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function show_help() { - echo "Usage:" 1>& 2 - echo " $(basename $0) set Fn Label" 1>& 2 - echo " Where n is a value from 1 to 20" 1>& 2 - echo " $(basename $0) set status Label" 1>& 2 - echo " Sets the touch bar status button's label" 1>& 2 - echo " $(basename $0) push [name]" 1>& 2 - echo " Saves the current labels with an optional name. Resets labels to their default value, unless name begins with a "." character." 1>& 2 - echo " $(basename $0) pop [name]" 1>& 2 - echo " If name is given, all key labels up to and including the one with the matching name are popped." 1>& 2 - echo "" 1>& 2 - echo "Example:" 1>& 2 - echo "#!/bin/bash" 1>& 2 - echo "# Wrapper script for mc that sets function key labels" 1>& 2 - echo "NAME=mc_\$RANDOM" 1>& 2 - echo "# Save existing labels" 1>& 2 - echo "$(basename $0) push \$NAME" 1>& 2 - echo "$(basename $0) set F1 Help" 1>& 2 - echo "$(basename $0) set F2 Menu" 1>& 2 - echo "$(basename $0) set F3 View" 1>& 2 - echo "$(basename $0) set F4 Edit" 1>& 2 - echo "$(basename $0) set F5 Copy" 1>& 2 - echo "$(basename $0) set F6 Move" 1>& 2 - echo "$(basename $0) set F7 Mkdir" 1>& 2 - echo "$(basename $0) set F8 Del" 1>& 2 - echo "$(basename $0) set F9 Menu" 1>& 2 - echo "$(basename $0) set F10 Quit" 1>& 2 - echo "$(basename $0) set F11 Menu" 1>& 2 - echo "$(basename $0) set F13 View" 1>& 2 - echo "$(basename $0) set F14 Edit" 1>& 2 - echo "$(basename $0) set F15 Copy" 1>& 2 - echo "$(basename $0) set F16 Move" 1>& 2 - echo "$(basename $0) set F17 Find" 1>& 2 - echo "mc" 1>& 2 - echo "# Restore labels to their previous state" 1>& 2 - echo "$(basename $0) pop \$NAME" 1>& 2 -} - -## Main -if [[ $# == 0 ]] -then - show_help - exit 1 -fi - -if [[ $1 == set ]] -then - if [[ $# != 3 ]] - then - show_help - exit 1 - fi - print_osc - printf "1337;SetKeyLabel=%s=%s" "$2" "$3" - print_st -elif [[ $1 == push ]] -then - if [[ $# == 1 ]] - then - print_osc - printf "1337;PushKeyLabels" - print_st - elif [[ $# == 2 ]] - then - if [[ $2 == "" ]] - then - echo "Name must not be empty" 1>& 2 - exit 1 - fi - print_osc - printf "1337;PushKeyLabels=%s" "$2" - print_st - else - show_help - exit 1 - fi -elif [[ $1 == pop ]] -then - if [[ $# == 1 ]] - then - print_osc - printf "1337;PopKeyLabels" - print_st - elif [[ $# == 2 ]] - then - if [[ $2 == "" ]] - then - echo "Name must not be empty" 1>& 2 - exit 1 - fi - print_osc - printf "1337;PopKeyLabels=%s" "$2" - print_st - else - show_help - exit 1 - fi -else - show_help - exit 1 -fi diff --git a/.config/zsh/.iterm2/it2tip b/.config/zsh/.iterm2/it2tip deleted file mode 100755 index 16a56ff..0000000 --- a/.config/zsh/.iterm2/it2tip +++ /dev/null @@ -1,401 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys - -tips = [ - { - "title": "Shell Integration", - "body": "The big new feature of iTerm2 version 3 is Shell Integration. Click “Learn More” for all the details.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Timestamps", - "body": "“View > Show Timestamps” shows the time (and date, if appropriate) when each line was last modified." - }, - { - "title": "Password Manager", - "body": "Did you know iTerm2 has a password manager? Open it with “Window > Password Manager.” You can define a Trigger to open it for you at a password prompt in “Prefs > Profiles > Advanced > Triggers.”" - }, - { - "title": "Open Quickly", - "body": "You can quickly search through your sessions with “View > Open Quickly” (⇧⌘O). You can type a query and sessions whose name, badge, current hostname, current user name, recent commands, and recent working directories match will be surfaced. It works best with Shell Integration so the user name, hostname, command, and directories can be known even while sshed.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Undo Close", - "body": "If you close a session, tab, or window by accident you can undo it with “Edit > Undo” (⌘Z). By default you have five seconds to undo, but you can adjust that timeout in “Prefs > Profiles > Session.”" - }, - { - "title": "Annotations", - "body": "Want to mark up your scrollback history? Right click on a selection and choose “Annotate Selection” to add a personal note to it. Use “View > Show Annotations” to show or hide them, and look in “Edit > Marks and Annotations” for more things you can do." - }, - { - "title": "Copy with Styles", - "body": "Copy a selection with ⌥⌘C to include styles such as colors and fonts. You can make this the default action for Copy in “Prefs > Advanced.”" - }, - { - "title": "Inline Images", - "body": "iTerm2 can display images (even animated GIFs) inline.", - "url": "https://iterm2.com/images.html" - }, - { - "title": "Automatic Profile Switching", - "body": "Automatic Profile Switching changes the current profile when the username, hostname, or directory changes. Set it up in “Prefs > Profiles > Advanced.” It requires Shell Integration to be installed.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Captured Output", - "body": "iTerm2 can act like an IDE using the Captured Output feature. When it sees text matching a regular expression you define, like compiler errors, it shows the matching lines in the Toolbelt. You can click to jump to the line in your terminal and double-click to perform an action like opening an editor to the line with the error.", - "url": "https://iterm2.com/captured_output.html" - }, - { - "title": "Badges", - "body": "You can display a status message in the top right of your session in the background. It’s called a “Badge.” If you install Shell Integration you can include info like user name, hostname, current directory, and more.", - "url": "https://iterm2.com/badges.html" - }, - { - "title": "Dynamic Profiles", - "body": "Dynamic Profiles let you store your profiles as one or more JSON files. It’s great for batch creating and editing profiles.", - "url": "https://iterm2.com/dynamic-profiles.html" - }, - { - "title": "Advanced Paste", - "body": "“Edit > Paste Special > Advanced Paste” lets you preview and edit text before you paste. You get to tweak options, like how to handle control codes, or even to base-64 encode before pasting." - }, - { - "title": "Zoom", - "body": "Ever wanted to focus on a block of lines without distraction, or limit Find to a single command’s output? Select the lines and choose “View > Zoom In on Selection.” The session’s contents will be temporarily replaced with the selection. Press “esc” to unzoom." - }, - { - "title": "Semantic History", - "body": "The “Semantic History” feature allows you to ⌘-click on a file or URL to open it." - }, - { - "title": "Tmux Integration", - "body": "If you use tmux, try running “tmux -CC” to get iTerm2’s tmux integration mode. The tmux windows show up as native iTerm2 windows, and you can use iTerm2’s keyboard shortcuts. It even works over ssh!", - "url": "https://gitlab.com/gnachman/iterm2/wikis/TmuxIntegration" - }, - { - "title": "Triggers", - "body": "iTerm2 can automatically perform actions you define when text matching a regular expression is received. For example, you can highlight text or show an alert box. Set it up in “Prefs > Profiles > Advanced > Triggers.”", - "url": "https://www.iterm2.com/documentation-triggers.html" - }, - { - "title": "Smart Selection", - "body": "Quadruple click to perform Smart Selection. It figures out if you’re selecting a URL, filename, email address, etc. based on prioritized regular expressions.", - "url": "https://www.iterm2.com/smartselection.html" - }, - { - "title": "Instant Replay", - "body": "Press ⌥⌘B to step back in time in a terminal window. Use arrow keys to go frame by frame. Hold ⇧ and press arrow keys to go faster." - }, - { - "title": "Hotkey Window", - "body": "You can have a terminal window open with a keystroke, even while in other apps. Click “Create a Dedicated Hotkey Window” in “Prefs > Keys.”" - }, - { - "title": "Hotkey Window", - "body": "Hotkey windows can stay open after losing focus. Turn it on in “Window > Pin Hotkey Window.”" - }, - { - "title": "Cursor Guide", - "body": "The cursor guide is a horizontal line that follows your cursor. You can turn it on in “Prefs > Profiles > Colors” or toggle it with the ⌥⌘; shortcut." - }, - { - "title": "Shell Integration: Alerts", - "body": "The Shell Integration feature lets you ask to be alerted (⌥⌘A) when a long-running command completes.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Cursor Blink Rate", - "body": "You can configure how quickly the cursor blinks in “Prefs > Advanced.”" - }, - { - "title": "Shell Integration: Navigation", - "body": "The Shell Integration feature lets you navigate among shell prompts with ⇧⌘↑ and ⇧⌘↓.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Shell Integration: Status", - "body": "The Shell Integration feature puts a blue arrow next to your shell prompt. If you run a command that fails, it turns red. Right click on it to get the running time and status.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Shell Integration: Selection", - "body": "With Shell Integration installed, you can select the output of the last command with ⇧⌘A.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Bells", - "body": "The dock icon shows a count of the number of bells rung and notifications posted since the app was last active." - }, - { - "title": "Shell Integration: Downloads", - "body": "If you install Shell Integration on a machine you ssh to, you can right click on a filename (for example, in the output of “ls”) and choose “Download with scp” to download the file.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Find Your Cursor", - "body": "Press ⌘/ to locate your cursor. It’s fun!" - }, - { - "title": "Customize Smart Selection", - "body": "You can edit Smart Selection regular expressions in “Prefs > Profiles > Advanced > Smart Selection.”", - "url": "https://www.iterm2.com/smartselection.html" - }, - { - "title": "Smart Selection Actions", - "body": "Assign an action to a Smart Selection rule in “Prefs > Profiles > Advanced > Smart Selection > Edit Actions.” They go in the context menu and override semantic history on ⌘-click.", - "url": "https://www.iterm2.com/smartselection.html" - }, - { - "title": "Visual Bell", - "body": "If you want the visual bell to flash the whole screen instead of show a bell icon, you can turn that on in “Prefs > Advanced.”" - }, - { - "title": "Tab Menu", - "body": "Right click on a tab to change its color, close tabs after it, or to close all other tabs." - }, - { - "title": "Tags", - "body": "You can assign tags to your profiles, and by clicking “Tags>” anywhere you see a list of profiles you can browse those tags." - }, - { - "title": "Tag Hierarchy", - "body": "If you put a slash in a profile’s tag, that implicitly defines a hierarchy. You can see it in the Profiles menu as nested submenus." - }, - { - "title": "Downloads", - "body": "iTerm2 can download files by base-64 encoding them. Click “Learn More” to download a shell script that makes it easy.", - "url": "https://iterm2.com/download.sh" - }, - { - "title": "Command Completion", - "body": "If you install Shell Integration, ⇧⌘; helps you complete commands. It remembers the commands you’ve run on each host that has Shell Integration installed. It knows how often that command was run and how recently to help make the best suggestions.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Recent Directories", - "body": "iTerm2 remembers which directories you use the most on each host that has Shell Integration installed. There’s a Toolbelt tool to browse them, and ⌥⌘/ gives you a popup sorted by frequency and recency of use.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Favorite Directories", - "body": "If you have Shell Integration installed, you can “star” a directory to keep it always at the bottom of the Recent Directories tool in the Toolbelt. Right click and choose “Toggle Star.”", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Shell Integration History", - "body": "Install Shell Integration and turn on “Prefs > General > Save copy/paste and command history to disk” to remember command history per host across restarts of iTerm2.", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Paste File as Base64", - "body": "Copy a file to the pasteboard in Finder and then use “Edit > Paste Special > Paste File Base64-Encoded” for easy uploads of binary files. Use ”base64 -D” (or -d on Linux) on the remote host to decode it." - }, - { - "title": "Split Panes", - "body": "You can split a tab into multiple panes with ⌘D and ⇧⌘D." - }, - { - "title": "Adjust Split Panes", - "body": "Resize split panes with the keyboard using ^⌘-Arrow Key." - }, - { - "title": "Move Cursor", - "body": "Hold ⌥ and click to move your cursor. It works best with Shell Integration installed (to avoid sending up/down arrow keys to your shell).", - "url": "https://iterm2.com/shell_integration.html" - }, - { - "title": "Edge Windows", - "body": "You can tell your profile to create windows that are attached to one edge of the screen in “Prefs > Profiles > Window.” You can resize them by dragging the edges." - }, - { - "title": "Tab Color", - "body": "You can assign colors to tabs in “Prefs > Profiles > Colors,” or in the View menu." - }, - { - "title": "Rectangular Selection", - "body": "Hold ⌥⌘ while dragging to make a rectangular selection." - }, - { - "title": "Multiple Selection", - "body": "Hold ⌘ while dragging to make multiple discontinuous selections." - }, - { - "title": "Dragging Panes", - "body": "Hold ⇧⌥⌘ and drag a session into another session to create or change split panes." - }, - { - "title": "Cursor Boost", - "body": "Adjust Cursor Boost in “Prefs > Profiles > Colors” to make all colors more muted, except the cursor. Use a bright white cursor and it pops!" - }, - { - "title": "Minimum Contrast", - "body": "Adjust “Minimum Contrast” in “Prefs > Profiles > Colors” to ensure text is always legible regardless of text/background color combination." - }, - { - "title": "Tabs", - "body": "Normally, new tabs appear at the end of the tab bar. There’s a setting in “Prefs > Advanced” to place them next to your current tab." - }, - { - "title": "Base Conversion", - "body": "Right-click on a number and the context menu shows it converted to hex or decimal as appropriate." - }, - { - "title": "Saved Searches", - "body": "In “Prefs > Keys” you can assign a keystroke to a search for a regular expression with the “Find Regular Expression…” action." - }, - { - "title": "Find URLs", - "body": "Search for URLs using “Edit > Find > Find URLs.” Navigate search results with ⌘G and ⇧⌘G. Open the current selection with ⌥⌘O." - }, - { - "title": "Triggers", - "body": "The “instant” checkbox in a Trigger allows it to fire while the cursor is on the same line as the text that matches your regular expression." - }, - { - "title": "Soft Boundaries", - "body": "Turn on “Edit > Selection Respects Soft Boundaries” to recognize split pane dividers in programs like vi, emacs, and tmux so you can select multiple lines of text." - }, - { - "title": "Select Without Dragging", - "body": "Single click where you want to start a selection and ⇧-click where you want it to end to select text without dragging." - }, - { - "title": "Smooth Window Resizing", - "body": "Hold ^ while resizing a window and it won’t snap to the character grid: you can make it any size you want." - }, - { - "title": "Pasting Tabs", - "body": "If you paste text containing tabs, you’ll be asked if you want to convert them to spaces. It’s handy at the shell prompt to avoid triggering filename completion." - }, - { - "title": "Bell Silencing", - "body": "Did you know? If the bell rings too often, you’ll be asked if you’d like to silence it temporarily. iTerm2 cares about your comfort." - }, - { - "title": "Profile Search", - "body": "Every list of profiles has a search field (e.g., in ”Prefs > Profiles.”) You can use various operators to restrict your search query. Click “Learn More” for all the details.", - "url": "https://iterm2.com/search_syntax.html" - }, - { - "title": "Color Schemes", - "body": "The online color gallery features over one hundred beautiful color schemes you can download.", - "url": "https://www.iterm2.com/colorgallery" - }, - { - "title": "ASCII/Non-Ascii Fonts", - "body": "You can have a separate font for ASCII versus non-ASCII text. Enable it in “Prefs > Profiles > Text.”" - }, - { - "title": "Coprocesses", - "body": "A coprocess is a job, such as a shell script, that has a special relationship with a particular iTerm2 session. All output in a terminal window (that is, what you see on the screen) is also input to the coprocess. All output from the coprocess acts like text that the user is typing at the keyboard.", - "url": "https://iterm2.com/coprocesses.html" - }, - { - "title": "Touch Bar Customization", - "body": "You can customize the touch bar by selecting “View > Customize Touch Bar.” You can add a tab bar for full-screen mode, a user-customizable status button, and you can even define your own touch bar buttons in Prefs > Keys. There’s also a new shell integration tool to customize touch bar function key labels." - }, - { - "title": "Ligatures", - "body": "If you use a font that supports ligatures, you can enable ligature support in Prefs > Profiles > Text." - }, - { - "title": "Floating Hotkey Window", - "body": "New in 3.1: You can configure your hotkey window to appear over other apps’ full screen windows. Turn on “Floating Window” in “Prefs > Profiles > Keys > Customize Hotkey Window.”" - }, - { - "title": "Multiple Hotkey Windows", - "body": "New in 3.1: You can have multiple hotkey windows. Each profile can have one or more hotkeys." - }, - { - "title": "Double-Tap Hotkey", - "body": "New in 3.1: You can configure a hotkey window to open on double-tap of a modifier in “Prefs > Profiles > Keys > Customize Hotkey Window.”" - }, - { - "title": "Buried Sessions", - "body": "You can “bury” a session with “Session > Bury Session.” It remains hidden until you restore it by selecting it from “Session > Buried Sessions > Your session.”" - }, - { - "title": "Python API", - "body": "You can add custom behavior to iTerm2 using the Python API.", - "url": "https://iterm2.com/python-api" - }, - { - "title": "Status Bar", - "body": "You can add a configurable status bar to your terminal windows.", - "url": "https://iterm2.com/3.3/documentation-status-bar.html" - }, - { - "title": "Minimal Theme", - "body": "Try the “Minimal” and “Compact” themes to reduce visual clutter. You can set it in “Prefs > Appearance > General.”" - }, - { - "title": "Session Titles", - "body": "You can configure which elements are present in session titles in “Prefs > Profiles > General > Title.”" - }, - { - "title": "Tab Icons", - "body": "Tabs can show an icon indicating the current application. Configure it in “Prefs > Profiles > General > Icon.”" - }, - { - "title": "Drag Window by Tab", - "body": "Hold ⌥ while dragging a tab to move the window. This is useful in the Compact and Minimal themes, which have a very small area for dragging the window." - }, - { - "title": "Composer", - "body": "Press ⇧⌘. to open the Composer. It gives you a scratchpad to edit a command before sending it to the shell." - }, - { - "title": "Shell Integration: Uploads", - "body": "If you install Shell Integration on a machine you ssh to, you can drag-drop from Finder into the remote host by holding ⌥ while dragging. The destination directory is determined by where you drop the file in the terminal window: run cd foo, then drop the file below the cd command, and the file will go into the foo directory.", - "url": "https://iterm2.com/shell_integration.html" - } - ] - - -home = os.getenv("XDG_DATA_HOME") -if not home: - home = "~" - -RCFILE = os.path.expanduser(os.path.join(home, '.it2totd')) - -def last_index(): - try: - with open(RCFILE) as f: - lines = f.readlines() - return int(lines[0].rstrip()) - except: - return -1 - -def print_tip(i): - def dcs(args): - return "\x1bP" + ";".join(args) - - def osc(args): - term = os.getenv("TERM") - if term.startswith("screen"): - return dcs(["tmux", "\x1b\x1b]"]) + ";".join(args) + "\a\x1b\\" - else: - return "\x1b]" + ";".join(args) + "\x1b\\" - - tip = tips[i] - print(f'iTerm2 tip - {tip["title"]}:') - print(tip["body"]) - if "url" in tip: - print("Learn more: " + osc(["8", "", tip["url"]]) + tip["url"] + osc(["8", "", ""])) - -def save_index(i): - with open(RCFILE, "w") as f: - f.write(str(i)) - -i = last_index() + 1 -if i >= len(tips) and len(sys.argv) > 1 and sys.argv[1] == "-w": - i = 0 - -if i < len(tips): - print_tip(i) - save_index(i) - diff --git a/.config/zsh/.iterm2/it2ul b/.config/zsh/.iterm2/it2ul deleted file mode 100755 index 5aae8df..0000000 --- a/.config/zsh/.iterm2/it2ul +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -trap clean_up EXIT -_STTY=$(stty -g) ## Save current terminal setup -stty -echo ## Turn off echo - -function clean_up() { - stty "$_STTY" ## Restore terminal settings -} - -function show_help() { - echo "Usage: $(basename $0) [destination [tar flags]]" 1>& 2 - echo " If given, the destination specifies the directory to place downloaded files." - echo " Further options are passed through to tar. See your system's manpage for tar for details." -} - -function bad_input() { - echo "Bad input: %1" 1>& 2 - exit 1 -} - -function die() { - echo "Fatal error: $1" 1>& 2 - exit 1 -} - -function read_base64_stanza() { - value="" - while read line; - do - if [ "$line" == "" ]; then - break - fi - printf "%s" "$line" - done -} - -function decode() { - VERSION=$(base64 --version 2>&1) - if [[ "$VERSION" =~ fourmilab ]]; then - BASE64ARG=-d - elif [[ "$VERSION" =~ GNU ]]; then - BASE64ARG=-di - else - BASE64ARG=-D - fi - - base64 "$BASE64ARG" <<< "$1" -} - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function send_request_for_upload() { - print_osc - printf '1337;RequestUpload=format=tgz' "" - print_st -} - -location="$PWD" -if [[ $# > 0 ]] -then - location="$1" - shift -fi - -send_request_for_upload -read status - -if [[ $status == ok ]] -then - data=$(read_base64_stanza) - clean_up - decode "$data" | tar -x -z -C "$location" -f - $* 1>& 2 -elif [[ $status == abort ]] -then - echo "Upload aborted" 1>& 2 -else - die "Unknown status: $status" 1>& 2 -fi - diff --git a/.config/zsh/.iterm2/it2universion b/.config/zsh/.iterm2/it2universion deleted file mode 100755 index 771c067..0000000 --- a/.config/zsh/.iterm2/it2universion +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash - -# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; -# ST, and for all ESCs in to be replaced with ESC ESC. It -# only accepts ESC backslash for ST. -function print_osc() { - if [[ $TERM == screen* ]] ; then - printf "\033Ptmux;\033\033]" - else - printf "\033]" - fi -} - -# More of the tmux workaround described above. -function print_st() { - if [[ $TERM == screen* ]] ; then - printf "\a\033\\" - else - printf "\a" - fi -} - -function show_help() { - echo "Usage:" 1>& 2 - echo " $(basename $0) set 8" 1>& 2 - echo " $(basename $0) set 9" 1>& 2 - echo " $(basename $0) push [name]" 1>& 2 - echo " Saves the current version with an optional name." 1>& 2 - echo " $(basename $0) pop [name]" 1>& 2 - echo " If name is given, all versions up to and including the one with the matching name are popped." 1>& 2 -} - -function set_version() { - print_osc - printf "1337;UnicodeVersion=$1" - print_st -} - -function push_version() { - print_osc - printf "1337;UnicodeVersion=push $1" - print_st -} - -function pop_version() { - print_osc - printf "1337;UnicodeVersion=pop $1" - print_st -} - -## Main -if [[ $# == 0 ]] -then - show_help - exit 1 -fi - -if [[ $1 == set ]] -then - if [[ $# != 2 ]] - then - show_help - exit 1 - fi - set_version $2 -elif [[ $1 == push ]] -then - if [[ $# == 1 ]] - then - push_version "" - elif [[ $# == 2 ]] - then - if [[ $2 == "" ]] - then - echo "Name must not be empty" 1>& 2 - exit 1 - fi - push_version "$2" - else - show_help - exit 1 - fi -elif [[ $1 == pop ]] -then - if [[ $# == 1 ]] - then - pop_version "" - elif [[ $# == 2 ]] - then - if [[ $2 == "" ]] - then - echo "Name must not be empty" 1>& 2 - exit 1 - fi - pop_version "$2" - else - show_help - exit 1 - fi -else - show_help - exit 1 -fi - diff --git a/.config/zsh/.iterm2_shell_integration.zsh b/.config/zsh/.iterm2_shell_integration.zsh deleted file mode 100755 index f86b087..0000000 --- a/.config/zsh/.iterm2_shell_integration.zsh +++ /dev/null @@ -1,179 +0,0 @@ -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -if [[ -o interactive ]]; then - if [ "${ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX-}""$TERM" != "screen" -a "${ITERM_SHELL_INTEGRATION_INSTALLED-}" = "" -a "$TERM" != linux -a "$TERM" != dumb ]; then - ITERM_SHELL_INTEGRATION_INSTALLED=Yes - ITERM2_SHOULD_DECORATE_PROMPT="1" - # Indicates start of command output. Runs just before command executes. - iterm2_before_cmd_executes() { - if [ "$TERM_PROGRAM" = "iTerm.app" ]; then - printf "\033]133;C;\r\007" - else - printf "\033]133;C;\007" - fi - } - - iterm2_set_user_var() { - printf "\033]1337;SetUserVar=%s=%s\007" "$1" $(printf "%s" "$2" | base64 | tr -d '\n') - } - - # Users can write their own version of this method. It should call - # iterm2_set_user_var but not produce any other output. - # e.g., iterm2_set_user_var currentDirectory $PWD - # Accessible in iTerm2 (in a badge now, elsewhere in the future) as - # \(user.currentDirectory). - whence -v iterm2_print_user_vars > /dev/null 2>&1 - if [ $? -ne 0 ]; then - iterm2_print_user_vars() { - true - } - fi - - iterm2_print_state_data() { - local _iterm2_hostname="${iterm2_hostname-}" - if [ -z "${iterm2_hostname:-}" ]; then - _iterm2_hostname=$(hostname -f 2>/dev/null) - fi - printf "\033]1337;RemoteHost=%s@%s\007" "$USER" "${_iterm2_hostname-}" - printf "\033]1337;CurrentDir=%s\007" "$PWD" - iterm2_print_user_vars - } - - # Report return code of command; runs after command finishes but before prompt - iterm2_after_cmd_executes() { - printf "\033]133;D;%s\007" "$STATUS" - iterm2_print_state_data - } - - # Mark start of prompt - iterm2_prompt_mark() { - printf "\033]133;A\007" - } - - # Mark end of prompt - iterm2_prompt_end() { - printf "\033]133;B\007" - } - - # There are three possible paths in life. - # - # 1) A command is entered at the prompt and you press return. - # The following steps happen: - # * iterm2_preexec is invoked - # * PS1 is set to ITERM2_PRECMD_PS1 - # * ITERM2_SHOULD_DECORATE_PROMPT is set to 1 - # * The command executes (possibly reading or modifying PS1) - # * iterm2_precmd is invoked - # * ITERM2_PRECMD_PS1 is set to PS1 (as modified by command execution) - # * PS1 gets our escape sequences added to it - # * zsh displays your prompt - # * You start entering a command - # - # 2) You press ^C while entering a command at the prompt. - # The following steps happen: - # * (iterm2_preexec is NOT invoked) - # * iterm2_precmd is invoked - # * iterm2_before_cmd_executes is called since we detected that iterm2_preexec was not run - # * (ITERM2_PRECMD_PS1 and PS1 are not messed with, since PS1 already has our escape - # sequences and ITERM2_PRECMD_PS1 already has PS1's original value) - # * zsh displays your prompt - # * You start entering a command - # - # 3) A new shell is born. - # * PS1 has some initial value, either zsh's default or a value set before this script is sourced. - # * iterm2_precmd is invoked - # * ITERM2_SHOULD_DECORATE_PROMPT is initialized to 1 - # * ITERM2_PRECMD_PS1 is set to the initial value of PS1 - # * PS1 gets our escape sequences added to it - # * Your prompt is shown and you may begin entering a command. - # - # Invariants: - # * ITERM2_SHOULD_DECORATE_PROMPT is 1 during and just after command execution, and "" while the prompt is - # shown and until you enter a command and press return. - # * PS1 does not have our escape sequences during command execution - # * After the command executes but before a new one begins, PS1 has escape sequences and - # ITERM2_PRECMD_PS1 has PS1's original value. - iterm2_decorate_prompt() { - # This should be a raw PS1 without iTerm2's stuff. It could be changed during command - # execution. - ITERM2_PRECMD_PS1="$PS1" - ITERM2_SHOULD_DECORATE_PROMPT="" - - # Add our escape sequences just before the prompt is shown. - # Use ITERM2_SQUELCH_MARK for people who can't mdoify PS1 directly, like powerlevel9k users. - # This is gross but I had a heck of a time writing a correct if statetment for zsh 5.0.2. - local PREFIX="" - if [[ $PS1 == *"$(iterm2_prompt_mark)"* ]]; then - PREFIX="" - elif [[ "${ITERM2_SQUELCH_MARK-}" != "" ]]; then - PREFIX="" - else - PREFIX="%{$(iterm2_prompt_mark)%}" - fi - PS1="$PREFIX$PS1%{$(iterm2_prompt_end)%}" - ITERM2_DECORATED_PS1="$PS1" - } - - iterm2_precmd() { - local STATUS="$?" - if [ -z "${ITERM2_SHOULD_DECORATE_PROMPT-}" ]; then - # You pressed ^C while entering a command (iterm2_preexec did not run) - iterm2_before_cmd_executes - if [ "$PS1" != "${ITERM2_DECORATED_PS1-}" ]; then - # PS1 changed, perhaps in another precmd. See issue 9938. - ITERM2_SHOULD_DECORATE_PROMPT="1" - fi - fi - - iterm2_after_cmd_executes "$STATUS" - - if [ -n "$ITERM2_SHOULD_DECORATE_PROMPT" ]; then - iterm2_decorate_prompt - fi - } - - # This is not run if you press ^C while entering a command. - iterm2_preexec() { - # Set PS1 back to its raw value prior to executing the command. - PS1="$ITERM2_PRECMD_PS1" - ITERM2_SHOULD_DECORATE_PROMPT="1" - iterm2_before_cmd_executes - } - - # If hostname -f is slow on your system set iterm2_hostname prior to - # sourcing this script. We know it is fast on macOS so we don't cache - # it. That lets us handle the hostname changing like when you attach - # to a VPN. - if [ -z "${iterm2_hostname-}" ]; then - if [ "$(uname)" != "Darwin" ]; then - iterm2_hostname=`hostname -f 2>/dev/null` - # Some flavors of BSD (i.e. NetBSD and OpenBSD) don't have the -f option. - if [ $? -ne 0 ]; then - iterm2_hostname=`hostname` - fi - fi - fi - - [[ -z ${precmd_functions-} ]] && precmd_functions=() - precmd_functions=($precmd_functions iterm2_precmd) - - [[ -z ${preexec_functions-} ]] && preexec_functions=() - preexec_functions=($preexec_functions iterm2_preexec) - - iterm2_print_state_data - printf "\033]1337;ShellIntegrationVersion=13;shell=zsh\007" - fi -fi -alias imgcat=${ZDOTDIR}/.iterm2/imgcat;alias imgls=${ZDOTDIR}/.iterm2/imgls;alias it2api=${ZDOTDIR}/.iterm2/it2api;alias it2attention=${ZDOTDIR}/.iterm2/it2attention;alias it2check=${ZDOTDIR}/.iterm2/it2check;alias it2copy=${ZDOTDIR}/.iterm2/it2copy;alias it2dl=${ZDOTDIR}/.iterm2/it2dl;alias it2getvar=${ZDOTDIR}/.iterm2/it2getvar;alias it2git=${ZDOTDIR}/.iterm2/it2git;alias it2setcolor=${ZDOTDIR}/.iterm2/it2setcolor;alias it2setkeylabel=${ZDOTDIR}/.iterm2/it2setkeylabel;alias it2tip=${ZDOTDIR}/.iterm2/it2tip;alias it2ul=${ZDOTDIR}/.iterm2/it2ul;alias it2universion=${ZDOTDIR}/.iterm2/it2universion;alias it2profile=${ZDOTDIR}/.iterm2/it2profile diff --git a/.gitignore b/.gitignore index bff516a..d0084f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ -.zcompdump -.zcompcache/ +.config/zsh/ +!.config/zsh/.zprofile +!.config/zsh/.zshenv +!.config/zsh/.zshrc +!.config/zsh/aliases +!.config/zsh/completion +!.config/zsh/dotfiles +!.config/zsh/keybinds +!.config/zsh/theme From 4d443c4419f877f6096e8f50c5f18221395c0507 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 12:21:17 +0700 Subject: [PATCH 053/126] chore: Rename module table to M That seems to be the de facto naming for module table on neovim related stuff --- .config/nvim/lua/null/util.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/nvim/lua/null/util.lua b/.config/nvim/lua/null/util.lua index 17a8018..75b39d7 100644 --- a/.config/nvim/lua/null/util.lua +++ b/.config/nvim/lua/null/util.lua @@ -1,6 +1,6 @@ -local RT = {} +local M = {} -function RT.getch_lazy_nvim() -- Get or Fetch lazy.nvim +function M.getch_lazy_nvim() -- Get or Fetch lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then vim.fn.system({ @@ -17,7 +17,7 @@ function RT.getch_lazy_nvim() -- Get or Fetch lazy.nvim return require("lazy") end -function RT.map(modes, key, target, opts) +function M.map(modes, key, target, opts) local mt = {} for mode in modes:gmatch"." do @@ -30,4 +30,4 @@ function RT.map(modes, key, target, opts) }) end -return RT +return M From 6df95d746de2b984bf534661f4bc6e9de407dae5 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 17 Apr 2024 16:49:28 +0700 Subject: [PATCH 054/126] chore: Remove mention of Windows entirely I no longer use Windows, haven't touched it as my daily driver for 2-3 years now so these are useless. --- .config/powershell/profile.ps1 | 71 ---------------------------------- README.md | 3 -- 2 files changed, 74 deletions(-) delete mode 100644 .config/powershell/profile.ps1 diff --git a/.config/powershell/profile.ps1 b/.config/powershell/profile.ps1 deleted file mode 100644 index f97491b..0000000 --- a/.config/powershell/profile.ps1 +++ /dev/null @@ -1,71 +0,0 @@ -function UsernameAtComputer -{ - if (! "$env:ComputerName" -eq "") { - $compname = $env:ComputerName - } - else { - $compname = "unknown" - } - if (! "$env:UserName" -eq "") { - $username = $env:UserName - } - if (! "$env:USER" -eq "") { - $username = $env:USER - } - else { - $username = "unknown" - } - "`e[35;1m" + $username + "`e[0m`e[1m@" + "`e[35;1m" + $compname -} - -# ----- set default color -Set-PSReadlineOption -Colors @{ Parameter = "`e[96m"} -Set-PSReadlineOption -Colors @{ Operator = "`e[96m"} -Set-PSReadlineOption -Colors @{ String = "`e[93m"} - -# ----- Messy function to make it looks like my zsh theme / git support -function Git-Status -{ - "$([char]27)[31m" - if ((git status --porcelain -b 2>$1 | Select-String -Pattern 'M ') -notmatch 'fatal') { - "!" - } - if ((git status --porcelain -b 2>$1 | Select-String -Pattern '\# ') -notmatch 'fatal') { - "⇡" - } - if ((git status --porcelain -b 2>$1 | Select-String -Pattern '\? ') -notmatch 'fatal') { - "?" - } -} -function Git-Branch -{ - " $([char]27)[35m " + (git branch --show-current) -} -function getdir -{ - # ((Get-Location) -replace '[a-zA-Z].\\','~\') # change 'c:/' into '~' (optional) - ((Get-Location) -replace '/home/[a-zA-Z]*','~') # change '/home/' into '~' -} -function end_of_prompt -{ -" -$([char]27)[32;1m$> $([char]27)[0m" -} - -# ----- Foreground (the thing that actually shows up) -function prompt -{ - if ((git log -n 1 2>$1) -notmatch 'fatal') { - " -$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (Git-Branch) + " " + ("$(Git-Status)" -replace ' ','') + (end_of_prompt) - } - else - { - " -$([char]27)[34;1m" + $env:COMPUTERNAME + "" + (getdir) + (end_of_prompt) - } -} - -# ----- Aliases -New-Alias vim nvim -function q{exit} diff --git a/README.md b/README.md index f98942a..5812255 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,3 @@ Add this to `/etc/zsh/zshenv` (**macOS**: `/etc/zshenv`) export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh" ``` - -### For winders peeps -Set $PROFILE environment variable to your powershell config file path (ex: $PROFILE='$HOME/.config/powershell/profile.ps1') From f276752d81c6e8329bd84b118e984346f29a4f22 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 08:10:10 +0700 Subject: [PATCH 055/126] feat: tree-sitter support for GSP --- .config/nvim/lua/null/plug.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index f42a005..eae793d 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -14,4 +14,8 @@ util.getch_lazy_nvim().setup({ -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function end, }, + { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + fp = "gsp", + }, }) From 6a66db229b1a34642cb18b06771cf31a020f512e Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 08:11:34 +0700 Subject: [PATCH 056/126] feat(vim): Backport tree-sitter to vim --- .config/vim/vim_plug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index 552575a..6d34f99 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -99,6 +99,8 @@ Plug 'projectfluent/fluent.vim' " --- AIO solution for highlighting Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} +Plug 'https://git.sr.ht/~mango/tree-sitter-gsp' + call plug#end() " ====================== From e69acc9844d8a29305f079bfebfd1152d5306212 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:12:43 +0700 Subject: [PATCH 057/126] chore(nvim): More lua migration - Migrated from NerdTree -> Neotree - Lazify neotree - Migrated from lightline -> lualine (TODO: colourscheme) - Add nvim-treesitter - Enable tree-sitter-gsp --- .config/nvim/lazy-lock.json | 7 ++++ .config/nvim/lua/null/plug.lua | 64 ++++++++++++++++++++++++++++++++++ .config/vim/vim_uni | 1 + 3 files changed, 72 insertions(+) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index a7016b5..531c713 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,7 +1,14 @@ { "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, + "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, + "nvim-treesitter": { "branch": "master", "commit": "3e10cffbb2a022cd8e2aaea9f4fffb514065e77c" }, "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, + "tree-sitter-gsp": { "branch": "master", "commit": "1f10ff9a6039a50e2f7be394fc22b1400832cf17" }, "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" } } \ No newline at end of file diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index eae793d..2465d13 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -1,6 +1,44 @@ local util = require("null.util") util.getch_lazy_nvim().setup({ + { + -- FIXME: Use my own colourscheme + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + config = function() + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup { + options = { + theme = "tokyonight" -- FIXME: Use my own colourscheme + } + } + end, + }, + { + "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + keys = { + { "", "Neotree toggle", desc = "NeoTree" }, + }, + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function () + require("neo-tree").setup({ + close_if_last_window = true, + }) + end, + }, { "stevearc/oil.nvim", opts = {}, @@ -14,6 +52,32 @@ util.getch_lazy_nvim().setup({ -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function end, }, + + -- Syntax Highlighting stuff + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "gsp", + }, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + }, + config = function(_, opts) + local config = require("nvim-treesitter.parsers").get_parser_configs() + config.gsp = { + install_info = { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + files = {"src/parser.c"}, + }, + filetype = "gsp", + } + require("nvim-treesitter.configs").setup(opts) + end + }, { url = "https://git.sr.ht/~mango/tree-sitter-gsp", fp = "gsp", diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 94244b0..06846cd 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -23,6 +23,7 @@ hi Folded ctermbg=Black set fillchars=eob:\ syntax on filetype indent plugin on +" -- converted map :NERDTreeToggle let mapleader=" " " -- converted set guifont=Iosevka:h15 " -- converted From f7c5370f5b8462d6a13fe9e2bc01cfeb857e79ba Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:28:33 +0700 Subject: [PATCH 058/126] chore(nvim): Some clean up - Start splitting plugins to their own files - Config should be loaded first - Config for plugins should be handled by lazy.nvim --- .config/nvim/lua/null/config.lua | 2 - .config/nvim/lua/null/init.lua | 4 +- .config/nvim/lua/null/plug.lua | 84 +------------------------ .config/nvim/lua/null/plugins/init.lua | 86 ++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 87 deletions(-) create mode 100644 .config/nvim/lua/null/plugins/init.lua diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index 206d0a3..515d866 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -8,5 +8,3 @@ o.relativenumber = true g.mapleader = " " g.guifont = { "Sarasa UI J", ":h16" } - -require("oil").setup() diff --git a/.config/nvim/lua/null/init.lua b/.config/nvim/lua/null/init.lua index 68d388d..b56700e 100644 --- a/.config/nvim/lua/null/init.lua +++ b/.config/nvim/lua/null/init.lua @@ -1,6 +1,6 @@ --- vim_plug -require("null.plug") -- vim_uni require("null.config") +-- vim_plug +require("null.plug") -- vim_nix require("null.nix") -- n*x specific stuff diff --git a/.config/nvim/lua/null/plug.lua b/.config/nvim/lua/null/plug.lua index 2465d13..93c8126 100644 --- a/.config/nvim/lua/null/plug.lua +++ b/.config/nvim/lua/null/plug.lua @@ -1,85 +1,3 @@ local util = require("null.util") -util.getch_lazy_nvim().setup({ - { - -- FIXME: Use my own colourscheme - "folke/tokyonight.nvim", - lazy = false, - priority = 1000, - config = function() - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) - end, - }, - { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("lualine").setup { - options = { - theme = "tokyonight" -- FIXME: Use my own colourscheme - } - } - end, - }, - { - "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this - keys = { - { "", "Neotree toggle", desc = "NeoTree" }, - }, - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function () - require("neo-tree").setup({ - close_if_last_window = true, - }) - end, - }, - { - "stevearc/oil.nvim", - opts = {}, - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - "tpope/vim-commentary", -- shortcut to comment a line - { - "dstein64/vim-startuptime", - cmd = "StartupTime", -- Note to self: lazy load on command - init = function() - -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function - end, - }, - - -- Syntax Highlighting stuff - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "gsp", - }, - - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - }, - config = function(_, opts) - local config = require("nvim-treesitter.parsers").get_parser_configs() - config.gsp = { - install_info = { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - files = {"src/parser.c"}, - }, - filetype = "gsp", - } - require("nvim-treesitter.configs").setup(opts) - end - }, - { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - fp = "gsp", - }, -}) +util.getch_lazy_nvim().setup("null.plugins") diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua new file mode 100644 index 0000000..1e1c392 --- /dev/null +++ b/.config/nvim/lua/null/plugins/init.lua @@ -0,0 +1,86 @@ +return { + { + -- FIXME: Use my own colourscheme + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + config = function () + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight]]) + end, + }, + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function () + require("lualine").setup { + options = { + theme = "tokyonight" -- FIXME: Use my own colourscheme + } + } + end, + }, + { + "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + keys = { + { "", "Neotree toggle", desc = "NeoTree" }, + }, + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function () + require("neo-tree").setup({ + close_if_last_window = true, + }) + end, + }, + { + "stevearc/oil.nvim", + opts = {}, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function () + require("oil").setup() + end + }, + "tpope/vim-commentary", -- shortcut to comment a line + { + "dstein64/vim-startuptime", + cmd = "StartupTime", -- Note to self: lazy load on command + init = function () + -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function + end, + }, + + -- Syntax Highlighting stuff + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "gsp", + }, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + }, + config = function (_, opts) + local config = require("nvim-treesitter.parsers").get_parser_configs() + config.gsp = { + install_info = { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + files = {"src/parser.c"}, + }, + filetype = "gsp", + } + require("nvim-treesitter.configs").setup(opts) + end + }, + { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + fp = "gsp", + }, +} From e4ad35f4a6d7d19f5863a5f3d61bd47a8f05c941 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:34:02 +0700 Subject: [PATCH 059/126] chore(nvim): Open oil with dash --- .config/nvim/lua/null/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 1e1c392..689e8e0 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -39,7 +39,9 @@ return { }, { "stevearc/oil.nvim", - opts = {}, + keys = { + { "-", "Oil", desc = "Oil" }, + }, dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () require("oil").setup() From 6636abb02f412f59915754c36fd32e9baa1705c6 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:48:03 +0700 Subject: [PATCH 060/126] chore(nvim): Split plugins to their own file and lazyload commentary --- .../nvim/lua/null/plugins/file-explorer.lua | 29 ++++++++++ .config/nvim/lua/null/plugins/init.lua | 58 ++----------------- .config/nvim/lua/null/plugins/treesitter.lua | 30 ++++++++++ 3 files changed, 63 insertions(+), 54 deletions(-) create mode 100644 .config/nvim/lua/null/plugins/file-explorer.lua create mode 100644 .config/nvim/lua/null/plugins/treesitter.lua diff --git a/.config/nvim/lua/null/plugins/file-explorer.lua b/.config/nvim/lua/null/plugins/file-explorer.lua new file mode 100644 index 0000000..eec63d8 --- /dev/null +++ b/.config/nvim/lua/null/plugins/file-explorer.lua @@ -0,0 +1,29 @@ +return { + { + "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + keys = { + { "", "Neotree toggle", desc = "NeoTree" }, + }, + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function () + require("neo-tree").setup({ + close_if_last_window = true, + }) + end, + }, + { + "stevearc/oil.nvim", + keys = { + { "-", "Oil", desc = "Oil" }, + }, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function () + require("oil").setup() + end + }, +} diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 689e8e0..1d7b48d 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -21,33 +21,13 @@ return { end, }, { - "nvim-neo-tree/neo-tree.nvim", -- I'll be using oil.nvim, but for better visual I'll keep this + "tpope/vim-commentary", -- shortcut to comment a line keys = { - { "", "Neotree toggle", desc = "NeoTree" }, + { "gcc", mode = "n" }, + { "gc", mode = "v" }, + { "gcc", mode = "i" }, }, - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function () - require("neo-tree").setup({ - close_if_last_window = true, - }) - end, }, - { - "stevearc/oil.nvim", - keys = { - { "-", "Oil", desc = "Oil" }, - }, - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function () - require("oil").setup() - end - }, - "tpope/vim-commentary", -- shortcut to comment a line { "dstein64/vim-startuptime", cmd = "StartupTime", -- Note to self: lazy load on command @@ -55,34 +35,4 @@ return { -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function end, }, - - -- Syntax Highlighting stuff - { - "nvim-treesitter/nvim-treesitter", - opts = { - ensure_installed = { - "gsp", - }, - - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - }, - config = function (_, opts) - local config = require("nvim-treesitter.parsers").get_parser_configs() - config.gsp = { - install_info = { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - files = {"src/parser.c"}, - }, - filetype = "gsp", - } - require("nvim-treesitter.configs").setup(opts) - end - }, - { - url = "https://git.sr.ht/~mango/tree-sitter-gsp", - fp = "gsp", - }, } diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua new file mode 100644 index 0000000..36be552 --- /dev/null +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -0,0 +1,30 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "gsp", + }, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + }, + config = function (_, opts) + local config = require("nvim-treesitter.parsers").get_parser_configs() + config.gsp = { + install_info = { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + files = {"src/parser.c"}, + }, + filetype = "gsp", + } + require("nvim-treesitter.configs").setup(opts) + end + }, + { + url = "https://git.sr.ht/~mango/tree-sitter-gsp", + fp = "gsp", + }, +} From c85e6a9bff3e566bcdf1e2b4b02cbbe5d54aa199 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:50:53 +0700 Subject: [PATCH 061/126] refactor(nvim): Simplify lazyload --- .config/nvim/lua/null/plugins/init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 1d7b48d..f66a077 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -22,11 +22,7 @@ return { }, { "tpope/vim-commentary", -- shortcut to comment a line - keys = { - { "gcc", mode = "n" }, - { "gc", mode = "v" }, - { "gcc", mode = "i" }, - }, + keys = { "gc" }, }, { "dstein64/vim-startuptime", From db063c919ab83c8069b26ba3bc595c499bc80b55 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:57:34 +0700 Subject: [PATCH 062/126] chore(nvim): Wakatime --- .config/nvim/lua/null/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index f66a077..6dd1712 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -1,4 +1,5 @@ return { + { "wakatime/vim-wakatime", lazy = false }, { -- FIXME: Use my own colourscheme "folke/tokyonight.nvim", From d2283fd2a5e083d4acab6151c9e3ce94050f04e0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 09:57:50 +0700 Subject: [PATCH 063/126] chore(nvim): Completion plugin(s) via Neo's LSP --- .config/nvim/lua/null/plugins/completion.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .config/nvim/lua/null/plugins/completion.lua diff --git a/.config/nvim/lua/null/plugins/completion.lua b/.config/nvim/lua/null/plugins/completion.lua new file mode 100644 index 0000000..318eaed --- /dev/null +++ b/.config/nvim/lua/null/plugins/completion.lua @@ -0,0 +1,12 @@ +return { + { + "hrsh7th/nvim-cmp", + dependencies = { + "neovim/nvim-lspconfig", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + }, + }, +} From 13467edd9d3f3f15087df54e1c590b281d5ec9b7 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 10:08:48 +0700 Subject: [PATCH 064/126] chore(nvim): Add more lang to treesitter --- .config/nvim/lazy-lock.json | 9 ++++++++- .config/nvim/lua/null/plugins/treesitter.lua | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 531c713..ff94719 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,8 +1,14 @@ { + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, + "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, + "nvim-lspconfig": { "branch": "master", "commit": "9266dc26862d8f3556c2ca77602e811472b4c5b8" }, "nvim-treesitter": { "branch": "master", "commit": "3e10cffbb2a022cd8e2aaea9f4fffb514065e77c" }, "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, @@ -10,5 +16,6 @@ "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, "tree-sitter-gsp": { "branch": "master", "commit": "1f10ff9a6039a50e2f7be394fc22b1400832cf17" }, "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, - "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" } + "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, + "vim-wakatime": { "branch": "master", "commit": "5d11a253dd1ecabd4612a885175216032d814300" } } \ No newline at end of file diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua index 36be552..0b28153 100644 --- a/.config/nvim/lua/null/plugins/treesitter.lua +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -3,7 +3,12 @@ return { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { + "c", + "fluent", + "python", + "go", "gsp", + "json5", }, highlight = { @@ -20,6 +25,13 @@ return { }, filetype = "gsp", } + config.fluent = { + install_info = { + url = "https://github.com/projectfluent/tree-sitter-fluent", -- local path or git repo + files = {"src/parser.c"}, -- note that some parsers also require src/scanner.c or src/scanner.cc + }, + filetype = "fluent", -- if filetype does not match the parser name + } require("nvim-treesitter.configs").setup(opts) end }, From 7356d51b6c975af128cd23850ee15152a38023b2 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 10:17:07 +0700 Subject: [PATCH 065/126] chore(nvim): Add more lang to treesitter --- .config/nvim/lua/null/plugins/treesitter.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua index 0b28153..5853652 100644 --- a/.config/nvim/lua/null/plugins/treesitter.lua +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -5,10 +5,15 @@ return { ensure_installed = { "c", "fluent", - "python", "go", "gsp", + "hyprlang", "json5", + "julia", + -- "latex", + "python", + "rust", + "sxhkdrc", }, highlight = { @@ -32,6 +37,12 @@ return { }, filetype = "fluent", -- if filetype does not match the parser name } + vim.filetype.add({ + extension = { rasi = "rasi" }, + pattern = { + [".*/hypr/.*%.conf"] = "hyprlang", + }, + }) require("nvim-treesitter.configs").setup(opts) end }, From 22e888a8624b3a2f38d19f9ed929735b8e93fffd Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 10:18:26 +0700 Subject: [PATCH 066/126] chore(nvim): Add elixir to treesitter --- .config/nvim/lua/null/plugins/treesitter.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua index 5853652..5d074ca 100644 --- a/.config/nvim/lua/null/plugins/treesitter.lua +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -4,6 +4,7 @@ return { opts = { ensure_installed = { "c", + "elixir", "fluent", "go", "gsp", From 4046c7f77255f0447bc8b3aada9f24786787ef6e Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:17:01 +0700 Subject: [PATCH 067/126] chore(nvim): Configure install behaviour --- .config/nvim/lua/null/plugins/treesitter.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua index 5d074ca..654d229 100644 --- a/.config/nvim/lua/null/plugins/treesitter.lua +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -17,6 +17,9 @@ return { "sxhkdrc", }, + sync_install = false, + auto_install = true, + highlight = { enable = true, additional_vim_regex_highlighting = false, From 4c5d2522d5f96c1d02a70e7b30c6ae06100105a1 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:17:56 +0700 Subject: [PATCH 068/126] style(nvim): Port vim lightline setup to nvim lualine --- .config/nvim/lua/null/plugins/init.lua | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 6dd1712..185dca3 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -14,10 +14,29 @@ return { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () + local _progress = require("lualine.components.progress") + local progress = function () + return "☰ " .. _progress() + end + local _location = require("lualine.components.location") + local location = function () + return "" .. _location() + end require("lualine").setup { options = { - theme = "tokyonight" -- FIXME: Use my own colourscheme - } + theme = "tokyonight", -- FIXME: Use my own colourscheme + -- theme = "zi", + section_separators = '', + component_separators = '', + }, + sections = { + lualine_a = {"mode"}, + lualine_b = {"branch", "diff", "diagnostics"}, + lualine_c = {"filename"}, + lualine_x = {location}, + lualine_y = {progress}, + lualine_z = {"encoding", "fileformat", "filetype"}, + }, } end, }, From 53b74ff7fc54e1b1abd4025d8d8304e81410e248 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:19:23 +0700 Subject: [PATCH 069/126] chore(nvim): Don't use single quote --- .config/nvim/lua/null/plugins/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 185dca3..b4d76c8 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -26,8 +26,8 @@ return { options = { theme = "tokyonight", -- FIXME: Use my own colourscheme -- theme = "zi", - section_separators = '', - component_separators = '', + section_separators = "", + component_separators = "", }, sections = { lualine_a = {"mode"}, From 6581bb148e6e436d5fe33d58ac36e8ce32a42286 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:47:33 +0700 Subject: [PATCH 070/126] chore(nvim): Migrated vim_nix to lua --- .config/nvim/lua/null/nix.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.config/nvim/lua/null/nix.lua b/.config/nvim/lua/null/nix.lua index e69de29..86bcb6d 100644 --- a/.config/nvim/lua/null/nix.lua +++ b/.config/nvim/lua/null/nix.lua @@ -0,0 +1,7 @@ +local o = vim.opt +local g = vim.g + +o.undodir = vim.fn.stdpath("data") .. "/null/undo" +o.directory = vim.fn.stdpath("data") .. "/null/swap" +o.backupdir = vim.fn.stdpath("data") .. "/null/backup" +o.viewdir = vim.fn.stdpath("data") .. "/null/view" From c0ea2a1f1454861edf39938e87da8bf14b1b9f64 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:48:14 +0700 Subject: [PATCH 071/126] chore(nvim): Migrated cmp and lsp config to lazy --- .config/nvim/lua/null/plugins/completion.lua | 120 ++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/completion.lua b/.config/nvim/lua/null/plugins/completion.lua index 318eaed..d7102f4 100644 --- a/.config/nvim/lua/null/plugins/completion.lua +++ b/.config/nvim/lua/null/plugins/completion.lua @@ -1,12 +1,130 @@ return { + { + "neovim/nvim-lspconfig", + lazy = true, + config = function () + local lsp = require("lspconfig") + lsp.pyright.setup{} + -- lsp.jedi_language_server.setup{} + lsp.rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + assist = { + importGranularity = "module", + importPrefix = "by_self", + }, + cargo = { + loadOutDirsFromCheck = true + }, + procMacro = { + enable = true + }, + } + } + }) + end, + }, { "hrsh7th/nvim-cmp", dependencies = { - "neovim/nvim-lspconfig", "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", "hrsh7th/cmp-path", "hrsh7th/cmp-cmdline", }, + config = function () + -- From vimrc, may need clean up + local cmp = require("cmp") + + local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + + cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + -- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + -- require("luasnip").lsp_expand(args.body) -- For `luasnip` users. + -- require("snippy").expand_snippet(args.body) -- For `snippy` users. + -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping(function(fallback) + if cmp.visible() and not cmp.confirm() then + cmp.abort() + else + fallback() + end + end, {"i", "s"}), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- elseif has_words_before() then + -- cmp.complete() + else + fallback() -- The fallback function sends a already mapped key. In this case, it"s probably ``. + end + end, { "i", "s" }), + [""] = cmp.mapping(function() + if cmp.visible() then + cmp.select_prev_item() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + -- { name = "vsnip" }, -- For vsnip users. + -- { name = "luasnip" }, -- For luasnip users. + -- { name = "ultisnips" }, -- For ultisnips users. + -- { name = "snippy" }, -- For snippy users. + }, { + { name = "buffer" }, + }) + }) + + -- Set configuration for specific filetype. + cmp.setup.filetype("gitcommit", { + sources = cmp.config.sources({ + { name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it. + }, { + { name = "buffer" }, + }) + }) + + -- Use buffer source for `/` (if you enabled `native_menu`, this won"t work anymore). + cmp.setup.cmdline("/", { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = "buffer" } + } + }) + + -- Use cmdline & path source for ":" (if you enabled `native_menu`, this won"t work anymore). + cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" } + }, { + { name = "cmdline" } + }) + }) + + -- Setup lspconfig. + local capabilities = require("cmp_nvim_lsp").default_capabilities() + require("lspconfig")["pyright"].setup { + capabilities = capabilities + } + end, }, } From 275d32019658354779aa69966819a99566b6bde6 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 11:48:45 +0700 Subject: [PATCH 072/126] style(nvim): Enable some extensions for lualine --- .config/nvim/lua/null/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index b4d76c8..0bcb736 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -29,6 +29,7 @@ return { section_separators = "", component_separators = "", }, + extensions = {"neo-tree", "oil", "lazy"}, sections = { lualine_a = {"mode"}, lualine_b = {"branch", "diff", "diagnostics"}, From 5537634904910f1b5b6eee4613094ef201b5633c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:22:40 +0700 Subject: [PATCH 073/126] chore(nvim): Fully migrated vim_uni --- .config/nvim/lua/null/config.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index 515d866..beec70f 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -1,10 +1,17 @@ -require("null.remap") - local o = vim.opt local g = vim.g +o.encoding = "utf-8" +o.hls = true o.nu = true o.relativenumber = true +o.ignorecase = true +o.smartcase = true +o.mouse = "a" +o.splitbelow = true +o.splitright = true g.mapleader = " " g.guifont = { "Sarasa UI J", ":h16" } + +require("null.remap") From 769816a507849eacbe564136d08bfda40e92eecf Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:23:05 +0700 Subject: [PATCH 074/126] chore(nvim): Fully migrated vim_nix --- .config/nvim/lua/null/nix.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/lua/null/nix.lua b/.config/nvim/lua/null/nix.lua index 86bcb6d..7aeb163 100644 --- a/.config/nvim/lua/null/nix.lua +++ b/.config/nvim/lua/null/nix.lua @@ -2,6 +2,7 @@ local o = vim.opt local g = vim.g o.undodir = vim.fn.stdpath("data") .. "/null/undo" +o.undofile = true o.directory = vim.fn.stdpath("data") .. "/null/swap" o.backupdir = vim.fn.stdpath("data") .. "/null/backup" o.viewdir = vim.fn.stdpath("data") .. "/null/view" From 4313d77fe71e87f6e981eb3bb6a7e612a95d5f8d Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:23:51 +0700 Subject: [PATCH 075/126] enhance(nvim): Lazy load completion when entering insert mode --- .config/nvim/lua/null/plugins/completion.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/nvim/lua/null/plugins/completion.lua b/.config/nvim/lua/null/plugins/completion.lua index d7102f4..6145a21 100644 --- a/.config/nvim/lua/null/plugins/completion.lua +++ b/.config/nvim/lua/null/plugins/completion.lua @@ -26,6 +26,7 @@ return { }, { "hrsh7th/nvim-cmp", + event = "InsertEnter", dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", From 05ab2b0a51def594c23ec114d3ba53340ec010a0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:24:30 +0700 Subject: [PATCH 076/126] chore(nvim): Fully migrated mappings) --- .config/nvim/lua/null/remap.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/remap.lua b/.config/nvim/lua/null/remap.lua index 9244c31..9e70cb1 100644 --- a/.config/nvim/lua/null/remap.lua +++ b/.config/nvim/lua/null/remap.lua @@ -18,4 +18,22 @@ map("v", "", "gc", { remap = true }) map("i", "", "gcc", { remap = true }) -- Normal command shortcut for VISUAL mode -map("v", ".", ":normal .") +map("v", ".", ":normal .") + +-- Clear search +map("n", "c", "noh") + +-- Navigate splits +map("n", "", "h") +map("n", "", "j") +map("n", "", "k") +map("n", "", "l") + +-- Ctrl+P or Ctrl+N alternatives +-- map("i", "", vim.fn.pumvisible() == 1 and "" or "") +-- map("i", "", vim.fn.pumvisible() == 1 and "" or "") +-- map("i", "", vim.fn.pumvisible() == 1 and "" or "") +-- map("i", "", vim.fn.pumvisible() == 1 and "" or "") + +-- Enter to complete +-- map("i", "", vim.fn.pumvisible() == 1 and "" or "") From 046ea79ea295181a08d7d22bc52f6c51b3ff67f7 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:28:03 +0700 Subject: [PATCH 077/126] enhance(nvim): Lazy load completion when typing commands --- .config/nvim/lua/null/plugins/completion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/completion.lua b/.config/nvim/lua/null/plugins/completion.lua index 6145a21..934f24c 100644 --- a/.config/nvim/lua/null/plugins/completion.lua +++ b/.config/nvim/lua/null/plugins/completion.lua @@ -26,7 +26,7 @@ return { }, { "hrsh7th/nvim-cmp", - event = "InsertEnter", + event = { "InsertEnter", "CmdlineEnter" }, dependencies = { "hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-buffer", From f4c221c1d2cc60b6a471d7d6e1e0e97537ca7670 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:32:31 +0700 Subject: [PATCH 078/126] docs: Setup updates --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5812255..b7ff044 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ My Setup: - **WM**: Hyprland - **OS**: Arch Linux / macOS 13.x (Ventura)*ᵖ* - **Shell**: zsh -- **Terminal**: st*ʳ* / kitty / iTerm2 +- **Terminal**: kitty / iTerm2 - **Editor**: Neovim / VSCode / IDEA - **File Manager**: Thunar / Nautilus / lf -- **Launcher**: tofi / Sol +- **Launcher**: tofi / Alfred - **Browser**: Pulse -*info*: *ʳ* = *in separate repo*; *ᵖ* = *partially work* +*info*: *ᵖ* = *partially work* ## Setup @@ -35,10 +35,9 @@ First time setup only: run `setup-dotfiles > ~/.config/zsh/dotfi ## Recommended Project/Software - TBSM - Fonts - - Iosevka + - Iosevka + Sarasa Gothic - Fira - - Sarasa Font - - Feather / Lucide (for Icons) + - Feather / Lucide / Phosphor (for Icons) - kitty - Tiling WM - Qtile (Linux - X11) @@ -50,7 +49,7 @@ First time setup only: run `setup-dotfiles > ~/.config/zsh/dotfi ## Tips -### Small guide for my dwm hotkeys +### Small guide for my tiling WM hotkeys - MODKey (Super/Win Key): Window Manager - Alt/Option: Terminal - Ctrl/: Most program inside terminal From e217bfa86cc02f4e433a751fddea86e86222668c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:34:55 +0700 Subject: [PATCH 079/126] docs: Use footnote --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7ff044..8fa1059 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ I'm still working on cleaning up some mess. My Setup: - **WM**: Hyprland -- **OS**: Arch Linux / macOS 13.x (Ventura)*ᵖ* +- **OS**: Arch Linux / macOS 13.x (Ventura)[^mac] - **Shell**: zsh - **Terminal**: kitty / iTerm2 - **Editor**: Neovim / VSCode / IDEA @@ -23,7 +23,7 @@ My Setup: - **Launcher**: tofi / Alfred - **Browser**: Pulse -*info*: *ᵖ* = *partially work* +[^mac]: macOS support is partially working ## Setup From d909aa1a518cde13125ff47e9c68fa622847f206 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:49:06 +0700 Subject: [PATCH 080/126] feat(nvim): Port LazyFile REF: https://github.com/folke/lazy.nvim/issues/1182 --- .config/nvim/lua/null/plugins/treesitter.lua | 4 ++ .config/nvim/lua/null/util.lua | 70 ++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/.config/nvim/lua/null/plugins/treesitter.lua b/.config/nvim/lua/null/plugins/treesitter.lua index 654d229..cad7dd2 100644 --- a/.config/nvim/lua/null/plugins/treesitter.lua +++ b/.config/nvim/lua/null/plugins/treesitter.lua @@ -1,6 +1,10 @@ +require("null.util").lazy_file() + return { { "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = { "LazyFile", "VeryLazy" }, opts = { ensure_installed = { "c", diff --git a/.config/nvim/lua/null/util.lua b/.config/nvim/lua/null/util.lua index 75b39d7..00d465c 100644 --- a/.config/nvim/lua/null/util.lua +++ b/.config/nvim/lua/null/util.lua @@ -30,4 +30,74 @@ function M.map(modes, key, target, opts) }) end +-- << REF: https://github.com/LazyVim/LazyVim/blob/7a5dbea/lua/lazyvim/util/plugin.lua#L59-L124 +-- Properly load file based plugins without blocking the UI +function M.lazy_file() + M.use_lazy_file = M.use_lazy_file and vim.fn.argc(-1) > 0 + + -- Add support for the LazyFile event + local Event = require("lazy.core.handler.event") + + if M.use_lazy_file then + -- We'll handle delayed execution of events ourselves + Event.mappings.LazyFile = { id = "LazyFile", event = "User", pattern = "LazyFile" } + Event.mappings["User LazyFile"] = Event.mappings.LazyFile + else + -- Don't delay execution of LazyFile events, but let lazy know about the mapping + Event.mappings.LazyFile = { id = "LazyFile", event = { "BufReadPost", "BufNewFile", "BufWritePre" } } + Event.mappings["User LazyFile"] = Event.mappings.LazyFile + return + end + + local events = {} ---@type {event: string, buf: number, data?: any}[] + + local done = false + local function load() + if #events == 0 or done then + return + end + done = true + vim.api.nvim_del_augroup_by_name("lazy_file") + + ---@type table + local skips = {} + for _, event in ipairs(events) do + skips[event.event] = skips[event.event] or Event.get_augroups(event.event) + end + + vim.api.nvim_exec_autocmds("User", { pattern = "LazyFile", modeline = false }) + for _, event in ipairs(events) do + if vim.api.nvim_buf_is_valid(event.buf) then + Event.trigger({ + event = event.event, + exclude = skips[event.event], + data = event.data, + buf = event.buf, + }) + if vim.bo[event.buf].filetype then + Event.trigger({ + event = "FileType", + buf = event.buf, + }) + end + end + end + vim.api.nvim_exec_autocmds("CursorMoved", { modeline = false }) + events = {} + end + + -- schedule wrap so that nested autocmds are executed + -- and the UI can continue rendering without blocking + load = vim.schedule_wrap(load) + + vim.api.nvim_create_autocmd(M.lazy_file_events, { + group = vim.api.nvim_create_augroup("lazy_file", { clear = true }), + callback = function(event) + table.insert(events, event) + load() + end, + }) +end +-- >> + return M From 42ee746b9e79158ab1a9423efe5262cb6ce3b0af Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 12:50:45 +0700 Subject: [PATCH 081/126] docs(nvim): Divider --- .config/nvim/lua/null/util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/null/util.lua b/.config/nvim/lua/null/util.lua index 00d465c..ca7e9fe 100644 --- a/.config/nvim/lua/null/util.lua +++ b/.config/nvim/lua/null/util.lua @@ -30,7 +30,7 @@ function M.map(modes, key, target, opts) }) end --- << REF: https://github.com/LazyVim/LazyVim/blob/7a5dbea/lua/lazyvim/util/plugin.lua#L59-L124 +-- <<[LAZY] REF: https://github.com/LazyVim/LazyVim/blob/7a5dbea/lua/lazyvim/util/plugin.lua#L59-L124 -- Properly load file based plugins without blocking the UI function M.lazy_file() M.use_lazy_file = M.use_lazy_file and vim.fn.argc(-1) > 0 @@ -98,6 +98,6 @@ function M.lazy_file() end, }) end --- >> +-- >>[LAZY] return M From 577be59f57a1e7b8e6a7d7baa78f7dbdfd7d3ba5 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 13:11:00 +0700 Subject: [PATCH 082/126] chore(nvim): Fully migrated to lua! Closes GH-5 --- .config/nvim/init.lua | 8 +------- .config/nvim/lua/null/config.lua | 10 +++++++++- .config/nvim/lua/null/plugins/init.lua | 13 +++++++++++-- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 7b9038b..32765b0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -20,10 +20,4 @@ -- null2264's NeoVim Config -- --========================================-- --- TODO: Uncomment once we done migrating --- require("null") - --- FIXME: Turn all these to LUA -vim.cmd("source ~/.config/vim/vim_nix") -vim.cmd("source ~/.config/vim/vim_uni") -vim.cmd("source ~/.config/vim/vim_plug") +require("null") diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index beec70f..98a7838 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -3,14 +3,22 @@ local g = vim.g o.encoding = "utf-8" o.hls = true -o.nu = true + +o.number = true o.relativenumber = true +o.cursorline = true +o.cursorlineopt = "number" + o.ignorecase = true o.smartcase = true o.mouse = "a" o.splitbelow = true o.splitright = true +-- Remove ugly tilde at the end of a file +-- REF: https://vi.stackexchange.com/a/29181 +o.fillchars = "eob: " + g.mapleader = " " g.guifont = { "Sarasa UI J", ":h16" } diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 0bcb736..d0a516e 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -6,8 +6,17 @@ return { lazy = false, priority = 1000, config = function () - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) + require("tokyonight").setup({ + style = "moon", + transparent = true, + styles = { + sidebars = "transparent" + }, + on_highlights = function (hl, c) + hl.CursorLineNr = { fg = c.yellow, bold = true } + end, + }) + vim.cmd([[colorscheme tokyonight-moon]]) end, }, { From 7baae6f6247f2c831827a5a624ad5e5d8e47969a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 13:12:48 +0700 Subject: [PATCH 083/126] chore: Archive vimrc --- {.config => archive}/vim/.gitignore | 0 {.config => archive}/vim/README.md | 0 {.config => archive}/vim/vim_idea | 0 {.config => archive}/vim/vim_nix | 0 {.config => archive}/vim/vim_plug | 0 {.config => archive}/vim/vim_uni | 0 {.config => archive}/vim/vim_win | 0 {.config => archive}/vim/vimrc | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {.config => archive}/vim/.gitignore (100%) rename {.config => archive}/vim/README.md (100%) rename {.config => archive}/vim/vim_idea (100%) rename {.config => archive}/vim/vim_nix (100%) rename {.config => archive}/vim/vim_plug (100%) rename {.config => archive}/vim/vim_uni (100%) rename {.config => archive}/vim/vim_win (100%) rename {.config => archive}/vim/vimrc (100%) diff --git a/.config/vim/.gitignore b/archive/vim/.gitignore similarity index 100% rename from .config/vim/.gitignore rename to archive/vim/.gitignore diff --git a/.config/vim/README.md b/archive/vim/README.md similarity index 100% rename from .config/vim/README.md rename to archive/vim/README.md diff --git a/.config/vim/vim_idea b/archive/vim/vim_idea similarity index 100% rename from .config/vim/vim_idea rename to archive/vim/vim_idea diff --git a/.config/vim/vim_nix b/archive/vim/vim_nix similarity index 100% rename from .config/vim/vim_nix rename to archive/vim/vim_nix diff --git a/.config/vim/vim_plug b/archive/vim/vim_plug similarity index 100% rename from .config/vim/vim_plug rename to archive/vim/vim_plug diff --git a/.config/vim/vim_uni b/archive/vim/vim_uni similarity index 100% rename from .config/vim/vim_uni rename to archive/vim/vim_uni diff --git a/.config/vim/vim_win b/archive/vim/vim_win similarity index 100% rename from .config/vim/vim_win rename to archive/vim/vim_win diff --git a/.config/vim/vimrc b/archive/vim/vimrc similarity index 100% rename from .config/vim/vimrc rename to archive/vim/vimrc From a1ad5ff8292d7695a0d6a0e701913e86684f58b5 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 13:22:53 +0700 Subject: [PATCH 084/126] enhance(nvim): q to close oil --- .config/nvim/lua/null/plugins/file-explorer.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/file-explorer.lua b/.config/nvim/lua/null/plugins/file-explorer.lua index eec63d8..87d7ab0 100644 --- a/.config/nvim/lua/null/plugins/file-explorer.lua +++ b/.config/nvim/lua/null/plugins/file-explorer.lua @@ -23,7 +23,11 @@ return { }, dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () - require("oil").setup() + require("oil").setup({ + keymaps = { + ["q"] = "actions.close", + }, + }) end }, } From 4e085a506c7f17466c15da8946c9cf3ada690dd0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 14:02:55 +0700 Subject: [PATCH 085/126] enhance(nvim): Visualise indentations --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/null/config.lua | 11 ++++++++--- .config/nvim/lua/null/plugins/init.lua | 7 +++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index ff94719..5eb6b74 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -3,6 +3,7 @@ "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index 98a7838..5a27cbb 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -15,9 +15,14 @@ o.mouse = "a" o.splitbelow = true o.splitright = true --- Remove ugly tilde at the end of a file --- REF: https://vi.stackexchange.com/a/29181 -o.fillchars = "eob: " +o.list = true +-- o.listchars:append("space:⋅") +-- > Visualize indent trails with dots +o.listchars:append("trail:⋅") +o.listchars:append("tab:▎―") +-- > Remove ugly tilde at the end of a file +-- > REF: https://vi.stackexchange.com/a/29181 +o.fillchars:append("eob: ") g.mapleader = " " g.guifont = { "Sarasa UI J", ":h16" } diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index d0a516e..24d70cb 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -61,4 +61,11 @@ return { -- Note to self: init is called during startup. Configuration for vim plugins typically should be set in an init function end, }, + { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + config = function () + require("ibl").setup() + end + }, } From 29fbf529402b64b6afdbd3dd606d5ae626bf22ec Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 18 Apr 2024 14:26:16 +0700 Subject: [PATCH 086/126] fix(nvim): I need that apparently --- .config/nvim/lua/null/config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/config.lua b/.config/nvim/lua/null/config.lua index 5a27cbb..7f8b8d2 100644 --- a/.config/nvim/lua/null/config.lua +++ b/.config/nvim/lua/null/config.lua @@ -16,8 +16,8 @@ o.splitbelow = true o.splitright = true o.list = true --- o.listchars:append("space:⋅") -- > Visualize indent trails with dots +o.listchars:append("space:⋅") o.listchars:append("trail:⋅") o.listchars:append("tab:▎―") -- > Remove ugly tilde at the end of a file From 954f87c7c74907f5af4daf42214be0ec667fa450 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 24 Apr 2024 11:14:20 +0700 Subject: [PATCH 087/126] fix: Redirect aliases cfvim* to nvim config files --- .config/zsh/aliases | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 66d8778..d7387e1 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -77,11 +77,10 @@ alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' #config shortcuts alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' -alias cfvim='vim $XDG_CONFIG_HOME/vim/vimrc' -alias cfvimplug='vim $XDG_CONFIG_HOME/vim/vim_plug' -alias cfvimnix='vim $XDG_CONFIG_HOME/vim/vim_nix' -alias cfvimwin='vim $XDG_CONFIG_HOME/vim/vim_win' -alias cfvimuni='vim $XDG_CONFIG_HOME/vim/vim_uni' +alias cfvim='vim $XDG_CONFIG_HOME/nvim/init.lua' +alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plug.lua' +alias cfvimnix='vim $XDG_CONFIG_HOME/nvim/lua/null/nix.lua' +alias cfvimuni='vim $XDG_CONFIG_HOME/nvim/lua/null/config.lua' alias cfbash='vim $HOME/.bashrc' alias cfzsh='vim $XDG_CONFIG_HOME/zsh/.zshrc' alias cfxres='vim $XDG_CONFIG_HOME/Xresources' From 22f590c7858fd281e1685f38ad90e8caaf83dbf2 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 24 Apr 2024 11:14:35 +0700 Subject: [PATCH 088/126] chore: Sync --- .config/discordcanary/settings.json | 21 +++++++++++++++++++-- .config/hypr/hyprland.conf | 2 +- .gitignore | 2 ++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.config/discordcanary/settings.json b/.config/discordcanary/settings.json index da8bd37..5f2d041 100644 --- a/.config/discordcanary/settings.json +++ b/.config/discordcanary/settings.json @@ -1,3 +1,20 @@ { - "SKIP_HOST_UPDATE": true -} + "SKIP_HOST_UPDATE": true, + "IS_MAXIMIZED": false, + "IS_MINIMIZED": false, + "WINDOW_BOUNDS": { + "x": 0, + "y": 28, + "width": 1366, + "height": 740 + }, + "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true, + "MIN_WIDTH": 940, + "MIN_HEIGHT": 500, + "chromiumSwitches": {}, + "openasar": { + "setup": true, + "css": "@import url(\"https://luckfire.github.io/amoled-cord/src/amoled-cord.css\")" + }, + "trayBalloonShown": true +} \ No newline at end of file diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 2d359eb..4fb3206 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -11,7 +11,7 @@ exec-once = xsettingsd & #exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & exec-once = swww query || sleep 1; swww init --format xrgb && swww img -t none $HOME/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.gif -monitor=,preferred,auto,auto +monitor=,preferred,auto,1 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { diff --git a/.gitignore b/.gitignore index d0084f8..e14dfc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.config/discordcanary +!.config/discordcanary/settings.json .config/zsh/ !.config/zsh/.zprofile !.config/zsh/.zshenv From fb1562f804d13841258d808c10052d7042bccaec Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 24 Apr 2024 11:19:27 +0700 Subject: [PATCH 089/126] chore: Disable lazy for oil.nvim I need it to overwrite netrw, I can't figure out how to do that with lazyload atm --- .config/nvim/lua/null/plugins/file-explorer.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/null/plugins/file-explorer.lua b/.config/nvim/lua/null/plugins/file-explorer.lua index 87d7ab0..a07aa0b 100644 --- a/.config/nvim/lua/null/plugins/file-explorer.lua +++ b/.config/nvim/lua/null/plugins/file-explorer.lua @@ -18,12 +18,11 @@ return { }, { "stevearc/oil.nvim", - keys = { - { "-", "Oil", desc = "Oil" }, - }, + lazy = false, dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () require("oil").setup({ + default_file_explorer = true, keymaps = { ["q"] = "actions.close", }, From 5df2ab49054bca79e9383d4a118d49c9aa6193e0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 24 Apr 2024 11:21:49 +0700 Subject: [PATCH 090/126] fix: Whoops, don't remove the keys --- .config/nvim/lua/null/plugins/file-explorer.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/nvim/lua/null/plugins/file-explorer.lua b/.config/nvim/lua/null/plugins/file-explorer.lua index a07aa0b..672abc5 100644 --- a/.config/nvim/lua/null/plugins/file-explorer.lua +++ b/.config/nvim/lua/null/plugins/file-explorer.lua @@ -19,6 +19,9 @@ return { { "stevearc/oil.nvim", lazy = false, + keys = { + { "-", "Oil", desc = "Oil" }, + }, dependencies = { "nvim-tree/nvim-web-devicons" }, config = function () require("oil").setup({ From 87b95207de46ecd7d50237489230974ccd3a8941 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sat, 27 Apr 2024 08:29:10 +0700 Subject: [PATCH 091/126] enhance: Fixes here and there - Fix flameshot not working (was replaced with grim as workaround) - Fix xtmapper not spawn on the right place --- .config/hypr/hyprland.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 4fb3206..78faae7 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -97,11 +97,14 @@ master { windowrulev2 = stayfocused,title:^(XtMapper)$ windowrulev2 = noblur,title:^(XtMapper)$ windowrulev2 = float,title:^(XtMapper)$ -windowrulev2 = move 0 34,title:^(XtMapper)$ +windowrulev2 = move 0 28,title:^(XtMapper)$ windowrulev2 = rounding 0,title:^(XtMapper)$ #windowrulev2 = maxsize 1366 734,title:^(XtMapper)$ #windowrulev2 = minsize 1366 734,title:^(XtMapper)$ # << +windowrulev2 = noblur,title:^(flameshot)$ +windowrulev2 = float,title:^(flameshot)$ +windowrulev2 = noanim,title:^(flameshot)$ # still fading when it closes, but close enough # Alt Key = Mostly for terminals only $mainMod = SUPER # Super Key = General MOD for WM @@ -111,7 +114,8 @@ $spaceMod = SUPER SHIFT # Super + Shift = MOD key(s) that control/modify the Wo bind = $mainMod, T, exec, kitty bind = $mainMod, Q, killactive, bind = $mainMod, B, exec, $BROWSER -bind = , Print, exec, grim -g "$(slurp)" - | wl-copy +#bind = , Print, exec, grim -g "$(slurp)" - | wl-copy +bind = , Print, exec, env XDG_CURRENT_DESKTOP="sway" flameshot gui bind = $mainMod, Space, exec, exec `tofi-run` 2>/dev/null bind = $metaMod, Q, exit, bind = $metaMod, F, togglefloating, From 69b724605f89a11545409064f36f7207a56e6bf2 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 07:22:47 +0700 Subject: [PATCH 092/126] chore: Disable cpupower set on boot You can set governor using `cpufreq.default_governor` kernel option since Linux 5.9 REF: https://wiki.archlinux.org/title/CPU_frequency_scaling#Make_changes_permanent --- .config/xprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/xprofile b/.config/xprofile index 4e839bc..20b3f9f 100644 --- a/.config/xprofile +++ b/.config/xprofile @@ -7,7 +7,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then xset s off -dpms # Set cpu-governor to performance (Sometime it still set to powersave) - cpupower frequency-set -g performance + #cpupower frequency-set -g performance # Slow app startup fix (for flatpaks) dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY From a6f76a45cdcea879504be3a3399915ce8e0c602b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 07:25:32 +0700 Subject: [PATCH 093/126] feat: Shorter alias for config dir --- .config/zsh/aliases | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index d7387e1..48729e2 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -77,6 +77,7 @@ alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' #config shortcuts alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' +alias cfg='config' alias cfvim='vim $XDG_CONFIG_HOME/nvim/init.lua' alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plug.lua' alias cfvimnix='vim $XDG_CONFIG_HOME/nvim/lua/null/nix.lua' From 671f50788b6771e326cc7ad3c1d4302fbcd21b08 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 07:26:31 +0700 Subject: [PATCH 094/126] enhance: `cfvimplug` now open `plugins` folder using `oil.nvim` --- .config/zsh/aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 48729e2..c5018af 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -79,7 +79,7 @@ alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' alias cfg='config' alias cfvim='vim $XDG_CONFIG_HOME/nvim/init.lua' -alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plug.lua' +alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plugins/' alias cfvimnix='vim $XDG_CONFIG_HOME/nvim/lua/null/nix.lua' alias cfvimuni='vim $XDG_CONFIG_HOME/nvim/lua/null/config.lua' alias cfbash='vim $HOME/.bashrc' From b86cf1cf562b951d5860c46a5d816b984ed7f307 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 07:30:04 +0700 Subject: [PATCH 095/126] feat: `neofetch` is dead, migrate to `fastfetch` --- .config/zsh/aliases | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index c5018af..a21b4d1 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -132,3 +132,5 @@ alias docx2pdf='lowriter --convert-to pdf' alias mirror-update='curl -s "https://archlinux.org/mirrorlist/?country=ID&country=SG&country=US&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -' alias center-pfetch="printf '\n'; pfetch | sed '\$d' | center -l" [ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" + +alias neofetch='fastfetch' From ca49363d286361f0bc739d7734041a72dba25d39 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 08:25:21 +0700 Subject: [PATCH 096/126] feat: Add script to launch spotify in compat mode --- .local/bin/personal/spotify-compat | 1 + 1 file changed, 1 insertion(+) create mode 100755 .local/bin/personal/spotify-compat diff --git a/.local/bin/personal/spotify-compat b/.local/bin/personal/spotify-compat new file mode 100755 index 0000000..90dcd29 --- /dev/null +++ b/.local/bin/personal/spotify-compat @@ -0,0 +1 @@ +SPOTIFY_FORCE_RENDERER=desktop spotify From e929ef27bed86810e86a464155162238c437ad8d Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 08:29:37 +0700 Subject: [PATCH 097/126] revert: Remove `spotify-compat` --- .local/bin/personal/spotify-compat | 1 - 1 file changed, 1 deletion(-) delete mode 100755 .local/bin/personal/spotify-compat diff --git a/.local/bin/personal/spotify-compat b/.local/bin/personal/spotify-compat deleted file mode 100755 index 90dcd29..0000000 --- a/.local/bin/personal/spotify-compat +++ /dev/null @@ -1 +0,0 @@ -SPOTIFY_FORCE_RENDERER=desktop spotify From f38d3ede24eeb280e652d1086e0649012512cbfc Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 2 May 2024 08:35:36 +0700 Subject: [PATCH 098/126] fix(flameshot): Putting image to clipboard is not consistent I assume the issue is caused by Flameshot using KDE's library to put the screenshot to clipboard. REF: https://github.com/flameshot-org/flameshot/issues/2848#issuecomment-1368644640 --- .config/hypr/hyprland.conf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 78faae7..eb0dd9a 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -114,8 +114,17 @@ $spaceMod = SUPER SHIFT # Super + Shift = MOD key(s) that control/modify the Wo bind = $mainMod, T, exec, kitty bind = $mainMod, Q, killactive, bind = $mainMod, B, exec, $BROWSER +# >> In case flameshot stop working again #bind = , Print, exec, grim -g "$(slurp)" - | wl-copy -bind = , Print, exec, env XDG_CURRENT_DESKTOP="sway" flameshot gui +# << +# >> Commented because flameshot clipboard support for wayland is buggy, probably because they use KDE's clipboard library +# I'll be feeding flameshot's raw output to wl-copy for now +#bind = , Print, exec, env XDG_CURRENT_DESKTOP="sway" flameshot gui +# << +# >> zi-copy is a custom private script +# It basically prompt me if I want to upload the result to S3 (using s3cmd) before copying to clipboard or not +bind = , Print, exec, env XDG_CURRENT_DESKTOP="sway" flameshot gui --raw | $(zi-copy || wl-copy) +# << bind = $mainMod, Space, exec, exec `tofi-run` 2>/dev/null bind = $metaMod, Q, exit, bind = $metaMod, F, togglefloating, From fb6bd7bba178cdf79efed77d6086d6581e76321a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 3 May 2024 09:27:23 +0700 Subject: [PATCH 099/126] fix: Comment hotkey not working in visual mode --- .config/nvim/lua/null/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 24d70cb..55225aa 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -52,7 +52,9 @@ return { }, { "tpope/vim-commentary", -- shortcut to comment a line - keys = { "gc" }, + keys = { + { "gc", mode = { "n", "v", "i" } }, + }, }, { "dstein64/vim-startuptime", From f234d31a1d213a8d6d159868620a5e16d5c84d44 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 3 May 2024 11:05:02 +0700 Subject: [PATCH 100/126] feat: TODO comments --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/null/plugins/init.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 5eb6b74..bfc5489 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -14,6 +14,7 @@ "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, + "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, "tree-sitter-gsp": { "branch": "master", "commit": "1f10ff9a6039a50e2f7be394fc22b1400832cf17" }, "vim-commentary": { "branch": "master", "commit": "c4b8f52cbb7142ec239494e5a2c4a512f92c4d07" }, diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index 55225aa..ac3366e 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -70,4 +70,11 @@ return { require("ibl").setup() end }, + { + "folke/todo-comments.nvim", + cmd = { "TodoTrouble", "TodoTelescope" }, + event = "LazyFile", + dependencies = { "nvim-lua/plenary.nvim" }, + config = true, + }, } From 64d2f4f02545f1a64fa9bdaf03cec0639f6144a8 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Tue, 7 May 2024 13:55:35 +0700 Subject: [PATCH 101/126] fix: Some bullshit --- .config/discordcanary/settings.json | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.config/discordcanary/settings.json b/.config/discordcanary/settings.json index 5f2d041..e75dd85 100644 --- a/.config/discordcanary/settings.json +++ b/.config/discordcanary/settings.json @@ -1,20 +1,10 @@ { - "SKIP_HOST_UPDATE": true, - "IS_MAXIMIZED": false, - "IS_MINIMIZED": false, - "WINDOW_BOUNDS": { - "x": 0, - "y": 28, - "width": 1366, - "height": 740 - }, - "DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING": true, - "MIN_WIDTH": 940, - "MIN_HEIGHT": 500, - "chromiumSwitches": {}, "openasar": { "setup": true, - "css": "@import url(\"https://luckfire.github.io/amoled-cord/src/amoled-cord.css\")" + "noTyping": true, + "css": "@import url(\"https://luckfire.github.io/amoled-cord/src/amoled-cord.css\");" }, - "trayBalloonShown": true + "chromiumSwitches": {}, + "IS_MAXIMIZED": true, + "IS_MINIMIZED": false } \ No newline at end of file From c6c0e339705fe6cdcf85ed8d3b181a27a92111ea Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Tue, 7 May 2024 13:56:10 +0700 Subject: [PATCH 102/126] feat(nvim): Add git-conflict.nvim --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/null/plugins/init.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index bfc5489..52e2b70 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -3,6 +3,7 @@ "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, diff --git a/.config/nvim/lua/null/plugins/init.lua b/.config/nvim/lua/null/plugins/init.lua index ac3366e..b813a30 100644 --- a/.config/nvim/lua/null/plugins/init.lua +++ b/.config/nvim/lua/null/plugins/init.lua @@ -77,4 +77,10 @@ return { dependencies = { "nvim-lua/plenary.nvim" }, config = true, }, + { + "akinsho/git-conflict.nvim", + event = "LazyFile", + version = "*", + config = true, + }, } From 6f57c1a670e1d0ae1e026b31d839e7a3e1a8a109 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Tue, 14 May 2024 16:56:42 +0700 Subject: [PATCH 103/126] style(eww): Initial design --- .config/eww/eww.scss | 125 +++++++++++++++++++++++++++++-------------- .config/eww/eww.yuck | 5 +- 2 files changed, 89 insertions(+), 41 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index a27cb7a..28814d0 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -1,21 +1,33 @@ +// vi: et ts=4 sw=4 * { - all: unset; - font-family: 'monospace'; - font-size: 16px; - font-feature-settings: 'tnum'; - color: #FFF; + all: unset; + font-family: 'monospace'; + font-size: 16px; + font-feature-settings: 'tnum'; + color: #FFF; } +// >> bg +$bg-100: #434758; +$bg-300: #2A3039; +$bg-500: #0E1418; // base + +$bg-radius: 8px; +$bg-margin: 4px; +// << bg + /** tooltip!! **/ -tooltip.background { - background-color: #0f0f17; - font-size: 18; - border-radius: 10px; - color: #bfc9db; -} +tooltip { + .background { + background-color: #0f0f17; + font-size: 18; + border-radius: 10px; + color: #bfc9db; + } -tooltip label { - margin: 6px; + label { + margin: 6px; + } } .csd.background.popup { /* SysTray popup */ @@ -25,47 +37,82 @@ tooltip label { padding-bottom: 8px; } + menuitem { + -gtk-dpi: 16; + } + menuitem:hover { background-color: red; } } .bar { - background-color: rgba(43, 48, 59, 1); + background: $bg-500; +} + +.middle { + .clock label { + background: $bg-300; + margin: $bg-margin 0px; + padding: 0 13px; + border-radius: $bg-radius; + } } .end { - > box { - padding: 0 8px; + > box { - > label:first-child { - padding-right: 16px; - } - } + widget > image { + background: $bg-300; + margin: $bg-margin 0px; + padding: 0 6px; + } - label:last-child { - margin-right: 12px; - } + widget:first-child > image { + border-radius: $bg-radius 0px 0px $bg-radius; + } - box label:last-child { - margin-left: 12px; - } + widget:last-child > image { + border-radius: 0px $bg-radius $bg-radius 0px; + } + + > label:first-child { + padding-right: 16px; + } + } + + label:last-child { + margin-right: 12px; + } + + box label:last-child { + margin-left: 12px; + } } -.workspaces button { - label { - padding: 0 13px; - } +.workspaces { + button:first-child label { + border-radius: $bg-radius 0px 0px $bg-radius; + } - &:hover { - background: rgba(0, 0, 0, 0.2); - } + button:last-child label { + border-radius: 0px $bg-radius $bg-radius 0px; + } - &.active { - background: rgba(0, 0, 0, 0.4); - } + button { + min-height: 13px; - &:hover, &.active { - box-shadow: inset 0 -3px #FAA14F; - } + label { + background: $bg-300; + margin: $bg-margin 0px; + padding: 0 13px; + } + + &:hover, &.active { + label { + background: #1CA2DA; + color: white; + } + } + } } diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index f3cfb82..3f55816 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -29,7 +29,8 @@ (workspaces)) (defwidget middle [] - (clock)) + (box :class "middle" + (clock))) (defwidget end [] (box :halign "end" @@ -46,7 +47,7 @@ id)))) (defwidget clock [] - (eventbox :onclick `eww update dtfull=${!dtfull}` + (eventbox :class "clock" :onclick `eww update dtfull=${!dtfull}` (label :text {dtfull ? datetime.full : datetime.date}))) (defwidget pair [icon text] From a4e13585d4b5c747b36f0803fe852e5443db905d Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 06:45:20 +0700 Subject: [PATCH 104/126] style(eww): Fix border radius if there's only 1 workspaces left --- .config/eww/eww.scss | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 28814d0..a0bf2f4 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -92,11 +92,13 @@ tooltip { .workspaces { button:first-child label { - border-radius: $bg-radius 0px 0px $bg-radius; + border-top-left-radius: $bg-radius; + border-bottom-left-radius: $bg-radius } button:last-child label { - border-radius: 0px $bg-radius $bg-radius 0px; + border-top-right-radius: $bg-radius; + border-bottom-right-radius: $bg-radius } button { From 044901c5cf5c2bce4e56ce36d55222e2d0ca10e0 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 06:46:44 +0700 Subject: [PATCH 105/126] style(eww): Different background colour for hover --- .config/eww/eww.scss | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index a0bf2f4..552d410 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -110,11 +110,12 @@ tooltip { padding: 0 13px; } - &:hover, &.active { - label { - background: #1CA2DA; - color: white; - } + &:hover label { + background: $bg-100; + } + + &.active label { + background: #1CA2DA; } } } From c5a497dd25a236262708eb0be1eee126c5d292e7 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 06:47:16 +0700 Subject: [PATCH 106/126] sync: discordcanary --- .config/discordcanary/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/discordcanary/settings.json b/.config/discordcanary/settings.json index e75dd85..b379770 100644 --- a/.config/discordcanary/settings.json +++ b/.config/discordcanary/settings.json @@ -6,5 +6,6 @@ }, "chromiumSwitches": {}, "IS_MAXIMIZED": true, - "IS_MINIMIZED": false + "IS_MINIMIZED": false, + "trayBalloonShown": true } \ No newline at end of file From a2e7390d190e0bd3bbedb013bb7c95f6dfd71cb7 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 08:25:06 +0700 Subject: [PATCH 107/126] refactor(zsh): Use XDG --- .config/zsh/.zshrc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 61c8e18..c1fd1a6 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -9,9 +9,10 @@ # rateUSD | sed 's/^/ /g' setopt auto_cd # auto cd if directory +__CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config} # highlight on tab (completion) -[ -f ~/.config/zsh/completion ] && source ~/.config/zsh/completion +[ -f $__CONFIG_DIR/zsh/completion ] && source $__CONFIG_DIR/zsh/completion # zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash # fpath=(/usr/local/share/zsh-completions $fpath) # autoload -U compinit && compinit -u @@ -19,16 +20,16 @@ setopt auto_cd # auto cd if directory # zstyle ':completion:*' menu select # Alias -[ -f ~/.config/zsh/aliases ] && source ~/.config/zsh/aliases +[ -f $__CONFIG_DIR/zsh/aliases ] && source $__CONFIG_DIR/zsh/aliases # Theme -[ -f ~/.config/zsh/theme ] && source ~/.config/zsh/theme +[ -f $__CONFIG_DIR/zsh/theme ] && source $__CONFIG_DIR/zsh/theme # opam test -r /home/ziro/.opam/opam-init/init.zsh && . /home/ziro/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true # History in cache directory -HISTFILE=~/.cache/zsh/zsh_history +HISTFILE=${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zsh_history HISTSIZE=1000 SAVEHIST=1000 @@ -38,7 +39,7 @@ bindkey -v export KEYTIMEOUT=1 # Keybindings -[ -f ~/.config/zsh/keybinds ] && source ~/.config/zsh/keybinds +[ -f $__CONFIG_DIR/zsh/keybinds ] && source $__CONFIG_DIR/zsh/keybinds # [[ Plugins ZSH_PLUGINS="$XDG_DATA_HOME/zsh/plugins" @@ -57,8 +58,6 @@ source $ZSH_PLUGINS/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh 2>/dev/nu # ]] Plugins -export PATH=$PATH:/home/ziro/.spicetify - # bun completions [ -s "/home/ziro/.bun/_bun" ] && source "/home/ziro/.bun/_bun" From e5b1940df24f23b26cd6a455baa724fc6848d4c3 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 08:47:15 +0700 Subject: [PATCH 108/126] fix(fcitx5): Stop fcitx5 from yelling at me for using Wayland --- .config/zsh/.zshenv | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index e2af12b..8811dac 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -48,6 +48,11 @@ if [[ "$XDG_SESSION_TYPE" != "wayland" ]]; then export QT_IM_MODULE="ibus" export GLFW_IM_MODULE="ibus" export XMODIFIERS=@im="ibus" +else + unset GTK_IM_MODULE + unset QT_IM_MODULE + unset GLFW_IM_MODULE + unset XMODIFIERS fi # -- rootless docker From cf67663fed081110eaf96a2981cee10ef241326f Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 08:47:51 +0700 Subject: [PATCH 109/126] style(eww): Another border-radius fix --- .config/eww/eww.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 552d410..6818128 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -69,11 +69,13 @@ tooltip { } widget:first-child > image { - border-radius: $bg-radius 0px 0px $bg-radius; + border-top-left-radius: $bg-radius; + border-bottom-left-radius: $bg-radius; } widget:last-child > image { - border-radius: 0px $bg-radius $bg-radius 0px; + border-top-right-radius: $bg-radius; + border-bottom-right-radius: $bg-radius; } > label:first-child { @@ -93,12 +95,12 @@ tooltip { .workspaces { button:first-child label { border-top-left-radius: $bg-radius; - border-bottom-left-radius: $bg-radius + border-bottom-left-radius: $bg-radius; } button:last-child label { border-top-right-radius: $bg-radius; - border-bottom-right-radius: $bg-radius + border-bottom-right-radius: $bg-radius; } button { From 45435ee15e6bbbdd25b9e797e5fd54ed9ae67f77 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 09:10:31 +0700 Subject: [PATCH 110/126] refactor: Move some zsh configs to `include/` directory Create symbolic for compatibility --- .config/zsh/.zshrc | 8 +- .config/zsh/aliases | 137 +-------------------------------- .config/zsh/completion | 77 +----------------- .config/zsh/dotfiles | 6 +- .config/zsh/include/aliases | 136 ++++++++++++++++++++++++++++++++ .config/zsh/include/completion | 76 ++++++++++++++++++ .config/zsh/include/dotfiles | 5 ++ .config/zsh/include/keybinds | 45 +++++++++++ .config/zsh/include/theme | 61 +++++++++++++++ .config/zsh/keybinds | 46 +---------- .config/zsh/theme | 62 +-------------- .gitignore | 7 +- 12 files changed, 337 insertions(+), 329 deletions(-) mode change 100644 => 120000 .config/zsh/aliases mode change 100644 => 120000 .config/zsh/completion mode change 100644 => 120000 .config/zsh/dotfiles create mode 100644 .config/zsh/include/aliases create mode 100644 .config/zsh/include/completion create mode 100644 .config/zsh/include/dotfiles create mode 100644 .config/zsh/include/keybinds create mode 100644 .config/zsh/include/theme mode change 100644 => 120000 .config/zsh/keybinds mode change 100644 => 120000 .config/zsh/theme diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index c1fd1a6..ee2a931 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -12,7 +12,7 @@ setopt auto_cd # auto cd if directory __CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config} # highlight on tab (completion) -[ -f $__CONFIG_DIR/zsh/completion ] && source $__CONFIG_DIR/zsh/completion +[ -f $__CONFIG_DIR/zsh/include/completion ] && source $__CONFIG_DIR/zsh/include/completion # zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash # fpath=(/usr/local/share/zsh-completions $fpath) # autoload -U compinit && compinit -u @@ -20,10 +20,10 @@ __CONFIG_DIR=${XDG_CONFIG_HOME:-$HOME/.config} # zstyle ':completion:*' menu select # Alias -[ -f $__CONFIG_DIR/zsh/aliases ] && source $__CONFIG_DIR/zsh/aliases +[ -f $__CONFIG_DIR/zsh/include/aliases ] && source $__CONFIG_DIR/zsh/include/aliases # Theme -[ -f $__CONFIG_DIR/zsh/theme ] && source $__CONFIG_DIR/zsh/theme +[ -f $__CONFIG_DIR/zsh/include/theme ] && source $__CONFIG_DIR/zsh/include/theme # opam test -r /home/ziro/.opam/opam-init/init.zsh && . /home/ziro/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true @@ -39,7 +39,7 @@ bindkey -v export KEYTIMEOUT=1 # Keybindings -[ -f $__CONFIG_DIR/zsh/keybinds ] && source $__CONFIG_DIR/zsh/keybinds +[ -f $__CONFIG_DIR/zsh/include/keybinds ] && source $__CONFIG_DIR/zsh/include/keybinds # [[ Plugins ZSH_PLUGINS="$XDG_DATA_HOME/zsh/plugins" diff --git a/.config/zsh/aliases b/.config/zsh/aliases deleted file mode 100644 index a21b4d1..0000000 --- a/.config/zsh/aliases +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env bash - -if [[ "$OSTYPE" == "darwin"* ]]; then - # i need sudo to launch emulator - alias pixelemu="sudo $HOME/Library/Android/sdk/emulator/emulator @Pixel_2_API_28" - alias mbrew="sudo -H -u maintenance -g staff brew" -fi - -alias punten='doas' -#sudo + vim without sacrificing config -alias sudovim='sudoedit' -alias doasvim='doasedit' - -#switch to pgsql user -alias pg='doas -u postgres' - -#mysql with color -# alias mysql=$(echo -e 'mysql --prompt="\x1B[34m\\d\x1B[32m \n>\x1B[0m "') - -#vim -alias nano=nvim -alias vim=nvim -alias vimsudo='sudoedit /etc/sudoers' -alias vimdoas='doasedit /etc/sudoers' -alias vi=nvim -alias v=nvim - -#emacs -alias emacs="emacs -nw" - -#mutt -alias mutt="neomutt" - -#curl -alias weather='curl wttr.in' - -#install -alias p='doas pacman' -alias a='paru' - -#ripper -alias yt='yt-dlp --add-metadata' -alias yta='yt-dlp --add-metadata -x --audio-format' -alias xreload='xrdb $HOME/.config/Xresources' - -#clean up -alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' - -#shortcuts -alias ytv='youtube-viewer' -alias gravit="$HOME/my\ Files/Gravit/GravitDesigner.AppImage" -alias redoom="$HOME/doom refresh" -alias rvim='doas vim' -alias py='python' -alias cls='clear' -alias classprop='xprop WM_CLASS' -alias storagelist='lsblk -f' -alias ..='cd ..' -alias ...='cd ../..' -alias ....='cd ../../..' -alias .....='cd ../../../..' -alias q='exit' - -#ls stuff -alias l='exa --color=always --group-directories-first' # my preferred listing -alias ls='exa --color=always --group-directories-first' # my preferred listing -alias la='exa -a --color=always --group-directories-first' # all files and dirs -alias ll='exa -l --color=always --group-directories-first' # long format -alias lla='exa -al --color=always --group-directories-first' # long format -alias lt='exa -aT --color=always --group-directories-first' # tree listing - -alias md='mkdir -p' -alias rd='rmdir' - -alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' -#alias mpv='mpv --geometry=1280x720' - -#config shortcuts -alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' -alias cfg='config' -alias cfvim='vim $XDG_CONFIG_HOME/nvim/init.lua' -alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plugins/' -alias cfvimnix='vim $XDG_CONFIG_HOME/nvim/lua/null/nix.lua' -alias cfvimuni='vim $XDG_CONFIG_HOME/nvim/lua/null/config.lua' -alias cfbash='vim $HOME/.bashrc' -alias cfzsh='vim $XDG_CONFIG_HOME/zsh/.zshrc' -alias cfxres='vim $XDG_CONFIG_HOME/Xresources' -alias cfbsp='vim $XDG_CONFIG_HOME/bspwm/bspwmrc' -alias cfqtile='vim $XDG_CONFIG_HOME/qtile/config.py' -alias cfpoly='vim $XDG_CONFIG_HOME/polybar/config' -alias cfkeys='vim $XDG_CONFIG_HOME/sxhkd/sxhkdrc' -alias cfalias='vim $XDG_CONFIG_HOME/zsh/aliases' -alias cfbind='vim $XDG_CONFIG_HOME/zsh/keybinds' -alias cfprofile='vim $XDG_CONFIG_HOME/zsh/.zprofile' -alias cfxprofile='vim $XDG_CONFIG_HOME/xprofile' -alias cfcompt='vim $XDG_CONFIG_HOME/picom/picom.conf' -alias cfenv='vim $XDG_CONFIG_HOME/zsh/.zshenv' -alias cfmutt='vim $XDG_CONFIG_HOME/mutt/muttrc' -alias cfnews='vim $XDG_CONFIG_HOME/newsboat/urls' - -#more shortcuts -alias htop='htop -t' -alias rm='rm -i' -alias mv='mv -i' -alias cp='cp -i' -alias mntfd='doas mount -o gid=users,fmask=113,dmask=002' -alias umntfd='doas umount' -alias cmatrix='unimatrix -n -s 96 -l "o"' -alias s='cd $HOME/.local/bin/scripts;ls' - -#folder shortcut -alias cdclg='cd "$HOME/my Files/Kuliah/"' -alias cdwine='cd "$HOME/.local/share/wineprefixes/"' - -#Git Aliases -alias cdgit='cd $HOME/Build/GIT' -alias gaa='git add -A' -alias gci='git commit' -alias gca='git commit --all' -alias gr='git rm' -alias gR='git restore' -alias gs='git status' -alias gp='git push' -alias gP='git pull' -alias gcl='git clone' -#alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' - -alias qn='vim $HOME/Documents/QuickNote' - -alias docx2pdf='lowriter --convert-to pdf' - -alias mirror-update='curl -s "https://archlinux.org/mirrorlist/?country=ID&country=SG&country=US&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -' -alias center-pfetch="printf '\n'; pfetch | sed '\$d' | center -l" -[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" - -alias neofetch='fastfetch' diff --git a/.config/zsh/aliases b/.config/zsh/aliases new file mode 120000 index 0000000..699dd25 --- /dev/null +++ b/.config/zsh/aliases @@ -0,0 +1 @@ +include/aliases \ No newline at end of file diff --git a/.config/zsh/completion b/.config/zsh/completion deleted file mode 100644 index 9f42d1e..0000000 --- a/.config/zsh/completion +++ /dev/null @@ -1,76 +0,0 @@ -# vim: filetype=zsh -zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash -fpath=(/usr/local/share/zsh-completions $fpath) - -autoload -Uz compinit - -if [[ "$OSTYPE" == "darwin"* ]]; then - FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" - compinit -u # homebrew moment, not recommended but whatever -else - compinit -fi - -zmodload -i zsh/complist -zstyle ':completion:*' menu select - -# case insensitive (all), partial-word and substring completion -if [[ "$CASE_SENSITIVE" = true ]]; then - zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*' -else - if [[ "$HYPHEN_INSENSITIVE" = true ]]; then - zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' - else - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' - fi -fi -unset CASE_SENSITIVE HYPHEN_INSENSITIVE - -# Complete . and .. special directories -zstyle ':completion:*' special-dirs true - -zstyle ':completion:*' list-colors '' -zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' - -if [[ "$OSTYPE" = solaris* ]]; then - zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm" -else - zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" -fi - -# disable named-directories autocompletion -zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories - -# Use caching so that commands like apt and dpkg complete are useable -zstyle ':completion:*' use-cache yes -zstyle ':completion:*' cache-path $ZSH_CACHE_DIR - -# Don't complete uninteresting users -zstyle ':completion:*:*:*:users' ignored-patterns \ - adm amanda apache at avahi avahi-autoipd beaglidx bin cacti canna \ - clamav daemon dbus distcache dnsmasq dovecot fax ftp games gdm \ - gkrellmd gopher hacluster haldaemon halt hsqldb ident junkbust kdm \ - ldap lp mail mailman mailnull man messagebus mldonkey mysql nagios \ - named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \ - operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \ - rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \ - usbmux uucp vcsa wwwrun xfs '_*' - -# ... unless we really want to. -zstyle '*' single-ignored show - -if [[ $COMPLETION_WAITING_DOTS = true ]]; then - expand-or-complete-with-dots() { - # toggle line-wrapping off and back on again - [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam - print -Pn "%{%F{red}......%f%}" - [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam - - zle expand-or-complete - zle redisplay - } - zle -N expand-or-complete-with-dots - bindkey "^I" expand-or-complete-with-dots -fi - -[ -s "/usr/share/zsh/site-functions/_pass" ] && zstyle ':completion:*' "/usr/share/zsh/site-functions/_pass" diff --git a/.config/zsh/completion b/.config/zsh/completion new file mode 120000 index 0000000..78e63d4 --- /dev/null +++ b/.config/zsh/completion @@ -0,0 +1 @@ +include/completion \ No newline at end of file diff --git a/.config/zsh/dotfiles b/.config/zsh/dotfiles deleted file mode 100644 index 494bd2f..0000000 --- a/.config/zsh/dotfiles +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/zsh - -export DOTFILES="" - -[ ! $DOTFILES ] && unset DOTFILES diff --git a/.config/zsh/dotfiles b/.config/zsh/dotfiles new file mode 120000 index 0000000..7091572 --- /dev/null +++ b/.config/zsh/dotfiles @@ -0,0 +1 @@ +include/dotfiles \ No newline at end of file diff --git a/.config/zsh/include/aliases b/.config/zsh/include/aliases new file mode 100644 index 0000000..a21b4d1 --- /dev/null +++ b/.config/zsh/include/aliases @@ -0,0 +1,136 @@ +#!/usr/bin/env bash + +if [[ "$OSTYPE" == "darwin"* ]]; then + # i need sudo to launch emulator + alias pixelemu="sudo $HOME/Library/Android/sdk/emulator/emulator @Pixel_2_API_28" + alias mbrew="sudo -H -u maintenance -g staff brew" +fi + +alias punten='doas' +#sudo + vim without sacrificing config +alias sudovim='sudoedit' +alias doasvim='doasedit' + +#switch to pgsql user +alias pg='doas -u postgres' + +#mysql with color +# alias mysql=$(echo -e 'mysql --prompt="\x1B[34m\\d\x1B[32m \n>\x1B[0m "') + +#vim +alias nano=nvim +alias vim=nvim +alias vimsudo='sudoedit /etc/sudoers' +alias vimdoas='doasedit /etc/sudoers' +alias vi=nvim +alias v=nvim + +#emacs +alias emacs="emacs -nw" + +#mutt +alias mutt="neomutt" + +#curl +alias weather='curl wttr.in' + +#install +alias p='doas pacman' +alias a='paru' + +#ripper +alias yt='yt-dlp --add-metadata' +alias yta='yt-dlp --add-metadata -x --audio-format' +alias xreload='xrdb $HOME/.config/Xresources' + +#clean up +alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' + +#shortcuts +alias ytv='youtube-viewer' +alias gravit="$HOME/my\ Files/Gravit/GravitDesigner.AppImage" +alias redoom="$HOME/doom refresh" +alias rvim='doas vim' +alias py='python' +alias cls='clear' +alias classprop='xprop WM_CLASS' +alias storagelist='lsblk -f' +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' +alias q='exit' + +#ls stuff +alias l='exa --color=always --group-directories-first' # my preferred listing +alias ls='exa --color=always --group-directories-first' # my preferred listing +alias la='exa -a --color=always --group-directories-first' # all files and dirs +alias ll='exa -l --color=always --group-directories-first' # long format +alias lla='exa -al --color=always --group-directories-first' # long format +alias lt='exa -aT --color=always --group-directories-first' # tree listing + +alias md='mkdir -p' +alias rd='rmdir' + +alias reUSD='rm -rf /tmp/rate.html /tmp/rateUSD.txt' +#alias mpv='mpv --geometry=1280x720' + +#config shortcuts +alias config='cd ${DOTFILES:-$HOME/Build/GIT/dotfiles}' +alias cfg='config' +alias cfvim='vim $XDG_CONFIG_HOME/nvim/init.lua' +alias cfvimplug='vim $XDG_CONFIG_HOME/nvim/lua/null/plugins/' +alias cfvimnix='vim $XDG_CONFIG_HOME/nvim/lua/null/nix.lua' +alias cfvimuni='vim $XDG_CONFIG_HOME/nvim/lua/null/config.lua' +alias cfbash='vim $HOME/.bashrc' +alias cfzsh='vim $XDG_CONFIG_HOME/zsh/.zshrc' +alias cfxres='vim $XDG_CONFIG_HOME/Xresources' +alias cfbsp='vim $XDG_CONFIG_HOME/bspwm/bspwmrc' +alias cfqtile='vim $XDG_CONFIG_HOME/qtile/config.py' +alias cfpoly='vim $XDG_CONFIG_HOME/polybar/config' +alias cfkeys='vim $XDG_CONFIG_HOME/sxhkd/sxhkdrc' +alias cfalias='vim $XDG_CONFIG_HOME/zsh/aliases' +alias cfbind='vim $XDG_CONFIG_HOME/zsh/keybinds' +alias cfprofile='vim $XDG_CONFIG_HOME/zsh/.zprofile' +alias cfxprofile='vim $XDG_CONFIG_HOME/xprofile' +alias cfcompt='vim $XDG_CONFIG_HOME/picom/picom.conf' +alias cfenv='vim $XDG_CONFIG_HOME/zsh/.zshenv' +alias cfmutt='vim $XDG_CONFIG_HOME/mutt/muttrc' +alias cfnews='vim $XDG_CONFIG_HOME/newsboat/urls' + +#more shortcuts +alias htop='htop -t' +alias rm='rm -i' +alias mv='mv -i' +alias cp='cp -i' +alias mntfd='doas mount -o gid=users,fmask=113,dmask=002' +alias umntfd='doas umount' +alias cmatrix='unimatrix -n -s 96 -l "o"' +alias s='cd $HOME/.local/bin/scripts;ls' + +#folder shortcut +alias cdclg='cd "$HOME/my Files/Kuliah/"' +alias cdwine='cd "$HOME/.local/share/wineprefixes/"' + +#Git Aliases +alias cdgit='cd $HOME/Build/GIT' +alias gaa='git add -A' +alias gci='git commit' +alias gca='git commit --all' +alias gr='git rm' +alias gR='git restore' +alias gs='git status' +alias gp='git push' +alias gP='git pull' +alias gcl='git clone' +#alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' + +alias qn='vim $HOME/Documents/QuickNote' + +alias docx2pdf='lowriter --convert-to pdf' + +alias mirror-update='curl -s "https://archlinux.org/mirrorlist/?country=ID&country=SG&country=US&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 -' +alias center-pfetch="printf '\n'; pfetch | sed '\$d' | center -l" +[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh" + +alias neofetch='fastfetch' diff --git a/.config/zsh/include/completion b/.config/zsh/include/completion new file mode 100644 index 0000000..9f42d1e --- /dev/null +++ b/.config/zsh/include/completion @@ -0,0 +1,76 @@ +# vim: filetype=zsh +zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash +fpath=(/usr/local/share/zsh-completions $fpath) + +autoload -Uz compinit + +if [[ "$OSTYPE" == "darwin"* ]]; then + FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" + compinit -u # homebrew moment, not recommended but whatever +else + compinit +fi + +zmodload -i zsh/complist +zstyle ':completion:*' menu select + +# case insensitive (all), partial-word and substring completion +if [[ "$CASE_SENSITIVE" = true ]]; then + zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*' +else + if [[ "$HYPHEN_INSENSITIVE" = true ]]; then + zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|=*' 'l:|=* r:|=*' + else + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' + fi +fi +unset CASE_SENSITIVE HYPHEN_INSENSITIVE + +# Complete . and .. special directories +zstyle ':completion:*' special-dirs true + +zstyle ':completion:*' list-colors '' +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' + +if [[ "$OSTYPE" = solaris* ]]; then + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm" +else + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" +fi + +# disable named-directories autocompletion +zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories + +# Use caching so that commands like apt and dpkg complete are useable +zstyle ':completion:*' use-cache yes +zstyle ':completion:*' cache-path $ZSH_CACHE_DIR + +# Don't complete uninteresting users +zstyle ':completion:*:*:*:users' ignored-patterns \ + adm amanda apache at avahi avahi-autoipd beaglidx bin cacti canna \ + clamav daemon dbus distcache dnsmasq dovecot fax ftp games gdm \ + gkrellmd gopher hacluster haldaemon halt hsqldb ident junkbust kdm \ + ldap lp mail mailman mailnull man messagebus mldonkey mysql nagios \ + named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \ + operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \ + rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \ + usbmux uucp vcsa wwwrun xfs '_*' + +# ... unless we really want to. +zstyle '*' single-ignored show + +if [[ $COMPLETION_WAITING_DOTS = true ]]; then + expand-or-complete-with-dots() { + # toggle line-wrapping off and back on again + [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam + print -Pn "%{%F{red}......%f%}" + [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam + + zle expand-or-complete + zle redisplay + } + zle -N expand-or-complete-with-dots + bindkey "^I" expand-or-complete-with-dots +fi + +[ -s "/usr/share/zsh/site-functions/_pass" ] && zstyle ':completion:*' "/usr/share/zsh/site-functions/_pass" diff --git a/.config/zsh/include/dotfiles b/.config/zsh/include/dotfiles new file mode 100644 index 0000000..494bd2f --- /dev/null +++ b/.config/zsh/include/dotfiles @@ -0,0 +1,5 @@ +#!/bin/zsh + +export DOTFILES="" + +[ ! $DOTFILES ] && unset DOTFILES diff --git a/.config/zsh/include/keybinds b/.config/zsh/include/keybinds new file mode 100644 index 0000000..77c2157 --- /dev/null +++ b/.config/zsh/include/keybinds @@ -0,0 +1,45 @@ +#!/bin/env zsh +# create a zkbd compatible hash; +# to add other keys to this hash, see: man 5 terminfo +typeset -g -A key + +key[Home]="${terminfo[khome]}" +key[End]="${terminfo[kend]}" +key[Insert]="${terminfo[kich1]}" +key[Backspace]="${terminfo[kbs]}" +key[Delete]="${terminfo[kdch1]}" +key[Up]="${terminfo[kcuu1]}" +key[Down]="${terminfo[kcud1]}" +key[Left]="${terminfo[kcub1]}" +key[Right]="${terminfo[kcuf1]}" +key[PageUp]="${terminfo[kpp]}" +key[PageDown]="${terminfo[knp]}" +key[Shift-Tab]="${terminfo[kcbt]}" + +# setup key accordingly +[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line +[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line +[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode +[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char +[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char +[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history +[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history +[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char +[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char +[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history +[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history +[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete + +# Finally, make sure the terminal is in application mode, when zle is +# active. Only then are the values from $terminfo valid. +if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then + autoload -Uz add-zle-hook-widget + function zle_application_mode_start { echoti smkx } + function zle_application_mode_stop { echoti rmkx } + add-zle-hook-widget -Uz zle-line-init zle_application_mode_start + add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop +fi + +bindkey -v '^[[3~' delete-char +bindkey '^ ' autosuggest-accept + diff --git a/.config/zsh/include/theme b/.config/zsh/include/theme new file mode 100644 index 0000000..26e4a63 --- /dev/null +++ b/.config/zsh/include/theme @@ -0,0 +1,61 @@ +#!/bin/env zsh +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +setopt prompt_subst +zstyle ':vcs_info:*' stagedstr 'M' +zstyle ':vcs_info:*' unstagedstr '!' +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:git:*' formats '%F{5} %b %F{1}%c%u %f' +zstyle ':vcs_info:git*+set-message:*' hooks git-untracked +zstyle ':vcs_info:*' enable git ++vi-git-untracked() { + + # git status ahead + if [[ $(git status --porcelain -b | grep '^## [^ ]\+ .*ahead') ]]; then + hook_com[unstaged]+='%F{1}⇡%f' + fi + + # git untracked + if [ $(git rev-parse --is-inside-work-tree 2> /dev/null) = 'true' ] && \ + [ $(git ls-files --other --directory --exclude-standard | sed q | wc -l | tr -d ' ') = 1 ] ; then + hook_com[unstaged]+='%F{1}?%f' + fi +} + +function zle-line-init zle-keymap-select { + PS1=" +%B%F{blue}%~ \$vcs_info_msg_0_ +%F{green}${${KEYMAP/vicmd/N }/(main|viins)/}$>%f%b " + PS2="%B%F{blue}?>%f%b " + # RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}" + # RPS2=$RPS1 + + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi + + zle reset-prompt +} +zle -N zle-line-init +zle -N zle-keymap-select + +_fix_cursor() { + echo -ne '\e[5 q' +} + +precmd () { + RPROMPT="" # for some reason path added to RPROMPT in macOS, I have no idea where it's coming from + vcs_info + _fix_cursor +} +#RPROMPT=\$vcs_info_msg_0_ +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline" +ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *" diff --git a/.config/zsh/keybinds b/.config/zsh/keybinds deleted file mode 100644 index 77c2157..0000000 --- a/.config/zsh/keybinds +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/env zsh -# create a zkbd compatible hash; -# to add other keys to this hash, see: man 5 terminfo -typeset -g -A key - -key[Home]="${terminfo[khome]}" -key[End]="${terminfo[kend]}" -key[Insert]="${terminfo[kich1]}" -key[Backspace]="${terminfo[kbs]}" -key[Delete]="${terminfo[kdch1]}" -key[Up]="${terminfo[kcuu1]}" -key[Down]="${terminfo[kcud1]}" -key[Left]="${terminfo[kcub1]}" -key[Right]="${terminfo[kcuf1]}" -key[PageUp]="${terminfo[kpp]}" -key[PageDown]="${terminfo[knp]}" -key[Shift-Tab]="${terminfo[kcbt]}" - -# setup key accordingly -[[ -n "${key[Home]}" ]] && bindkey -- "${key[Home]}" beginning-of-line -[[ -n "${key[End]}" ]] && bindkey -- "${key[End]}" end-of-line -[[ -n "${key[Insert]}" ]] && bindkey -- "${key[Insert]}" overwrite-mode -[[ -n "${key[Backspace]}" ]] && bindkey -- "${key[Backspace]}" backward-delete-char -[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char -[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-history -[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-history -[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char -[[ -n "${key[PageUp]}" ]] && bindkey -- "${key[PageUp]}" beginning-of-buffer-or-history -[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history -[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete - -# Finally, make sure the terminal is in application mode, when zle is -# active. Only then are the values from $terminfo valid. -if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then - autoload -Uz add-zle-hook-widget - function zle_application_mode_start { echoti smkx } - function zle_application_mode_stop { echoti rmkx } - add-zle-hook-widget -Uz zle-line-init zle_application_mode_start - add-zle-hook-widget -Uz zle-line-finish zle_application_mode_stop -fi - -bindkey -v '^[[3~' delete-char -bindkey '^ ' autosuggest-accept - diff --git a/.config/zsh/keybinds b/.config/zsh/keybinds new file mode 120000 index 0000000..4b76640 --- /dev/null +++ b/.config/zsh/keybinds @@ -0,0 +1 @@ +include/keybinds \ No newline at end of file diff --git a/.config/zsh/theme b/.config/zsh/theme deleted file mode 100644 index 26e4a63..0000000 --- a/.config/zsh/theme +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/env zsh -autoload -Uz vcs_info -precmd_vcs_info() { vcs_info } -precmd_functions+=( precmd_vcs_info ) -setopt prompt_subst -zstyle ':vcs_info:*' stagedstr 'M' -zstyle ':vcs_info:*' unstagedstr '!' -zstyle ':vcs_info:*' check-for-changes true -zstyle ':vcs_info:git:*' formats '%F{5} %b %F{1}%c%u %f' -zstyle ':vcs_info:git*+set-message:*' hooks git-untracked -zstyle ':vcs_info:*' enable git -+vi-git-untracked() { - - # git status ahead - if [[ $(git status --porcelain -b | grep '^## [^ ]\+ .*ahead') ]]; then - hook_com[unstaged]+='%F{1}⇡%f' - fi - - # git untracked - if [ $(git rev-parse --is-inside-work-tree 2> /dev/null) = 'true' ] && \ - [ $(git ls-files --other --directory --exclude-standard | sed q | wc -l | tr -d ' ') = 1 ] ; then - hook_com[unstaged]+='%F{1}?%f' - fi -} - -function zle-line-init zle-keymap-select { - PS1=" -%B%F{blue}%~ \$vcs_info_msg_0_ -%F{green}${${KEYMAP/vicmd/N }/(main|viins)/}$>%f%b " - PS2="%B%F{blue}?>%f%b " - # RPS1="${${KEYMAP/vicmd/-- NORMAL --}/(main|viins)/-- INSERT --}" - # RPS2=$RPS1 - - if [[ ${KEYMAP} == vicmd ]] || - [[ $1 = 'block' ]]; then - echo -ne '\e[1 q' - - elif [[ ${KEYMAP} == main ]] || - [[ ${KEYMAP} == viins ]] || - [[ ${KEYMAP} = '' ]] || - [[ $1 = 'beam' ]]; then - echo -ne '\e[5 q' - fi - - zle reset-prompt -} -zle -N zle-line-init -zle -N zle-keymap-select - -_fix_cursor() { - echo -ne '\e[5 q' -} - -precmd () { - RPROMPT="" # for some reason path added to RPROMPT in macOS, I have no idea where it's coming from - vcs_info - _fix_cursor -} -#RPROMPT=\$vcs_info_msg_0_ -ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline" -ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *" diff --git a/.config/zsh/theme b/.config/zsh/theme new file mode 120000 index 0000000..6696fdf --- /dev/null +++ b/.config/zsh/theme @@ -0,0 +1 @@ +include/theme \ No newline at end of file diff --git a/.gitignore b/.gitignore index e14dfc5..7ed3bcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -.config/discordcanary +.config/discordcanary/** !.config/discordcanary/settings.json -.config/zsh/ + +.config/zsh/** !.config/zsh/.zprofile !.config/zsh/.zshenv !.config/zsh/.zshrc @@ -9,3 +10,5 @@ !.config/zsh/dotfiles !.config/zsh/keybinds !.config/zsh/theme +!.config/zsh/include/ +!.config/zsh/include/** From 35abdddc511adcff386a4ef180332df0e1b0b9fd Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 09:14:28 +0700 Subject: [PATCH 111/126] refactor(zsh): Add `ZI_` to avoid potential conflict --- .config/zsh/.zshenv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 8811dac..0724180 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -4,8 +4,8 @@ export XDG_CACHE_HOME="$HOME/.cache" export XDG_DATA_HOME="$HOME/.local/share" export XDG_STATE_HOME="$HOME/.local/state" export XDG_CONFIG_HOME="$HOME/.config" -export BINARY_HOME="$HOME/.local/bin" -export SCRIPTS_HOME="$HOME/.local/bin/scripts" +export ZI_BINARY_HOME="$HOME/.local/bin" +export ZI_SCRIPTS_HOME="$ZI_BINARY_HOME/scripts" if [[ "$OSTYPE" == "darwin"* ]]; then export JAVA_HOME="$HOME/.sdkman/candidates/java/current" @@ -34,12 +34,12 @@ fi export BUN_INSTALL="$HOME/.bun" if [[ "$OSTYPE" == "darwin"* ]]; then export PYTHONPATH="$HOME/Library/Python/3.10/lib:$PYTHONPATH" - LOCAL_PATH=$(du "$BINARY_HOME" -d 1 | cut -f2 > /tmp/ENV_PATH && paste -sd ':' /tmp/ENV_PATH) + LOCAL_PATH=$(du "$ZI_BINARY_HOME" -d 1 | cut -f2 > /tmp/ENV_PATH && paste -sd ':' /tmp/ENV_PATH) LOCAL_PATH="$HOME/Library/Python/3.10/bin:$LOCAL_PATH" elif [[ "$OSTYPE" == "linux-gnu" ]]; then - LOCAL_PATH=$(du "$BINARY_HOME" -d 1 | cut -f2 | paste -sd ':') + LOCAL_PATH=$(du "$ZI_BINARY_HOME" -d 1 | cut -f2 | paste -sd ':') fi -PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$SCRIPTS_HOME/bin:$LOCAL_PATH${PATH:+:${PATH}}" +PATH="$BUN_INSTALL/bin:$HOME/.pub-cache/bin:$HOME/.local/share/go/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_AVD_HOME:$HOME/.local/share/npm/bin:$HOME/.local/share/cargo/bin:$ZI_SCRIPTS_HOME/bin:$LOCAL_PATH${PATH:+:${PATH}}" # export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/library # -- IBus stuff (IME) From f2497953781cb533ae967889c6de5e9850d621cc Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 09:17:33 +0700 Subject: [PATCH 112/126] refactor(zsh): Move lf icons to its own file --- .config/zsh/.zshenv | 165 +---------------------------------------- .config/zsh/include/lf | 163 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 164 deletions(-) create mode 100644 .config/zsh/include/lf diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 0724180..309854a 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -130,167 +130,4 @@ export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" # zsh export ZSH_PLUGINS="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" -# -- LF -# icon for lf -export LF_ICONS="\ -tw=:\ -st=:\ -ow=:\ -dt=:\ -di=:\ -fi=:\ -ln=:\ -or=:\ -ex=:\ -*.c=:\ -*.cc=:\ -*.clj=:\ -*.coffee=:\ -*.cpp=:\ -*.css=:\ -*.d=:\ -*.dart=:\ -*.erl=:\ -*.exs=:\ -*.fs=:\ -*.go=:\ -*.h=:\ -*.hh=:\ -*.hpp=:\ -*.hs=:\ -*.html=:\ -*.java=:\ -*.jl=:\ -*.js=:\ -*.json=:\ -*.lua=:\ -*.md=:\ -*.php=:\ -*.pl=:\ -*.pro=:\ -*.py=:\ -*.rb=:\ -*.rs=:\ -*.scala=:\ -*.ts=:\ -*.vim=:\ -*.cmd=:\ -*.ps1=:\ -*.sh=:\ -*.bash=:\ -*.zsh=:\ -*.fish=:\ -*.tar=:\ -*.tgz=:\ -*.arc=:\ -*.arj=:\ -*.taz=:\ -*.lha=:\ -*.lz4=:\ -*.lzh=:\ -*.lzma=:\ -*.tlz=:\ -*.txz=:\ -*.tzo=:\ -*.t7z=:\ -*.zip=:\ -*.z=:\ -*.dz=:\ -*.gz=:\ -*.lrz=:\ -*.lz=:\ -*.lzo=:\ -*.xz=:\ -*.zst=:\ -*.tzst=:\ -*.bz2=:\ -*.bz=:\ -*.tbz=:\ -*.tbz2=:\ -*.tz=:\ -*.deb=:\ -*.rpm=:\ -*.jar=:\ -*.war=:\ -*.ear=:\ -*.sar=:\ -*.rar=:\ -*.alz=:\ -*.ace=:\ -*.zoo=:\ -*.cpio=:\ -*.7z=:\ -*.rz=:\ -*.cab=:\ -*.wim=:\ -*.swm=:\ -*.dwm=:\ -*.esd=:\ -*.jpg=:\ -*.jpeg=:\ -*.mjpg=:\ -*.mjpeg=:\ -*.gif=:\ -*.bmp=:\ -*.pbm=:\ -*.pgm=:\ -*.ppm=:\ -*.tga=:\ -*.xbm=:\ -*.xpm=:\ -*.tif=:\ -*.tiff=:\ -*.png=:\ -*.svg=:\ -*.svgz=:\ -*.mng=:\ -*.pcx=:\ -*.mov=:\ -*.mpg=:\ -*.mpeg=:\ -*.m2v=:\ -*.mkv=:\ -*.webm=:\ -*.ogm=:\ -*.mp4=:\ -*.m4v=:\ -*.mp4v=:\ -*.vob=:\ -*.qt=:\ -*.nuv=:\ -*.wmv=:\ -*.asf=:\ -*.rm=:\ -*.rmvb=:\ -*.flc=:\ -*.avi=:\ -*.fli=:\ -*.flv=:\ -*.gl=:\ -*.dl=:\ -*.xcf=:\ -*.xwd=:\ -*.yuv=:\ -*.cgm=:\ -*.emf=:\ -*.ogv=:\ -*.ogx=:\ -*.aac=:\ -*.au=:\ -*.flac=:\ -*.m4a=:\ -*.mid=:\ -*.midi=:\ -*.mka=:\ -*.mp3=:\ -*.mpc=:\ -*.ogg=:\ -*.ra=:\ -*.wav=:\ -*.oga=:\ -*.opus=:\ -*.spx=:\ -*.xspf=:\ -*.pdf=:\ -*.nix=:\ -" +[ -f ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/include/lf ] && source ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/include/lf diff --git a/.config/zsh/include/lf b/.config/zsh/include/lf new file mode 100644 index 0000000..2f8b3b9 --- /dev/null +++ b/.config/zsh/include/lf @@ -0,0 +1,163 @@ +#!/bin/sh +export LF_ICONS="\ +tw=:\ +st=:\ +ow=:\ +dt=:\ +di=:\ +fi=:\ +ln=:\ +or=:\ +ex=:\ +*.c=:\ +*.cc=:\ +*.clj=:\ +*.coffee=:\ +*.cpp=:\ +*.css=:\ +*.d=:\ +*.dart=:\ +*.erl=:\ +*.exs=:\ +*.fs=:\ +*.go=:\ +*.h=:\ +*.hh=:\ +*.hpp=:\ +*.hs=:\ +*.html=:\ +*.java=:\ +*.jl=:\ +*.js=:\ +*.json=:\ +*.lua=:\ +*.md=:\ +*.php=:\ +*.pl=:\ +*.pro=:\ +*.py=:\ +*.rb=:\ +*.rs=:\ +*.scala=:\ +*.ts=:\ +*.vim=:\ +*.cmd=:\ +*.ps1=:\ +*.sh=:\ +*.bash=:\ +*.zsh=:\ +*.fish=:\ +*.tar=:\ +*.tgz=:\ +*.arc=:\ +*.arj=:\ +*.taz=:\ +*.lha=:\ +*.lz4=:\ +*.lzh=:\ +*.lzma=:\ +*.tlz=:\ +*.txz=:\ +*.tzo=:\ +*.t7z=:\ +*.zip=:\ +*.z=:\ +*.dz=:\ +*.gz=:\ +*.lrz=:\ +*.lz=:\ +*.lzo=:\ +*.xz=:\ +*.zst=:\ +*.tzst=:\ +*.bz2=:\ +*.bz=:\ +*.tbz=:\ +*.tbz2=:\ +*.tz=:\ +*.deb=:\ +*.rpm=:\ +*.jar=:\ +*.war=:\ +*.ear=:\ +*.sar=:\ +*.rar=:\ +*.alz=:\ +*.ace=:\ +*.zoo=:\ +*.cpio=:\ +*.7z=:\ +*.rz=:\ +*.cab=:\ +*.wim=:\ +*.swm=:\ +*.dwm=:\ +*.esd=:\ +*.jpg=:\ +*.jpeg=:\ +*.mjpg=:\ +*.mjpeg=:\ +*.gif=:\ +*.bmp=:\ +*.pbm=:\ +*.pgm=:\ +*.ppm=:\ +*.tga=:\ +*.xbm=:\ +*.xpm=:\ +*.tif=:\ +*.tiff=:\ +*.png=:\ +*.svg=:\ +*.svgz=:\ +*.mng=:\ +*.pcx=:\ +*.mov=:\ +*.mpg=:\ +*.mpeg=:\ +*.m2v=:\ +*.mkv=:\ +*.webm=:\ +*.ogm=:\ +*.mp4=:\ +*.m4v=:\ +*.mp4v=:\ +*.vob=:\ +*.qt=:\ +*.nuv=:\ +*.wmv=:\ +*.asf=:\ +*.rm=:\ +*.rmvb=:\ +*.flc=:\ +*.avi=:\ +*.fli=:\ +*.flv=:\ +*.gl=:\ +*.dl=:\ +*.xcf=:\ +*.xwd=:\ +*.yuv=:\ +*.cgm=:\ +*.emf=:\ +*.ogv=:\ +*.ogx=:\ +*.aac=:\ +*.au=:\ +*.flac=:\ +*.m4a=:\ +*.mid=:\ +*.midi=:\ +*.mka=:\ +*.mp3=:\ +*.mpc=:\ +*.ogg=:\ +*.ra=:\ +*.wav=:\ +*.oga=:\ +*.opus=:\ +*.spx=:\ +*.xspf=:\ +*.pdf=:\ +*.nix=:\ +" From d65af418f6cf8457affac621b000997db76e3411 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 10:23:41 +0700 Subject: [PATCH 113/126] style(eww): Stylise systray --- .config/eww/eww.scss | 21 +++++++++++++++++---- .config/eww/eww.yuck | 2 +- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 6818128..7dbfcc7 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -16,6 +16,8 @@ $bg-radius: 8px; $bg-margin: 4px; // << bg +$blue-500: #1CA2DA; + /** tooltip!! **/ tooltip { .background { @@ -30,19 +32,30 @@ tooltip { } } -.csd.background.popup { /* SysTray popup */ - background-color: black; +.tray menu { /* SysTray popup */ + padding: 5px; + background-color: $bg-300; + border-radius: $bg-radius; separator { padding-bottom: 8px; } menuitem { - -gtk-dpi: 16; + padding: 2px 8px; + font-size: 14px; + } + + menuitem:last-child { + margin: 0px 0px $bg-radius 0px; + } + + menuitem:first-child { + margin: $bg-radius 0px 0px 0px; } menuitem:hover { - background-color: red; + background-color: $blue-500; } } diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 3f55816..3a87119 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -36,7 +36,7 @@ (box :halign "end" :class "end" :space-evenly false - (systray :icon-size "16" :pack-direction "rtl"))) + (systray :class "tray" :icon-size "16" :pack-direction "rtl"))) (defwidget workspaces [] (box :class "workspaces" From ab4d9a9e8145fd7bbd451b8200c76c5fe272812f Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 10:26:20 +0700 Subject: [PATCH 114/126] style(eww): Simplify CSS --- .config/eww/eww.scss | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 7dbfcc7..2f8f683 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -33,7 +33,6 @@ tooltip { } .tray menu { /* SysTray popup */ - padding: 5px; background-color: $bg-300; border-radius: $bg-radius; @@ -43,19 +42,18 @@ tooltip { menuitem { padding: 2px 8px; - font-size: 14px; - } - menuitem:last-child { - margin: 0px 0px $bg-radius 0px; - } + &:last-child { + margin: 0px 0px $bg-radius 0px; + } - menuitem:first-child { - margin: $bg-radius 0px 0px 0px; - } + &:first-child { + margin: $bg-radius 0px 0px 0px; + } - menuitem:hover { - background-color: $blue-500; + &:hover { + background-color: $blue-500; + } } } From 1aef655bc2ceff76180ce9eaddf59b33c5bb2c55 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 10:31:57 +0700 Subject: [PATCH 115/126] refactor: Move eww scripts inside eww config dir --- .config/eww/eww.yuck | 6 ++--- .config/eww/scripts/datetime-listener | 8 +++++++ .config/eww/scripts/hyprland-getsocket | 4 ++++ .config/eww/scripts/workspace-active-listener | 7 ++++++ .config/eww/scripts/workspace-list-listener | 22 +++++++++++++++++++ 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100755 .config/eww/scripts/datetime-listener create mode 100755 .config/eww/scripts/hyprland-getsocket create mode 100755 .config/eww/scripts/workspace-active-listener create mode 100755 .config/eww/scripts/workspace-list-listener diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 3a87119..1dfc6ab 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -3,13 +3,13 @@ ;; Listeners (deflisten active-workspace - `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-active-workspace-listener`) + `stdbuf -oL ./scripts/workspace-active-listener`) (deflisten workspace-list :initial '[1]' - `stdbuf -oL $HOME/.local/bin/scripts/eww-hyprland-workspace-list-listener`) + `stdbuf -oL ./scripts/workspace-list-listener`) (deflisten datetime - `stdbuf -oL $HOME/.local/bin/scripts/eww-datetime-listener`) + `stdbuf -oL ./scripts/datetime-listener`) ;; Windows (defwindow bar diff --git a/.config/eww/scripts/datetime-listener b/.config/eww/scripts/datetime-listener new file mode 100755 index 0000000..b98731b --- /dev/null +++ b/.config/eww/scripts/datetime-listener @@ -0,0 +1,8 @@ +#!/bin/sh + +while : +do + date +"full='%a, %d %b %Y • %H:%M %Z' date='%Y-%m-%d'" \ + | xargs jo + date +%s.%N | dc -e "? d 1 + 1 / r - p" | xargs sleep +done diff --git a/.config/eww/scripts/hyprland-getsocket b/.config/eww/scripts/hyprland-getsocket new file mode 100755 index 0000000..2eaf931 --- /dev/null +++ b/.config/eww/scripts/hyprland-getsocket @@ -0,0 +1,4 @@ +#!/bin/sh + +tmp=/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock +[ -f $tmp ] && echo $tmp || echo $XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock diff --git a/.config/eww/scripts/workspace-active-listener b/.config/eww/scripts/workspace-active-listener new file mode 100755 index 0000000..9908a8b --- /dev/null +++ b/.config/eww/scripts/workspace-active-listener @@ -0,0 +1,7 @@ +#!/bin/sh +# REF: https://github.com/Mango0x45/dotfiles/blob/d62026673b0b833f27b85f8a551cb646ae2bd751/.config/eww/scripts/active-workspace-listener + +readonly IPC=$(./scripts/hyprland-getsocket) + +hyprctl -j activeworkspace | jq -r '.name' +socat -u UNIX-CONNECT:"$IPC" - | sed -n 's/^workspace>>//p' diff --git a/.config/eww/scripts/workspace-list-listener b/.config/eww/scripts/workspace-list-listener new file mode 100755 index 0000000..f2aedf2 --- /dev/null +++ b/.config/eww/scripts/workspace-list-listener @@ -0,0 +1,22 @@ +#!/bin/sh +# REF: https://github.com/Mango0x45/dotfiles/blob/d620266/.config/eww/scripts/workspace-list-listener + +readonly IPC=$(./scripts/hyprland-getsocket) + +ws="`hyprctl -j workspaces | jq -r 'sort_by(.id) | .[] | .name'`" +jo -a $ws + +socat -u UNIX-CONNECT:"$IPC" - \ + | stdbuf -oL grep -E '^(create|destroy)workspace>>' \ + | while IFS='>>' read -r e _ n + do + case "$e" in + c*) + ws="`printf '%s\n%s\n' "$ws" $n | sort -n`" + ;; + d*) + ws="`echo "$ws" | grep -v "^$n$"`" + ;; + esac + jo -a $ws + done From b3437a55b27e60058c2f4c98fb509a1a817ea648 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 10:36:16 +0700 Subject: [PATCH 116/126] refactor(eww): Move hypr-related scripts to `hypr/` dir In case I'm planning to stop using Hyprland --- .config/eww/eww.yuck | 4 ++-- .config/eww/scripts/{ => hypr}/hyprland-getsocket | 0 .config/eww/scripts/{ => hypr}/workspace-active-listener | 2 +- .config/eww/scripts/{ => hypr}/workspace-list-listener | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .config/eww/scripts/{ => hypr}/hyprland-getsocket (100%) rename .config/eww/scripts/{ => hypr}/workspace-active-listener (83%) rename .config/eww/scripts/{ => hypr}/workspace-list-listener (90%) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 1dfc6ab..6fcc421 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -3,10 +3,10 @@ ;; Listeners (deflisten active-workspace - `stdbuf -oL ./scripts/workspace-active-listener`) + `stdbuf -oL ./scripts/hypr/workspace-active-listener`) (deflisten workspace-list :initial '[1]' - `stdbuf -oL ./scripts/workspace-list-listener`) + `stdbuf -oL ./scripts/hypr/workspace-list-listener`) (deflisten datetime `stdbuf -oL ./scripts/datetime-listener`) diff --git a/.config/eww/scripts/hyprland-getsocket b/.config/eww/scripts/hypr/hyprland-getsocket similarity index 100% rename from .config/eww/scripts/hyprland-getsocket rename to .config/eww/scripts/hypr/hyprland-getsocket diff --git a/.config/eww/scripts/workspace-active-listener b/.config/eww/scripts/hypr/workspace-active-listener similarity index 83% rename from .config/eww/scripts/workspace-active-listener rename to .config/eww/scripts/hypr/workspace-active-listener index 9908a8b..c5e600f 100755 --- a/.config/eww/scripts/workspace-active-listener +++ b/.config/eww/scripts/hypr/workspace-active-listener @@ -1,7 +1,7 @@ #!/bin/sh # REF: https://github.com/Mango0x45/dotfiles/blob/d62026673b0b833f27b85f8a551cb646ae2bd751/.config/eww/scripts/active-workspace-listener -readonly IPC=$(./scripts/hyprland-getsocket) +readonly IPC=$(./scripts/hypr/hyprland-getsocket) hyprctl -j activeworkspace | jq -r '.name' socat -u UNIX-CONNECT:"$IPC" - | sed -n 's/^workspace>>//p' diff --git a/.config/eww/scripts/workspace-list-listener b/.config/eww/scripts/hypr/workspace-list-listener similarity index 90% rename from .config/eww/scripts/workspace-list-listener rename to .config/eww/scripts/hypr/workspace-list-listener index f2aedf2..e865f1d 100755 --- a/.config/eww/scripts/workspace-list-listener +++ b/.config/eww/scripts/hypr/workspace-list-listener @@ -1,7 +1,7 @@ #!/bin/sh # REF: https://github.com/Mango0x45/dotfiles/blob/d620266/.config/eww/scripts/workspace-list-listener -readonly IPC=$(./scripts/hyprland-getsocket) +readonly IPC=$(./scripts/hypr/hyprland-getsocket) ws="`hyprctl -j workspaces | jq -r 'sort_by(.id) | .[] | .name'`" jo -a $ws From b590bb5f95583b5568d3b53ff7f300b1a9a4e938 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 10:52:11 +0700 Subject: [PATCH 117/126] fix: Stop eww from yelling at me on start --- .config/eww/eww.yuck | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/eww/eww.yuck b/.config/eww/eww.yuck index 6fcc421..a760cfd 100644 --- a/.config/eww/eww.yuck +++ b/.config/eww/eww.yuck @@ -5,10 +5,10 @@ (deflisten active-workspace `stdbuf -oL ./scripts/hypr/workspace-active-listener`) -(deflisten workspace-list :initial '[1]' +(deflisten workspace-list :initial "[1]" `stdbuf -oL ./scripts/hypr/workspace-list-listener`) -(deflisten datetime +(deflisten datetime :initial "{}" `stdbuf -oL ./scripts/datetime-listener`) ;; Windows @@ -36,7 +36,7 @@ (box :halign "end" :class "end" :space-evenly false - (systray :class "tray" :icon-size "16" :pack-direction "rtl"))) + (systray :class "tray" :icon-size "16"))) (defwidget workspaces [] (box :class "workspaces" From 2967b9e807d1f3230b2ed57735892379837815f4 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 15 May 2024 11:27:33 +0700 Subject: [PATCH 118/126] refactor(sww): Simplify CSS --- .config/eww/eww.scss | 54 +++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/.config/eww/eww.scss b/.config/eww/eww.scss index 2f8f683..c765557 100644 --- a/.config/eww/eww.scss +++ b/.config/eww/eww.scss @@ -43,17 +43,21 @@ tooltip { menuitem { padding: 2px 8px; - &:last-child { - margin: 0px 0px $bg-radius 0px; + &:first-child { + margin-top: $bg-radius; } - &:first-child { - margin: $bg-radius 0px 0px 0px; + &:last-child { + margin-bottom: $bg-radius; } &:hover { background-color: $blue-500; } + + image { + // -gtk-icon-size: 15px; + } } } @@ -70,37 +74,41 @@ tooltip { } } -.end { - > box { +.end .tray { - widget > image { + widget { + > image { background: $bg-300; margin: $bg-margin 0px; padding: 0 6px; } - widget:first-child > image { - border-top-left-radius: $bg-radius; - border-bottom-left-radius: $bg-radius; - } - - widget:last-child > image { - border-top-right-radius: $bg-radius; - border-bottom-right-radius: $bg-radius; - } - - > label:first-child { - padding-right: 16px; + &:hover > image { + background: $bg-100; } } - label:last-child { - margin-right: 12px; + widget:first-child > image { + border-top-left-radius: $bg-radius; + border-bottom-left-radius: $bg-radius; } - box label:last-child { - margin-left: 12px; + widget:last-child > image { + border-top-right-radius: $bg-radius; + border-bottom-right-radius: $bg-radius; } + +// > label:first-child { +// padding-right: 16px; +// } + +// label:last-child { +// margin-right: 12px; +// } + +// box label:last-child { +// margin-left: 12px; +// } } .workspaces { From c8c13f1151bb6e963d5c4e7b3c0fc77704440a9d Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:18:11 +0700 Subject: [PATCH 119/126] enhance(zshenv): XDG config specs clean up - pyenv - fix wget crash REF: https://github.com/pyenv/pyenv/blob/54f7a7c0464f4feb3ba61cfee72fc14db802f98f/README.md#environment-variables --- .config/zsh/.zshenv | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 309854a..5cafd39 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -105,27 +105,31 @@ export MESA_GLSL_VERSION_OVERRIDE=460 # export SUDO_ASKPASS="/bin/dmenu-askpass" # fi -# cleaning up +# >> [XDG] +# Clean up export PARALLEL_HOME="$XDG_CONFIG_HOME/parallel" -export SCRIPTS="$HOME/.scripts" +# export SCRIPTS="$HOME/.scripts" export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" -export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi" +export KODI_DATA="$XDG_DATA_HOME/kodi" export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" export WGETRC="$XDG_CONFIG_HOME/wgetrc" export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default" export ADB_VENDOR_KEY="$XDG_CONFIG_HOME/android" -export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" -export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" -export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" -#export PYTHONSTARTUP="${XDG_CONFIG_HOME:-$HOME/.config}/python/pyrc" -export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export GOPATH="$XDG_DATA_HOME/go" +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" +# export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pyrc" +export GNUPGHOME="$XDG_DATA_HOME/gnupg" unset SSH_AGENT_PID -export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh" +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" +export PYENV_ROOT="$XDG_DATA_HOME/pyenv/" -# vimrc (this will init/source ~/.config/vim/vimrc instead of ~/.vimrc) -#export VIMINIT='let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc" | source $MYVIMRC' +# Fixes +[ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME +[ -f $WGETRC ] || touch $WGETRC # wget will fail to run without this file +# << [XDG] # zsh export ZSH_PLUGINS="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" From 81694bca42104b90e22bd8f6ff37a249c449d21c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:25:36 +0700 Subject: [PATCH 120/126] fix(zshenv): GnuPG not working on fresh install --- .config/zsh/.zshenv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 5cafd39..e846020 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -124,11 +124,12 @@ export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" export GNUPGHOME="$XDG_DATA_HOME/gnupg" unset SSH_AGENT_PID export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" -export PYENV_ROOT="$XDG_DATA_HOME/pyenv/" +export PYENV_ROOT="$XDG_DATA_HOME/pyenv" # Fixes [ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME [ -f $WGETRC ] || touch $WGETRC # wget will fail to run without this file +[ -d $GNUPGHOME ] || mkdir -p $GNUPGHOME # << [XDG] # zsh From b78dd2fa294a82637903ecd172d5a0adf4efb4c8 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:33:46 +0700 Subject: [PATCH 121/126] feat: npmrc --- .config/npm/npmrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .config/npm/npmrc diff --git a/.config/npm/npmrc b/.config/npm/npmrc new file mode 100644 index 0000000..b12cc98 --- /dev/null +++ b/.config/npm/npmrc @@ -0,0 +1,4 @@ +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js +logs-dir=${XDG_STATE_HOME}/npm/logs From 8c4eb71747bbfd85350749d7e911c4b6c0100d64 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:41:33 +0700 Subject: [PATCH 122/126] enhance(zshenv): XDG wakatime --- .config/zsh/.zshenv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index e846020..e586787 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -125,11 +125,13 @@ export GNUPGHOME="$XDG_DATA_HOME/gnupg" unset SSH_AGENT_PID export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" export PYENV_ROOT="$XDG_DATA_HOME/pyenv" +export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" # Fixes [ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME [ -f $WGETRC ] || touch $WGETRC # wget will fail to run without this file [ -d $GNUPGHOME ] || mkdir -p $GNUPGHOME +[ -d $WAKATIME_HOME ] || mkdir -p $WAKATIME_HOME # << [XDG] # zsh From 20c1f194bff2b1ae50853192899f2ef298bdc5be Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:45:52 +0700 Subject: [PATCH 123/126] enhance(zshen): XDG - rustup --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index e586787..d3444bb 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -126,6 +126,7 @@ unset SSH_AGENT_PID export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" export PYENV_ROOT="$XDG_DATA_HOME/pyenv" export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" +export RUSTUP_HOME="$XDG_DATA_HOME/rustup" # Fixes [ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME From 44ef1a73462320d026f3664f69b2c317f922c99c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:47:09 +0700 Subject: [PATCH 124/126] enhance(zshenv): XDG - gradle --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index d3444bb..12c852f 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -127,6 +127,7 @@ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" export PYENV_ROOT="$XDG_DATA_HOME/pyenv" export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" export RUSTUP_HOME="$XDG_DATA_HOME/rustup" +export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" # Fixes [ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME From aea43a475e40cbcb00fcae1e41aaf127b7c7f61a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 08:50:23 +0700 Subject: [PATCH 125/126] enhance(zshenv): XDG - pkg-cache --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 12c852f..782e7d6 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -128,6 +128,7 @@ export PYENV_ROOT="$XDG_DATA_HOME/pyenv" export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" export RUSTUP_HOME="$XDG_DATA_HOME/rustup" export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" +export PKG_CACHE_PATH="$XDG_DATA_HOME/pkg-cache" # Fixes [ -d $XDG_CONFIG_HOME ] || mkdir -p $XDG_CONFIG_HOME From e2039847546bed4e321de023f3c09f32626bdf8a Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 17 May 2024 09:00:35 +0700 Subject: [PATCH 126/126] fix: Wine complains about directory not found --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 782e7d6..0090f4d 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -135,6 +135,7 @@ export PKG_CACHE_PATH="$XDG_DATA_HOME/pkg-cache" [ -f $WGETRC ] || touch $WGETRC # wget will fail to run without this file [ -d $GNUPGHOME ] || mkdir -p $GNUPGHOME [ -d $WAKATIME_HOME ] || mkdir -p $WAKATIME_HOME +[ -d $WINEPREFIX ] || mkdir -p $WINEPREFIX # << [XDG] # zsh