From cd934044acabb919e34a1bf3d13719bcb13decdb Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 15 Jul 2023 15:14:21 -0500 Subject: Install .profile separately from .zshenv --- sh/profile | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 sh/profile (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile new file mode 100644 index 0000000..09a81c1 --- /dev/null +++ b/sh/profile @@ -0,0 +1,134 @@ +# Import ENV from system +. /etc/profile +[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh + +# Other XDG paths +export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} +export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} +export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" + +# Doesn't seem to work +export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android +export ANDROID_AVD_HOME="$XDG_DATA_HOME"/android/ +export ANDROID_EMULATOR_HOME="$XDG_DATA_HOME"/android/ +export ADB_VENDOR_KEY="$XDG_CONFIG_HOME"/android + +# Disable files +export LESSHISTFILE=- + +# Fixing Paths +export MBSYNCRC="$XDG_CONFIG_HOME"/isync/mbsyncrc +export ATOM_HOME="$XDG_DATA_HOME"/atom +export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc +export XSERVERRC="$XDG_CONFIG_HOME"/X11/xserverrc +export GEM_SPEC_CACHE="$XDG_DATA_HOME/ruby/specs" +export GEM_HOME="$XDG_DATA_HOME/ruby/gems" +export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc +export GOPATH="$XDG_DATA_HOME"/go +export GNUPGHOME="$XDG_DATA_HOME"/gnupg +export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle +export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages +export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export ZDOTDIR=$HOME/.config/zsh +export CARGO_HOME="$XDG_DATA_HOME"/cargo +export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc +export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug +export WINEROOT="$XDG_DATA_HOME"/wineprefixes +export WINEPREFIX="$WINEROOT"/default +export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket" + +# Scaling +export QT_AUTO_SCREEN_SCALE_FACTOR=0 +export QT_SCALE_FACTOR=1 +export QT_SCREEN_SCALE_FACTORS="1;1;1" +export GDK_SCALE=1 +export GDK_DPI_SCALE=1 + +# Theming +export QT_QPA_PLATFORMTHEME=qt5ct + +# Configure apps +export BEMENU_OPTS="-H 36 --fn \"mononoki Nerd Font Mono 24\" --nb \"#000000\" --nf \"#c5c8c6\" --hb \"#39c1ed\" --hf \"#000000\" --cb \"#000000\" --cf \"#000000\" --tf \"#000000\" --tb \"#39c1ed\" --fb \"#000000\" --ff \"#c5c8c6\" --fbb \"#39c1ed\" --fbf \"#198844\"" + +# Fix wayland stuff +export MOZ_ENABLE_WAYLAND=1 +export XKB_DEFAULT_OPTIONS=caps:escape +export XDG_CURRENT_DESKTOP=Unity + +# Default Apps +export EDITOR="nvim" +export READER="zathura" +export VISUAL="nvim" +export TERMINAL="alacritty" +export BROWSER="browser" +export VIDEO="mpv" +export IMAGE="sxiv" +export OPENER="xdg-open" +export PAGER="less" + +# Modern SDK +export N64_LIBGCCDIR="/opt/crashsdk/lib/gcc/mips64-elf/12.2.0" +export ROOT=/etc/n64 +export BLENDER_3_0="/usr/bin/blender" + +# DIRS +export SRCDIR="$HOME/.local/src" + +# OLD PATH +export SYSPATH="$PATH" + +# NEW PATH +unset PATH +if [ -d "$HOME/.local/bin/testing" ]; then + PATH="$HOME/.local/bin/testing" +fi +if [ -d "$HOME/.local/bin/shortcmds" ]; then + PATH="$PATH:$HOME/.local/bin/shortcmds" +fi +if [ -d "$HOME/.local/bin/generics" ]; then + PATH="$PATH:$HOME/.local/bin/generics" +fi +if [ -d "$HOME/.local/bin/scripts" ]; then + PATH="$PATH:$HOME/.local/bin/scripts" +fi +if [ -d "$HOME/.local/bin/sp" ]; then + PATH="$PATH:$HOME/.local/bin/sp" +fi +if [ -d "$HOME/.local/bin/blocks" ]; then + PATH="$PATH:$HOME/.local/bin/blocks" +fi +if [ -d "$HOME/.local/bin/ignore" ]; then + PATH="$PATH:$HOME/.local/bin/ignore" +fi +if [ -d "$HOME/local/bin/volsv" ]; then + PATH="$PATH:$HOME/.local/volsv" +fi +if [ -d "$HOME/.local/bin" ]; then + PATH="$PATH:$HOME/.local/bin" +fi +if [ -d "$HOME/.local/bin/flatpak-sc" ]; then + PATH="$PATH:$HOME/.local/bin/flatpak-sc" +fi +if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then + PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" +fi +if [ -d "$CARGO_HOME/bin" ]; then + PATH="$PATH:$CARGO_HOME/bin" +fi +if [ -d "$GOPATH/bin" ]; then + PATH="$PATH:$GOPATH/bin" +fi +if [ -d "/var/lib/flatpak/exports/bin" ]; then + PATH="$PATH:/var/lib/flatpak/exports/bin" +fi + +# MERGE PATHS +export PATH="$PATH:$SYSPATH" + +# CLEANUP +unset SYSPATH -- cgit v1.2.3 From dc9907cb8f0e46443e54061f130fa8d65b15a3ce Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 16 Aug 2023 13:16:41 -0500 Subject: Not using bemenu anymore --- sh/profile | 3 --- 1 file changed, 3 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 09a81c1..1174421 100644 --- a/sh/profile +++ b/sh/profile @@ -52,9 +52,6 @@ export GDK_DPI_SCALE=1 # Theming export QT_QPA_PLATFORMTHEME=qt5ct -# Configure apps -export BEMENU_OPTS="-H 36 --fn \"mononoki Nerd Font Mono 24\" --nb \"#000000\" --nf \"#c5c8c6\" --hb \"#39c1ed\" --hf \"#000000\" --cb \"#000000\" --cf \"#000000\" --tf \"#000000\" --tb \"#39c1ed\" --fb \"#000000\" --ff \"#c5c8c6\" --fbb \"#39c1ed\" --fbf \"#198844\"" - # Fix wayland stuff export MOZ_ENABLE_WAYLAND=1 export XKB_DEFAULT_OPTIONS=caps:escape -- cgit v1.2.3 From e7f2de1fc4362673d4cce38441e396e08929c942 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 19 Oct 2023 09:07:03 -0500 Subject: Change shell alias and ENV, set kitty title Adding in lb=lsblk, adding in more XDG dirs, and permanently set kitty title to 'terminal' from zsh. --- sh/aliases | 2 +- sh/profile | 9 +++++++-- zsh/.zshrc | 3 +-- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'sh/profile') diff --git a/sh/aliases b/sh/aliases index 6b254d7..ef9a53b 100644 --- a/sh/aliases +++ b/sh/aliases @@ -24,13 +24,13 @@ esac alias ll='ls -l' alias la='ls -A' alias lla='ls -lA' +alias lb='lsblk' alias md='mkdir -p' alias ch='cd $HOME' #alias nvim='vim' alias nv='nvim' alias v='nvim' -#alias lf='lfrun' ## Change utils alias rm='rm -i' diff --git a/sh/profile b/sh/profile index 1174421..79151b9 100644 --- a/sh/profile +++ b/sh/profile @@ -2,11 +2,17 @@ . /etc/profile [ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh -# Other XDG paths +# Other XDG vars export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +export XDG_CURRENT_DESKTOP="i3" +export XDG_DOCUMENTS_DIR=${HOME}/Documents +export XDG_DOWNLOAD_DIR=${HOME}/Downloads +export XDG_DESKTOP_DIR=${HOME}/Desktop +export XDG_VIDEOS_DIR=${HOME}/Videos + # Doesn't seem to work export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android @@ -55,7 +61,6 @@ export QT_QPA_PLATFORMTHEME=qt5ct # Fix wayland stuff export MOZ_ENABLE_WAYLAND=1 export XKB_DEFAULT_OPTIONS=caps:escape -export XDG_CURRENT_DESKTOP=Unity # Default Apps export EDITOR="nvim" diff --git a/zsh/.zshrc b/zsh/.zshrc index 0c0366f..3314bb3 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -97,5 +97,4 @@ bindkey -- '^[[B' down-line-or-beg [[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete [[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char -#eval "$(starship init zsh)" -type portmaster-start 2>&1 >/dev/null && eval "$(portmaster-start --data=/opt/safing/portmaster completion zsh)" +precmd () {print -Pn "\e]0;terminal\a"} -- cgit v1.2.3 From c599f7ea5d79030fdaae5df120898f5eeaf0559e Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 23 Oct 2023 00:14:52 -0500 Subject: New addtopath function to fix issues with PATH var --- sh/profile | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 79151b9..901c581 100644 --- a/sh/profile +++ b/sh/profile @@ -85,48 +85,56 @@ export SRCDIR="$HOME/.local/src" export SYSPATH="$PATH" # NEW PATH +addtopath () { + if [ -n "$PATH" ]; then + PATH="$@:$PATH" + else + PATH="$@" + fi +} + unset PATH if [ -d "$HOME/.local/bin/testing" ]; then - PATH="$HOME/.local/bin/testing" + addtopath "$HOME/.local/bin/testing" fi if [ -d "$HOME/.local/bin/shortcmds" ]; then - PATH="$PATH:$HOME/.local/bin/shortcmds" + addtopath "$HOME/.local/bin/shortcmds" fi if [ -d "$HOME/.local/bin/generics" ]; then - PATH="$PATH:$HOME/.local/bin/generics" + addtopath "$HOME/.local/bin/generics" fi if [ -d "$HOME/.local/bin/scripts" ]; then - PATH="$PATH:$HOME/.local/bin/scripts" + addtopath "$HOME/.local/bin/scripts" fi if [ -d "$HOME/.local/bin/sp" ]; then - PATH="$PATH:$HOME/.local/bin/sp" + addtopath "$HOME/.local/bin/sp" fi if [ -d "$HOME/.local/bin/blocks" ]; then - PATH="$PATH:$HOME/.local/bin/blocks" + addtopath "$HOME/.local/bin/blocks" fi if [ -d "$HOME/.local/bin/ignore" ]; then - PATH="$PATH:$HOME/.local/bin/ignore" + addtopath "$HOME/.local/bin/ignore" fi if [ -d "$HOME/local/bin/volsv" ]; then - PATH="$PATH:$HOME/.local/volsv" + addtopath "$HOME/.local/volsv" fi if [ -d "$HOME/.local/bin" ]; then - PATH="$PATH:$HOME/.local/bin" + addtopath "$HOME/.local/bin" fi if [ -d "$HOME/.local/bin/flatpak-sc" ]; then - PATH="$PATH:$HOME/.local/bin/flatpak-sc" + addtopath "$HOME/.local/bin/flatpak-sc" fi if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then - PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" + addtopath "$HOME/.local/share/flatpak/exports/bin/" fi if [ -d "$CARGO_HOME/bin" ]; then - PATH="$PATH:$CARGO_HOME/bin" + addtopath "$CARGO_HOME/bin" fi if [ -d "$GOPATH/bin" ]; then - PATH="$PATH:$GOPATH/bin" + addtopath "$GOPATH/bin" fi if [ -d "/var/lib/flatpak/exports/bin" ]; then - PATH="$PATH:/var/lib/flatpak/exports/bin" + addtopath "/var/lib/flatpak/exports/bin" fi # MERGE PATHS -- cgit v1.2.3 From a4413556bfa84121291f687195d53bc21bce0ff1 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 6 Feb 2024 23:30:46 -0600 Subject: sh: fix volsv in PATH volsv was wrong in .profile when setting the path in two different ways. Nice. --- sh/profile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 901c581..33faf7a 100644 --- a/sh/profile +++ b/sh/profile @@ -115,8 +115,8 @@ fi if [ -d "$HOME/.local/bin/ignore" ]; then addtopath "$HOME/.local/bin/ignore" fi -if [ -d "$HOME/local/bin/volsv" ]; then - addtopath "$HOME/.local/volsv" +if [ -d "$HOME/.local/bin/volsv" ]; then + PATH="$PATH:$HOME/.local/bin/volsv" fi if [ -d "$HOME/.local/bin" ]; then addtopath "$HOME/.local/bin" -- cgit v1.2.3 From 7a250319aaa6ca612b8c30f362b6855ae43e410c Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 23 Mar 2024 18:11:04 -0500 Subject: Fix sh not loading xdg user dirs --- sh/profile | 3 ++- zsh/.zshenv | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 33faf7a..c03fc93 100644 --- a/sh/profile +++ b/sh/profile @@ -6,13 +6,14 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +. "$HOME/.config/user-dirs.dirs" export XDG_CURRENT_DESKTOP="i3" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop export XDG_VIDEOS_DIR=${HOME}/Videos +export XDG_DATA_DIRS="${XDG_DATA_DIRS}:$HOME/.nix-profile/share" # Doesn't seem to work export ANDROID_SDK_HOME="$XDG_CONFIG_HOME"/android diff --git a/zsh/.zshenv b/zsh/.zshenv index 286e11a..1740c82 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,3 +1,4 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE +[ -f "$HOME/.profile" ] && . "$HOME/.profile" export ZDOTDIR=$HOME/.config/zsh -- cgit v1.2.3 From 17a1b35c31aa0035f5570312a469d080ff00aefe Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 4 Jun 2024 22:13:12 -0500 Subject: Remove nix from profile; add zvm Removing nix, as using the package manager was an experiment I didn't super get along with. Adding in the Zig Version Manager to manage Zig installations. --- sh/profile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index c03fc93..c37bc48 100644 --- a/sh/profile +++ b/sh/profile @@ -1,8 +1,4 @@ -# Import ENV from system -. /etc/profile -[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh - -# Other XDG vars +# XDG paths export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} @@ -74,6 +70,10 @@ export IMAGE="sxiv" export OPENER="xdg-open" export PAGER="less" +# ZVM +export ZVM_INSTALL="$HOME/.zvm/self" +export ZVMPATH="$HOME/.zvm/bin" + # Modern SDK export N64_LIBGCCDIR="/opt/crashsdk/lib/gcc/mips64-elf/12.2.0" export ROOT=/etc/n64 -- cgit v1.2.3 From 43c7d3b7e65b5ec36a5fe02dcbd3f2694cadeb53 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 4 Jun 2024 22:13:59 -0500 Subject: Fix adding paths to sh profile The previous method was clunky, redundant, and terrible; it is now better, and should not keep adding the same directories into the path when sourcing it over and over. --- sh/profile | 82 ++++++++++++++++++++++---------------------------------------- 1 file changed, 29 insertions(+), 53 deletions(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index c37bc48..07f51f5 100644 --- a/sh/profile +++ b/sh/profile @@ -83,63 +83,39 @@ export BLENDER_3_0="/usr/bin/blender" export SRCDIR="$HOME/.local/src" # OLD PATH -export SYSPATH="$PATH" +export PATHS="$(echo "$PATH" | sed 's/:/\n/g')" +USERPATH="" -# NEW PATH addtopath () { - if [ -n "$PATH" ]; then - PATH="$@:$PATH" - else - PATH="$@" - fi + local USERPATHS="$(echo "$USERPATH" | sed 's/:/\n/g')" + if [ -d "$1" ]; then + echo "$PATHS" | /usr/bin/grep -qE "^$1$" && return + echo "$USERPATHS" | /usr/bin/grep -qE "^$1$" && return + [ -n "$USERPATH" ] && USERPATH="${USERPATH}:" + USERPATH="${USERPATH}$1" + fi } -unset PATH -if [ -d "$HOME/.local/bin/testing" ]; then - addtopath "$HOME/.local/bin/testing" -fi -if [ -d "$HOME/.local/bin/shortcmds" ]; then - addtopath "$HOME/.local/bin/shortcmds" -fi -if [ -d "$HOME/.local/bin/generics" ]; then - addtopath "$HOME/.local/bin/generics" -fi -if [ -d "$HOME/.local/bin/scripts" ]; then - addtopath "$HOME/.local/bin/scripts" -fi -if [ -d "$HOME/.local/bin/sp" ]; then - addtopath "$HOME/.local/bin/sp" -fi -if [ -d "$HOME/.local/bin/blocks" ]; then - addtopath "$HOME/.local/bin/blocks" -fi -if [ -d "$HOME/.local/bin/ignore" ]; then - addtopath "$HOME/.local/bin/ignore" -fi -if [ -d "$HOME/.local/bin/volsv" ]; then - PATH="$PATH:$HOME/.local/bin/volsv" -fi -if [ -d "$HOME/.local/bin" ]; then - addtopath "$HOME/.local/bin" -fi -if [ -d "$HOME/.local/bin/flatpak-sc" ]; then - addtopath "$HOME/.local/bin/flatpak-sc" -fi -if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then - addtopath "$HOME/.local/share/flatpak/exports/bin/" -fi -if [ -d "$CARGO_HOME/bin" ]; then - addtopath "$CARGO_HOME/bin" -fi -if [ -d "$GOPATH/bin" ]; then - addtopath "$GOPATH/bin" -fi -if [ -d "/var/lib/flatpak/exports/bin" ]; then - addtopath "/var/lib/flatpak/exports/bin" -fi +addtopath "$HOME/.local/bin/testing" +addtopath "$HOME/.local/bin/shortcmds" +addtopath "$HOME/.local/bin/generics" +addtopath "$HOME/.local/bin/scripts" +addtopath "$HOME/.local/bin/sp" +addtopath "$HOME/.local/bin/blocks" +addtopath "$HOME/.local/bin/ignore" +addtopath "$HOME/.local/bin/volsv" +addtopath "$HOME/.local/bin" +addtopath "$HOME/.local/bin/flatpak-sc" +addtopath "$HOME/.local/share/flatpak/exports/bin/" +addtopath "$CARGO_HOME/bin" +addtopath "$GOPATH/bin" +addtopath "$ZVMPATH" +addtopath "$ZVM_INSTALL" +addtopath "/var/lib/flatpak/exports/bin" # MERGE PATHS -export PATH="$PATH:$SYSPATH" +[ -n "$USERPATH" ] && export PATH="$USERPATH:$PATH" -# CLEANUP -unset SYSPATH +unset -f addtopath +unset USERPATH +unset PATHS -- cgit v1.2.3 From 2ee05bfac4735a99c29d67562b496232153d1f34 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 4 Jun 2024 23:27:28 -0500 Subject: Add # NEW PATH comment to sh profile The barest of documentation --- sh/profile | 1 + 1 file changed, 1 insertion(+) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 07f51f5..e5c38b2 100644 --- a/sh/profile +++ b/sh/profile @@ -96,6 +96,7 @@ addtopath () { fi } +# NEW PATH addtopath "$HOME/.local/bin/testing" addtopath "$HOME/.local/bin/shortcmds" addtopath "$HOME/.local/bin/generics" -- cgit v1.2.3 From f7175b21a3a6cc6965b0ea77e7c47535ce83beec Mon Sep 17 00:00:00 2001 From: zachir Date: Wed, 5 Jun 2024 09:09:47 -0500 Subject: Add better/more XDG support Implements XDG support for more programs that support it, in various levels of hackiness. --- .gitignore | 4 + X11/Xresources | 495 ----------------------------------------------------- X11/xresources | 495 +++++++++++++++++++++++++++++++++++++++++++++++++++++ autostart.sh | 2 +- hypr/hyprland.conf | 2 +- sh/aliases | 3 + sh/profile | 7 + zsh/.zshenv | 4 +- 8 files changed, 513 insertions(+), 499 deletions(-) delete mode 100644 X11/Xresources create mode 100644 X11/xresources (limited to 'sh/profile') diff --git a/.gitignore b/.gitignore index 76e77d4..522e3d0 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ galculator/ gamescope/ ghb/ GIMP/ +git/ glib-2.0/ gnome-control-center/ gnome-initial-setup-done @@ -222,6 +223,7 @@ solaar/ spotifyd/ spotify-tui/ straw-viewer/ +subversion/ SUPERHOT/ switcher/ syncthing/ @@ -248,6 +250,8 @@ unity3d/ Valve Corporation/ vdirsyncer/ VeraCrypt/ +vim/ +!vim/vimrc VirtualBox/ vlc/vlc-qt-interface.conf waybar/config-dwl-* diff --git a/X11/Xresources b/X11/Xresources deleted file mode 100644 index d5c4550..0000000 --- a/X11/Xresources +++ /dev/null @@ -1,495 +0,0 @@ -!! dmenu - -dmenu.font: mononoki Nerd Font Mono:size=24 - -!! dwm - -dwm.normbgcolor: #000000 -dwm.normbordercolor: #1b1d1c -dwm.normfgcolor: #ffffff -dwm.selbgcolor: #198844 -dwm.selbordercolor: #198844 -dwm.selfgcolor: #ffffff -dwm.urgfgcolor: #ffffff -dwm.urgbordercolor: #198844 -dwm.urgbgcolor: #cc342b -dwm.borderpx: 3 -dwm.gappx: 6 -dwm.snap: 32 -dwm.showbar: 1 -dwm.topbar: 1 -dwm.nmaster: 1 -dwm.resizehints: 1 -dwm.mfact: 0.50 - -!! st - -! These options only take effect on startup. -st.termname: st-256color -! if you do not set shell, precedence is: -e arg, utmp option, SHELL env var, /etc/passwd shell -st.shell: /usr/bin/tmux - -! The following options options can be reloaded via USR1 signal. -!st.font: mononoki Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; -!st.font2: Symbola:pixelsize=12:antialias=true:autohint=true; -st.borderpx: 3 -! st alpha -st.alpha: 0.8 -st.alphaUnfocused: 0.8 -! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions) -st.cursorshape: 6 -! thickness of underline and bar cursors -st.cursorthickness: 2 -! 0: normal blinking, 1: leave cursor border and blink with cursor''s background -st.cursorblinkstyle: 0 -! 0: cursor blinks with a constant interval; 1: blinking cycle resets on key input -st.cursorblinkontype: 1 -! st.bold_font: 0 -st.xfps: 120 -st.actionfps: 60 -! Amount of lines scrolled -st.mouseScrollLines: 1 -! Kerning / character bounding-box height multiplier -st.chscale: 1.0 -! Kerning / character bounding-box width multiplier -st.cwscale: 1.0 -! blinking timeout for terminal and cursor blinking (0 disables) -st.blinktimeout: 800 -! bell volume. Value between -100 and 100. (0 disables) -st.bellvolume: 0 -! this is a char that is exposed like so: `printf '\033[z'` -st.prompt_char: $ -! This option is can be preedit style. Available values: `root` `overthespot` (Default taken `root`) -st.imstyle: root -! This option sets the number of spaces for a tab -st.tabspaces: 2 - -!! RXVT-Unicode (urxvt) config -! do not scroll with output -URxvt.scrollTtyOutput: false -! scroll in relation to buffer (with mouse scroll or Shift+Page Up) -URxvt.scrollWithBuffer: true -! scroll back to the bottom on keypress -URxvt.scrollTtyKeypress: true -! disable scrollback buffer for secondary screen -URxvt.secondaryScreen: 1 -URxvt.secondaryScroll: 0 -URxvt.secondaryWheel: 1 -! URxvt font -URxvt.font: xft:Fira Code:regular:size=8,xft:symbola:regular:size=9 -! fix font spacing -URxvt.letterSpace: -1 -! Disable printing -URxvt.print-pipe: "cat > /dev/null" -! disable iso14755 -URxvt.iso14755: false -URxvt.iso14755_52: false -! enable transparency -URxvt.depth: 32 -URxvt.background: rgba:0000/0000/0200/c800 -! disable scrollbar -URxvt.scrollBar: false - -!! perls -! perls -URxvt.perl-ext: default,url-select,tabbed,resize-font,clipboard -! clipboard -URxvt.clipboard.autocopy: true -URxvt.keysym.Shift-Control-C: perl:clipboard:copy -URxvt.keysym.Shift-Control-V: perl:clipboard:paste -! url-select -URxvt.keysum.M-u: perl:url-select:select-next -URxvt.url-select.launcher: /usr/bin/xdg-open -URxvt.url-select.underline: true -! tabbed -URxvt.tabbed.tabbar-fg: 2 -URxvt.tabbed.tabbar-bg: 0 -URxvt.tabbed.tab-fg: 3 -URxvt.tabbed.tab-bg: 0 -! resize-font -URxvt.keysym.C-Minus: resize-font:smaller -URxvt.keysym.C-Plus: resize-font:bigger - -! "Enabled modi" Set from: Default -rofi.modi: window,run,ssh,drun.5 -! "Window width" Set from: Default -rofi.width: 1366 -! "Number of lines" Set from: Default -! rofi.lines: 15 -! "Number of columns" Set from: Default -! rofi.columns: 1 -! "Font to use" Set from: Default -rofi.font: mononoki 9 -! "Border width" Set from: Default -! rofi.bw: 1 -! "Location on screen" Set from: Default -rofi.location: 2 -! "Padding" Set from: Default -! rofi.padding: 5 -! "Y-offset relative to location" Set from: Default -! rofi.yoffset: 0 -! "X-offset relative to location" Set from: Default -! rofi.xoffset: 0 -! "Always show number of lines" Set from: Default -! rofi.fixed-num-lines: true -! "Whether to load and show icons" Set from: Default -! rofi.show-icons: false -! "Terminal to use" Set from: Default -! rofi.terminal: rofi-sensible-terminal -! "Ssh client to use" Set from: Default -! rofi.ssh-client: ssh -! "Ssh command to execute" Set from: Default -! rofi.ssh-command: {terminal} -e {ssh-client} {host} [-p {port}] -! "Run command to execute" Set from: Default -! rofi.run-command: {cmd} -! "Command to get extra run targets" Set from: Default -! rofi.run-list-command: -! "Run command to execute that runs in shell" Set from: Default -! rofi.run-shell-command: {terminal} -e {cmd} -! "Command to executed when -kb-accept-alt binding is hit on selected window " Set from: Default -! rofi.window-command: wmctrl -i -R {window} -! "Window fields to match in window mode" Set from: Default -! rofi.window-match-fields: all -! "Theme to use to look for icons" Set from: Default -! rofi.icon-theme: -! "Desktop entry fields to match in drun" Set from: Default -! rofi.drun-match-fields: name,generic,exec,categories,keywords -! "Only show Desktop entry from these categories" Set from: Default -! rofi.drun-categories: -! "Desktop entry show actions." Set from: Default -! rofi.drun-show-actions: false -! "DRUN format string. (Supports: generic,name,comment,exec,categories)" Set from: Default -! rofi.drun-display-format: {name} [({generic})] -! "Command to open an Desktop Entry that is a Link." Set from: Default -! rofi.drun-url-launcher: xdg-open -! "Disable history in run/ssh" Set from: Default -! rofi.disable-history: false -! "Programs ignored for history" Set from: Default -! rofi.ignored-prefixes: -! "Use sorting" Set from: Default -! rofi.sort: false -! "Choose the strategy used for sorting: normal (levenshtein) or fzf." Set from: Default -! rofi.sorting-method: normal -! "Set case-sensitivity" Set from: Default -! rofi.case-sensitive: false -! "Cycle through the results list" Set from: Default -! rofi.cycle: true -! "Enable sidebar-mode" Set from: Default -! rofi.sidebar-mode: false -! "Row height (in chars)" Set from: Default -! rofi.eh: 1 -! "Enable auto select mode" Set from: Default -! rofi.auto-select: false -! "Parse hosts file for ssh mode" Set from: Default -! rofi.parse-hosts: false -! "Parse known_hosts file for ssh mode" Set from: Default -! rofi.parse-known-hosts: true -! "Set the modi to combine in combi mode" Set from: Default -! rofi.combi-modi: window,run -! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default -! rofi.matching: normal -! "Tokenize input string" Set from: Default -! rofi.tokenize: true -! "Monitor id to show on" Set from: Default -! rofi.m: -5 -! "Margin between rows *DEPRECATED*" Set from: Default -! rofi.line-margin: 2 -! "Padding within rows *DEPRECATED*" Set from: Default -! rofi.line-padding: 1 -! "Pre-set filter" Set from: Default -! rofi.filter: -! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default -! rofi.separator-style: dash -! "Hide scroll-bar *DEPRECATED*" Set from: Default -! rofi.hide-scrollbar: false -! "Fullscreen" Set from: Default -! rofi.fullscreen: false -! "Fake transparency *DEPRECATED*" Set from: Default -! rofi.fake-transparency: false -! "DPI" Set from: Default -! rofi.dpi: -1 -! "Threads to use for string matching" Set from: Default -! rofi.threads: 0 -! "Scrollbar width *DEPRECATED*" Set from: Default -! rofi.scrollbar-width: 8 -! "Scrolling method. (0: Page, 1: Centered)" Set from: Default -! rofi.scroll-method: 0 -! "Background to use for fake transparency. (background or screenshot) *DEPRECATED*" Set from: Default -! rofi.fake-background: screenshot -! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default -! rofi.window-format: {w} {c} {t} -! "Click outside the window to exit" Set from: Default -! rofi.click-to-exit: true -! "Indicate how it match by underlining it." Set from: Default -! rofi.show-match: true -! "New style theme file" Set from: Default -! rofi.theme: -! "Color scheme for normal row" Set from: Default -! 'bg' 'fg' 'bgalt' 'hlbg' 'hlfg' -rofi.color-normal: #000000, #b4b7b5, #89231d, #cc342b, #000000 -! "Color scheme for urgent row" Set from: Default -! rofi.color-urgent: -! "Color scheme for active row" Set from: Default -! rofi.color-active: -! "Color scheme window" Set from: Default -! 'background' 'border' 'separator' -rofi.color-window: #1d1f21, #101010, #000000 -! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default -! rofi.max-history-size: 25 -! "Hide the prefix mode prefix on the combi view." Set from: Default -! rofi.combi-hide-mode-prefix: false -! "Set the character used to negate the matching. ('\0' to disable)" Set from: Default -! rofi.matching-negate-char: - -! "Directory where history and temporary files are stored." Set from: Default -! rofi.cache-dir: -! "Show window thumbnail (if available) as icon in window switcher." Set from: Default -! rofi.window-thumbnail: false -! "DRUN: build and use a cache with desktop file content." Set from: Default -! rofi.drun-use-desktop-cache: false -! "DRUN: If enabled, reload the cache with desktop file content." Set from: Default -! rofi.drun-reload-desktop-cache: false -! "Normalize string when matching (implies -no-show-match)." Set from: Default -! rofi.normalize-match: false -! "Pidfile location" Set from: Default -! rofi.pid: /run/user/1000/rofi.pid -! "The display name of this browser" Set from: Default -! rofi.display-window: -! "The display name of this browser" Set from: Default -! rofi.display-windowcd: -! "The display name of this browser" Set from: Default -! rofi.display-run: -! "The display name of this browser" Set from: Default -! rofi.display-ssh: -! "The display name of this browser" Set from: Default -! rofi.display-drun: -! "The display name of this browser" Set from: Default -! rofi.display-combi: -! "The display name of this browser" Set from: Default -! rofi.display-keys: -! "The display name of this browser" Set from: Default -! rofi.display-file-browser: -! "Paste primary selection" Set from: Default -! rofi.kb-primary-paste: Control+V,Shift+Insert -! "Paste clipboard" Set from: Default -! rofi.kb-secondary-paste: Control+v,Insert -! "Clear input line" Set from: Default -! rofi.kb-clear-line: Control+w -! "Beginning of line" Set from: Default -! rofi.kb-move-front: Control+a -! "End of line" Set from: Default -! rofi.kb-move-end: Control+e -! "Move back one word" Set from: Default -! rofi.kb-move-word-back: Alt+b,Control+Left -! "Move forward one word" Set from: Default -! rofi.kb-move-word-forward: Alt+f,Control+Right -! "Move back one char" Set from: Default -! rofi.kb-move-char-back: Left,Control+b -! "Move forward one char" Set from: Default -! rofi.kb-move-char-forward: Right,Control+f -! "Delete previous word" Set from: Default -! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace -! "Delete next word" Set from: Default -! rofi.kb-remove-word-forward: Control+Alt+d -! "Delete next char" Set from: Default -! rofi.kb-remove-char-forward: Delete,Control+d -! "Delete previous char" Set from: Default -! rofi.kb-remove-char-back: BackSpace,Shift+BackSpace,Control+h -! "Delete till the end of line" Set from: Default -! rofi.kb-remove-to-eol: Control+k -! "Delete till the start of line" Set from: Default -! rofi.kb-remove-to-sol: Control+u -! "Accept entry" Set from: Default -! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter -! "Use entered text as command (in ssh/run modi)" Set from: Default -! rofi.kb-accept-custom: Control+Return -! "Use alternate accept command." Set from: Default -! rofi.kb-accept-alt: Shift+Return -! "Delete entry from history" Set from: Default -! rofi.kb-delete-entry: Shift+Delete -! "Switch to the next mode." Set from: Default -! rofi.kb-mode-next: Shift+Right,Control+Tab -! "Switch to the previous mode." Set from: Default -! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab -! "Go to the previous column" Set from: Default -! rofi.kb-row-left: Control+Page_Up -! "Go to the next column" Set from: Default -! rofi.kb-row-right: Control+Page_Down -! "Select previous entry" Set from: Default -! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab -! "Select next entry" Set from: Default -! rofi.kb-row-down: Down,Control+n -! "Go to next row, if one left, accept it, if no left next mode." Set from: Default -! rofi.kb-row-tab: Tab -! "Go to the previous page" Set from: Default -! rofi.kb-page-prev: Page_Up -! "Go to the next page" Set from: Default -! rofi.kb-page-next: Page_Down -! "Go to the first entry" Set from: Default -! rofi.kb-row-first: Home,KP_Home -! "Go to the last entry" Set from: Default -! rofi.kb-row-last: End,KP_End -! "Set selected item as input text" Set from: Default -! rofi.kb-row-select: Control+space -! "Take a screenshot of the rofi window" Set from: Default -! rofi.kb-screenshot: Alt+S -! "Toggle between ellipsize modes for displayed data" Set from: Default -! rofi.kb-ellipsize: Alt+period -! "Toggle case sensitivity" Set from: Default -! rofi.kb-toggle-case-sensitivity: grave,dead_grave -! "Toggle sort" Set from: Default -! rofi.kb-toggle-sort: Alt+grave -! "Quit rofi" Set from: Default -! rofi.kb-cancel: Escape,Control+g,Control+bracketleft -! "Custom keybinding 1" Set from: Default -! rofi.kb-custom-1: Alt+1 -! "Custom keybinding 2" Set from: Default -! rofi.kb-custom-2: Alt+2 -! "Custom keybinding 3" Set from: Default -! rofi.kb-custom-3: Alt+3 -! "Custom keybinding 4" Set from: Default -! rofi.kb-custom-4: Alt+4 -! "Custom Keybinding 5" Set from: Default -! rofi.kb-custom-5: Alt+5 -! "Custom keybinding 6" Set from: Default -! rofi.kb-custom-6: Alt+6 -! "Custom Keybinding 7" Set from: Default -! rofi.kb-custom-7: Alt+7 -! "Custom keybinding 8" Set from: Default -! rofi.kb-custom-8: Alt+8 -! "Custom keybinding 9" Set from: Default -! rofi.kb-custom-9: Alt+9 -! "Custom keybinding 10" Set from: Default -! rofi.kb-custom-10: Alt+0 -! "Custom keybinding 11" Set from: Default -! rofi.kb-custom-11: Alt+exclam -! "Custom keybinding 12" Set from: Default -! rofi.kb-custom-12: Alt+at -! "Custom keybinding 13" Set from: Default -! rofi.kb-custom-13: Alt+numbersign -! "Custom keybinding 14" Set from: Default -! rofi.kb-custom-14: Alt+dollar -! "Custom keybinding 15" Set from: Default -! rofi.kb-custom-15: Alt+percent -! "Custom keybinding 16" Set from: Default -! rofi.kb-custom-16: Alt+dead_circumflex -! "Custom keybinding 17" Set from: Default -! rofi.kb-custom-17: Alt+ampersand -! "Custom keybinding 18" Set from: Default -! rofi.kb-custom-18: Alt+asterisk -! "Custom Keybinding 19" Set from: Default -! rofi.kb-custom-19: Alt+parenleft -! "Select row 1" Set from: Default -! rofi.kb-select-1: Super+1 -! "Select row 2" Set from: Default -! rofi.kb-select-2: Super+2 -! "Select row 3" Set from: Default -! rofi.kb-select-3: Super+3 -! "Select row 4" Set from: Default -! rofi.kb-select-4: Super+4 -! "Select row 5" Set from: Default -! rofi.kb-select-5: Super+5 -! "Select row 6" Set from: Default -! rofi.kb-select-6: Super+6 -! "Select row 7" Set from: Default -! rofi.kb-select-7: Super+7 -! "Select row 8" Set from: Default -! rofi.kb-select-8: Super+8 -! "Select row 9" Set from: Default -! rofi.kb-select-9: Super+9 -! "Select row 10" Set from: Default -! rofi.kb-select-10: Super+0 -! "Go to the previous column" Set from: Default -! rofi.ml-row-left: ScrollLeft -! "Go to the next column" Set from: Default -! rofi.ml-row-right: ScrollRight -! "Select previous entry" Set from: Default -! rofi.ml-row-up: ScrollUp -! "Select next entry" Set from: Default -! rofi.ml-row-down: ScrollDown -! "Select hovered row" Set from: Default -! rofi.me-select-entry: MousePrimary -! "Accept hovered row" Set from: Default -! rofi.me-accept-entry: MouseDPrimary -! "Accept hovered row with custom action" Set from: Default -! rofi.me-accept-custom: Control+MouseDPrimary - -!! special -!*.foreground: #c5c8c6 -!*.background: #1d1f21 -!*.cursorColor: #c5c8c6 -! -!! black -!*.color0: #282a2e -!*.color8: #373b41 -! -!! red -!*.color1: #a54242 -!*.color9: #cc6666 -! -!! green -!*.color2: #8c9440 -!*.color10: #b5bd68 -! -!! yellow -!*.color3: #de935f -!*.color11: #f0c674 -! -!! blue -!*.color4: #5f819d -!*.color12: #81a2be -! -!! magenta -!*.color5: #85678f -!*.color13: #b294bb -! -!! cyan -!*.color6: #5e8d87 -!*.color14: #8abeb7 -! -!! white -!*.color7: #707880 -!*.color15: #c5c8c6 -! -!! special -*.foreground: #c5c8c6 -*.background: #000000 -*.cursorColor: #c5c8c6 -*.reverseCursor: #333536 -dmenu.selbackground: #39c1ed -dmenu.selforeground: #000000 -dmenu.hibackground: #000000 -dmenu.hiforeground: #198844 -dmenu.selhibackground: #39c1ed -dmenu.selhiforeground: #198844 - -! black -*.color0: #1b1d1c -*.color8: #969896 - -! red -*.color1: #89231d -*.color9: #cc342b - -! green -*.color2: #198844 -*.color10: #4eec4e - -! yellow -*.color3: #ae7518 -*.color11: #fba922 - -! blue -*.color4: #2b55b2 -*.color12: #3971ed - -! magenta -*.color5: #784e93 -*.color13: #a36ac7 - -! cyan -*.color6: #2783a1 -*.color14: #39c1ed - -! white -*.color7: #b4b7b5 -*.color15: #ffffff diff --git a/X11/xresources b/X11/xresources new file mode 100644 index 0000000..d5c4550 --- /dev/null +++ b/X11/xresources @@ -0,0 +1,495 @@ +!! dmenu + +dmenu.font: mononoki Nerd Font Mono:size=24 + +!! dwm + +dwm.normbgcolor: #000000 +dwm.normbordercolor: #1b1d1c +dwm.normfgcolor: #ffffff +dwm.selbgcolor: #198844 +dwm.selbordercolor: #198844 +dwm.selfgcolor: #ffffff +dwm.urgfgcolor: #ffffff +dwm.urgbordercolor: #198844 +dwm.urgbgcolor: #cc342b +dwm.borderpx: 3 +dwm.gappx: 6 +dwm.snap: 32 +dwm.showbar: 1 +dwm.topbar: 1 +dwm.nmaster: 1 +dwm.resizehints: 1 +dwm.mfact: 0.50 + +!! st + +! These options only take effect on startup. +st.termname: st-256color +! if you do not set shell, precedence is: -e arg, utmp option, SHELL env var, /etc/passwd shell +st.shell: /usr/bin/tmux + +! The following options options can be reloaded via USR1 signal. +!st.font: mononoki Nerd Font Mono:pixelsize=12:antialias=true:autohint=true; +!st.font2: Symbola:pixelsize=12:antialias=true:autohint=true; +st.borderpx: 3 +! st alpha +st.alpha: 0.8 +st.alphaUnfocused: 0.8 +! Available cursor values: 2 4 6 7 = █ _ | ☃ ( 1 3 5 are blinking versions) +st.cursorshape: 6 +! thickness of underline and bar cursors +st.cursorthickness: 2 +! 0: normal blinking, 1: leave cursor border and blink with cursor''s background +st.cursorblinkstyle: 0 +! 0: cursor blinks with a constant interval; 1: blinking cycle resets on key input +st.cursorblinkontype: 1 +! st.bold_font: 0 +st.xfps: 120 +st.actionfps: 60 +! Amount of lines scrolled +st.mouseScrollLines: 1 +! Kerning / character bounding-box height multiplier +st.chscale: 1.0 +! Kerning / character bounding-box width multiplier +st.cwscale: 1.0 +! blinking timeout for terminal and cursor blinking (0 disables) +st.blinktimeout: 800 +! bell volume. Value between -100 and 100. (0 disables) +st.bellvolume: 0 +! this is a char that is exposed like so: `printf '\033[z'` +st.prompt_char: $ +! This option is can be preedit style. Available values: `root` `overthespot` (Default taken `root`) +st.imstyle: root +! This option sets the number of spaces for a tab +st.tabspaces: 2 + +!! RXVT-Unicode (urxvt) config +! do not scroll with output +URxvt.scrollTtyOutput: false +! scroll in relation to buffer (with mouse scroll or Shift+Page Up) +URxvt.scrollWithBuffer: true +! scroll back to the bottom on keypress +URxvt.scrollTtyKeypress: true +! disable scrollback buffer for secondary screen +URxvt.secondaryScreen: 1 +URxvt.secondaryScroll: 0 +URxvt.secondaryWheel: 1 +! URxvt font +URxvt.font: xft:Fira Code:regular:size=8,xft:symbola:regular:size=9 +! fix font spacing +URxvt.letterSpace: -1 +! Disable printing +URxvt.print-pipe: "cat > /dev/null" +! disable iso14755 +URxvt.iso14755: false +URxvt.iso14755_52: false +! enable transparency +URxvt.depth: 32 +URxvt.background: rgba:0000/0000/0200/c800 +! disable scrollbar +URxvt.scrollBar: false + +!! perls +! perls +URxvt.perl-ext: default,url-select,tabbed,resize-font,clipboard +! clipboard +URxvt.clipboard.autocopy: true +URxvt.keysym.Shift-Control-C: perl:clipboard:copy +URxvt.keysym.Shift-Control-V: perl:clipboard:paste +! url-select +URxvt.keysum.M-u: perl:url-select:select-next +URxvt.url-select.launcher: /usr/bin/xdg-open +URxvt.url-select.underline: true +! tabbed +URxvt.tabbed.tabbar-fg: 2 +URxvt.tabbed.tabbar-bg: 0 +URxvt.tabbed.tab-fg: 3 +URxvt.tabbed.tab-bg: 0 +! resize-font +URxvt.keysym.C-Minus: resize-font:smaller +URxvt.keysym.C-Plus: resize-font:bigger + +! "Enabled modi" Set from: Default +rofi.modi: window,run,ssh,drun.5 +! "Window width" Set from: Default +rofi.width: 1366 +! "Number of lines" Set from: Default +! rofi.lines: 15 +! "Number of columns" Set from: Default +! rofi.columns: 1 +! "Font to use" Set from: Default +rofi.font: mononoki 9 +! "Border width" Set from: Default +! rofi.bw: 1 +! "Location on screen" Set from: Default +rofi.location: 2 +! "Padding" Set from: Default +! rofi.padding: 5 +! "Y-offset relative to location" Set from: Default +! rofi.yoffset: 0 +! "X-offset relative to location" Set from: Default +! rofi.xoffset: 0 +! "Always show number of lines" Set from: Default +! rofi.fixed-num-lines: true +! "Whether to load and show icons" Set from: Default +! rofi.show-icons: false +! "Terminal to use" Set from: Default +! rofi.terminal: rofi-sensible-terminal +! "Ssh client to use" Set from: Default +! rofi.ssh-client: ssh +! "Ssh command to execute" Set from: Default +! rofi.ssh-command: {terminal} -e {ssh-client} {host} [-p {port}] +! "Run command to execute" Set from: Default +! rofi.run-command: {cmd} +! "Command to get extra run targets" Set from: Default +! rofi.run-list-command: +! "Run command to execute that runs in shell" Set from: Default +! rofi.run-shell-command: {terminal} -e {cmd} +! "Command to executed when -kb-accept-alt binding is hit on selected window " Set from: Default +! rofi.window-command: wmctrl -i -R {window} +! "Window fields to match in window mode" Set from: Default +! rofi.window-match-fields: all +! "Theme to use to look for icons" Set from: Default +! rofi.icon-theme: +! "Desktop entry fields to match in drun" Set from: Default +! rofi.drun-match-fields: name,generic,exec,categories,keywords +! "Only show Desktop entry from these categories" Set from: Default +! rofi.drun-categories: +! "Desktop entry show actions." Set from: Default +! rofi.drun-show-actions: false +! "DRUN format string. (Supports: generic,name,comment,exec,categories)" Set from: Default +! rofi.drun-display-format: {name} [({generic})] +! "Command to open an Desktop Entry that is a Link." Set from: Default +! rofi.drun-url-launcher: xdg-open +! "Disable history in run/ssh" Set from: Default +! rofi.disable-history: false +! "Programs ignored for history" Set from: Default +! rofi.ignored-prefixes: +! "Use sorting" Set from: Default +! rofi.sort: false +! "Choose the strategy used for sorting: normal (levenshtein) or fzf." Set from: Default +! rofi.sorting-method: normal +! "Set case-sensitivity" Set from: Default +! rofi.case-sensitive: false +! "Cycle through the results list" Set from: Default +! rofi.cycle: true +! "Enable sidebar-mode" Set from: Default +! rofi.sidebar-mode: false +! "Row height (in chars)" Set from: Default +! rofi.eh: 1 +! "Enable auto select mode" Set from: Default +! rofi.auto-select: false +! "Parse hosts file for ssh mode" Set from: Default +! rofi.parse-hosts: false +! "Parse known_hosts file for ssh mode" Set from: Default +! rofi.parse-known-hosts: true +! "Set the modi to combine in combi mode" Set from: Default +! rofi.combi-modi: window,run +! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Default +! rofi.matching: normal +! "Tokenize input string" Set from: Default +! rofi.tokenize: true +! "Monitor id to show on" Set from: Default +! rofi.m: -5 +! "Margin between rows *DEPRECATED*" Set from: Default +! rofi.line-margin: 2 +! "Padding within rows *DEPRECATED*" Set from: Default +! rofi.line-padding: 1 +! "Pre-set filter" Set from: Default +! rofi.filter: +! "Separator style (none, dash, solid) *DEPRECATED*" Set from: Default +! rofi.separator-style: dash +! "Hide scroll-bar *DEPRECATED*" Set from: Default +! rofi.hide-scrollbar: false +! "Fullscreen" Set from: Default +! rofi.fullscreen: false +! "Fake transparency *DEPRECATED*" Set from: Default +! rofi.fake-transparency: false +! "DPI" Set from: Default +! rofi.dpi: -1 +! "Threads to use for string matching" Set from: Default +! rofi.threads: 0 +! "Scrollbar width *DEPRECATED*" Set from: Default +! rofi.scrollbar-width: 8 +! "Scrolling method. (0: Page, 1: Centered)" Set from: Default +! rofi.scroll-method: 0 +! "Background to use for fake transparency. (background or screenshot) *DEPRECATED*" Set from: Default +! rofi.fake-background: screenshot +! "Window Format. w (desktop name), t (title), n (name), r (role), c (class)" Set from: Default +! rofi.window-format: {w} {c} {t} +! "Click outside the window to exit" Set from: Default +! rofi.click-to-exit: true +! "Indicate how it match by underlining it." Set from: Default +! rofi.show-match: true +! "New style theme file" Set from: Default +! rofi.theme: +! "Color scheme for normal row" Set from: Default +! 'bg' 'fg' 'bgalt' 'hlbg' 'hlfg' +rofi.color-normal: #000000, #b4b7b5, #89231d, #cc342b, #000000 +! "Color scheme for urgent row" Set from: Default +! rofi.color-urgent: +! "Color scheme for active row" Set from: Default +! rofi.color-active: +! "Color scheme window" Set from: Default +! 'background' 'border' 'separator' +rofi.color-window: #1d1f21, #101010, #000000 +! "Max history size (WARNING: can cause slowdowns when set to high)." Set from: Default +! rofi.max-history-size: 25 +! "Hide the prefix mode prefix on the combi view." Set from: Default +! rofi.combi-hide-mode-prefix: false +! "Set the character used to negate the matching. ('\0' to disable)" Set from: Default +! rofi.matching-negate-char: - +! "Directory where history and temporary files are stored." Set from: Default +! rofi.cache-dir: +! "Show window thumbnail (if available) as icon in window switcher." Set from: Default +! rofi.window-thumbnail: false +! "DRUN: build and use a cache with desktop file content." Set from: Default +! rofi.drun-use-desktop-cache: false +! "DRUN: If enabled, reload the cache with desktop file content." Set from: Default +! rofi.drun-reload-desktop-cache: false +! "Normalize string when matching (implies -no-show-match)." Set from: Default +! rofi.normalize-match: false +! "Pidfile location" Set from: Default +! rofi.pid: /run/user/1000/rofi.pid +! "The display name of this browser" Set from: Default +! rofi.display-window: +! "The display name of this browser" Set from: Default +! rofi.display-windowcd: +! "The display name of this browser" Set from: Default +! rofi.display-run: +! "The display name of this browser" Set from: Default +! rofi.display-ssh: +! "The display name of this browser" Set from: Default +! rofi.display-drun: +! "The display name of this browser" Set from: Default +! rofi.display-combi: +! "The display name of this browser" Set from: Default +! rofi.display-keys: +! "The display name of this browser" Set from: Default +! rofi.display-file-browser: +! "Paste primary selection" Set from: Default +! rofi.kb-primary-paste: Control+V,Shift+Insert +! "Paste clipboard" Set from: Default +! rofi.kb-secondary-paste: Control+v,Insert +! "Clear input line" Set from: Default +! rofi.kb-clear-line: Control+w +! "Beginning of line" Set from: Default +! rofi.kb-move-front: Control+a +! "End of line" Set from: Default +! rofi.kb-move-end: Control+e +! "Move back one word" Set from: Default +! rofi.kb-move-word-back: Alt+b,Control+Left +! "Move forward one word" Set from: Default +! rofi.kb-move-word-forward: Alt+f,Control+Right +! "Move back one char" Set from: Default +! rofi.kb-move-char-back: Left,Control+b +! "Move forward one char" Set from: Default +! rofi.kb-move-char-forward: Right,Control+f +! "Delete previous word" Set from: Default +! rofi.kb-remove-word-back: Control+Alt+h,Control+BackSpace +! "Delete next word" Set from: Default +! rofi.kb-remove-word-forward: Control+Alt+d +! "Delete next char" Set from: Default +! rofi.kb-remove-char-forward: Delete,Control+d +! "Delete previous char" Set from: Default +! rofi.kb-remove-char-back: BackSpace,Shift+BackSpace,Control+h +! "Delete till the end of line" Set from: Default +! rofi.kb-remove-to-eol: Control+k +! "Delete till the start of line" Set from: Default +! rofi.kb-remove-to-sol: Control+u +! "Accept entry" Set from: Default +! rofi.kb-accept-entry: Control+j,Control+m,Return,KP_Enter +! "Use entered text as command (in ssh/run modi)" Set from: Default +! rofi.kb-accept-custom: Control+Return +! "Use alternate accept command." Set from: Default +! rofi.kb-accept-alt: Shift+Return +! "Delete entry from history" Set from: Default +! rofi.kb-delete-entry: Shift+Delete +! "Switch to the next mode." Set from: Default +! rofi.kb-mode-next: Shift+Right,Control+Tab +! "Switch to the previous mode." Set from: Default +! rofi.kb-mode-previous: Shift+Left,Control+ISO_Left_Tab +! "Go to the previous column" Set from: Default +! rofi.kb-row-left: Control+Page_Up +! "Go to the next column" Set from: Default +! rofi.kb-row-right: Control+Page_Down +! "Select previous entry" Set from: Default +! rofi.kb-row-up: Up,Control+p,ISO_Left_Tab +! "Select next entry" Set from: Default +! rofi.kb-row-down: Down,Control+n +! "Go to next row, if one left, accept it, if no left next mode." Set from: Default +! rofi.kb-row-tab: Tab +! "Go to the previous page" Set from: Default +! rofi.kb-page-prev: Page_Up +! "Go to the next page" Set from: Default +! rofi.kb-page-next: Page_Down +! "Go to the first entry" Set from: Default +! rofi.kb-row-first: Home,KP_Home +! "Go to the last entry" Set from: Default +! rofi.kb-row-last: End,KP_End +! "Set selected item as input text" Set from: Default +! rofi.kb-row-select: Control+space +! "Take a screenshot of the rofi window" Set from: Default +! rofi.kb-screenshot: Alt+S +! "Toggle between ellipsize modes for displayed data" Set from: Default +! rofi.kb-ellipsize: Alt+period +! "Toggle case sensitivity" Set from: Default +! rofi.kb-toggle-case-sensitivity: grave,dead_grave +! "Toggle sort" Set from: Default +! rofi.kb-toggle-sort: Alt+grave +! "Quit rofi" Set from: Default +! rofi.kb-cancel: Escape,Control+g,Control+bracketleft +! "Custom keybinding 1" Set from: Default +! rofi.kb-custom-1: Alt+1 +! "Custom keybinding 2" Set from: Default +! rofi.kb-custom-2: Alt+2 +! "Custom keybinding 3" Set from: Default +! rofi.kb-custom-3: Alt+3 +! "Custom keybinding 4" Set from: Default +! rofi.kb-custom-4: Alt+4 +! "Custom Keybinding 5" Set from: Default +! rofi.kb-custom-5: Alt+5 +! "Custom keybinding 6" Set from: Default +! rofi.kb-custom-6: Alt+6 +! "Custom Keybinding 7" Set from: Default +! rofi.kb-custom-7: Alt+7 +! "Custom keybinding 8" Set from: Default +! rofi.kb-custom-8: Alt+8 +! "Custom keybinding 9" Set from: Default +! rofi.kb-custom-9: Alt+9 +! "Custom keybinding 10" Set from: Default +! rofi.kb-custom-10: Alt+0 +! "Custom keybinding 11" Set from: Default +! rofi.kb-custom-11: Alt+exclam +! "Custom keybinding 12" Set from: Default +! rofi.kb-custom-12: Alt+at +! "Custom keybinding 13" Set from: Default +! rofi.kb-custom-13: Alt+numbersign +! "Custom keybinding 14" Set from: Default +! rofi.kb-custom-14: Alt+dollar +! "Custom keybinding 15" Set from: Default +! rofi.kb-custom-15: Alt+percent +! "Custom keybinding 16" Set from: Default +! rofi.kb-custom-16: Alt+dead_circumflex +! "Custom keybinding 17" Set from: Default +! rofi.kb-custom-17: Alt+ampersand +! "Custom keybinding 18" Set from: Default +! rofi.kb-custom-18: Alt+asterisk +! "Custom Keybinding 19" Set from: Default +! rofi.kb-custom-19: Alt+parenleft +! "Select row 1" Set from: Default +! rofi.kb-select-1: Super+1 +! "Select row 2" Set from: Default +! rofi.kb-select-2: Super+2 +! "Select row 3" Set from: Default +! rofi.kb-select-3: Super+3 +! "Select row 4" Set from: Default +! rofi.kb-select-4: Super+4 +! "Select row 5" Set from: Default +! rofi.kb-select-5: Super+5 +! "Select row 6" Set from: Default +! rofi.kb-select-6: Super+6 +! "Select row 7" Set from: Default +! rofi.kb-select-7: Super+7 +! "Select row 8" Set from: Default +! rofi.kb-select-8: Super+8 +! "Select row 9" Set from: Default +! rofi.kb-select-9: Super+9 +! "Select row 10" Set from: Default +! rofi.kb-select-10: Super+0 +! "Go to the previous column" Set from: Default +! rofi.ml-row-left: ScrollLeft +! "Go to the next column" Set from: Default +! rofi.ml-row-right: ScrollRight +! "Select previous entry" Set from: Default +! rofi.ml-row-up: ScrollUp +! "Select next entry" Set from: Default +! rofi.ml-row-down: ScrollDown +! "Select hovered row" Set from: Default +! rofi.me-select-entry: MousePrimary +! "Accept hovered row" Set from: Default +! rofi.me-accept-entry: MouseDPrimary +! "Accept hovered row with custom action" Set from: Default +! rofi.me-accept-custom: Control+MouseDPrimary + +!! special +!*.foreground: #c5c8c6 +!*.background: #1d1f21 +!*.cursorColor: #c5c8c6 +! +!! black +!*.color0: #282a2e +!*.color8: #373b41 +! +!! red +!*.color1: #a54242 +!*.color9: #cc6666 +! +!! green +!*.color2: #8c9440 +!*.color10: #b5bd68 +! +!! yellow +!*.color3: #de935f +!*.color11: #f0c674 +! +!! blue +!*.color4: #5f819d +!*.color12: #81a2be +! +!! magenta +!*.color5: #85678f +!*.color13: #b294bb +! +!! cyan +!*.color6: #5e8d87 +!*.color14: #8abeb7 +! +!! white +!*.color7: #707880 +!*.color15: #c5c8c6 +! +!! special +*.foreground: #c5c8c6 +*.background: #000000 +*.cursorColor: #c5c8c6 +*.reverseCursor: #333536 +dmenu.selbackground: #39c1ed +dmenu.selforeground: #000000 +dmenu.hibackground: #000000 +dmenu.hiforeground: #198844 +dmenu.selhibackground: #39c1ed +dmenu.selhiforeground: #198844 + +! black +*.color0: #1b1d1c +*.color8: #969896 + +! red +*.color1: #89231d +*.color9: #cc342b + +! green +*.color2: #198844 +*.color10: #4eec4e + +! yellow +*.color3: #ae7518 +*.color11: #fba922 + +! blue +*.color4: #2b55b2 +*.color12: #3971ed + +! magenta +*.color5: #784e93 +*.color13: #a36ac7 + +! cyan +*.color6: #2783a1 +*.color14: #39c1ed + +! white +*.color7: #b4b7b5 +*.color15: #ffffff diff --git a/autostart.sh b/autostart.sh index 311953f..3616220 100755 --- a/autostart.sh +++ b/autostart.sh @@ -25,7 +25,7 @@ if [ -n "${WAYLAND_DISPLAY}${DISPLAY}" ]; then import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' import-gsettings icon-theme 'Mint-X-Grey' import-gsettings cursor-theme 'Adwaita' - xrdb ~/.Xresources + xrdb "$XDG_CONFIG_HOME/X11/xresources" fi [ -x "$XDG_CONFIG_HOME/computerrc.sh" ] && "$XDG_CONFIG_HOME/computerrc.sh" diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 26d5441..633c832 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -20,7 +20,7 @@ exec-once = lxqt-policykit-agent exec-once = import-gsettings gtk-theme 'Flat-Remix-GTK-Green-Darkest-Solid' exec-once = import-gsettings icon-theme 'Mint-X-Grey' exec-once = import-gsettings cursor-theme 'Breeze' -exec-once = xrdb ~/.Xresources +exec-once = xrdb -load "$XDG_CONFIG_HOME"/X11/xresources exec-once = com.github.wwmm.easyeffects exec-once = mpd #}}} diff --git a/sh/aliases b/sh/aliases index a930a47..1537161 100644 --- a/sh/aliases +++ b/sh/aliases @@ -77,3 +77,6 @@ alias s='sudo systemctl' ## Runit #alias ursm='env SVDIR="$HOME/.local/sv/" rsm' + +# XDG dirs fix +alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion" diff --git a/sh/profile b/sh/profile index e5c38b2..b18500d 100644 --- a/sh/profile +++ b/sh/profile @@ -7,6 +7,7 @@ export XDG_CURRENT_DESKTOP="i3" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop +export XDG_STATE_HOME="${HOME}/.local/state" export XDG_VIDEOS_DIR=${HOME}/Videos export XDG_DATA_DIRS="${XDG_DATA_DIRS}:$HOME/.nix-profile/share" @@ -37,6 +38,7 @@ export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo +export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc @@ -44,6 +46,11 @@ export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug export WINEROOT="$XDG_DATA_HOME"/wineprefixes export WINEPREFIX="$WINEROOT"/default export MPD_HOST="$XDG_CONFIG_HOME/mpd/socket" +export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc +export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" +export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc +export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority +export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" # Scaling export QT_AUTO_SCREEN_SCALE_FACTOR=0 diff --git a/zsh/.zshenv b/zsh/.zshenv index 1740c82..b8c9d48 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,4 @@ # ZSH SPECIFIC CONFIGS unset HISTFILE -[ -f "$HOME/.profile" ] && . "$HOME/.profile" -export ZDOTDIR=$HOME/.config/zsh +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" -- cgit v1.2.3 From 7300dbfe7b58e465fefcf9b7e1f44342ab3f6b9b Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 6 Jun 2024 15:22:36 -0500 Subject: Update XDG paths for more programs This time features python, wget, adb, and xcursor. --- python/pythonrc | 24 ++++++++++++++++++++++++ sh/aliases | 3 +++ sh/profile | 3 +++ 3 files changed, 30 insertions(+) create mode 100644 python/pythonrc (limited to 'sh/profile') diff --git a/python/pythonrc b/python/pythonrc new file mode 100644 index 0000000..cd954b6 --- /dev/null +++ b/python/pythonrc @@ -0,0 +1,24 @@ +def is_vanilla() -> bool: + import sys + return not hasattr(__builtins__, '__IPYTHON__') and 'bpython' not in sys.argv[0] + + +def setup_history(): + import os + import atexit + import readline + from pathlib import Path + + if state_home := os.environ.get('XDG_STATE_HOME'): + state_home = Path(state_home) + else: + state_home = Path.home() / '.local' / 'state' + + history: Path = state_home / 'python_history' + + readline.read_history_file(str(history)) + atexit.register(readline.write_history_file, str(history)) + + +if is_vanilla(): + setup_history() diff --git a/sh/aliases b/sh/aliases index 1537161..d34ece9 100644 --- a/sh/aliases +++ b/sh/aliases @@ -80,3 +80,6 @@ alias s='sudo systemctl' # XDG dirs fix alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion" +alias adb="'HOME="$XDG_DATA_HOME"/android adb" +alias wget="wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\"" +alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config" diff --git a/sh/profile b/sh/profile index b18500d..14e805f 100644 --- a/sh/profile +++ b/sh/profile @@ -51,6 +51,9 @@ export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" +export ANDROID_USER_HOME="$XDG_DATA_HOME"/android +export XCURSOR_PATH="$XDG_DATA_HOME/icons" +export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc # Scaling export QT_AUTO_SCREEN_SCALE_FACTOR=0 -- cgit v1.2.3 From 84e670004f797f30b89298daf4de7b842fda4f26 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 6 Jun 2024 15:23:22 -0500 Subject: Set XDG_CURRENT_DESKTOP to Hyprland This should help something or other involving portals. Idk. --- sh/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 14e805f..760fae9 100644 --- a/sh/profile +++ b/sh/profile @@ -3,7 +3,7 @@ export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} . "$HOME/.config/user-dirs.dirs" -export XDG_CURRENT_DESKTOP="i3" +export XDG_CURRENT_DESKTOP="Hyprland" export XDG_DOCUMENTS_DIR=${HOME}/Documents export XDG_DOWNLOAD_DIR=${HOME}/Downloads export XDG_DESKTOP_DIR=${HOME}/Desktop -- cgit v1.2.3 From f995945828966933168d9bffebab4f384a1855f4 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 11 Jul 2024 09:35:44 -0500 Subject: Fix some xdg path blunders These broke adb, and the xcursor path. --- sh/aliases | 3 +++ sh/profile | 3 +++ 2 files changed, 6 insertions(+) (limited to 'sh/profile') diff --git a/sh/aliases b/sh/aliases index 1537161..1b6606e 100644 --- a/sh/aliases +++ b/sh/aliases @@ -80,3 +80,6 @@ alias s='sudo systemctl' # XDG dirs fix alias svn="svn --config-dir \"$XDG_CONFIG_HOME\"/subversion" +alias adb="HOME="$XDG_DATA_HOME"/android adb" +alias wget="wget --hsts-file=\"$XDG_DATA_HOME/wget-hsts\"" +alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config" diff --git a/sh/profile b/sh/profile index b18500d..e2e155d 100644 --- a/sh/profile +++ b/sh/profile @@ -51,6 +51,9 @@ export RENPY_PATH_TO_SAVES="$XDG_DATA_HOME" export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc export XAUTHORITY="$XDG_RUNTIME_DIR"/X11/Xauthority export VIMINIT="set nocp | source ${XDG_CONFIG_HOME:-$HOME.config}/vim/vimrc" +export ANDROID_USER_HOME="$XDG_DATA_HOME"/android +export XCURSOR_PATH="/usr/share/icons:$XDG_DATA_HOME/icons" +export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc # Scaling export QT_AUTO_SCREEN_SCALE_FACTOR=0 -- cgit v1.2.3 From 44fbfc95f779e5d6bbdaaf250ada4dfcdae5cb2a Mon Sep 17 00:00:00 2001 From: ZachIR Date: Sat, 18 Jan 2025 23:39:25 -0600 Subject: Cleanup zsh configs + add zplug Just a couple plugins for syntax highlighting and history searching, removing a bunch of old unused files, and changing to just accept the standard of using dotfiles in the home directory. --- Makefile | 16 +++++--- installers/set_zshdirs.sh | 13 ------ sh/profile | 2 +- zsh/.zlogout | 1 - zsh/.zprofile | 6 --- zsh/.zshenv | 5 --- zsh/.zshrc | 100 ---------------------------------------------- zsh/zshenv | 6 +++ zsh/zshrc | 72 +++++++++++++++++++++++++++++++++ 9 files changed, 90 insertions(+), 131 deletions(-) delete mode 100755 installers/set_zshdirs.sh delete mode 100644 zsh/.zlogout delete mode 100644 zsh/.zprofile delete mode 100644 zsh/.zshenv delete mode 100644 zsh/.zshrc create mode 100644 zsh/zshenv create mode 100644 zsh/zshrc (limited to 'sh/profile') diff --git a/Makefile b/Makefile index e27af0a..898fe9e 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ VIM := $(shell command -v vim 2>/dev/null) NVIM := $(shell command -v nvim 2>/dev/null) -ZCONFS := zsh/.zshenv +ZCONFS := zsh/zshenv zsh/zshrc +SCONFS := sh/profile DCONFS := doas.conf all: -install: install-zshconfigs vimplug-vim vimplug-nvim +install: install-zshconfigs install-shconfigs vimplug-vim vimplug-nvim install-zshconfigs: $(ZCONFS) @echo "Installing zsh conf files..." - @echo "Setting ZSHDOTDIR globally..." - @$(shell sudo installers/set_zshdirs.sh) @echo ".zshenv..." - @ln -sf `pwd`/zsh/.zshenv ~/.zshenv + @ln -sf `pwd`/zsh/zshenv ~/.zshenv + @echo ".zshrc..." + @ln -sf `pwd`/zsh/zshrc ~/.zshrc @echo "Done." +install-shconfigs: $(SCONFS) + @echo "Installing sh conf files..." + @echo ".profile..." + @ln -sf `pwd`/sh/profile ~/.profile + vimplug-vim: installers/vimplug_vim.sh ifdef VIM @echo "Installing vim-plug for vim..." diff --git a/installers/set_zshdirs.sh b/installers/set_zshdirs.sh deleted file mode 100755 index 2d82f19..0000000 --- a/installers/set_zshdirs.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if [ -f /etc/zshenv ]; then - ZSHENV="/etc/zshenv" -elif [ -d /etc/zsh ]; then - ZSHENV="/etc/zsh/zshenv" -else - ZSHENV="/etc/zshenv" -fi - -if ! grep -q "ZDOTDIR" $ZSHENV 2>/dev/null; then - echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" >> $ZSHENV -fi diff --git a/sh/profile b/sh/profile index de79a65..b83d012 100644 --- a/sh/profile +++ b/sh/profile @@ -36,7 +36,7 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages export RXVT_SOCKET="$XDG_RUNTIME_DIR"/urxvtd export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc -export ZDOTDIR=$HOME/.config/zsh +#export ZDOTDIR=$HOME/.config/zsh export CARGO_HOME="$XDG_DATA_HOME"/cargo export RUSTUP_HOME="$XDG_DATA_HOME"/rustup export WEECHAT_HOME="$XDG_CONFIG_HOME"/weechat diff --git a/zsh/.zlogout b/zsh/.zlogout deleted file mode 100644 index 33666be..0000000 --- a/zsh/.zlogout +++ /dev/null @@ -1 +0,0 @@ -rm -rf /tmp/xorg-awake diff --git a/zsh/.zprofile b/zsh/.zprofile deleted file mode 100644 index 1eae5e7..0000000 --- a/zsh/.zprofile +++ /dev/null @@ -1,6 +0,0 @@ -#export GDK_DPI_SCALE=0.7 - -#gnome_schema=org.gnome.desktop.interface -# -#gsettings set $gnome_schema gtk-theme 'Plata-Noir-Compact' -#gsettings set $gnome_schema icon-theme 'Papirus-Dark' diff --git a/zsh/.zshenv b/zsh/.zshenv deleted file mode 100644 index f02f83a..0000000 --- a/zsh/.zshenv +++ /dev/null @@ -1,5 +0,0 @@ -# ZSH SPECIFIC CONFIGS -unset HISTFILE -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -[ -f /etc/profile ] && . /etc/profile -[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 100644 index a00f116..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1,100 +0,0 @@ -HISTFILE="$ZDOTDIR"/hist -SAVEHIST=1000 -HISTSIZE=1000 -setopt APPEND_HISTORY -setopt HIST_FIND_NO_DUPS -setopt HIST_EXPIRE_DUPS_FIRST -setopt HIST_VERIFY -setopt HIST_IGNORE_DUPS -setopt INC_APPEND_HISTORY -setopt HIST_REDUCE_BLANKS - -_SH="zsh" - -if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then - source "$XDG_CONFIG_HOME"/sh/aliases -fi -if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then - source "$XDG_CONFIG_HOME"/sh/functions -fi - -if [ -n "$ZDOTDIR"/.zshrc -a -f "$ZDOTDIR"/.zshrc ]; then - alias e='source "$ZDOTDIR"/.zshrc' -elif [ -f "$HOME"/.zshrc ]; then - alias e='source ~/.zshrc' -fi - -bindkey "^?" backward-delete-char - -# bindkey -v - -if [ "$TERM" = "st-256color" ] || [ "$TERM" = "xterm-256color" ]; then - function zle-line-init () { echoti smkx } - function zle-line-finish () { echoti rmkx } - - zle -N zle-line-init - zle -N zle-line-finish -fi - -unset COLOR1 -ZSHTHEMERC="${ZDOTDIR:-$HOME}/.zsh_theme" -[ -f "$ZSHTHEMERC" ] && . "$ZSHTHEMERC" - -if [ -z "$COLOR1" ]; then - case "$(whoami)" in - zachir) COLOR1="014" ;; - git) COLOR1="013" ;; - subsonic) COLOR1="012" ;; - *) COLOR1="015" ;; - esac -fi - -MYPROMPT='%B%S%F{'"$COLOR1"'}[%n@%m]:%f%s%F{015}%~%f%S%F{'"$COLOR1"'}%#%f%s%b ' -function zle-line-init zle-keymap-select { - VIM_PROMPT="%B%F{012}[%n@%m]:%f%F{015}%~%f%F{012}%#%f%b " - PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" - #PS1="$PROMPT $KEYMAP" - zle reset-prompt -} - -unset COLOR1 - -zle -N zle-line-init -zle -N zle-keymap-select -export KEYTIMEOUT=1 - -fpath+="$ZDOTDIR/zfunc" - -autoload -Uz compinit promptinit -compinit -d $CONFIG/zcompdump -promptinit -autoload -Uz up-line-or-beginning-search down-line-or-beginning-search -zle -N up-line-or-beginning-search -zle -N down-line-or-beginning-search - -zstyle ':completion:*' menu select -zstyle ':completion::complete:*' gain-privileges 1 -zstyle ':completion:*' rehash true - -setopt COMPLETE_ALIASES -setopt AUTO_CD - -typeset -g -A key - -key[Up]="${terminfo[kcuu1]}" -key[Down]="${terminfo[kcud1]}" -key[Left]="${terminfo[kcub1]}" -key[Right]="${terminfo[kcuf1]}" -key[Shift-Tab]="${terminfo[kcbt]}" -key[Delete]="${terminfo[kdch1]}" - -[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search -bindkey -- '^[[A' up-line-or-beginning-search -bindkey -- '^[[B' down-line-or-beginning-search -[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search -[[ -n "${key[Left]}" ]] && bindkey -- "${key[Left]}" backward-char -[[ -n "${key[Right]}" ]] && bindkey -- "${key[Right]}" forward-char -[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete -[[ -n "${key[Delete]}" ]] && bindkey -- "${key[Delete]}" delete-char - -eval "$(_AUTO_CPUFREQ_COMPLETE=zsh_source auto-cpufreq)" diff --git a/zsh/zshenv b/zsh/zshenv new file mode 100644 index 0000000..df0371e --- /dev/null +++ b/zsh/zshenv @@ -0,0 +1,6 @@ +# ZSH SPECIFIC CONFIGS +unset HISTFILE +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export skip_global_compinit=1 +[ -f /etc/profile ] && . /etc/profile +[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile" diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..fb5b167 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,72 @@ +#zmodload zsh/zprof +if [ -d "$HOME/.zplug" ]; then + export ZPLUG_INSTALLED="y" + source "$HOME/.zplug/init.zsh" +fi +HISTFILE="$XDG_CONFIG_HOME/zsh/hist" +SAVEHIST=1000 +HISTSIZE=1000 +setopt APPEND_HISTORY +setopt HIST_FIND_NO_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_VERIFY +setopt HIST_IGNORE_DUPS +setopt INC_APPEND_HISTORY +setopt HIST_REDUCE_BLANKS +setopt COMPLETE_ALIASES +setopt AUTO_CD + +_SH="zsh" + +if [ -f "$XDG_CONFIG_HOME"/sh/aliases ]; then + source "$XDG_CONFIG_HOME"/sh/aliases +fi +if [ -f "$XDG_CONFIG_HOME"/sh/functions ]; then + source "$XDG_CONFIG_HOME"/sh/functions +fi + +if [ -f "$XDG_CONFIG_HOME/zsh/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zsh/zshrc"' +elif [ -f "$XDG_CONFIG_HOME/zshrc" ]; then + alias e='source "$XDG_CONFIG_HOME/zshrc"' +elif [ -f "$HOME"/.zshrc ]; then + alias e='source ~/.zshrc' +fi + +bindkey -v + +MYPROMPT=$'%B%S%F{002}[%n@%m]%s\UE0B0%F{015}%~%S%F{002}\UE0B0%#%s\UE0B0%f%k%b ' +function zle-line-init zle-keymap-select { + VIM_PROMPT=$'%B%S%F{012}[%n@%m]%s\UE0B0%F{015}%~%S%F{012}\UE0B0%#%s\UE0B0%f%k%b ' + PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}" + zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select +export KEYTIMEOUT=1 + +fpath+="$XDG_CONFIG_HOME/zsh/zfunc" + +if [ -n "$ZPLUG_INSTALLED" ]; then + # zsh history substring search + zplug "zsh-users/zsh-history-substring-search", as:plugin + + bindkey '^[[A' history-substring-search-up + bindkey '^[[B' history-substring-search-down + bindkey -M vicmd '^[[A' history-substring-search-up + bindkey -M vicmd '^[[B' history-substring-search-down + bindkey -M vicmd 'k' history-substring-search-up + bindkey -M vicmd 'j' history-substring-search-down + + # zsh syntax highlighting + zplug "zsh-users/zsh-syntax-highlighting", defer:2 + + # load zsh plugins + zplug load +fi + +autoload -Uz compinit +compinit + +#zprof -- cgit v1.2.3 From 18450042569408f80694a252dd17b7d1d22ecbfb Mon Sep 17 00:00:00 2001 From: ZachIR Date: Fri, 28 Feb 2025 11:29:23 -0600 Subject: Fix gtk and qt theming Also set the theme back to green instead of white --- gtk-2.0/gtkrc | 2 +- gtk-3.0/settings.ini | 18 ++---------------- qt5ct/qt5ct.conf | 14 +++++++------- qt6ct/qt6ct.conf | 8 ++++---- sh/profile | 2 +- xsettingsd/xsettingsd.conf | 2 +- 6 files changed, 16 insertions(+), 30 deletions(-) (limited to 'sh/profile') diff --git a/gtk-2.0/gtkrc b/gtk-2.0/gtkrc index 6a23e8c..3c97dc3 100644 --- a/gtk-2.0/gtkrc +++ b/gtk-2.0/gtkrc @@ -1,7 +1,7 @@ # DO NOT EDIT! This file will be overwritten by nwg-look. # Any customization should be done in ~/.gtkrc-2.0.mine instead. -gtk-theme-name="Flat-Remix-GTK-White-Darkest-Solid" +gtk-theme-name="Flat-Remix-GTK-Green-Darkest" gtk-icon-theme-name="Cosmic" gtk-font-name="Cantarell 11" gtk-cursor-theme-name="BreezeX-Black" diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index f876bba..87b4543 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,17 +1,3 @@ [Settings] -gtk-theme-name=Flat-Remix-GTK-White-Darkest-Solid -gtk-icon-theme-name=Cosmic -gtk-font-name=Cantarell 11 -gtk-cursor-theme-name=BreezeX-Black -gtk-cursor-theme-size=32 -gtk-toolbar-style=GTK_TOOLBAR_ICONS -gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -gtk-button-images=0 -gtk-menu-images=0 -gtk-enable-event-sounds=1 -gtk-enable-input-feedback-sounds=0 -gtk-xft-antialias=1 -gtk-xft-hinting=1 -gtk-xft-hintstyle=hintslight -gtk-xft-rgba=rgb -gtk-application-prefer-dark-theme=0 +gtk-cursor-theme-name = BreezeX-Black +gtk-cursor-theme-size = 32 diff --git a/qt5ct/qt5ct.conf b/qt5ct/qt5ct.conf index 516eaab..964da53 100644 --- a/qt5ct/qt5ct.conf +++ b/qt5ct/qt5ct.conf @@ -1,13 +1,13 @@ [Appearance] -color_scheme_path=/usr/share/qt5ct/colors/darker.conf -custom_palette=false -icon_theme=Mint-X-Grey -standard_dialogs=xdgdesktopportal +color_scheme_path=/home/zachir/.config/qt5ct/style-colors.conf +custom_palette=true +icon_theme=Cosmic +standard_dialogs=gtk2 style=gtk2 [Fonts] -fixed=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) -general=@Variant(\0\0\0@\0\0\0\x1e\0\x44\0\x65\0j\0\x61\0V\0u\0 \0L\0G\0\x43\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10) +fixed="DejaVu LGC Sans,12,-1,5,50,0,0,0,0,0" +general="DejaVu LGC Sans,12,-1,5,50,0,0,0,0,0" [Interface] activate_item_on_single_click=1 @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x1\x95\0\0\0\xfb\0\0\x5\x45\0\0\x3\x93\0\0\x1\x96\0\0\0\xfc\0\0\x5\x44\0\0\x3\x92\0\0\0\0\0\0\0\0\a\x80\0\0\x1\x96\0\0\0\xfc\0\0\x5\x44\0\0\x3\x92) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/\0\0\0\0\0\0\0\0\a\x80\0\0\0H\0\0\x2T\0\0\x3\xdb\0\0\x4/) [Troubleshooting] force_raster_widgets=1 diff --git a/qt6ct/qt6ct.conf b/qt6ct/qt6ct.conf index 810fb94..5d9a12c 100644 --- a/qt6ct/qt6ct.conf +++ b/qt6ct/qt6ct.conf @@ -1,8 +1,8 @@ [Appearance] color_scheme_path=/usr/share/qt6ct/colors/airy.conf custom_palette=false -icon_theme=Mint-X -standard_dialogs=xdgdesktopportal +icon_theme=Cosmic +standard_dialogs=gtk2 style=qt6gtk2 [Fonts] @@ -12,7 +12,7 @@ general="DejaVu LGC Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" [Interface] activate_item_on_single_click=1 buttonbox_layout=0 -cursor_flash_time=1000 +cursor_flash_time=1200 dialog_buttons_have_icons=1 double_click_interval=400 gui_effects=@Invalid() @@ -25,7 +25,7 @@ underline_shortcut=1 wheel_scroll_lines=3 [SettingsWindow] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x3\x42\0\0\x3\xe7\0\0\0\0\0\0\0\0\0\0\x2\xde\0\0\x2\x46\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x3\x42\0\0\x3\xe7) +geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\xff\xff\xff\xfd\xff\xff\xff\xe2\0\0\a<\0\0\x3\xf9\0\0\0\0\0\0\0\0\0\0\a9\0\0\x3\xf6\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\a9\0\0\x3\xf6) [Troubleshooting] force_raster_widgets=1 diff --git a/sh/profile b/sh/profile index b83d012..55657fa 100644 --- a/sh/profile +++ b/sh/profile @@ -63,7 +63,7 @@ export GDK_SCALE=1 export GDK_DPI_SCALE=1 # Theming -export QT_QPA_PLATFORMTHEME=qt5ct +export QT_QPA_PLATFORMTHEME=qt6ct # Fix wayland stuff export MOZ_ENABLE_WAYLAND=1 diff --git a/xsettingsd/xsettingsd.conf b/xsettingsd/xsettingsd.conf index c1e323c..e762fa9 100644 --- a/xsettingsd/xsettingsd.conf +++ b/xsettingsd/xsettingsd.conf @@ -1,4 +1,4 @@ -Net/ThemeName "Flat-Remix-GTK-White-Darkest-Solid" +Net/ThemeName "Flat-Remix-GTK-Green-Darkest" Net/IconThemeName "Cosmic" Gtk/CursorThemeName "BreezeX-Black" Net/EnableEventSounds 1 -- cgit v1.2.3 From 4338d5c6a527249bd5bbfe797cba9ff4d0ddd8ac Mon Sep 17 00:00:00 2001 From: ZachIR Date: Fri, 28 Feb 2025 11:33:16 -0600 Subject: Add command_not_found handle for distrobox --- sh/profile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sh/profile') diff --git a/sh/profile b/sh/profile index 55657fa..ff237a1 100644 --- a/sh/profile +++ b/sh/profile @@ -130,3 +130,17 @@ addtopath "/var/lib/flatpak/exports/bin" unset -f addtopath unset USERPATH unset PATHS + +command_not_found_handle() { +# don't run if not in a container + if [ ! -e /run/.containerenv ] && [ ! -e /.dockerenv ]; then + exit 127 + fi + + distrobox-host-exec "${@}" +} +if [ -n "${ZSH_VERSION-}" ]; then + command_not_found_handler() { + command_not_found_handle "$@" + } +fi -- cgit v1.2.3 From 12fb9ecc242867b03626d1c52e5e84799ab330c8 Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 17 Apr 2025 22:59:36 -0500 Subject: Redo nvim to use init.lua --- nvim/init.lua | 5 + nvim/init.vim | 306 ----------------------------------------------- nvim/lua/colorscheme.lua | 8 ++ nvim/lua/keymaps.lua | 97 +++++++++++++++ nvim/lua/options.lua | 32 +++++ nvim/lua/plugins.lua | 106 ++++++++++++++++ nvim/lua/term.lua | 51 ++++++++ sh/profile | 2 +- vim/vimrc | 4 +- 9 files changed, 302 insertions(+), 309 deletions(-) create mode 100644 nvim/init.lua delete mode 100644 nvim/init.vim create mode 100644 nvim/lua/colorscheme.lua create mode 100644 nvim/lua/keymaps.lua create mode 100644 nvim/lua/options.lua create mode 100644 nvim/lua/plugins.lua create mode 100644 nvim/lua/term.lua (limited to 'sh/profile') diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..cf11420 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,5 @@ +require('options') +require('keymaps') +require('plugins') +require('colorscheme') +require('term') diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index 812bf3e..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,306 +0,0 @@ -set runtimepath^=$XDG_CONFIG_HOME/vim -set runtimepath+=$XDG_DATA_HOME/vim -set runtimepath+=$XDG_CONFIG_HOME/vim/after - -set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim -set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after - -let g:netrw_home = $XDG_DATA_HOME."/vim" -call mkdir($XDG_DATA_HOME."/vim/spell", 'p') - -set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p') -set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p') -set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p') -set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p') - -if !has('nvim') | set viminfofile=$XDG_STATE_HOME/vim/viminfo | endif - -" vimplugs {{{ -call plug#begin('~/.config/nvim/plugged') -" colorschemes {{{ -Plug 'tomasiser/vim-code-dark' " codedark color scheme -Plug 'flazz/vim-colorschemes' " meta-color scheme package -Plug 'tomasiser/vim-code-dark' " codedark color scheme -Plug 'flazz/vim-colorschemes' " meta-color scheme package -Plug 'ZachIndigo/vim-preglow' " my old color scheme -" }}} -" language support {{{ -Plug 'axvr/org.vim' " basic org markup language implementation -Plug 'ziglang/zig.vim' " zig programming language -Plug 'jdonaldson/vaxe' " haxe programming language -Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } " latex live preview support -Plug 'waycrate/swhkd-vim' " swhkd syntax highlighting -Plug 'HiPhish/guile.vim' " guile syntax highlighting -" }}} -" utility {{{ -Plug 'preservim/nerdtree' " directory tree interface -Plug 'Xuyuanp/nerdtree-git-plugin' " git status indicator for nerdtree -Plug 'PhilRunninger/nerdtree-visual-selection' " allows visual selection mode in nerdtree -Plug 'tpope/vim-fugitive' " git command interface -Plug 'junegunn/goyo.vim' " simplify the user interface (distraction-free) [BROKEN] -Plug 'junegunn/limelight.vim' " focus on single paragraph of text at a time -Plug 'vim-airline/vim-airline' " powerline the vim bottom bar -Plug 'nathanaelkane/vim-indent-guides' " indent guides for vim -Plug 'mhinz/vim-signify' " use signs to show diffs -Plug 'tpope/vim-endwise' " auto end functions/if statements -Plug 'tpope/vim-surround' " auto close stuff -Plug 'mattn/emmet-vim' " html css easy formating -Plug 'godlygeek/tabular' " Needed for vim-markdown -Plug 'plasticboy/vim-markdown' " Better markdown support -Plug 'ryanoasis/vim-devicons' " dev icons for nerdtree -" }}} -call plug#end() - -" }}} -" nvim options {{{ - -"" nvimrc: -"" General - -set showmatch " Highlight matching brace - -set number -set relativenumber - -colorscheme Dark2 - -set hlsearch " Highlight all search results -set smartcase " Enable smart-case search -set incsearch " Searches for strings incrementally - -set expandtab " Use spaces instead of tabs -set shiftwidth=2 " Number of auto-indent spaces -set smartindent " Enable smart-indent -set smarttab " Enable smart-tabs -set softtabstop=2 " Number of spaces per Tab - -"" Advanced -set ruler " Show row and column ruler information -set undolevels=1000 " Number of undo levels -set backspace=indent,eol,start " Backspace behaviour -filetype plugin indent on - -"" GUI Config -set guifont=mononoki\ Nerd\ Font\ Mono:h12 - -"hi Normal guibg=NONE ctermbg=NONE -"hi NonText guibg=NONE ctermbg=NONE -"set background=dark - -set foldmethod=marker - -set conceallevel=2 - -" set leader key - -let mapleader="'" - -" emmet {{{ -let g:user_emmet_leader_key='' -" }}} - -" zig config {{{ -let g:zig_fmt_autosave = 1 -" }}} - -" latex live preview {{{ -let g:livepreview_previewer = 'zathura' -let g:livepreview_use_biber = 1 -let g:livepreview_cursorhold_recompile = 0 -" }}} - -" vim-markdown {{{ -let g:vim_markdown_folding_disabled = 1 -let g:vim_markdown_folding_level = 3 -let g:vim_markdown_toc_autofit = 1 -let g:vim_markdown_emphasis_multiline = 0 -let g:tex_conceal = "" -let g:vim_markdown_math = 1 -let g:vim_markdown_conceal_code_blocks = 1 -let g:vim_markdown_fenced_languages = ['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini'] -let g:vim_markdown_follow_anchor = 1 -let g:vim_markdown_math = 1 -let g:vim_markdown_frontmatter = 1 -let g:vim_markdown_toml_frontmatter = 1 -let g:vim_markdown_strikethrough = 1 -let g:vim_markdown_no_extensions_in_markdown = 1 -let g:vim_markdown_autowrite = 1 -let g:vim_markdown_auto_insert_bullets = 0 -let g:vim_markdown_new_list_item_indent = 0 -let g:vim_markdown_edit_url_in = 'tab' -" }}} - -" NERDTree config {{{ -let g:NERDTreeGitStatusUseNerdFonts = 1 " use nerd fonts -let g:NERDTreeGitStatusShowClean = 1 " default: 0 -let g:NERDTreeDirArrowExpandable = '>' -let g:NERDTreeDirArrowCollapsible = '<' -let g:NERDTreeMapToggleHidden = 'z' -" }}} - -" Goyo config {{{ -let g:goyo_width = '90%' -let g:goyo_height = '100%' -" }}} - -" limelight config {{{ -let g:limelight_conceal_ctermfg = 'gray' -let g:limelight_conceal_guifg = 'gray' -" }}} - -" devicon config {{{ -let g:airline_powerline_fonts = 1 -let g:webdevicons_enable_nerdtree = 1 -" }}} - -" vim-indent-guides config {{{ -let g:indent_guides_enable_on_vim_startup = 0 -" }}} - -" vim-signify config {{{ -set updatetime=100 -" }}} - -" }}} -" Functions {{{ -" Goyo functions {{{ -function! s:goyo_enter() - if executable('tmux') && strlen($TMUX) - silent !tmux set status off - silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z - endif - set noshowmode - set noshowcmd - set scrolloff=999 - Limelight - NERDTreeClose -endfunction -function! s:goyo_leave() - if executable('tmux') && strlen('$TMUX') - silent !tmux set status on - silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z - endif - set showmode - set showcmd - set scrolloff=5 - Limelight! - NERDTree -endfunction -" }}} -" }}} -" Autocommands {{{ -" Goyo autocommands {{{ -autocmd! User GoyoEnter nested call goyo_enter() -autocmd! User GoyoLeave nested call goyo_leave() -" }}} -" NERDTree autocmds {{{ -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | wincmd p | endif -autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | - \ execute 'NERDTree' argv()[0] | wincmd p | enew | execute 'cd '.argv()[0] | endif -autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif -"autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 | - "\ let buf=bufnr() | buffer# | execute "normal! \w" | execute 'buffer;.buf | endif -autocmd BufWinEnter * if getcmdwintype() == '' | silent NERDTreeMirror | endif -" }}} -" custom augroup {{{ -augroup custom - autocmd! - "au BufEnter *.tex :LLPStartPreview - au BufEnter *.md :set textwidth=80 - au BufEnter *.ms :set textwidth=80 - "au BufEnter *.c :colo DevC++ - "au BufEnter *.h :colo DevC++ - "au BufEnter *.cc :colo DevC++ - "au BufEnter *.hh :colo DevC++ - "au BufEnter *.cpp :colo DevC++ - "au BufEnter *.hpp :colo DevC++ - au BufWritePost init.vim :source % - "au BufWritePost *.tex :make - au BufWritePost *sxhkdrc* :!pkill -USR1 -x sxhkd - au BufWritePost .Xresources :!xrdb ~/.Xresources - au BufWritePost .gitignore :!git add .gitignore -augroup end -" }}} -" }}} -" keybindings {{{ - -" direction keys - -inoremap gj -inoremap gk -inoremap g -inoremap g -vnoremap gj -vnoremap gk -vnoremap g -vnoremap g -nnoremap gj -nnoremap gk - -" clear search highlights -nnoremap / :noh - -" toggles -nnoremap tn :set number! -nnoremap tr :set relativenumber! -nnoremap tt :NERDTreeToggle - -" tabs -nnoremap th :tabprevious -nnoremap tl :tabnext -nnoremap tk :tabnew -nnoremap tj :tabclose - -" splits -nnoremap wh :vertical resize -1 -nnoremap wj :resize -1 -nnoremap wk :resize +1 -nnoremap wl :vertical resize +1 - -" config -nnoremap en :e ~/.config/nvim/init.vim -nnoremap ec :source % - -" write as root -nnoremap ZW :w !pkexec tee % >/dev/null - -" Goyo -nnoremap G :Goyo - -" windows -nnoremap h -nnoremap j -nnoremap k -nnoremap l -vnoremap h -vnoremap j -vnoremap k -vnoremap l - -" files -" these may go away soon -nnoremap xx :q -nnoremap x! :q! -" these are the new standard -nnoremap qq :q -nnoremap q! :q! -nnoremap wq :wq -nnoremap ww :w -nnoremap ee :e - -" escape for term windows -tnoremap - -" vim-plug -nnoremap pi :PlugInstall -nnoremap pu :PlugUpdate -nnoremap pU :PlugUpgrade -nnoremap pc :PlugClean - -" fugitive -nnoremap gp :G pull -nnoremap gd :G diff % - -" }}} diff --git a/nvim/lua/colorscheme.lua b/nvim/lua/colorscheme.lua new file mode 100644 index 0000000..66516fa --- /dev/null +++ b/nvim/lua/colorscheme.lua @@ -0,0 +1,8 @@ +-- define your colorscheme here +local colorscheme = 'badwolf' + +local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not is_ok then + vim.notify('colorscheme ' .. colorscheme .. ' not found!') + return +end diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua new file mode 100644 index 0000000..26037c6 --- /dev/null +++ b/nvim/lua/keymaps.lua @@ -0,0 +1,97 @@ +-- define common options +local opts = { + noremap = true, -- non-recursive + silent = true, -- do not show message +} + +-- set leader key +vim.g.mapleader = "'" + +----------------- +-- Normal mode -- +----------------- + +-- Hint: set `:h vim.map.set()` +-- Better window navigation +vim.keymap.set('n', '', 'h', opts) +vim.keymap.set('n', '', 'j', opts) +vim.keymap.set('n', '', 'k', opts) +vim.keymap.set('n', '', 'l', opts) + +-- Resize with arrows +vim.keymap.set('n', '', ':resize -2', opts) +vim.keymap.set('n', '', ':resize +2', opts) +vim.keymap.set('n', '', ':vertical resize -2', opts) +vim.keymap.set('n', '', ':vertical resize +2', opts) +vim.keymap.set('n', 'wh :vertical resize', '-1') +vim.keymap.set('n', 'wj :resize', '-1') +vim.keymap.set('n', 'wk :resize', '+1') +vim.keymap.set('n', 'wl :vertical resize', '+1') + +-- NerdTREE +vim.keymap.set('n', 'tt', ':NERDTreeToggle') + +-- files +-- these may go away soon +vim.keymap.set('n', 'xx', ':q') +vim.keymap.set('n', 'x!', ':q!') + +-- Close with leader +vim.keymap.set('n', 'ww', ':w', opts) +vim.keymap.set('n', 'qq', ':q', opts) +vim.keymap.set('n', 'wq', ':wq', opts) +vim.keymap.set('n', 'q!', ':q!', opts) +vim.keymap.set('n', 'wq', ':wq') +vim.keymap.set('n', 'ee :e', '') + +-- Tabs with leader +vim.keymap.set('n', 'th', ':tabprevious', opts) +vim.keymap.set('n', 'tl', ':tabnext', opts) +vim.keymap.set('n', 'tk', ':tabnew', opts) +vim.keymap.set('n', 'tj', ':tabclose', opts) + +-- Write with sudo +vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null', opts) + +-- clear search highlights +vim.keymap.set('n', '/', ':noh') + +-- toggles +vim.keymap.set('n', 'tn :set', 'number!') +vim.keymap.set('n', 'tr :set', 'relativenumber!') + +-- write as root +vim.keymap.set('n', 'ZW', ':w !pkexec tee % >/dev/null') + +-- config +vim.keymap.set('n', 'en', ':e ~/.config/nvim/init.lua') +vim.keymap.set('n', 'ec', ':source %') +vim.keymap.set('n', 'er', ':source ~/.config/nvim/init.lua') + +-- Goyo +vim.keymap.set('n', 'G', ':Goyo') + +-- fugitive +vim.keymap.set('n', 'gp :G', 'pull') +vim.keymap.set('n', 'gd :G diff', '%') + +----------------- +-- Visual mode -- +----------------- + +-- Hint: start visual mode with the same area as the previous area and the same mode +--vim.keymap.set('v', '<', '', '>gv', opts) + +-- windows +vim.keymap.set('v', '', 'h') +vim.keymap.set('v', '', 'j') +vim.keymap.set('v', '', 'k') +vim.keymap.set('v', '', 'l') + +-------------- +-- TERMINAL -- +-------------- + +-- escape for term windows +vim.keymap.set('t', '', '') diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua new file mode 100644 index 0000000..1d4826e --- /dev/null +++ b/nvim/lua/options.lua @@ -0,0 +1,32 @@ +-- Hint: use `:h