From 316edfc2d03d02a6a3be41c2e08916280f1cd01c Mon Sep 17 00:00:00 2001 From: eneller Date: Wed, 16 Sep 2026 20:45:48 +0200 Subject: [PATCH] new setup --- .config/alacritty/alacritty.toml | 2 +- .config/shell/alias.sh | 3 +- .config/sway/cheatsheet.md | 51 ++++++++++++++++++++++++++++++++ .config/sway/config.d/default | 5 +--- .config/sway/config.d/output | 33 ++++++--------------- .config/sway/config.d/scratchpad | 23 +++++++++----- .config/sway/env.d/env | 1 + .config/sway/environment | 47 +++++++++++++++++++++++++++++ .config/sway/waybar/config.ini | 7 ++--- .gitconfig | 4 +++ .zshrc | 10 +++++-- 11 files changed, 141 insertions(+), 45 deletions(-) create mode 100644 .config/sway/cheatsheet.md create mode 100644 .config/sway/env.d/env create mode 100644 .config/sway/environment diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 12cd4d2..e07b75d 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -49,4 +49,4 @@ key = "F11" history = 50000 [window] -opacity = 0.8 +opacity = 1 diff --git a/.config/shell/alias.sh b/.config/shell/alias.sh index b17ab93..c247b1b 100644 --- a/.config/shell/alias.sh +++ b/.config/shell/alias.sh @@ -6,7 +6,6 @@ alias ll='ls --long --header --git' alias li='ls --git-ignore' alias la='ls --all' alias less='less --use-color' -alias grep='rg' # colorize grep output, set GREP_COLORS alias cp="cp -i" # Confirm before overwriting something alias df='df -h' # Human-readable sizes alias vi='nvim' # Show sizes in MB @@ -14,10 +13,10 @@ alias r='R' alias xar="xarchiver" alias g="git" alias py="python" -alias t="dict" alias act="source .venv/bin/activate" alias copy="wl-copy" alias paste="wl-paste" +alias todo="rg -A 1 -B 1 '(TODO|FIXME|NOTE)'" # Add an "alert" alias for long running commands. Use like so: 'sleep 10; alert' diff --git a/.config/sway/cheatsheet.md b/.config/sway/cheatsheet.md new file mode 100644 index 0000000..fe8fc9f --- /dev/null +++ b/.config/sway/cheatsheet.md @@ -0,0 +1,51 @@ +# Sway CheatSheet # + + Super = Windows Key + +# common operations + Super Return *term* (`kitty`) + Super q *quit* (kill focused window) + Super Shift q *quit* (kill focused window) + Super d *launcher* + Super Shift d *dmenu* + Super x *show archlinux-logout* (lock/suspend/logout/reboot/shutdown) + Super Shift r *reload config files* (`reload`) + Super Escape *kill application* + +# screenshot + PrintSrc *full screenshot* + Shift PrintSrc *screenshot active* + Ctrl PrintSrc *screenshot selection* + +# application shortcuts + Ctrl Alt F *firefox* + Ctrl Alt U *pavucontrol* + Ctrl Alt P *pamac-manager* + Super Shift Return *file manager* (`thunar`) + Super F1 *browser* (`firefox`) + +# container layout + + Super Shift Space *toggle tiling/floating mode* + Super left mouse button *move window* + Super right mouse button *resize window* + +# workspaces + Super 1 .. 0 *switch to workspace 1 .. 10* + Super Shift 1 .. 0 *move container to workspace 1 .. 10* + +# notes + - *Sway* is documented through man pages - man sway. + - *Waybar* is documented through man pages - man waybar. + - User configuration files are in `~/.config/`. + - Sway configuration files are in `~/.config/sway/config.d/`. + - Similarly, Waybar configuration is in `~/.config/waybar`. + +# user githubs + - https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-sway-settings + - https://gitlab.com/risca-dot-files/sway/-/tree/master/.config/sway + - https://github.com/weasnerb/sway-dots + +# share your own files on github + - so we can all learn + - and you have a backup diff --git a/.config/sway/config.d/default b/.config/sway/config.d/default index 9010153..05f9832 100644 --- a/.config/sway/config.d/default +++ b/.config/sway/config.d/default @@ -83,12 +83,9 @@ bindsym Ctrl+Alt+Prior exec conky-rotate -p # CONTROL + ALT bindsym $mod+e exec thunar -bindsym Ctrl+Alt+f exec firefox -bindsym Ctrl+Alt+g exec chromium +bindsym $mod+w exec firefox bindsym Ctrl+Alt+p exec pamac-manager bindsym Ctrl+Alt+u exec pavucontrol -bindsym Ctrl+Alt+w exec arcolinux-welcome-app -bindsym Ctrl+Alt+s exec spotify # # Moving around: diff --git a/.config/sway/config.d/output b/.config/sway/config.d/output index 7de028c..e2bcfcf 100644 --- a/.config/sway/config.d/output +++ b/.config/sway/config.d/output @@ -1,6 +1,13 @@ ### Output configuration -output DP_2 resolution 2560x1440 pos 0 0 -output DP_3 resolution 2560x1440 pos 2560 0 +set $output-1 DP_1 +set $output-2 DP_2 +set $output-3 DP_3 +output $output-1 resolution 2560x1440 pos 0 0 +output $output-2 resolution 2560x1440 pos 2560 0 +output $output-3 resolution 2560x1440 pos 5120 0 +workspace 1 output $output-1 +workspace 2 output $output-2 +workspace 3 output $output-3 # # Example configuration: # @@ -11,25 +18,3 @@ output DP_3 resolution 2560x1440 pos 2560 0 # Wacom Tablet - Example # input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1 # input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1 - -# Example dual monitor - -#output HDMI-A-1 pos 0 0 -#output HDMI-A-2 pos 1920 0 - -# Define outputs -#set $output-primary HDMI-A-1 -#set $output-secondary HDMI-A-2 - - -#workspace 1 output $output-primary -#workspace 2 output $output-primary -#workspace 3 output $output-primary -#workspace 4 output $output-primary -#workspace 5 output $output-primary - -#workspace 6 output $output-secondary -#workspace 7 output $output-secondary -#workspace 8 output $output-secondary -#workspace 9 output $output-secondary -#workspace 10 output $output-secondary diff --git a/.config/sway/config.d/scratchpad b/.config/sway/config.d/scratchpad index cb37837..7915fc0 100644 --- a/.config/sway/config.d/scratchpad +++ b/.config/sway/config.d/scratchpad @@ -1,16 +1,23 @@ # vim: filetype=i3config # Scratchpad binds exec_always bitwarden-desktop -for_window [instance="bitwarden"] move scratchpad -for_window [instance="bitwarden"] sticky enable -for_window [instance="bitwarden"] resize set height 1200 900 -bindsym $mod+p [instance="bitwarden"] scratchpad show; +for_window [app_id="Bitwarden"] { + floating enable + sticky enable + resize set width 1200 height 900 + move position center + move scratchpad +} +bindsym $mod+p [app_id="Bitwarden"] scratchpad show exec_always alacritty --class="dropdown_tmux" -e 'tmux' -for_window [app_id="dropdown_tmux"] move scratchpad -for_window [app_id="dropdown_tmux"] floating enable -for_window [app_id="dropdown_tmux"] sticky enable -for_window [app_id="dropdown_tmux"] resize set height 900 width 1200 +for_window [app_id="dropdown_tmux"] { + floating enable + sticky enable + resize set width 1200 height 900 + move position center + move scratchpad +} bindsym $mod+Space [app_id="dropdown_tmux"] scratchpad show # General dropdown window traits. The order can matter. diff --git a/.config/sway/env.d/env b/.config/sway/env.d/env new file mode 100644 index 0000000..c542045 --- /dev/null +++ b/.config/sway/env.d/env @@ -0,0 +1 @@ +https://curiouscoding.nl/linux/environment-variables/ diff --git a/.config/sway/environment b/.config/sway/environment new file mode 100644 index 0000000..b8ca1eb --- /dev/null +++ b/.config/sway/environment @@ -0,0 +1,47 @@ +# Clean Up Home Directory +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_STATE_HOME="$HOME/.local/state" +export TS3_CONFIG_DIR="$XDG_CONFIG_HOME/ts3client" +export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter" +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" +export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export WGETRC="$XDG_CONFIG_HOME/wgetrc" +alias vscodium='vscodium --extensions-dir "$XDG_DATA_HOME/vscode"' +export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' +alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"' +alias code='code --extensions-dir "$XDG_DATA_HOME/vscode"' +alias dict='dict -c "$XDG_CONFIG_HOME"/dict/dictrc ' + + +# THEME + +export QT_QPA_PLATFORMTHEME="qt5ct" +export QT_AUTO_SCREEN_SCALE_FACTOR=0 +# global theme colors +export BLACK="#272822" +export WHITE="#FFFFFF" +export RED="#F92672" +export BLUE="#66D9EF" +export GREEN="#A6E22E" +export ORANGE="#FD971F" +export YELLOW="#E6DB74" +export PURPLE="#AE81FF" +export FONT="Noto" +export FONTSIZE="12" + +# default applications +export EDITOR=/usr/bin/nvim +export BROWSER=/usr/bin/firefox +export TERMINAL=/usr/bin/alacritty +export EXPLORER=/usr/bin/thunar +export MAILCLIENT=/usr/bin/thunderbird +# set BAT as man pager +export MANPAGER="sh -c 'col -bx | bat -l man -p'" +export MANROFFOPT="-c" diff --git a/.config/sway/waybar/config.ini b/.config/sway/waybar/config.ini index a92c4bf..9df2ac6 100755 --- a/.config/sway/waybar/config.ini +++ b/.config/sway/waybar/config.ini @@ -44,8 +44,7 @@ }, "clock": { "tooltip-format": "{:%A %B %d %Y | %H:%M}", - "format": " {:%a %d %b %I:%M %p}", //12 hour format - //"format": " {:%a %d %b %H:%M}", //24 hour format + "format": " {:%a %d %b %H:%M}", "format-alt": " {:%d/%m/%Y %H:%M:%S}", //"timezones": [ "$TZ" ], //"max-length": 200 @@ -53,11 +52,11 @@ }, "cpu": { "format": "cpu: {usage: >3}%", - "on-click": "alacritty -e bashtop" + "on-click": "alacritty -e btop" }, "memory": { "format": "mem: {: >3}%", - "on-click": "alacritty -e bashtop" + "on-click": "alacritty -e btop" }, "temperature": { // "thermal-zone": 2, diff --git a/.gitconfig b/.gitconfig index f6f8d65..01b3a99 100644 --- a/.gitconfig +++ b/.gitconfig @@ -14,3 +14,7 @@ ui = auto [branch] sort = -committerdate +[init] + defaultBranch = main +[fetch] + prune = true diff --git a/.zshrc b/.zshrc index 47108d6..36c3eab 100644 --- a/.zshrc +++ b/.zshrc @@ -15,6 +15,7 @@ export MANROFFOPT="-c" export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.bin:$PATH" export PATH="$HOME/.local/bin:$PATH" +export PATH="$PATH:$(gem env user_gemhome)/bin" export HISTCONTROL=ignoreboth:erasedups #unsetopt beep # try disabling annoying beep sounds @@ -28,9 +29,12 @@ setopt extendedglob # Extended globbing. Allows using regular ex setopt correct # Auto correct mistakes setopt numericglobsort # Sort filenames numerically when it makes sense setopt appendhistory +setopt sharehistory +export HISTSIZE=10000 +export SAVEHIST=10000 +HISTFILE=~/.history setopt GLOB_DOTS #share commands between terminal instances or not -unsetopt SHARE_HISTORY #setopt SHARE_HISTORY zstyle ':completion:*' special-dirs true # complete hidden directories @@ -73,7 +77,7 @@ zle -N self-insert url-quote-magic WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word -#bindkey -e # use emacs key layout +bindkey -e # use emacs key layout bindkey '^[[1;5D' backward-word # 'CTRL + leftarrow' bindkey '^[[1;5C' forward-word # 'CTRL + rightarrow' bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace @@ -136,6 +140,8 @@ source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme # If not running interactively, don't do anything [[ $- != *i* ]] && return +source <(fzf --zsh) +source <(tea completion zsh) #PS1='[\u@\h \W]\$ '