From 471cf8613903e5feb1d3627dcde11e5b957da7f7 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Tue, 5 Jul 2022 09:24:16 +0700 Subject: [PATCH 01/39] + ytdlp --- .config/zsh/aliases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 8b4f558..862751e 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -32,8 +32,8 @@ alias p='doas pacman' alias a='paru' #ripper -alias yt='youtube-dl --add-metadata' -alias yta='youtube-dl --add-metadata -x --audio-format' +alias yt='yt-dlp --add-metadata' +alias yta='yt-dlp --add-metadata -x --audio-format' alias xreload='xrdb $HOME/.config/Xresources' #clean up From 1b336fb6de1c857645100c4bee8adbfc53f11070 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 6 Jul 2022 15:26:34 +0700 Subject: [PATCH 02/39] + Fixing homebrew zsh problem --- .config/zsh/.zshrc | 2 +- .config/zsh/completion | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 04f7bcc..93fd704 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -13,7 +13,7 @@ setopt auto_cd # auto cd if directory [ -f ~/.config/zsh/completion ] && source ~/.config/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 +# autoload -U compinit && compinit -u # zmodload -i zsh/complist # zstyle ':completion:*' menu select diff --git a/.config/zsh/completion b/.config/zsh/completion index 3392dc6..100100e 100644 --- a/.config/zsh/completion +++ b/.config/zsh/completion @@ -1,7 +1,16 @@ # vim: filetype=zsh zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash fpath=(/usr/local/share/zsh-completions $fpath) -autoload -U compinit && compinit + +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 From 050068106aebc3a9c250f4c92e6fe42bd3ccca82 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 8 Jul 2022 09:39:18 +0700 Subject: [PATCH 03/39] + brew alias --- .config/zsh/aliases | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 862751e..a705f1d 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -1,5 +1,9 @@ #!/usr/bin/env bash +if [[ "$OSTYPE" == "darwin"* ]]; then + alias brew="sudo -H -u maintenance brew" +fi + #sudo + vim without sacrificing config alias sudovim='sudoedit' alias doasvim='doasedit' From 636cfb280d9008052ec5468f430d8b6034753860 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Wed, 13 Jul 2022 14:10:16 +0700 Subject: [PATCH 04/39] + More pain from Google --- .config/zsh/.zshenv | 12 ++++++------ .config/zsh/aliases | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 7013f87..e1c7da1 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -8,13 +8,13 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export JAVA_HOME="$HOME/.sdkman/candidates/java/current" else export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" -fi -# Android stuff -export ANDROID_SDK_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" -export ANDROID_PREFS_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" -export ANDROID_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" -export ANDROID_AVD_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/.android/avd" + # Android stuff + export ANDROID_SDK_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" + export ANDROID_PREFS_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" + export ANDROID_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/Android/Sdk" + export ANDROID_AVD_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/.android/avd" +fi # -- Path if [[ "$OSTYPE" == "darwin"* ]]; then diff --git a/.config/zsh/aliases b/.config/zsh/aliases index a705f1d..f1a47da 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -1,6 +1,8 @@ #!/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 brew="sudo -H -u maintenance brew" fi From d08cd5f7fcaa5e1216f867d928a67dfdf0f00bb9 Mon Sep 17 00:00:00 2001 From: ziro Date: Sun, 11 Sep 2022 07:20:00 +0700 Subject: [PATCH 05/39] ew --- .config/powershell/profile.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.config/powershell/profile.ps1 b/.config/powershell/profile.ps1 index 0dc637f..f97491b 100644 --- a/.config/powershell/profile.ps1 +++ b/.config/powershell/profile.ps1 @@ -17,13 +17,6 @@ function UsernameAtComputer } "`e[35;1m" + $username + "`e[0m`e[1m@" + "`e[35;1m" + $compname } -Write-Host " `e[34;1m ,___---'‾‾‾|`e[0m " (UsernameAtComputer) -Write-Host " `e[34;1m|'‾ | | " -Write-Host " `e[34;1m| | |" -Write-Host " `e[34;1m|------|------|" -Write-Host " `e[34;1m| | |" -Write-Host " `e[34;1m|,_ | |" -Write-Host " `e[34;1m '‾‾‾---,___|" # ----- set default color Set-PSReadlineOption -Colors @{ Parameter = "`e[96m"} From a950db5c41e50daa395cdb4c6927312c3c6637ae Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Fri, 28 Oct 2022 09:44:57 +0700 Subject: [PATCH 06/39] refactor: Add support for vscode --- .config/vim/vimrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index d4c768b..008679d 100755 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -39,4 +39,6 @@ else endif " ----- PlugIns -source ~/.config/vim/vim_plug +if !exists('g:vscode') + source ~/.config/vim/vim_plug +endif From 209041a90e81d5948fb4801a95a882309e62b102 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 13 Nov 2022 13:38:38 +0700 Subject: [PATCH 07/39] stuff --- .config/zsh/.zshenv | 1 + .config/zsh/aliases | 1 + 2 files changed, 2 insertions(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index e1c7da1..147aa3d 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -6,6 +6,7 @@ export XDG_CONFIG_HOME="$HOME/.config" if [[ "$OSTYPE" == "darwin"* ]]; then export JAVA_HOME="$HOME/.sdkman/candidates/java/current" + export CHROME_EXECUTABLE=/Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser else export JAVA_HOME="/usr/lib/jvm/java-11-openjdk" diff --git a/.config/zsh/aliases b/.config/zsh/aliases index f1a47da..adda88c 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -127,3 +127,4 @@ 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" From e4a115c32540838a8334ad6540383510b182b697 Mon Sep 17 00:00:00 2001 From: ziro Date: Tue, 13 Dec 2022 09:48:35 +0700 Subject: [PATCH 08/39] feat: zsh cursor to mimic vim cursor --- .config/zsh/.zshenv | 2 +- .config/zsh/aliases | 2 ++ .config/zsh/theme | 21 ++++++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 147aa3d..ca18525 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -23,7 +23,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/.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="$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/aliases b/.config/zsh/aliases index adda88c..cac347b 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -6,6 +6,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then alias brew="sudo -H -u maintenance brew" fi +alias punten='doas' #sudo + vim without sacrificing config alias sudovim='sudoedit' alias doasvim='doasedit' @@ -128,3 +129,4 @@ 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" diff --git a/.config/zsh/theme b/.config/zsh/theme index 51bd1d4..83003fc 100644 --- a/.config/zsh/theme +++ b/.config/zsh/theme @@ -30,12 +30,31 @@ function zle-line-init zle-keymap-select { 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 -precmd () { vcs_info } +_fix_cursor() { + echo -ne '\e[5 q' +} + +precmd () { + vcs_info + _fix_cursor +} #RPROMPT=\$vcs_info_msg_0_ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#60C0FF,bold,underline" ZSH_AUTOSUGGEST_HISTORY_IGNORE="ls *,cd *" From 8604092e811e341854ff99850e732eea4b8a25c2 Mon Sep 17 00:00:00 2001 From: ziro Date: Tue, 3 Jan 2023 13:56:37 +0700 Subject: [PATCH 09/39] refactor: some experiment --- .config/xprofile | 18 +++++++++++------- .config/zsh/.zshenv | 3 +++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.config/xprofile b/.config/xprofile index 91ed4d0..448030e 100644 --- a/.config/xprofile +++ b/.config/xprofile @@ -12,13 +12,17 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then # Slow app startup fix (for flatpaks) dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY - # Universal Autostarts - # fcitx5 -d & - xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & - unclutter & - dunst & - numlockx & - lxpolkit & + if [[ "1$(pidof dwm)" == "1" ]]; then + echo "" + else + # Autostarts for DWM + # fcitx5 -d & + xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources & + unclutter & + dunst & + numlockx & + lxpolkit & + fi # Custom Resolutions xrandr --newmode "768x432" 25.75 768 792 864 960 432 435 440 450 -hsync +vsync diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index ca18525..a1647ad 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -32,6 +32,9 @@ export QT_IM_MODULE="ibus" export GLFW_IM_MODULE="ibus" export XMODIFIERS=@im="ibus" +# -- rootless docker +export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock + # -- DEFAULT export QT_QPA_PLATFORMTHEME="qt5ct" if [[ -n $SSH_CONNECTION ]]; then From d0f695f4f8485ec509acccf4f78cc359f2775b54 Mon Sep 17 00:00:00 2001 From: ziro Date: Tue, 3 Jan 2023 14:03:39 +0700 Subject: [PATCH 10/39] refactor: Plugin for Windows user --- .config/vim/vimrc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 008679d..6b1ee4d 100755 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -31,14 +31,19 @@ if has('win64') || has('win32') || has('win16') 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 else " *nix (Linux/Mac) so ~/.config/vim/vim_nix " Universal so ~/.config/vim/vim_uni -endif -" ----- PlugIns -if !exists('g:vscode') - source ~/.config/vim/vim_plug + " ----- PlugIns + if !exists('g:vscode') + source ~/.config/vim/vim_plug + endif endif From 3a4f4256f8b9bfd4d68e025be5690bf5ad85d4b0 Mon Sep 17 00:00:00 2001 From: ziro Date: Mon, 6 Mar 2023 14:47:22 +0700 Subject: [PATCH 11/39] chore: Update plugins --- .config/dwm/autostart.sh | 1 + .config/vim/vim_plug | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.config/dwm/autostart.sh b/.config/dwm/autostart.sh index 1841dfd..bc3ac26 100755 --- a/.config/dwm/autostart.sh +++ b/.config/dwm/autostart.sh @@ -5,6 +5,7 @@ picom & nitrogen --restore & $HOME/.scripts/launch-conky_dwm.sh & sxhkd -c $HOME/.config/sxhkd/dwm & +easyeffects --gapplication-service & if [ x$(pidof dwmblocks) = "x" ] then dwmblocks & diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index 184f77d..0a82ce3 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -39,7 +39,7 @@ Plug 'ryanoasis/vim-devicons' " ====== " -- Markdown preview, not really useful since it's only support github's md format. -Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' } +Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']} " --- Auto complete with NCM2 (nvim-completion-manager) " Plug 'ncm2/ncm2' @@ -62,11 +62,11 @@ Plug 'neovim/nvim-lspconfig' " Plug 'Shougo/ddc-sorter_rank', { 'branch': 'main' } " --- Auto complete with CMP -Plug 'hrsh7th/cmp-nvim-lsp' -Plug 'hrsh7th/cmp-buffer' -Plug 'hrsh7th/cmp-path' -Plug 'hrsh7th/cmp-cmdline' -Plug 'hrsh7th/nvim-cmp' +Plug 'hrsh7th/cmp-nvim-lsp', { 'branch': 'main' } +Plug 'hrsh7th/cmp-buffer', { 'branch': 'main' } +Plug 'hrsh7th/cmp-path', { 'branch': 'main' } +Plug 'hrsh7th/cmp-cmdline', { 'branch': 'main' } +Plug 'hrsh7th/nvim-cmp', { 'branch': 'main' } " --- Indent visualization " Plug 'Yggdroot/indentLine' @@ -78,7 +78,7 @@ Plug 'hrsh7th/nvim-cmp' Plug 'JuliaEditorSupport/julia-vim' " --- enhanced python highlighting -Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'} +Plug 'wookayin/semshi', {'do': ':UpdateRemotePlugins'} " --- For golang Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } @@ -398,7 +398,7 @@ lua < with each lsp server you've enabled. require('lspconfig')['pyright'].setup { capabilities = capabilities From 1eaeedfd762d7674376dba2d6fb886245f39a15f Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 6 Apr 2023 08:03:28 +0700 Subject: [PATCH 12/39] feat: Hyprland --- .config/hypr/hyprland.conf | 133 +++++++++++++++++++++++++++++++++++++ .config/tofi/config | 10 +++ .config/vim/vim_plug | 5 +- .config/vim/vim_uni | 2 +- .config/xprofile | 2 +- 5 files changed, 149 insertions(+), 3 deletions(-) create mode 100644 .config/hypr/hyprland.conf create mode 100644 .config/tofi/config diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..a3d5700 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,133 @@ +exec-once = xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources +exec-once = waybar +exec-once = unclutter +exec-once = dunst +exec-once = numlockx +exec-once = lxpolkit + +monitor=,preferred,auto,auto + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = no + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +general { + gaps_in = 5 + gaps_out = 20 + border_size = 2 + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + layout = dwindle +} + +decoration { + rounding = 5 + blur = yes + blur_size = 3 + blur_passes = 1 + blur_new_optimizations = on + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + pseudotile = on + preserve_split = on + no_gaps_when_only = on +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = on +} + +# I don't use Trackpads/Touchpads, gestures basically useless for me (for now) +#gestures { +# # See https://wiki.hyprland.org/Configuring/Variables/ for more +# workspace_swipe = off +#} + + # Alt Key = Mostly for terminals only +$mainMod = SUPER # Super Key = General MOD for WM +$metaMod = SUPER ALT # Super + Alt = MOD key(s) that control/modify the WM's behaviour +$spaceMod = SUPER SHIFT # Super + Shift = MOD key(s) that control/modify the Workspace's behaviour + +bind = $mainMod, space, exec, kitty +bind = $mainMod, Q, killactive, +bind = $mainMod, B, exec, $BROWSER +bind = , Print, exec, flameshot gui +bind = , XF86Search, exec, tofi-run +bind = $metaMod, Q, exit, +bind = $metaMod, F, togglefloating, +bind = $metaMod, P, pseudo, # for dwindle only +bind = $metaMod, J, togglesplit, # for dwindle only + +# Window focus +bind = $mainMod, H, movefocus, l +bind = $mainMod, L, movefocus, r +bind = $mainMod, K, movefocus, u +bind = $mainMod, J, movefocus, d + +# Workspace +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $spaceMod, 1, movetoworkspace, 1 +bind = $spaceMod, 2, movetoworkspace, 2 +bind = $spaceMod, 3, movetoworkspace, 3 +bind = $spaceMod, 4, movetoworkspace, 4 +bind = $spaceMod, 5, movetoworkspace, 5 +bind = $spaceMod, 6, movetoworkspace, 6 +bind = $spaceMod, 7, movetoworkspace, 7 +bind = $spaceMod, 8, movetoworkspace, 8 +bind = $spaceMod, 9, movetoworkspace, 9 +bind = $spaceMod, 0, movetoworkspace, 10 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +#bindm = $metaMod, mouse:272, movewindow +#bindm = $metaMod, mouse:273, resizewindow diff --git a/.config/tofi/config b/.config/tofi/config new file mode 100644 index 0000000..aa3a2cd --- /dev/null +++ b/.config/tofi/config @@ -0,0 +1,10 @@ +width = 100% +height = 100% +border-width = 0 +outline-width = 0 +padding-left = 35% +padding-top = 35% +result-spacing = 25 +num-results = 5 +font = monospace +background-color = #000A diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index 0a82ce3..ff04b69 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -78,7 +78,7 @@ Plug 'hrsh7th/nvim-cmp', { 'branch': 'main' } Plug 'JuliaEditorSupport/julia-vim' " --- enhanced python highlighting -Plug 'wookayin/semshi', {'do': ':UpdateRemotePlugins'} +"Plug 'wookayin/semshi', {'do': ':UpdateRemotePlugins'} " --- For golang Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } @@ -93,6 +93,9 @@ Plug 'wakatime/vim-wakatime' Plug 'GutenYe/json5.vim' +" --- Project Fluent support +Plug 'projectfluent/fluent.vim' + call plug#end() " ====================== diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 8d30f3d..c978cb5 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -94,7 +94,7 @@ autocmd BufEnter *.py set ai sw=4 ts=4 sta et fo=croql autocmd BufEnter *.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 +autocmd Filetype *css set ai sw=4 ts=4 sta et fo=croql autocmd Filetype javascript set ai sw=4 ts=4 sta et fo=croql autocmd Filetype vue set ai sw=4 ts=4 sta et fo=croql autocmd Filetype php set ai sw=4 ts=4 sta et fo=croql diff --git a/.config/xprofile b/.config/xprofile index 448030e..4e839bc 100644 --- a/.config/xprofile +++ b/.config/xprofile @@ -13,7 +13,7 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY if [[ "1$(pidof dwm)" == "1" ]]; then - echo "" + echo else # Autostarts for DWM # fcitx5 -d & From 3fbd6337a3d4fd79dab761e3bb655a3e9fffcd19 Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 6 Apr 2023 08:05:36 +0700 Subject: [PATCH 13/39] chore: Mimic macOS' Spotlight keymap --- .config/hypr/hyprland.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index a3d5700..0affe05 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -84,11 +84,11 @@ $mainMod = SUPER # Super Key = General MOD for WM $metaMod = SUPER ALT # Super + Alt = MOD key(s) that control/modify the WM's behaviour $spaceMod = SUPER SHIFT # Super + Shift = MOD key(s) that control/modify the Workspace's behaviour -bind = $mainMod, space, exec, kitty +bind = $mainMod, T, exec, kitty bind = $mainMod, Q, killactive, bind = $mainMod, B, exec, $BROWSER bind = , Print, exec, flameshot gui -bind = , XF86Search, exec, tofi-run +bind = $mainMod, Space, exec, tofi-run bind = $metaMod, Q, exit, bind = $metaMod, F, togglefloating, bind = $metaMod, P, pseudo, # for dwindle only From 973fbd32beb7731c3461a65d6153d9c37bc2cae0 Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 6 Apr 2023 14:10:46 +0700 Subject: [PATCH 14/39] fix: Tofi and Flameshow not working properly --- .config/hypr/hyprland.conf | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 0affe05..745e1f5 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -4,6 +4,7 @@ exec-once = unclutter exec-once = dunst exec-once = numlockx exec-once = lxpolkit +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 @@ -50,16 +51,14 @@ decoration { animations { enabled = yes - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + bezier = myBezier, 0.05, 1, 0.1, 1 - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% + animation = windows, 1, 5, myBezier + animation = windowsOut, 1, 6, default, popin 80% animation = border, 1, 10, default animation = borderangle, 1, 8, default animation = fade, 1, 7, default - animation = workspaces, 1, 6, default + animation = workspaces, 1, 5, default } dwindle { @@ -87,8 +86,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, flameshot gui -bind = $mainMod, Space, exec, tofi-run +bind = , Print, exec, grim -g "$(slurp)" - | wl-copy +bind = $mainMod, Space, exec, exec `tofi-run` 2>/dev/null bind = $metaMod, Q, exit, bind = $metaMod, F, togglefloating, bind = $metaMod, P, pseudo, # for dwindle only From 5f10ed90d28be4e7ca6de123051bea9995f5b854 Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 6 Apr 2023 14:11:57 +0700 Subject: [PATCH 15/39] style: Waybar config and styling --- .config/waybar/config | 93 ++++++++++++++++++++++++++++++++++++++++ .config/waybar/style.css | 62 +++++++++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 .config/waybar/config create mode 100644 .config/waybar/style.css diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..f3c56eb --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,93 @@ +// 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-center": ["hyprland/window"], + "modules-right": ["idle_inhibitor", "pulseaudio", "network", "disk", "memory", "temperature", "clock", "tray"], + "wlr/workspaces": { + "format": "{icon}", + "on-click": "activate", + "sort-by-number": true + }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "disk": { + "interval": 30, + "format": "{free} free 󰋊" + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%a, %d %b %Y • %H:%M %Z} 󰥔", + "format-alt": "{:%Y-%m-%d} 󰥔" + }, + "memory": { + "format": "{}% 󰍛" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["󱃃", "󰔏", "󱃂"] + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) 󰤨", + "format-ethernet": "󰌘", + "tooltip-format": "{ifname} via {gwaddr}", + "format-linked": "󰌚", + "format-disconnected": "󰌙", + "format-alt": "{ipaddr}/{cidr} 󰌘" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-muted": "󰝟 {format_source}", + "format-source": "{volume}% 󰍬", + "format-source-muted": "󰍭", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..eba8cc2 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,62 @@ +* { + font-family: Sarasa Term J, Iosevka Nerd Font, monoscope; + font-weight: bold; +} + +window#waybar { + background-color: rgba(43, 48, 59, 0.5); + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +#workspaces { + background-color: #0E1418; + border-radius: 6px; +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #ffffff; + border-radius: 6px; + border-bottom: 3px solid transparent; +} + +#workspaces button:hover { + background: #2c363d; + border-bottom: 3px solid #FFF; +} + +#workspaces button.active { + border-bottom: 3px solid #08A5DE; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#mpd { + padding: 0 10px; + color: #ffffff; +} + +box.modules-right { + background-color: #0E1418; + border-radius: 6px; +} From 373e608f2ea3978200984df88bf10011e9998474 Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 8 Apr 2023 06:19:27 +0700 Subject: [PATCH 16/39] feat: Enable move window with MOD + Mouse clicks bind --- .config/hypr/hyprland.conf | 4 ++-- .config/tdm/default | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 745e1f5..b0c7535 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -128,5 +128,5 @@ bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging -#bindm = $metaMod, mouse:272, movewindow -#bindm = $metaMod, mouse:273, resizewindow +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow diff --git a/.config/tdm/default b/.config/tdm/default index 5ef608d..5ee27ce 120000 --- a/.config/tdm/default +++ b/.config/tdm/default @@ -1 +1 @@ -/home/ziro/.config/tdm/sessions/dwm \ No newline at end of file +/home/ziro/.config/tdm/extra/hyprland \ No newline at end of file From 041a5d21491497984553e68e5fd7acf92894fec9 Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 8 Apr 2023 07:30:33 +0700 Subject: [PATCH 17/39] docs: Spotify weird behaviour --- .config/hypr/hyprland.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index b0c7535..920b49b 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -78,6 +78,17 @@ master { # workspace_swipe = off #} +# Seems like spotify spawn act a bit different compared to most process spawn, +# my workaround for now is by creating a shell script, since I use shell script for spotify anyway to inject adblocker it's no problem to me: +# ======================== +# #!/bin/sh +# LD_PRELOAD=/usr/local/lib/spotify-adblock.so $(realpath -L $(which spotify)) --no-zygote --disable-gpu --disable-software-rasterizer & +# sleep 0.5 # wait a bit until spotify ready before toggling off float for spotify +# hyprctl dispatch togglefloating '^(Spotify)$' +# ======================== +#windowrule = unset,^(Spotify)$ +#windowrule = tile,^(Spotify)$ + # Alt Key = Mostly for terminals only $mainMod = SUPER # Super Key = General MOD for WM $metaMod = SUPER ALT # Super + Alt = MOD key(s) that control/modify the WM's behaviour From 596daa1232d7a0c58b2a45e69ac308f791b4ca1e Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 8 Apr 2023 08:55:22 +0700 Subject: [PATCH 18/39] fix: OBS --- .config/hypr/hyprland.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 920b49b..b04fdc6 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -1,3 +1,4 @@ +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 = unclutter From b347b3421c081c68844e37bf8e9a86a8295b0675 Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 8 Apr 2023 09:04:51 +0700 Subject: [PATCH 19/39] chore: Replace mpvpaper with hyprpaper --- .config/hypr/hyprland.conf | 3 ++- .config/hypr/hyprpaper.conf | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .config/hypr/hyprpaper.conf diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index b04fdc6..c30a2e1 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,7 +5,8 @@ exec-once = unclutter exec-once = dunst exec-once = numlockx exec-once = lxpolkit -exec-once = mpvpaper -vs -o "no-audio loop" VGA-1 /home/ziro/my\ Files/Wallpaper/HoloLive/Torii\ Gate/Torii\ Gate.webm & +exec-once = hyperpaper +#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 diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..583be6d --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,2 @@ +preload = ~/my Files/Wallpaper/HoloLive/Torii Gate/preview.jpg +wallpaper = VGA-1,~/my Files/Wallpaper/HoloLive/Torii Gate/preview.jpg From 207ad67a7b5d1bc13aa0989f534a8e9ade2e386b Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 15 Apr 2023 09:13:27 +0700 Subject: [PATCH 20/39] fix: Tab no longer trigger auto-complete (Use CTRL+Space instead) --- .config/vim/vim_plug | 5 +++-- .config/vim/vim_uni | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/vim/vim_plug b/.config/vim/vim_plug index ff04b69..a01e979 100644 --- a/.config/vim/vim_plug +++ b/.config/vim/vim_plug @@ -315,6 +315,7 @@ let g:ale_linters = { lua <"] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif has_words_before() then - cmp.complete() + -- elseif has_words_before() then + -- cmp.complete() else fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. end diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index c978cb5..73fa91c 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -95,7 +95,8 @@ autocmd BufEnter *.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 -autocmd Filetype javascript set ai sw=4 ts=4 sta et fo=croql +autocmd Filetype javascript* set ai sw=4 ts=4 sta et fo=croql +autocmd Filetype json set ai sw=4 ts=4 sta et fo=croql autocmd Filetype vue set ai sw=4 ts=4 sta et fo=croql autocmd Filetype php set ai sw=4 ts=4 sta et fo=croql From b2a731e341408eb0ed7f2c4dee2adeedf58802ca Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 25 May 2023 09:14:36 +0700 Subject: [PATCH 21/39] fix(vim): now as it should be in the first place --- .config/hypr/hyprland.conf | 4 +++- .config/vim/vim_uni | 7 +++---- .config/zsh/.zshrc | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index c30a2e1..ca58882 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -5,7 +5,8 @@ exec-once = unclutter exec-once = dunst exec-once = numlockx exec-once = lxpolkit -exec-once = hyperpaper +exec-once = nitrogen --restore +exec-once = fcitx5 -d #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 @@ -103,6 +104,7 @@ bind = , Print, exec, grim -g "$(slurp)" - | wl-copy bind = $mainMod, Space, exec, exec `tofi-run` 2>/dev/null bind = $metaMod, Q, exit, bind = $metaMod, F, togglefloating, +bind = $metaMod, S, pin, bind = $metaMod, P, pseudo, # for dwindle only bind = $metaMod, J, togglesplit, # for dwindle only diff --git a/.config/vim/vim_uni b/.config/vim/vim_uni index 73fa91c..5d557b0 100644 --- a/.config/vim/vim_uni +++ b/.config/vim/vim_uni @@ -52,10 +52,9 @@ noremap "+y noremap "+P " Shortcut to comment a line -" means ctrl+/ for vim, for some reason... -map gcc -vmap gc -imap gc +map gcc +vmap gc +imap gc " Clear last search result map c :noh diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 93fd704..d9b0be4 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -9,6 +9,7 @@ # rateUSD | sed 's/^/ /g' setopt auto_cd # auto cd if directory + # highlight on tab (completion) [ -f ~/.config/zsh/completion ] && source ~/.config/zsh/completion # zstyle ':completion:*:*:git:*' script /usr/local/etc/bash_completion.d/git-completion.bash From 62df30426c291f4ad20df9235d35655fe7fefadc Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Sun, 23 Jul 2023 09:55:08 +0700 Subject: [PATCH 22/39] chore(zsh.aliases): brew -> mbrew Allow user to use their own brew --- .config/zsh/.zshenv | 6 ++++++ .config/zsh/aliases | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index a1647ad..5550c71 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -17,9 +17,15 @@ else export ANDROID_AVD_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android/.android/avd" fi +# -- Python +if [[ "$OSTYPE" == "darwin"* ]]; then + export PYTHONNOUSERSITE=1 +fi + # -- Path if [[ "$OSTYPE" == "darwin"* ]]; then LOCAL_PATH=$(du "$HOME/.local/bin/" | cut -f2 > /tmp/path && paste -sd ':' /tmp/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}}" fi diff --git a/.config/zsh/aliases b/.config/zsh/aliases index cac347b..472debb 100644 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -3,7 +3,7 @@ if [[ "$OSTYPE" == "darwin"* ]]; then # i need sudo to launch emulator alias pixelemu="sudo $HOME/Library/Android/sdk/emulator/emulator @Pixel_2_API_28" - alias brew="sudo -H -u maintenance brew" + alias mbrew="sudo -H -u maintenance -g staff brew" fi alias punten='doas' From c35a397fab454e2b8247839a956295e225b10a98 Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 24 Jul 2023 08:37:45 +0700 Subject: [PATCH 23/39] fix: Remove `RPROMPT` --- .config/zsh/theme | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/theme b/.config/zsh/theme index 83003fc..26e4a63 100644 --- a/.config/zsh/theme +++ b/.config/zsh/theme @@ -52,6 +52,7 @@ _fix_cursor() { } precmd () { + RPROMPT="" # for some reason path added to RPROMPT in macOS, I have no idea where it's coming from vcs_info _fix_cursor } From 2714811cc33669b0d51237f0098810c476139e9c Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Mon, 24 Jul 2023 11:49:46 +0700 Subject: [PATCH 24/39] fix: Docker for macOS --- .config/zsh/.zshenv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 5550c71..96dbb4e 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -39,7 +39,11 @@ export GLFW_IM_MODULE="ibus" export XMODIFIERS=@im="ibus" # -- rootless docker -export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock +if [[ "$OSTYPE" == "darwin"* ]]; then + export DOCKER_HOST=unix:///var/run/docker.sock +elif [[ "$OSTYPE" == "linux-gnu" ]]; then + export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock +fi # -- DEFAULT export QT_QPA_PLATFORMTHEME="qt5ct" From 9fc857fe6987989491773ca7a486dd2201098c3b Mon Sep 17 00:00:00 2001 From: Ahmad Ansori Palembani Date: Thu, 27 Jul 2023 11:18:10 +0700 Subject: [PATCH 25/39] fix: Python package location on macOS Legit I have no idea why it's unset by default --- .config/zsh/.zshenv | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/zsh/.zshenv b/.config/zsh/.zshenv index 96dbb4e..dca22e5 100644 --- a/.config/zsh/.zshenv +++ b/.config/zsh/.zshenv @@ -24,6 +24,7 @@ fi # -- Path 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="$HOME/Library/Python/3.10/bin:$LOCAL_PATH" elif [[ "$OSTYPE" == "linux-gnu" ]]; then From 1ae13b9168495b57afbe5e6be7e188d059d35b6e Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 27 Jul 2023 15:05:57 +0700 Subject: [PATCH 26/39] 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 27/39] 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 28/39] 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 29/39] 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 30/39] 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 31/39] 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 32/39] 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 33/39] 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 34/39] 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 35/39] 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 36/39] 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 37/39] 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 38/39] 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 39/39] 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)))