diff --git a/.chezmoiignore b/.chezmoiignore index 8f0cac0..a3ceed8 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -16,6 +16,7 @@ .config/dunst/dunstrc .config/rofi/wal.rasi .config/nvim +.config/sway/outputs .inputrc .env {{- end }} diff --git a/dot_envrc b/dot_envrc index f583896..669832c 100644 --- a/dot_envrc +++ b/dot_envrc @@ -52,30 +52,42 @@ export XMODIFIERS=@im=fcitx ################################ # pls use the goddamn xdg dirs # ################################ -export GOPATH="$XDG_DATA_HOME"/go -export GNUPGHOME="$XDG_DATA_HOME/gnupg" + # If you use non-default GnuPG Home directory, you will need to edit all # socket files to use the values of gpgconf --list-dirs. # If you set your SSH_AUTH_SOCK manually, keep in mind that your socket # location may be different if you are using a custom GNUPGHOME +export GOPATH="$XDG_DATA_HOME"/go +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc #export PNPM_HOME="$XDG_DATA_HOME/pnpm" -export NPM_CONFIG_PREFIX="$XDG_DATA_HOME/npm-global" alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" +export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config +export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials export CARGO_HOME="$XDG_DATA_HOME/cargo" export CARGO_INSTALL_ROOT="$HOME/.local" +export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker +export GOPATH="$XDG_DATA_HOME"/go +export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc" +export IPYTHONDIR="$XDG_CONFIG_HOME/ipython" +export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME"/jupyter export LESSHISTFILE="$XDG_STATE_HOME/less/history" -# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc +export MYPY_CACHE_DIR="$XDG_CACHE_HOME"/mypy +export NPM_CONFIG_PREFIX="$XDG_DATA_HOME/npm-global" export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WINEPREFIX="$XDG_DATA_HOME"/wine export XCURSOR_PATH=/usr/share/icons:$XDG_DATA_HOME/icons -export GOPATH="$XDG_DATA_HOME"/go -export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials -export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config -export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker +export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history +export PYTHONSTARTUP="$HOME"/python/pythonrc +export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr +export ERRFILE="$XDG_CACHE_HOME/X11/xsession-errors" +export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority + + ############### # SET UP PATH # ############### @@ -127,3 +139,5 @@ esac export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive # this better fix libadwaita? export ADW_DISABLE_PORTAL=1 +export MOZ_ENABLE_WAYLAND=1 +export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-sway}" diff --git a/executable_dot_aliasrc b/executable_dot_aliasrc index 7de6637..c08024f 100644 --- a/executable_dot_aliasrc +++ b/executable_dot_aliasrc @@ -139,3 +139,12 @@ load_aliases() { } load_aliases unset -f load_aliases + +function yy() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" +} diff --git a/executable_dot_bashrc b/executable_dot_bashrc index bcd4c79..0db0b6d 100644 --- a/executable_dot_bashrc +++ b/executable_dot_bashrc @@ -10,11 +10,11 @@ checkCommand(){ type "$1" >/dev/null 2>&1 } -# If you have zellij installed, this will auto start it -if [ -z "$ZELLIJ" ] && checkCommand zellij; then - #export ZELLIJ_AUTO_ATTACH=true - exec zellij -fi +# # If you have zellij installed, this will auto start it +# if [ -z "$ZELLIJ" ] && checkCommand zellij; then +# #export ZELLIJ_AUTO_ATTACH=true +# exec zellij +# fi # Speed up shell load on WSL OLDPATH=$PATH diff --git a/private_dot_config/external_nvim b/private_dot_config/external_nvim index d1313ec..ec9a04a 160000 --- a/private_dot_config/external_nvim +++ b/private_dot_config/external_nvim @@ -1 +1 @@ -Subproject commit d1313ec3626b148042706e656c6e58d5f86038f0 +Subproject commit ec9a04ae33660eba606ca624884e74f1884d1a94 diff --git a/private_dot_config/kitty/kitty.conf b/private_dot_config/kitty/kitty.conf index b0e365f..2bca6f0 100644 --- a/private_dot_config/kitty/kitty.conf +++ b/private_dot_config/kitty/kitty.conf @@ -19,27 +19,17 @@ #: heavy. Setting them manually is useful for font families that have #: many weight variants like Book, Medium, Thick, etc. For example:: -font_family Berkeley Mono Trial -# font_family ProFont IIx -# font_family Monocraft Nerd Font -# font_family Miracode -# modify_font baseline -1.75 -# font_family Monocraft Nerd Font -# font_family Ubuntu Mono -# bold_font Operator Mono Medium -# italic_font Operator Mono Book Italic -# bold_italic_font Operator Mono Medium Italic +font_family MonaspiceNe Nerd Font Mono +bold_family MonaspiceNe Nerd Font Mono +italic_family MonaspiceNe Nerd Font Mono +bold_italic_family MonaspiceNe Nerd Font Mono font_size 12.0 #: Font size (in pts) # force_ltr no -symbol_map U+002A ProFont IIx -symbol_map U+0023 ProFont IIx -symbol_map U+002F ProFont IIx -symbol_map U+005C ProFont IIx - +# TODO: move neerdfont icons into an import # https://github.com/ryanoasis/nerd-fonts/wiki/Glyph-Sets-and-Code-Points # symbol_map U+E5FA-U+E62B Symbols Nerd Font Mono # # Devicons @@ -636,7 +626,7 @@ url_color #0B5393 #: Terminal bell {{{ -# enable_audio_bell yes +enable_audio_bell no #: The audio bell. Useful to disable it in environments that require #: silence. @@ -657,7 +647,7 @@ url_color #0B5393 #: Request window attention on bell. Makes the dock icon bounce on #: macOS or the taskbar flash on linux. -# bell_on_tab "🔔 " +bell_on_tab "🔔 " #: Some text or a Unicode symbol to show on the tab if a window in the #: tab that does not have focus has a bell. If you want to use leading @@ -1287,18 +1277,10 @@ include colors.conf #: in the path are expanded. Changing this option by reloading the #: config is not supported. -# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask +clipboard_control write-clipboard write-primary read-clipboard read-primary #: Allow programs running in kitty to read and write from the -#: clipboard. You can control exactly which actions are allowed. The -#: possible actions are: write-clipboard, read-clipboard, write- -#: primary, read-primary, read-clipboard-ask, read-primary-ask. The -#: default is to allow writing to the clipboard and primary selection -#: and to ask for permission when a program tries to read from the -#: clipboard. Note that disabling the read confirmation is a security -#: risk as it means that any program, even the ones running on a -#: remote server via SSH can read your clipboard. See also -#: clipboard_max_size. +#: clipboard. # clipboard_max_size 64 @@ -1325,7 +1307,7 @@ include colors.conf #: special value of ask means that kitty will ask before opening the #: link when clicked. -# shell_integration enabled +shell_integration enabled #: Enable shell integration on supported shells. This enables features #: such as jumping to previous prompts, browsing the output of the diff --git a/private_dot_config/sway/config b/private_dot_config/sway/config index 3d3e642..7b4fd5d 100644 --- a/private_dot_config/sway/config +++ b/private_dot_config/sway/config @@ -1,3 +1,5 @@ +include /etc/sway/config.d/* +include /etc/sway/config.d/50-systemd-user.conf set $mod Mod4 include "theme" @@ -10,6 +12,7 @@ include "outputs" floating_modifier $mod +for_window [app_id="flameshot"] border pixel 0, floating enable, fullscreen disable, move absolute position 0 0 # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" @@ -33,9 +36,9 @@ set $ws27 "27" set $ws28 "28" set $ws29 "29" set $ws20 "20" -exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec hash dbus-update-activation-environment 2>/dev/null && \ - dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway +exec_always systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec_always dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + include "keybinds" #border size @@ -47,9 +50,9 @@ exec_always --no-startup-id /usr/bin/lxpolkit exec_always --no-startup-id /usr/bin/lxqt-policykit-agent #notif daemon exec dunst -exec nm-tray # exec_always fcitx5 -exec_always wl-paste --watch cliphist store -exec_always gnome-keyring-daemon -r +exec wl-paste --watch cliphist store +exec gnome-keyring-daemon -r exec ~/.config/swhkd/hotkeys.sh exec udiskie +exec nm-tray diff --git a/private_dot_config/swhkd/swhkdrc b/private_dot_config/swhkd/swhkdrc index f94734c..0d01fd2 100644 --- a/private_dot_config/swhkd/swhkdrc +++ b/private_dot_config/swhkd/swhkdrc @@ -1,60 +1,60 @@ # Browser super + b - xdg-open http:// + exec xdg-open http:// # Pipewire controls XF86AudioRaiseVolume - pactl set-sink-volume @DEFAULT_SINK@ +5%;# increase sound volume + exec pactl set-sink-volume @DEFAULT_SINK@ +5%;# increase sound volume XF86AudioLowerVolume - pactl set-sink-volume @DEFAULT_SINK@ -5%; # decrease sound volume + exec pactl set-sink-volume @DEFAULT_SINK@ -5%; # decrease sound volume XF86AudioMute - pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound + exec pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound # Media player controls XF86AudioPlay - playerctl play-pause + exec playerctl play-pause XF86AudioNext - playerctl next + exec playerctl next XF86AudioPrev - playerctl previous + exec playerctl previous # Sreen brightness controls #sudo chmod +s $(which brightnessctl) XF86MonBrightnessUp - brightnessctl -e s 5%+ + exec brightnessctl -e s 5%+ XF86MonBrightnessDown - brightnessctl -e s 5%- + exec brightnessctl -e s 5%- super + enter - kitty + exec kitty super + shift + e - rofi \ - -show p \ - -modi p:'rofi-power-menu --symbols-font "Symbols Nerd Font Mono"' \ - -theme lunar-witch + exec rofi \ + exec -show p \ + exec -modi p:'rofi-power-menu --symbols-font "Symbols Nerd Font Mono"' \ + exec -theme lunar-witch super + space - rofi -combi-modi "drun#run" -show combi -show-icons -theme lunar-witch + exec rofi -combi-modi "drun#run" -show combi -show-icons -theme lunar-witch super + tab - rofi -show window -show-icons -theme lunar-witch + exec rofi -show window -show-icons -theme lunar-witch print - grim - | tee "$XDG_PICTURES_DIR/screenshots/$(date -Is).png" | wl-copy -t image/png + exec grim - | tee "$XDG_PICTURES_DIR/screenshots/$(date -Is).png" | wl-copy -t image/png shift + print - grim -g "$(slurp)" - | tee "$XDG_PICTURES_DIR/screenshots/$(date -Is).png" | wl-copy -t image/png + exec grim -g "$(slurp)" - | tee "$XDG_PICTURES_DIR/screenshots/$(date -Is).png" | wl-copy -t image/png ctrl + print - TEMP=$(mktemp); grim -g "$(slurp)" $TEMP && notify-send "$TEMP" && flatpak run org.gimp.GIMP -- $TEMP + exec TEMP=$(mktemp); grim -g "$(slurp)" $TEMP && notify-send "$TEMP" && flatpak run org.gimp.GIMP -- $TEMP super + shift + v - cliphist list | rofi -dmenu -display-columns 2 -p "Select item to copy" -lines 10 -width 35 -theme lunar-witch | cliphist decode | wl-copy + exec cliphist list | rofi -dmenu -display-columns 2 -p "Select item to copy" -lines 10 -width 35 -theme lunar-witch | cliphist decode | wl-copy # super + shift + v # cb hs $(cb hs | jq '.[] | .content.path? // .content' | rofi -dmenu -format i -theme lunar-witch) super + shift + . - rofi -show emoji -modi emoji -theme lunar-witch | cb + exec rofi -show emoji -modi emoji -theme lunar-witch | cb