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

3 Commits

Author SHA1 Message Date
fea0831c13 Unstaged changes
Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-23 23:17:44 +00:00
ea5f537303 scripts/dpi: Constant blur/corner-radius scaling
Scale picom blur and corner radius according to a constant scale factor
much like we do for cursor sizes. This ideally would be defined
somewhere centrally, but this is better than nothing.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-23 10:59:37 +00:00
2907e24656 cursor: Switch to BreezeX Black
I still prefer Breeze-Obsidian, but the reality is that it's unsupported
and nobody even seems to have the source any more :(

Allow `dpi` script to scale cursor relative to display scale according
to a fixed "standard" size, which for BreezeX is around 28px to closely
match the scale of the Breeze-Obsidian 16px.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-23 10:24:28 +00:00
19 changed files with 126 additions and 119 deletions

View File

@ -17,7 +17,7 @@ export MOZ_USE_XINPUT2=1 # enable pixel-accurate scrolling in firefox
# Load Xorg resources and set the DPI # Load Xorg resources and set the DPI
xrdb -merge "$XDG_CONFIG_HOME/X11/xresources" xrdb -merge "$XDG_CONFIG_HOME/X11/xresources"
"$XDG_CONFIG_HOME/scripts/dpi" "$(xrdb -query | grep -i xft.dpi | cut -d: -f2 | xargs)" #"$XDG_CONFIG_HOME/scripts/dpi" "$(xrdb -query | grep -i xft.dpi | cut -d: -f2 | xargs)"
setxkbmap -option caps:none setxkbmap -option caps:none
xset r rate 200 18 xset r rate 200 18

View File

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

54
aliases
View File

@ -53,7 +53,7 @@ alias scp='scp -r'
alias dd='dd status=progress' alias dd='dd status=progress'
alias wget='wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file' alias wget='wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file'
alias vi=vim alias vi=vim
alias grip='grip --user=frebib --pass=$GRIP_API_KEY' alias grip='grip --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 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 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 \ alias alpine-sdk="docker run -ti --rm \
@ -110,38 +110,25 @@ alias ginit='git init'
alias gignore='$EDITOR .gitignore' alias gignore='$EDITOR .gitignore'
alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config' alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore' alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore'
alias gcl="git clone --recursive"
alias gco="git checkout" alias gco="git checkout"
alias gcom="git checkout \"\$(git defbranch)\"" alias gcom="git checkout \"\$(git defbranch)\""
alias gsw="git switch"
alias gswm="git switch \"\$(git defbranch)\""
alias gbr="git branch"
alias gtg="git tag"
alias gbl="git blame"
alias gt="git tag"
alias gst="git status"
alias grl="git reflog"
alias gfp="git format-patch"
alias gcl="git clone --recursive"
alias ga="git add" alias ga="git add"
alias gap="git add -p" alias gap="git add -p"
alias gau="git add -u" alias gau="git add -u"
alias gaN="git add -N" alias gaN="git add -N"
alias gaa="ga -A" alias gaa="ga -A"
alias grm="git rm" alias grm="git rm"
alias gmv="git mv" alias gc="git commit -s"
alias gcm="git commit -s -em"
alias gc="git commit -sv" alias gca="git commit -s --amend --date=\"\$(date -R)\""
alias gcm="git commit -sv -em" alias gcn="git commit -s --no-edit"
alias gca="git commit -sv --amend --date=\"\$(date -R)\"" alias gcan="gca -s --no-edit"
alias gcn="git commit -sv --no-edit" alias gcam="gca -s -m"
alias gcan="gca --no-edit" alias gst="git status"
alias gcam="gca -m"
alias gm="git merge" alias gm="git merge"
alias gma="git merge --abort" alias gma="git merge --abort"
alias gmc="git merge --continue"
alias grb="git rebase" alias grb="git rebase"
alias grbi="grb -i" alias grbi="grb -i"
@ -149,9 +136,9 @@ alias grba="grb --abort"
alias grbc="grb --continue" alias grbc="grb --continue"
alias grbsk="grb --skip" alias grbsk="grb --skip"
alias grbsh="grb --show-current" alias grbsh="grb --show-current"
alias grbom="git rebase \"origin/\$(git defbranch origin)\"" alias grbom="git rebase \"origin/\$(git defbranch)\""
gfrb() { ref="${1:-origin/$(git defbranch origin)}"; remote="${ref%%/*}"; git fetch "$remote" && git rebase "$ref" "${@:2}"; } gfrb() { remote="${1%/*}"; git fetch "$remote" && git rebase "$@"; }
gfrbi() { ref="${1:-origin/$(git defbranch origin)}"; remote="${ref%%/*}"; git fetch "$remote" && git rebase -i "$ref" "${@:2}"; } gfrbi() { remote="${1%/*}"; git fetch "$remote" && git rebase -i "$@"; }
alias gam="git am" alias gam="git am"
alias gama="git am --abort" alias gama="git am --abort"
@ -177,10 +164,10 @@ alias gpsuom="git push --set-upstream origin \"\$(git defbranch)\""
alias gpall="git remote | xargs -L1 git push" alias gpall="git remote | xargs -L1 git push"
alias gl="git pull --rebase" alias gl="git pull --rebase"
alias glp="gl && gp" alias glp="gl && gp"
alias gd="git diff --patch-with-stat --no-prefix" alias gd="git diff --patch-with-stat"
alias gdni="gd --no-index --no-prefix" alias gdni="gd --no-index"
alias gds="gd --staged --no-prefix" alias gds="gd --staged"
alias gsh="git show --format=fuller --patch-with-stat --no-prefix" alias gsh="git show --format=fuller --patch-with-stat"
alias glg="git log --color --format=fuller --stat --no-merges --graph" 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 glgp="git log --color --format=fuller --patch-with-stat --no-merges --graph"
alias glog="git log --color --oneline --decorate --graph" alias glog="git log --color --oneline --decorate --graph"
@ -188,9 +175,10 @@ alias glog="git log --color --oneline --decorate --graph"
alias grst="git reset" alias grst="git reset"
alias gundo="git reset --keep @~1" alias gundo="git reset --keep @~1"
alias gclean="git clean" alias gclean="git clean"
alias gclm="git cleanmerged" 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 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 gr="git remote"
alias gra="gr add" alias gra="gr add"
alias grr="gr rm" alias grr="gr rm"
@ -201,12 +189,12 @@ alias gsta='git stash'
alias gstd='gsta drop' alias gstd='gsta drop'
alias gstl='gsta list --stat --color' alias gstl='gsta list --stat --color'
alias gstp='gsta pop' alias gstp='gsta pop'
alias gstv="gsta show --patch-with-stat stash@{0}" alias gstv="gsta show -p stash@{0}"
# Docker aliases # Docker aliases
alias d=docker alias d=docker
alias dps="docker ps --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.label-schema.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'" alias dps="docker ps --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.label-schema.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'"
alias dpsa="docker ps -a --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.opencontainers.image.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'" alias dpsa="docker ps -a --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.label-schema.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'"
alias dnets="docker network ls -q | xargs docker inspect | jq '.[] | select(.Name != \"host\" and .Name != \"none\") | [.] | map(.Name + \"\t\" + (.IPAM.Config | map(.Subnet) | join(\"\t\")))[]' -r | sort -V -k2,3 | column -t" alias dnets="docker network ls -q | xargs docker inspect | jq '.[] | select(.Name != \"host\" and .Name != \"none\") | [.] | map(.Name + \"\t\" + (.IPAM.Config | map(.Subnet) | join(\"\t\")))[]' -r | sort -V -k2,3 | column -t"
daddrs() { docker inspect "${1:-bridge}" | jq '.[0].Containers | map(.Name + "\t" + .IPv4Address + "\t" + .IPv6Address)[]' -r | sort -V -k2,3 | column -t; } daddrs() { docker inspect "${1:-bridge}" | jq '.[0].Containers | map(.Name + "\t" + .IPv4Address + "\t" + .IPv6Address)[]' -r | sort -V -k2,3 | column -t; }
alias din='docker inspect' alias din='docker inspect'

View File

@ -22,6 +22,6 @@ WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"
XINITRC="$XDG_CONFIG_HOME/X11/xinitrc" XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
ZDOTDIR="$XDG_CONFIG_HOME/zsh" ZDOTDIR="$XDG_CONFIG_HOME/zsh"
PATH="${PATH}:${GOPATH}/bin:${GEM_HOME}/bin" PATH="${PATH}:${GOPATH}/bin:${GEM_HOME}/ruby/3.0.0/bin"
# vim: ft=sh # vim: ft=sh

View File

@ -5,11 +5,11 @@
[core] [core]
autocrlf = input autocrlf = input
excludesfile = /home/frebib/.config/git/gitignore excludesfile = /home/frebib/.config/git/gitignore
pager = diff-highlight | $PAGER pager = delta --diff-so-fancy --color-only
[init] [init]
defaultBranch = master defaultBranch = master
[interactive] [interactive]
diffFilter = diff-highlight diffFilter = delta --diff-so-fancy --color-only
[commit] [commit]
gpgsign = true gpgsign = true
[fetch] [fetch]
@ -37,23 +37,8 @@
count = !echo $(pwd) && git rev-list HEAD --count count = !echo $(pwd) && git rev-list HEAD --count
unpushed = !git log --oneline @{u}..HEAD unpushed = !git log --oneline @{u}..HEAD
leaders = !git shortlog -s -n --all --no-merges leaders = !git shortlog -s -n --all --no-merges
defbranch = "!defbranch() { \ defbranch = !git symbolic-ref refs/remotes/origin/HEAD | sed \"s@^refs/remotes/origin/@@\"
r=\"${1:-origin}\"; \ rbranch = for-each-ref --sort='committerdate' --format="%20%20%(refname:short)" refs/heads/
{ \
git symbolic-ref \"refs/remotes/$r/HEAD\" || { \
git remote set-head \"$r\" -a >&2 && \
git symbolic-ref \"refs/remotes/$r/HEAD\"; \
}; \
} 2>/dev/null \
| sed \"s@^refs/remotes/$r/@@\"; \
}; defbranch"
cleanmerged = "!cleanmerged() { \
r=\"${1:-origin}\"; \
b=\"${2:-$(git defbranch \"$r\")}\"; \
git branch --merged \"$r/$b\" | \
grep -ve \"^\\\\*\" -e \"^. $b$\" | \
xargs -r git branch -d; \
}; cleanmerged"
[advice] [advice]
statusHints = false statusHints = false
pushUpdateRejected = false pushUpdateRejected = false

View File

@ -1,8 +1,8 @@
gtk-theme-name="Arc-Dark" gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="Xenlism-Wildfire" gtk-icon-theme-name="Xenlism-Wildfire"
gtk-font-name="sans 9" gtk-font-name="sans 9"
gtk-cursor-theme-name="Breeze_Obsidian" gtk-cursor-theme-name="BreezeX-Black"
gtk-cursor-theme-size=16 gtk-cursor-theme-size=28
gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1 gtk-button-images=1

View File

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

View File

@ -139,7 +139,7 @@ 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+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+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+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 rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g' bindsym $mod+Shift+p exec systemd-run-i3 -n rofi-rbw
bindsym $mod+Shift+e exec "pkill rofi; rofi -show emoji -modi emoji -normal-window" bindsym $mod+Shift+e exec "pkill rofi; rofi -show emoji -modi emoji -normal-window"
bindsym $mod+Shift+i exec rofi-fontawesome bindsym $mod+Shift+i exec rofi-fontawesome
bindsym --release Print exec screenshot --clip bindsym --release Print exec screenshot --clip
@ -150,7 +150,7 @@ bindsym $mod+Shift+x exec systemd-run-i3 -n i3-sensible-terminal --cl
bindsym $mod+$alt+space exec systemd-run-i3 -s background -n ~/.config/i3/cycleaudio.py 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+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+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 -r notify-send -c transfer' 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 --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+z exec otp | rofi -dmenu -p otp | xargs otp

View File

@ -11,7 +11,7 @@ case $option in
power\ off) systemctl poweroff;; power\ off) systemctl poweroff;;
reboot) systemctl reboot;; reboot) systemctl reboot;;
windows) 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 sudo efibootmgr -n $windows
reboot;; systemctl reboot;;
esac esac

View File

@ -6,8 +6,8 @@ log-level = "info";
shadow = true; shadow = true;
shadow-radius = 30; shadow-radius = 30;
shadow-offset-x = -30; shadow-offset-x = -30;
shadow-offset-y = -26; shadow-offset-y = -24;
shadow-opacity = 0.35; shadow-opacity = 0.4;
shadow-color = "#000000"; shadow-color = "#000000";
shadow-exclude = [ shadow-exclude = [
"class_g = 'slop'", "class_g = 'slop'",
@ -38,7 +38,7 @@ opacity-rule = [
blur: blur:
{ {
method = "dual_kawase"; method = "dual_kawase";
strength = 10; strength = 12;
}; };
blur-background-frame = true; blur-background-frame = true;
blur-background-fixed = true; blur-background-fixed = true;
@ -79,6 +79,11 @@ focus-exclude = [
"class_g = 'steam_app_271590'" "class_g = 'steam_app_271590'"
]; ];
transition-length = 350;
transition-pow-x = 0.3;
transition-pow-y = 0.3;
size-transition = true;
# Other # Other
# https://github.com/yshui/picom/blob/next/picom.sample.conf#L203 # https://github.com/yshui/picom/blob/next/picom.sample.conf#L203
backend = "glx"; backend = "glx";
@ -131,4 +136,17 @@ wintypes: {
} }
}; };
#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 # vim: ft=conf noet

View File

@ -44,7 +44,8 @@ line-colour = #f00
modules-left = i3 modules-left = i3
modules-center = modules-center =
modules-right = volume updates weather wifi ethernet memory cpu cputemp backlight battery date # 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
tray-position = right tray-position = right
tray-detached = false tray-detached = false
@ -131,9 +132,8 @@ label-urgent-foreground = ${colours.urgent}
label-urgent-padding = ${self.label-focused-padding} label-urgent-padding = ${self.label-focused-padding}
[module/backlight] [module/xbacklight]
type = internal/backlight type = internal/xbacklight
card = intel_backlight
label = %percentage% label = %percentage%
format = <label> format = <label>
@ -141,6 +141,12 @@ format-prefix = " "
format-prefix-foreground = ${colours.icon} format-prefix-foreground = ${colours.icon}
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
card = intel_backlight
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
interval = 2 interval = 2
@ -158,9 +164,9 @@ format-prefix-foreground = ${colours.icon}
label = %percentage_used%% label = %percentage_used%%
[module/wifi] [module/wlan]
type = internal/network type = internal/network
interface-type = wireless interface = wlp1s0
interval = 3.0 interval = 3.0
format-connected = <ramp-signal> <label-connected> format-connected = <ramp-signal> <label-connected>
@ -179,9 +185,9 @@ ramp-signal-2 = 
ramp-signal-foreground = ${colours.icon} ramp-signal-foreground = ${colours.icon}
[module/ethernet] [module/eth]
type = internal/network type = internal/network
interface-type = wired interface = lan
interval = 10.0 interval = 10.0
label-connected = %local_ip% & %local_ip6% label-connected = %local_ip% & %local_ip6%
@ -261,7 +267,7 @@ ramp-capacity-1-foreground = ${colours.warning}
[module/cputemp] [module/cputemp]
type = internal/temperature type = internal/temperature
hwmon-path = /sys/devices/platform/nct6775.656/hwmon/hwmon1/temp2_input hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp2_input
base-temperature = 25 base-temperature = 25
format = <ramp> <label> format = <ramp> <label>

View File

@ -5,8 +5,8 @@ configuration {
/* show-icons: true; */ /* show-icons: true; */
separator-style: "solid"; separator-style: "solid";
modi: "window,run,ssh"; modi: "window,run,ssh";
kb-row-tab: "Shift-Tab"; /* kb-row-tab: "Shift-Tab"; */
kb-row-select: "Tab"; /* kb-row-select: "Tab"; */
terminal: "i3-sensible-terminal"; terminal: "i3-sensible-terminal";
matching: "glob"; matching: "glob";

View File

@ -4,9 +4,9 @@ set -eu
# Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup # Based on https://github.com/vincentbernat/awesome-configuration/blob/master/bin/xsettingsd-setup
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
BLUR_STRENGTH=10 BLUR_STRENGTH=12
CURSOR_SIZE=28
CORNER_RADIUS=9 CORNER_RADIUS=9
CURSOR_SIZE=16
xrdbget() { xrdbget() {
set -o pipefail set -o pipefail
@ -57,13 +57,13 @@ Xft.dpi: $dpi
Xcursor.size: $cursor Xcursor.size: $cursor
EOF EOF
xrandr --dpi "$dpi" & xrandr --dpi "$dpi" &
systemctl --user try-reload-or-restart xsettingsd & systemctl --user reload-or-restart xsettingsd &
wait wait
systemctl --user try-reload-or-restart \ systemctl --user reload \
i3 \ i3 \
polybar@i3bar & polybar@i3bar &
systemctl --user try-restart \ systemctl --user restart \
dunst & dunst &
wait wait

View File

@ -1,12 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail
NOTIF_PERSIST=30000
NOTIF_INFORM=5000
stdout=
caller=
notif=
while getopts "on:" o; do while getopts "on:" o; do
case "${o}" in case "${o}" in
@ -27,19 +19,24 @@ if [ $# -lt 1 ]; then
fi fi
if [ -n "$caller" ]; then if [ -n "$caller" ]; then
notif="$(notify-send -p -t $NOTIF_PERSIST "Touch your Yubikey" "$caller is requesting otp for $1")" notif="$(notify-send -p "Touch your Yubikey" "$caller is requesting otp for $1")"
trap 'notify-send -r $notif -t 1 "Touch your Yubikey" "$caller is requesting otp for $1"' EXIT
fi fi
code=$(ykman oath accounts code -s "$1") ykman oath accounts code -s "$1" 2>&1 |
if [ -z "$stdout" ]; then while read -r x; do
echo "$code" | tee >(xclip -i) if grep -Pqw '[0-9]{6}' <<< "$x"; then
xdotool type "$code" if [ -z "$stdout" ]; then
else echo "$x" | tee >(xclip -i)
echo "$code" xdotool type "$x"
fi else
echo "$x"
fi
fi
if [ -z "$stdout" ]; then
notify-send "$x";
fi
done
if [ -n "$code" ] && [ -n "$notif" ]; then if [ -n "$notif" ]; then
trap : EXIT notify-send -r "$notif" -t 1000 "Touch your Yubikey" "otp generated for $caller"
notify-send -r "$notif" -t $NOTIF_INFORM "Yubikey Touched" "otp generated for $caller"
fi fi

View File

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

View File

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

View File

@ -1,6 +1,6 @@
# This file is written by xdg-user-dirs-update # This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're # 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 # 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 # homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported. # absolute path. No other format is supported.

View File

@ -53,8 +53,9 @@ function! SaveIfExist()
write write
endif endif
endfunction endfunction
set autowrite set autowrite
autocmd CursorHold,CursorHoldI,InsertLeave,FocusGained,FocusLost * call SaveIfExist() autocmd InsertLeave <buffer> :write
" Search options " Search options
set hlsearch set hlsearch
@ -89,7 +90,6 @@ endif
call plug#begin('$XDG_CONFIG_HOME/vim/plug') call plug#begin('$XDG_CONFIG_HOME/vim/plug')
Plug 'scrooloose/nerdtree', { 'on': 'NERTreeToggle' }
Plug 'tpope/vim-sensible' Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb' Plug 'tpope/vim-rhubarb'
@ -134,6 +134,10 @@ let g:use_dvorak = 1
call deoplete#custom#option({ call deoplete#custom#option({
\ 'camel_case': v:true, \ 'camel_case': v:true,
\ }) \ })
" Use ALE as completion sources for all code.
"call deoplete#custom#option('sources', {
"\ '_': ['ale'],
"\})
call deoplete#enable() call deoplete#enable()
" Vim-Airline config " Vim-Airline config
@ -151,8 +155,10 @@ let vim_markdown_preview_use_xdg_open=1
let vim_markdown_preview_github=1 let vim_markdown_preview_github=1
" LaTeX config " LaTeX config
"let g:vimtex_view_method='zathura'
let g:tex_flavor='xelatex' let g:tex_flavor='xelatex'
let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying
let g:syntastic_tex_checkers = ['chktex']
autocmd FileType tex silent VimtexCompile autocmd FileType tex silent VimtexCompile
autocmd FileType tex setlocal spell autocmd FileType tex setlocal spell
augroup vimtex augroup vimtex

View File

@ -128,3 +128,10 @@ trysource() { for f in "$@"; do source "$f" 2>/dev/null && return; done; }
trysource /usr/share/fzf/key-bindings.zsh \ trysource /usr/share/fzf/key-bindings.zsh \
/usr/share/doc/fzf/examples/key-bindings.zsh /usr/share/doc/fzf/examples/key-bindings.zsh
trysource /usr/share/doc/pkgfile/command-not-found.zsh # pkgfile on Arch 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