1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

2 Commits

Author SHA1 Message Date
6ceb993208 aliases: fix all shellcheck warnings
Most of these changes have no semantic bearing, but some of the warnings
specifically related to quoting fix some word-splitting and globbing
issues with certain scripts.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-05-25 11:27:38 +00:00
4e505c23c6 aliases: replace cdt alias with function
This adds an optional argument to `cdt` to allow specifying the
temporary directory prefix instead of the default `tmp`. This also
shortens the random character string from 10 (GNU mktemp) to 8.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-05-25 11:01:14 +00:00
39 changed files with 249 additions and 447 deletions

View File

@ -24,7 +24,7 @@
],
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"defaultCountryCode": "GB",
"showLabsSettings": true,
"showLabsSettings": false,
"features": {
"feature_font_scaling": "labs",
"feature_pinning": "labs",

View File

@ -4,20 +4,20 @@
export TERMINAL="alacritty"
export BROWSER="firefox"
export GTK_THEME="$(grep gtk-theme-name "${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" | sed 's/.*\s*=\s*//')"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini"
export QT_QPA_PLATFORMTHEME=qt5ct
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
# https://www.reddit.com/r/linux/comments/72mfv8/psa_for_firefox_users_set_moz_use_xinput21_to/
export MOZ_USE_XINPUT2=1 # enable pixel-accurate scrolling in firefox
# https://wiki.archlinux.org/index.php/firefox#Hardware_video_acceleration
export MOZ_X11_EGL=1
# Load Xorg resources and set the DPI
xrdb -merge "$XDG_CONFIG_HOME/X11/xresources"
#"$XDG_CONFIG_HOME/scripts/dpi" "$(xrdb -query | grep -i xft.dpi | cut -d: -f2 | xargs)"
xrdb -merge $XDG_CONFIG_HOME/X11/xresources
xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2)
setxkbmap -option caps:none
xset r rate 200 18

View File

@ -36,5 +36,4 @@ Xft.hinting: true
Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault
Xcursor.size: 28
Xcursor.theme: BreezeX-Black
Xcursor.theme: Breeze_Obsidian

View File

@ -51,12 +51,6 @@ window:
# - buttonless: Title bar, transparent background, but no title bar buttons
decorations: full
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
opacity: 0.8
# Startup Mode (changes require restart)
#
# Values for `startup_mode`:
@ -265,13 +259,6 @@ colors:
#
#indexed_colors: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
transparent_background_colors: false
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
@ -298,6 +285,12 @@ colors:
# duration: 0
# color: '#ffffff'
# Background opacity
#
# Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque.
background_opacity: 0.80
selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
@ -373,6 +366,28 @@ mouse:
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: false
url:
# URL launcher
#
# This program is executed when clicking on a text which is recognized as a URL.
# The URL is always added to the command as the last parameter.
#
# When set to `None`, URL launching will be disabled completely.
#
# Default:
# - (macOS) open
# - (Linux/BSD) xdg-open
# - (Windows) explorer
launcher:
program: xdg-open
args: []
# URL modifiers
#
# These are the modifiers that need to be held down for opening URLs when clicking
# on them. The available modifiers are documented in the key binding section.
#modifiers: None
# Mouse bindings
#
# Mouse bindings are specified as a list of objects, much like the key
@ -611,7 +626,7 @@ debug:
# - Info
# - Debug
# - Trace
log_level: Warn
log_level: Info
# Print all received window events.
#print_events: false

32
aliases
View File

@ -35,7 +35,7 @@ alias al=la # No, I don't need the Mono Assembly Linker
alias md='mkdir -p'
alias rd='rmdir -p'
alias -- -='cd -'
cdt() { cd "$(mktemp -d -t "${1:-tmp}.XXXXXXXX")"; }
cdt() { cd "$(mktemp -d "${1:-tmp}.XXXXXXXX")"; }
alias svi=sudoedit
alias svim=sudoedit
@ -46,14 +46,14 @@ alias sudo='sudo '
alias open=xdg-open
# Command rewrites
alias rm='rm -iv'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -ir'
alias scp='scp -r'
alias dd='dd status=progress'
alias wget='wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file'
alias vi=vim
alias grip='grip --pass=$GRIP_API_KEY'
alias grip='grip --user=frebib --pass=$GRIP_API_KEY'
alias acme.sh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
alias acmesh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
alias alpine-sdk="docker run -ti --rm \
@ -112,7 +112,7 @@ alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore'
alias gcl="git clone --recursive"
alias gco="git checkout"
alias gcom="git checkout \"\$(git defbranch)\""
alias gcom="git checkout master"
alias ga="git add"
alias gap="git add -p"
alias gau="git add -u"
@ -136,31 +136,23 @@ alias grba="grb --abort"
alias grbc="grb --continue"
alias grbsk="grb --skip"
alias grbsh="grb --show-current"
alias grbom="git rebase \"origin/\$(git defbranch)\""
gfrb() { remote="${1%/*}"; git fetch "$remote" && git rebase "$@"; }
gfrbi() { remote="${1%/*}"; git fetch "$remote" && git rebase -i "$@"; }
alias grbom="git rebase origin/master"
alias gfrb="git fetch && git rebase"
alias gam="git am"
alias gama="git am --abort"
alias gamc="git am --continue"
alias gamsk="git am --skip"
alias gcp="git cherry-pick"
alias gcpa="git cherry-pick --abort"
alias gcpc="git cherry-pick --continue"
alias gcpsk="git cherry-pick --skip"
alias grv="git revert"
alias grva="git revert --abort"
alias grvc="git revert --continue"
alias grvsk="git revert --skip"
alias gf="git fetch"
alias gp="git push"
alias gpf="gp --force"
alias gpsu="git push --set-upstream"
alias gpoH="git push origin HEAD"
alias gpsuom="git push --set-upstream origin \"\$(git defbranch)\""
alias gpsuom="git push --set-upstream origin master"
alias gpall="git remote | xargs -L1 git push"
alias gl="git pull --rebase"
alias glp="gl && gp"
@ -168,18 +160,18 @@ alias gd="git diff --patch-with-stat"
alias gdni="gd --no-index"
alias gds="gd --staged"
alias gsh="git show --format=fuller --patch-with-stat"
alias glg="git log --color --format=fuller --stat --no-merges --graph"
alias glgp="git log --color --format=fuller --patch-with-stat --no-merges --graph"
alias glg="git log --color --format=fuller --stat"
alias glgp="git log --color --format=fuller --patch-with-stat"
alias glog="git log --color --oneline --decorate --graph"
alias grst="git reset"
alias gundo="git reset --keep @~1"
alias gclean="git clean"
alias gbr="git branch"
alias gbrl="git for-each-ref --sort=committerdate refs/heads/ --format=\"%(refname:short)\" | fzf -x --ansi --multi --preview-window=right:70% --preview=\"git log --format=fuller --stat --color=always {} | head -n\$((\$(tput lines)*10))\""
alias gtg="git tag"
alias gbl="git blame"
alias gr="git remote"
alias grv="git revert"
alias gra="gr add"
alias grr="gr rm"
alias grao="gra origin"
@ -210,7 +202,6 @@ alias dst='docker stop'
alias drst='docker restart'
alias dnet='docker network'
alias dvol='docker volume'
alias dc='docker compose'
alias dlg='docker logs --tail=1000 -f'
alias dalpine='docker run -ti --rm spritsail/alpine /bin/sh'
alias drm-stopped='docker container prune'
@ -286,6 +277,7 @@ do_dsh() {
docker "${docker_args[@]}" "$host" "${prog[@]}"
}
alias dc='docker-compose'
alias dm='docker-machine'
dmc() { eval "$(docker-machine env "$1")"; }
@ -308,7 +300,7 @@ alias xresources="\$EDITOR \$XDG_CONFIG_HOME/X11/xresources ; xrdb merge \$XDG_C
alias sshc="\$EDITOR ~/.ssh/config"
alias dotfiles="cd \$XDG_CONFIG_HOME"
alias i3c="\$EDITOR \$XDG_CONFIG_HOME/i3/config; systemctl --user reload i3"
alias polybarc="\$EDITOR \$XDG_CONFIG_HOME/polybar/config.ini; systemctl --user reload polybar@i3bar"
alias polybarc="\$EDITOR \$XDG_CONFIG_HOME/polybar/config; systemctl --user reload polybar@i3bar"
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"

View File

@ -51,16 +51,21 @@
# Ignore newlines '\n' in notifications.
ignore_newline = no
# dynamic width from 0 to 400
# width = (0, 400)
# constant width of 400
width = (320, 360)
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 30x30
# 53 = 30 + 23 (bar-height)
geometry = "360x5-30+30"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
@ -69,7 +74,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 20
transparency = 15
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.

View File

@ -9,6 +9,6 @@ XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
EDITOR="vim"
VISUAL="vim"
PATH="${PATH}:/sbin:/usr/sbin:${HOME}/.local/bin:${XDG_CONFIG_HOME}/scripts"
PATH="${PATH}:/sbin:/usr/sbin:${XDG_CONFIG_HOME}/scripts"
# vim: ft=sh

View File

@ -9,7 +9,7 @@ GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
GOPATH="$XDG_DATA_HOME/go"
ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority"
NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
#PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup"
RUSTUP_HOME="$XDG_DATA_HOME/rustup"
TERMINFO="$XDG_DATA_HOME/terminfo"
@ -22,6 +22,6 @@ WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"
XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
ZDOTDIR="$XDG_CONFIG_HOME/zsh"
PATH="${PATH}:${GOPATH}/bin:${GEM_HOME}/ruby/3.0.0/bin"
PATH="${PATH}:${GOPATH}/bin:${GEM_HOME}/bin"
# vim: ft=sh

View File

@ -6,44 +6,25 @@
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans</string>
<string>Noto Color Emoji</string>
<string>FontAwesome 6 Pro Light</string>
<string>FontAwesome 5 Pro Light</string>
</edit>
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
<edit mode="assign" name="hinting"><bool>false</bool></edit>
</match>
<match>
<test qual="any" name="family"><string>serif</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif</string>
<string>Noto Color Emoji</string>
<string>FontAwesome 6 Pro Light</string>
<string>FontAwesome 5 Pro Light</string>
</edit>
</match>
<match>
<test qual="any" name="family"><string>monospace</string></test>
<edit name="family" mode="prepend" binding="strong">
<string>Source Code Pro</string>
<string>Noto Color Emoji</string>
<string>FontAwesome 6 Pro Light</string>
<string>FontAwesome 5 Pro Light</string>
</edit>
</match>
<match>
<test qual="all" name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
</match>
<match>
<test qual="all" name="family" compare="eq"><string>Source Code Pro</string></test>
<edit name="antialias" mode="assign_replace"><bool>false</bool></edit>
<edit name="hintstyle" mode="assign_replace"><const>hintfull</const></edit>
<edit name="lcdfilter" mode="assign_replace"><const>lcddefault</const></edit>
<edit name="rgba" mode="assign_replace"><const>rgb</const></edit>
</match>
<alias>
<family>SF Mono</family>
<accept>
@ -51,8 +32,13 @@
</accept>
</alias>
<match>
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<match target="font">
<test qual="all" name="family" compare="eq"><string>Noto Sans</string></test>
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
</match>
<match target="font">
<test qual="all" name="family" compare="eq"><string>Source Code Pro</string></test>
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>

View File

@ -5,11 +5,11 @@
[core]
autocrlf = input
excludesfile = /home/frebib/.config/git/gitignore
pager = delta --diff-so-fancy --color-only
pager = diff-highlight | $PAGER
[init]
defaultBranch = master
[interactive]
diffFilter = delta --diff-so-fancy --color-only
diffFilter = diff-highlight
[commit]
gpgsign = true
[fetch]
@ -19,14 +19,8 @@
[pull]
rebase = true
prune = true
[merge]
ff = only
[rebase]
autoStash = true
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
[remote "upstream"]
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
[log]
date = iso8601-local
[format]
@ -37,8 +31,6 @@
count = !echo $(pwd) && git rev-list HEAD --count
unpushed = !git log --oneline @{u}..HEAD
leaders = !git shortlog -s -n --all --no-merges
defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\"
rbranch = for-each-ref --sort='committerdate' --format="%20%20%(refname:short)" refs/heads/
[advice]
statusHints = false
pushUpdateRejected = false

View File

@ -1,8 +1,11 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="Xenlism-Wildfire"
gtk-font-name="sans 9"
gtk-cursor-theme-name="BreezeX-Black"
gtk-cursor-theme-size=28
gtk-font-name="Noto Sans 9"
gtk-cursor-theme-name="Breeze_Obsidian"
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1

View File

@ -2,9 +2,9 @@
gtk-theme-name=Arc-Dark
gtk-icon-theme-name=Xenlism-Wildfire
gtk-application-prefer-dark-theme=true
gtk-font-name=sans 9
gtk-cursor-theme-name=BreezeX-Black
gtk-cursor-theme-size=28
gtk-font-name=Noto Sans 9
gtk-cursor-theme-name=Breeze_Obsidian
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1

View File

@ -1 +0,0 @@
../gtk-3.0/settings.ini

View File

@ -139,20 +139,19 @@ bindsym $mod+v exec systemd-run-i3 -n alacritty -e sh -c "($SHE
bindsym $mod+Ctrl+v exec systemd-run-i3 -n alacritty --class floating -e sh -c "($SHELL -c $EDITOR || : ) && $SHELL"
bindsym $mod+l exec dm-tool switch-to-greeter
bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window -run-command 'systemd-run-i3 -n {cmd}'"
bindsym $mod+Shift+p exec systemd-run-i3 -n rofi-rbw
bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g'
bindsym $mod+Shift+e exec "pkill rofi; rofi -show emoji -modi emoji -normal-window"
bindsym $mod+Shift+i exec rofi-fontawesome
bindsym --release Print exec screenshot --clip
bindsym --release $mod+Print exec screenshot
bindsym --release Print exec screenshot
bindsym --release $mod+Print exec screenshot --clip
bindsym --release Shift+Print exec screenshot --active
bindsym --release $mod+Shift+Print exec screenshot --active --clip
bindsym $mod+Shift+x exec systemd-run-i3 -n i3-sensible-terminal --class floating-term --hold -e /bin/echo "$(xprop -id $(xdotool getactivewindow))"
bindsym $mod+$alt+space exec systemd-run-i3 -s background -n ~/.config/i3/cycleaudio.py
bindsym $mod+numbersign exec systemd-run-i3 -n i3-sensible-terminal --hold -e sh -c 'xclip -o | gpg --decrypt 2>&1'
bindsym $mod+r exec bash -c 'pwgen -snc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i -r'
bindsym $mod+g exec systemd-run-i3 -n bash -xc 'xclip -o | gh gist create -d Paste - 2>&1 | grep -vE "^[-✓] Creat(ing|ed) gist" | tee >(xclip -i >&2 >/dev/null) | xargs -I% --null -r notify-send -c transfer -- %'
bindsym --release $mod+i exec systemd-run-i3 -s background -n sh -c 'sleep 0.5 && xdotool getactivewindow type --delay 10 -- "$(xclip -o -selection clipboard)"'
bindsym $mod+z exec otp | rofi -dmenu -p otp | xargs otp
bindsym $mod+g exec systemd-run-i3 -n notify-send -c transfer "$(gist -PRpc)"
bindsym --release $mod+i exec systemd-run-i3 -s background -n sh -c 'sleep 0.5 && xdotool getactivewindow type --delay 250 "$(xclip -o -selection clipboard)"'
# Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause

View File

@ -11,7 +11,7 @@ case $option in
power\ off) systemctl poweroff;;
reboot) systemctl reboot;;
windows)
windows="$(efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4)"
windows=`efibootmgr | grep -Po -m1 'Boot\K(\d{4}).*Windows.*' | head -c4`
sudo efibootmgr -n $windows
systemctl reboot;;
reboot;;
esac

View File

@ -4,29 +4,31 @@ log-level = "info";
# Shadow
shadow = true;
shadow-radius = 30;
shadow-offset-x = -30;
shadow-radius = 24;
shadow-offset-x = -24;
shadow-offset-y = -24;
shadow-opacity = 0.4;
shadow-color = "#000000";
shadow-opacity = 0.6;
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [
"class_g = 'slop'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'firefox' && argb && (window_type = 'utility' || window_type = 'popup_menu')",
"class_g = 'Cairo-clock'",
"class_g = 'firefox' && argb",
"name = 'Notification'",
"name = 'cpt_frame_window'",
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
# shadow-ignore-shaped = true;
xinerama-shadow-crop = true;
# Opacity
frame-opacity = 1.0;
active-opacity = 1.0;
inactive-opacity = 0.5;
# active-opacity = 0.8;
inactive-opacity = 0.6;
inactive-opacity-override = true;
# inactive-dim = 0.2;
# inactive-dim-fixed = true;
@ -38,7 +40,7 @@ opacity-rule = [
blur:
{
method = "dual_kawase";
strength = 12;
strength = 8;
};
blur-background-frame = true;
blur-background-fixed = true;
@ -47,106 +49,56 @@ blur-background-exclude = [
"class_g = 'Onboard'",
"class_g = 'slop'",
"class_g = 'Polybar'",
"class_g = 'firefox' && argb && (window_type = 'utility' || window_type = 'popup_menu')",
"class_g = 'firefox' && argb",
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
"_GTK_FRAME_EXTENTS@:c"
];
# Corners
corner-radius = 9;
# Fading
fading = true;
fade-delta = 10;
fade-in-step = 0.035;
fade-in-step = 0.04
fade-out-step = 0.06;
no-fading-openclose = false;
no-fading-destroyed-argb = false;
# fade-exclude = [ ];
# Focus
focus-exclude = [
"i:ai:chromium",
"class_g = 'firefox'",
"class_g = 'zoom'",
"class_g = 'guvcview'",
"class_g = 'Entangle'",
"class_g = 'obs'",
"class_g = 'parsecd'",
"class_g = 'discord'",
"class_g = 'steam_app_271590'"
];
transition-length = 350;
transition-pow-x = 0.3;
transition-pow-y = 0.3;
size-transition = true;
# Other
# https://github.com/yshui/picom/blob/next/picom.sample.conf#L203
backend = "glx";
vsync = true;
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
use-ewmh-active-win = true;
refresh-rate = 0;
vsync = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [
"i:ai:chromium",
"class_g = 'firefox'",
"class_g = 'zoom'"
];
detect-transient = true;
detect-client-leader = true;
invert-color-include = [ ];
resize-damage = 1;
# resize-damage = 1;
# GLX backend
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
# xrender-sync-fence = true;
# no-use-damage = false;
xrender-sync-fence = true;
use-damage = true;
# Window type settings
wintypes: {
tooltip = {
opacity = 0.75;
full-shadow = false;
blur-background = false;
}
dock = {
# Prevents polybar getting a forehead-shadow
shadow = false;
}
dnd = {
# Prevents dragged text in a browser getting blur/shadow
shadow = false;
blur-background = false;
}
popup_menu = {
opacity = 0.8;
}
dropdown_menu = {
opacity = 0.8;
}
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};
#animations = true;
#animation-clamping = false;
#animation-dampening = 1.0;
#animation-window-mass = 0.125;
#animation-unmap = "fade-out";
#animation-for-unmap-window = "zoom";
#animation-for-open-window = "auto";
#animation-workspace-in = "slide-left";
#animation-workspace-out = "slide-left";
#animation-for-workspace-switch-in = "auto";
#animation-for-workspace-switch-out = "auto";
#animation-for-transient-window = "zoom";
# vim: ft=conf noet

View File

@ -1,5 +1,5 @@
[colours]
background = #0000
background = transparent
text = #eceff1
icon = #147a82
warning = #ffcb00
@ -10,23 +10,25 @@ urgent = #e53935
format-foreground = ${colours.text}
format-background = ${colours.background}
format-spacing = 0
format-margin = 3
format-margin = 2.5
format-offset = 0
screenchange-reload = true
[bar/i3bar]
monitor = ${env:MONITOR:HDMI-0}
dpi = ${xrdb:Xft.dpi:96}
fixed-center = false
enable-ipc = true
width = 100%
#offset-x = 18px
height = 16pt
bottom = true
radius = 0
font-0 = sans:pixelsize=9;2pt
font-1 = FontAwesome6ProLight:pixelsize=10;2pt
font-1 = FontAwesome5ProLight:pixelsize=10;2pt
foreground = ${colours.text}
background = ${colours.background}
@ -37,7 +39,7 @@ padding-right = 2pt
border-size = 0
border-left-size = 16pt
border-right-size = 16pt
border-bottom-size = 10pt
border-bottom-size = 8pt
line-size = 0
line-colour = #f00
@ -45,14 +47,14 @@ line-colour = #f00
modules-left = i3
modules-center =
# modules-right = volume updates weather xkeyboard wlan gateway eth memory cpu xbacklight battery cputemp gputemp date
modules-right = volume updates weather wlan eth memory cpu xbacklight battery cputemp gputemp date
modules-right = volume updates weather wlan gateway eth memory cpu xbacklight battery cputemp gputemp date
tray-position = right
tray-detached = false
tray-background = ${colours.background}
#tray-offset-x = -20
#tray-offset-y = 0
tray-maxsize = 16pt
tray-maxsize = 12pt
tray-padding = 8pt
tray-scale = 1.0
@ -187,10 +189,10 @@ ramp-signal-foreground = ${colours.icon}
[module/eth]
type = internal/network
interface = lan
interval = 10.0
interface = eth0
interval = 3.0
label-connected = %local_ip% & %local_ip6%
label-connected = %local_ip%
format-connected-prefix = " "
format-connected-prefix-foreground = ${colours.icon}
format-connected-underline = ${colours.background}
@ -267,7 +269,7 @@ ramp-capacity-1-foreground = ${colours.warning}
[module/cputemp]
type = internal/temperature
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp2_input
hwmon-path = /sys/devices/platform/nct6775.656/hwmon/hwmon1/temp2_input
base-temperature = 25
format = <ramp> <label>

View File

@ -8,7 +8,7 @@ window {
border: 0.3em;
border-color: #2f343f;
padding: 0.8em;
background-color: rgba(56, 60, 74, 0.9);
background-color: rgba(56, 60, 74, 0.95);
transparency: "real";
}

View File

@ -1,12 +1,15 @@
configuration {
theme: "arc-dark";
font: "sans 14";
dpi: 0;
width: 35;
lines: 10;
/* show-icons: true; */
separator-style: "solid";
modi: "window,run,ssh";
/* kb-row-tab: "Shift-Tab"; */
/* kb-row-select: "Tab"; */
kb-row-tab: "Shift-Tab";
kb-row-select: "Tab";
terminal: "i3-sensible-terminal";
matching: "glob";
@ -139,15 +142,4 @@ configuration {
/* me-accept-custom: "Control+MouseDPrimary";*/
}
@theme "arc-dark"
window {
width: 700;
}
listview {
lines: 10;
columns: 1;
}
/* vim: ft=css sw=2 */

View File

@ -1,69 +1,36 @@
#!/bin/bash
set -eu
#!/bin/sh
set -e
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
BLUR_STRENGTH=12
CURSOR_SIZE=28
CORNER_RADIUS=9
dpi=$1
xrdbget() {
set -o pipefail
xrdb -query | grep -i -m1 "$1" | sed 's/^.*:\s//g' || echo "$2"
}
xsetting_bool() {
case "$1" in
true) echo 1;;
false) echo 0;;
default) echo -1;;
*) echo -1;;
esac
}
if [ -z "$1" ] || [ "$1" -gt 200 ] || [ "$1" -lt 96 ]; then
>&2 printf "Usage\n\t%s: value\n\n value\t Value must be within 96-200 inclusive\n" "$(basename "$0")"
if [ -z "$1" ]; then
>&2 printf "Usage\n\t%s: <dpi>" "$(basename "$0")"
exit 1
fi
dpi=$1
scale=$(( dpi/96 ))
cursor=$(( (dpi*CURSOR_SIZE)/96 ))
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/xsettingsd"
mkdir -p "$CONF_DIR"
# Update picom scale
sed -i -e "s/strength =.*$/strength = $(( (dpi*BLUR_STRENGTH)/96 ));/" \
-e "s/corner-radius =.*$/corner-radius = $(( (dpi*CORNER_RADIUS)/96 ));/" \
"$CONF_DIR/picom/picom.conf" &
cursor=$(echo $dpi/6 | bc | cut -d. -f1)
# Build xsettingsd.conf
mkdir -p "$CONF_DIR/xsettingsd"
# Build xsettingsd.local
{
cat "$CONF_DIR/xsettingsd.local" 2>/dev/null || :
echo "Xcursor/size $cursor"
echo "Gtk/CursorThemeSize $cursor"
echo "Gtk/CursorThemeName \"$(xrdbget Xcursor.theme Adwaita)\""
echo "Xft/HintStyle \"$(xrdbget Xft.hintstyle hintfull)\""
echo "Xft/Hinting $(xsetting_bool "$(xrdbget Xft.hinting default)")"
echo "Xft/RGBA \"$(xrdbget Xft.rgba rgb)\""
echo "Xft/DPI $(( dpi*1024 ))"
echo "Gdk/WindowScalingFactor $scale"
echo "Gdk/UnscaledDPI $(( dpi*1024/scale ))"
} > "$CONF_DIR/xsettingsd/xsettingsd.conf"
cat $CONF_DIR/xsettingsd.conf 2>/dev/null || true
echo Xcursor/size $cursor
echo Gtk/CursorThemeSize $cursor
echo Xft/DPI $(( dpi*1024 ))
echo Gdk/WindowScalingFactor $(( dpi/96 ))
echo Gdk/UnscaledDPI $(( dpi*1024/(dpi/96) ))
} > $CONF_DIR/xsettingsd.local
xrdb -merge <<EOF &
Xft.dpi: $dpi
Xcursor.size: $cursor
EOF
xrandr --dpi "$dpi" &
systemctl --user reload-or-restart xsettingsd &
wait
{
echo Xft.dpi: $dpi
echo Xcursor.size: $cursor
} | xrdb -merge
systemctl --user reload \
i3 \
polybar@i3bar &
systemctl --user restart \
dunst &
xrandr --dpi $dpi
wait
systemctl --user reload-or-restart xsettingsd
systemctl --user --no-block reload i3 polybar@i3bar

View File

@ -1,42 +0,0 @@
#!/usr/bin/env bash
while getopts "on:" o; do
case "${o}" in
o)
stdout=1;;
n)
caller="${OPTARG}"
;;
*)
exec ykman oath accounts list
;;
esac
done
shift $((OPTIND-1))
if [ $# -lt 1 ]; then
exec ykman oath accounts list
fi
if [ -n "$caller" ]; then
notif="$(notify-send -p "Touch your Yubikey" "$caller is requesting otp for $1")"
fi
ykman oath accounts code -s "$1" 2>&1 |
while read -r x; do
if grep -Pqw '[0-9]{6}' <<< "$x"; then
if [ -z "$stdout" ]; then
echo "$x" | tee >(xclip -i)
xdotool type "$x"
else
echo "$x"
fi
fi
if [ -z "$stdout" ]; then
notify-send "$x";
fi
done
if [ -n "$notif" ]; then
notify-send -r "$notif" -t 1000 "Touch your Yubikey" "otp generated for $caller"
fi

View File

@ -59,7 +59,7 @@ function notify() {
function display() {
update=$'\tUpdate Font Awesome cache'
fontawesome=$(grep -v '#\|^[[:space:]]*$' "$FONTAWESOME_FILE"; printf "$update\n")
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' $@)
line=$(echo "$fontawesome" | rofi -dmenu -i -p fontawesome -normal-window -kb-custom-1 Ctrl+c -kb-row-tab '' -kb-row-select Tab $@)
exit_code=$?
if [ "${line[@]}" == "$update" ]; then

View File

@ -1,6 +1,5 @@
#!/bin/bash -e
slice=app
rand=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 8)
args=()
@ -17,11 +16,14 @@ do case "$opt" in
done
shift $((OPTIND-1))
if [ -z "$slice" ]; then
slice=app
fi
exec systemd-run \
--user \
--collect \
--slice="$slice" \
--unit="$slice-$1-$rand" \
--property=BindsTo=graphical-session.target \
--property=ExitType=cgroup \
"${args[@]}" -- "$@"
${args[@]} -- "$@"

View File

@ -1,13 +0,0 @@
#!/bin/sh -e
if [ -z "$SSH_HOST" ]; then
>&2 echo 'Missing SSH_HOST variable'
exit 1
fi
case "$SSH_HOST" in
*)
echo 'Unknown SSH host'
exit 1
;;
esac

View File

@ -1 +0,0 @@
/usr/lib/systemd/user/pipewire.service

View File

@ -4,7 +4,7 @@ Requires=graphical-session.target
After=dbus.service graphical-session.target xorg.target
[Service]
ExecStart=/usr/bin/picom --dbus
ExecStart=/usr/bin/picom --experimental-backends --dbus
Restart=always
Slice=session.slice

View File

@ -1 +0,0 @@
/usr/lib/systemd/user/wireplumber.service

View File

@ -1 +0,0 @@
/usr/lib/systemd/user/wireplumber.service

View File

@ -1,11 +1,11 @@
[Unit]
Description=Polybar bar %i
Description=Polybar
Requires=graphical-session.target
After=graphical-session.target pulseaudio.socket i3.service
[Service]
ExecStart=/usr/bin/polybar --reload --log=warning %i
ExecReload=/usr/bin/polybar-msg -p $MAINPID cmd restart
ExecReload=/usr/bin/polybar-msg cmd restart -p $MAINPID
Restart=always
Slice=session.slice

View File

@ -0,0 +1,2 @@
[Service]
Slice=session.slice

View File

@ -1 +0,0 @@
/usr/lib/systemd/user/pipewire.socket

View File

@ -0,0 +1 @@
/usr/lib/systemd/user/pulseaudio.socket

View File

@ -1,13 +0,0 @@
[Unit]
Description=SSH persistent connection to %i
[Service]
Type=forking
Slice=ssh.slice
Environment=SSH_ASKPASS=%E/ssh/askpass
Environment=SSH_HOST=%i
ExecStart=/usr/bin/ssh -fNT %i
Restart=on-failure
[Install]
WantedBy=ssh.target

View File

@ -1,7 +1,7 @@
[Unit]
Description=Load Xorg configuration
# this is a bit weird, but I guess it works
PartOf=xorg.target
After=xorg.target
[Service]
Type=oneshot

View File

@ -1,6 +1,6 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.

106
vim/vimrc
View File

@ -39,23 +39,15 @@ set updatetime=500 " reduce delay from 4s default
let mapleader="\<space>"
" ALE config
let g:ale_completion_enabled = 1
let g:ale_open_list = 1
augroup CloseLoclistWindowGroup
autocmd!
autocmd QuitPre * if empty(&buftype) | lclose | endif
augroup END
" Autosave settings
function! SaveIfExist()
if @% != "" && filereadable(@%) && !&readonly && &modified
SyntasticCheck
write
endif
endfunction
set autowrite
autocmd InsertLeave <buffer> :write
autocmd CursorHold,CursorHoldI,InsertLeave,FocusGained,FocusLost * call SaveIfExist()
" Search options
set hlsearch
@ -71,11 +63,14 @@ set splitright " Vertical split to right of current.
" Whitespace highlight settings
set list
set listchars=space,tab:>-,trail:◦,extends:▶,precedes:◀
set listchars=eol:$,space,tab:>-,trail:◦,extends:▶,precedes:◀
highlight SpecialKey ctermfg=8
set cc=+1
highlight ColorColumn ctermbg=8
if exists('+colorcolumn')
highlight ColorColumn ctermbg=8
autocmd filetype c,h,cpp,hpp set colorcolumn=81
autocmd filetype c,h,cpp,hpp match ErrorMsg '\%>80v.\+'
endif
" Highlight line and column of cursor
set cul cuc
@ -90,6 +85,9 @@ endif
call plug#begin('$XDG_CONFIG_HOME/vim/plug')
Plug 'Valloric/YouCompleteMe'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdtree', { 'on': 'NERTreeToggle' }
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
@ -105,13 +103,6 @@ Plug 'vim-airline/vim-airline-themes'
Plug 'lervag/vimtex'
Plug 'JamshedVesuna/vim-markdown-preview'
Plug 'junegunn/fzf.vim'
" Completion and linting
Plug 'dense-analysis/ale'
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
" Syntax Highlighting
@ -120,41 +111,18 @@ Plug 'PotatoesMaster/i3-vim-syntax'
Plug 'puppetlabs/puppet-syntax-vim'
Plug 'saltstack/salt-vim'
Plug 'arrufat/vala.vim'
Plug 'Glench/Vim-Jinja2-Syntax'
Plug 'pearofducks/ansible-vim'
Plug 'jvirtanen/vim-hcl'
Plug 'hashivim/vim-terraform'
call plug#end()
" Change to dvorak-mapped keys
let g:use_dvorak = 1
" Deoplete config
call deoplete#custom#option({
\ 'camel_case': v:true,
\ })
" Use ALE as completion sources for all code.
"call deoplete#custom#option('sources', {
"\ '_': ['ale'],
"\})
call deoplete#enable()
" Vim-Airline config
let g:Powerline_symbols = 'fancy'
let g:airline_powerline_fonts = 1
let g:airline_theme='solarized'
let g:airline#extensions#tabline#enabled = 1
" ALE integration
let g:airline#extensions#ale#enabled = 1
" vim-markdown plugin
let vim_markdown_preview_toggle=0
let vim_markdown_preview_browser='Chromium'
let vim_markdown_preview_use_xdg_open=1
let vim_markdown_preview_github=1
" LaTeX config
" YouCompleteMe config
let g:ycm_confirm_extra_conf = 0
if !exists('g:ycm_semantic_triggers')
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
"let g:vimtex_view_method='zathura'
let g:tex_flavor='xelatex'
let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying
@ -168,6 +136,35 @@ augroup vimtex
autocmd BufWritePost tex silent VimtexCompile
augroup END
" Vim-Airline config
let g:Powerline_symbols = 'fancy'
let g:airline_powerline_fonts = 1
let g:airline_theme='solarized'
let g:airline#extensions#tabline#enabled = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
" vim-markdown plugin
let vim_markdown_preview_toggle=0
let vim_markdown_preview_browser='Chromium'
let vim_markdown_preview_use_xdg_open=1
let vim_markdown_preview_github=1
" Syntastic configuration
let g:syntastic_enable_highlighting = 1
let g:syntastic_enable_signs=1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Tagbar configuration
let g:tagbar_width = 50
let g:tagbar_compact = 1
@ -307,11 +304,6 @@ cmap w!! w !sudo tee > /dev/null %
map Q <nop>
autocmd FileType c setlocal noet
autocmd filetype c,h,cpp,hpp set colorcolumn=81
autocmd filetype c,h,cpp,hpp match ErrorMsg '\%>80v.\+'
autocmd FileType jinja setlocal sts=2 sw=2 et
autocmd FileType markdown setlocal sts=2 sw=2 et
autocmd FileType yaml setlocal sts=2 sw=2 et indentkeys-=<:>
autocmd FileType gitcommit setlocal tw=72 et sw=4
autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et indentkeys-=<:>
autocmd FileType gitcommit setlocal cc=72 et sw=4

View File

@ -16,10 +16,9 @@ if exists tty && tty -s; then
fi
# Configure less and add colours
export LESS="-nRIFRSXM --mouse --wheel-lines=3"
export LESS="-RI --mouse --wheel-lines=3"
export PAGER="less"
export MANPAGER="less -+N"
export SYSTEMD_LESS="$LESS"
export SYSTEMD_PAGER="less $LESS"
# Disable histfile
export LESSHISTFILE=-
@ -60,18 +59,17 @@ ZINIT[HOME_DIR]="$XDG_CACHE_HOME/zsh/zinit"
ZINIT[BIN_DIR]="${ZINIT[HOME_DIR]}/bin"
ZINIT[PLUGINS_DIR]="${ZINIT[HOME_DIR]}/plugins"
if [ ! -e "${ZINIT[HOME_DIR]}" ]; then
git clone https://github.com/zdharma-continuum/zinit.git "${ZINIT[HOME_DIR]}"
git clone https://github.com/zdharma/zinit.git "${ZINIT[HOME_DIR]}"
fi
source "${ZINIT[HOME_DIR]}"/zinit.zsh
zinit wait lucid for \
atinit"ZINIT[COMPINIT_OPTS]=-C;zicompinit;zicdreplay" \
atload"FAST_HIGHLIGHT[chroma-zinit]=" \
zdharma-continuum/fast-syntax-highlighting \
blockf \
zsh-users/zsh-completions \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions
zinit wait lucid light-mode for \
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
zdharma/fast-syntax-highlighting \
blockf \
zsh-users/zsh-completions \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions
zinit light agkozak/zsh-z
@ -91,16 +89,13 @@ bindkey "^[[7~" beginning-of-line
bindkey "^[[8~" end-of-line
bindkey "^[[3~" delete-char
bindkey "^[[3;3~" delete-word
bindkey '^[[A' fzf-history-widget # Up (fzf)
bindkey '^[[B' fzf-history-widget # Down (fzf)
bindkey '^F' fzf-file-widget # Ctrl+F file search (fzf)
bindkey "^F" fzf-file-widget # Ctrl+F file search (fzf)
bindkey "^[[A" fzf-history-widget # Up (fzf)
bindkey "^[[B" fzf-history-widget # Down (fzf)
bindkey "${terminfo[kcuu1]}" fzf-history-widget # Up (fzf)
bindkey "${terminfo[kcud1]}" fzf-history-widget # Down (fzf)
# Backspace across newlines when in vi-mode
bindkey -v '^?' backward-delete-char
bindkey "^F" fzf-file-widget
bindkey -M vicmd "^W" backward-delete-word
bindkey -M vicmd d vi-backward-char
bindkey -M vicmd h vi-down-line-or-history
bindkey -M vicmd t vi-up-line-or-history
@ -110,8 +105,8 @@ bindkey -M vicmd K vi-kill-eol
bindkey -M vicmd j vi-find-next-char-skip
bindkey -M vicmd l vi-repeat-search
# Disable all fsh chromas, fixes `zi` being slow
FAST_HIGHLIGHT=()
# Backspace across newlines when in vi-mode
bindkey -v '^?' backward-delete-char
ZSH_AUTOSUGGEST_USE_ASYNC=true
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128
@ -128,10 +123,3 @@ trysource() { for f in "$@"; do source "$f" 2>/dev/null && return; done; }
trysource /usr/share/fzf/key-bindings.zsh \
/usr/share/doc/fzf/examples/key-bindings.zsh
trysource /usr/share/doc/pkgfile/command-not-found.zsh # pkgfile on Arch
if command -v kubectl >/dev/null 2>&1; then
autoload -Uz compinit
compinit
source <(kubectl completion zsh)
fi

View File

@ -1,19 +1,9 @@
# ZSH Theme emulating the Fish shell's default prompt.
_fishy_collapsed_wd() {
pwd | sed -E 's|^'$HOME'|~|;s|([\.~]?[^/]{1})[^/]*/|\1/|g'
pwd | sed -E 's|^'$HOME'|~|;s|(.*)/|\1%|;s|((^\|/)\.?[^/%]{1})[^/%]*|\1|g;s|(.*)%|\1/|'
}
function zle-line-init zle-keymap-select {
case $KEYMAP in
vicmd) printf '\e[3 q';; # block cursor
*) printf '\e[2 q';; # less visible cursor
esac
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
# Required for dynamic prompt
setopt prompt_subst
@ -21,8 +11,4 @@ local user_color='green'; [ $UID -eq 0 ] && user_color='red'
PROMPT="%n@%m %F{$user_color}\$(_fishy_collapsed_wd)%f%(!.#.>) "
PROMPT2='%F{red}\ %f'
RPROMPT='%F{cyan}${${KEYMAP/vicmd/ normal}/(main|viins)/}%f%(?.. %F{red}%?%f)'
# Disable trailing space
# https://superuser.com/questions/655607/removing-the-useless-space-at-the-end-of-the-right-prompt-of-zsh-rprompt
ZLE_RPROMPT_INDENT=0
RPROMPT='%F{red}%(?.. %?)%f'

View File

@ -57,7 +57,7 @@ git_prompt_status() {
# Required for dynamic prompt
setopt prompt_subst
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_PREFIX=" "
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""