Skip to content

Instantly share code, notes, and snippets.

@surajRathi
Last active July 14, 2023 20:00
Show Gist options
  • Save surajRathi/0a3e64bc14f06f45576d57b43690b329 to your computer and use it in GitHub Desktop.
Save surajRathi/0a3e64bc14f06f45576d57b43690b329 to your computer and use it in GitHub Desktop.
Arch zsh config
export XDG_CONFIG_HOME=$HOME/.config
# HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000000
SAVEHIST=10000000
# setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
# setopt HIST_VERIFY # Don't execute immediately upon history expansion.
# setopt HIST_BEEP # Beep when accessing nonexistent history.
alias fgrep='grep -F'
alias c='alacritty --config-file="${HOME}/.config/alacritty/alacritty.yml.old" -o font.size=14 --title="DCSS" -e "c" &! exit'
alias feh=imv
alias dff='df -hT -x tmpfs -x devtmpfs -x squashfs'
alias pac_search='pacman -Slq | fzf --multi --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S'
alias pac_full_search='pacman -Ss | paste -d '' - - | fzf --multi --preview 'pacman -Si {1}' | cut -d ' ' -f 1 | xargs -ro pacman -Si'
alias inhibit='systemd-inhibit --what=shutdown:sleep:idle:handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch --mode=block'
## To enable android charging via laptop
# adb devices # This will autostart the adb daemon
source ~/.local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
export FZF_DEFAULT_OPTS="--reverse"
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
source /home/suraj/.local/share/zsh/fzf-zsh-completion.sh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
#! /usr/bin/sh
export TERMINAL="alacritty"
export BROWSER="chrome"
export EDITOR="vim"
# export LIBVA_DRIVER_NAME=iHD
export LIBVA_DRIVER_NAME=radeonsi
export QXCURSOR_THEME="capitain-cursors"
export QT_QPA_PLATFORM=wayland
# export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORMTHEME=kvantum
export QT_STYLE_OVERRIDE=kvantum
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export GTK_USE_PORTAL=1
export GTK_THEME="Arc-Dark"
export DESKTOP_SESSION=gnome
export CLUTTER_BACKEND=wayland
export MOZ_ENABLE_WAYLAND="1"
# May break games with old SDL
# export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
# For Screen Sharing
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
dbus-update-activation-environment --all
# systemctl --user import-environment
export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1
export MOZ_ACCELERATED=1
export MOZ_DBUS_REMOTE=1
# sway 2>&1 > ~/.cache/sway/"$(date +%s)"start_sway.log
mv ~/.cache/sway/start_sway.log{,.old}
mv ~/.cache/sway/start_sway.err.log{,.old}
sway 2>~/.cache/sway/start_sway.err.log > ~/.cache/sway/start_sway.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment