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

17 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
fa136cbd2a picom: Adjust shadow alignment/size
Picom can now accurately draw shadows (again?) so tweak them so they're
horizontally centred and slightly below the window so they look
aesthetically pleasing.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:26 +00:00
499b044fea picom: Remove --experimental-backends
They're now default and the legacy backends are the exceptional case.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:26 +00:00
14805b3f9a picom: Increase corner radius
Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:20 +00:00
e03c93bf39 gtk: Force GTK 4.0 to use the GTK 3 theming
This non-compliant turd doesn't respect the config file, because of
course it doesn't. Enforce the theme with yet another messy environment
variable.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:12 +00:00
ba6173e0ee git: Dynamically identify the "default" branch
This broadly assumes that the "default" remote is called "origin", but
that's better than assuming that plus the default branch name.

Thanks to https://joshtronic.com/2020/08/09/how-to-get-the-default-git-branch/

Suggested-by: Chris Lane <chris@chrislane.com>
Signed-off-by: Joe Groocock <me@frebib.net>
2022-08-31 20:43:06 +00:00
dcfd191613 systemd: Add pipewire+wireplumber, remove pulseaudio
Gotta go fast. pipewire seems to be working pretty well so far.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 22:21:37 +00:00
db40ef08bb picom: Update to picom 9.1, enable rounded corners
As always, tweak some of the visuals. Tone down the shadow opacity to
make the non-rounded corner shadows less obvious. Hopefully I can undo
that a bit in the future.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 22:12:40 +00:00
839d972e95 systemd-run-i3: Add ExitType=cgroup to user units
systemd v250 added ExitType= which allows systemd to wait for all
processes in the cgroup to exit before terminating the unit, instead of
only the main pid. This has many uses, but for desktop applications in
particular it allows self-restarting (forking) applications to correctly
fork/restart and other background processes that may have been spawned
to continue when their forked parent inevitably exits first (like ssh
processes inside terminals).

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 21:46:28 +00:00
ece2eb878a picom: Avoid odd-looking shadows in Firefox
picom cannot and does not attempt to use the window geometry from the
non-rectangular menu+friend windows that Firefox displays which causes a
strange floating blur/shadow behind the menus. Avoid this by disabling
both blur and shadows on those pop-ups until picom can handle it better.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 21:44:39 +00:00
6f1569b35d alacritty: log at Warn and above
Info produces causes logging under normal use, which creates useless log
files in /tmp, which I don't need.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 21:42:48 +00:00
5035afc8b4 X11, dpi: reliably set xcursor size
Other minor tweaks to the dpi script to ensure everything gets updated
correctly.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 21:41:57 +00:00
650eb08a80 aliases: rm is always verbose
That way I can see when I've been an idiot and deleted something I
actually needed.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-21 21:35:00 +00:00
535697a31c aliases: Be consistent with abort/continue/skip aliases
Laziness prevails 🚀

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-04 11:32:27 +00:00
f520784d9b zsh: LESS with more usability
These defaults are heavily inspired by the default of $SYSTEMD_LESS
provided by systemd themselves.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-03-04 11:21:55 +00:00
28 changed files with 188 additions and 100 deletions

View File

@ -4,18 +4,20 @@
export TERMINAL="alacritty" export TERMINAL="alacritty"
export BROWSER="firefox" export BROWSER="firefox"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" export GTK_THEME="$(grep gtk-theme-name "${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" | sed 's/.*\s*=\s*//')"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini"
export QT_QPA_PLATFORMTHEME=qt5ct export QT_QPA_PLATFORMTHEME=qt5ct
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open 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/ # 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 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"
xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2) #"$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,4 +36,5 @@ Xft.hinting: true
Xft.hintstyle: hintfull Xft.hintstyle: hintfull
Xft.lcdfilter: lcddefault Xft.lcdfilter: lcddefault
Xcursor.theme: Breeze_Obsidian Xcursor.size: 28
Xcursor.theme: BreezeX-Black

View File

@ -611,7 +611,7 @@ debug:
# - Info # - Info
# - Debug # - Debug
# - Trace # - Trace
log_level: Info log_level: Warn
# Print all received window events. # Print all received window events.
#print_events: false #print_events: false

18
aliases
View File

@ -46,14 +46,14 @@ alias sudo='sudo '
alias open=xdg-open alias open=xdg-open
# Command rewrites # Command rewrites
alias rm='rm -i' alias rm='rm -iv'
alias mv='mv -i' alias mv='mv -i'
alias cp='cp -ir' alias cp='cp -ir'
alias scp='scp -r' 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 \
@ -112,7 +112,7 @@ 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 gcl="git clone --recursive"
alias gco="git checkout" alias gco="git checkout"
alias gcom="git checkout master" alias gcom="git checkout \"\$(git defbranch)\""
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"
@ -136,24 +136,31 @@ 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/master" alias grbom="git rebase \"origin/\$(git defbranch)\""
gfrb() { remote="${1%/*}"; git fetch "$remote" && git rebase "$@"; } gfrb() { remote="${1%/*}"; git fetch "$remote" && git rebase "$@"; }
gfrbi() { remote="${1%/*}"; git fetch "$remote" && git rebase -i "$@"; } 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"
alias gamc="git am --continue" alias gamc="git am --continue"
alias gamsk="git am --skip"
alias gcp="git cherry-pick" alias gcp="git cherry-pick"
alias gcpa="git cherry-pick --abort" alias gcpa="git cherry-pick --abort"
alias gcpc="git cherry-pick --continue" 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 gf="git fetch"
alias gp="git push" alias gp="git push"
alias gpf="gp --force" alias gpf="gp --force"
alias gpsu="git push --set-upstream" alias gpsu="git push --set-upstream"
alias gpoH="git push origin HEAD" alias gpoH="git push origin HEAD"
alias gpsuom="git push --set-upstream origin master" 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"
@ -173,7 +180,6 @@ alias gbrl="git for-each-ref --sort=committerdate refs/heads/ --format=\"%(refna
alias gtg="git tag" alias gtg="git tag"
alias gbl="git blame" alias gbl="git blame"
alias gr="git remote" alias gr="git remote"
alias grv="git revert"
alias gra="gr add" alias gra="gr add"
alias grr="gr rm" alias grr="gr rm"
alias grao="gra origin" alias grao="gra origin"

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,6 +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 = !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] [advice]
statusHints = false statusHints = false
pushUpdateRejected = false pushUpdateRejected = false

View File

@ -1,11 +1,8 @@
# 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-theme-name="Arc-Dark"
gtk-icon-theme-name="Xenlism-Wildfire" gtk-icon-theme-name="Xenlism-Wildfire"
gtk-font-name="Noto Sans 9" gtk-font-name="sans 9"
gtk-cursor-theme-name="Breeze_Obsidian" gtk-cursor-theme-name="BreezeX-Black"
gtk-cursor-theme-size=0 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

@ -2,9 +2,9 @@
gtk-theme-name=Arc-Dark 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=Noto Sans 9 gtk-font-name=sans 9
gtk-cursor-theme-name=Breeze_Obsidian gtk-cursor-theme-name=BreezeX-Black
gtk-cursor-theme-size=0 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

1
gtk-4.0/settings.ini Symbolic link
View File

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

View File

@ -139,18 +139,18 @@ 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 bindsym --release Print exec screenshot --clip
bindsym --release $mod+Print exec screenshot --clip bindsym --release $mod+Print exec screenshot
bindsym --release Shift+Print exec screenshot --active bindsym --release Shift+Print exec screenshot --active
bindsym --release $mod+Shift+Print exec screenshot --active --clip 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+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+$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 notify-send -c transfer "$(gist -PRpc)" 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

@ -4,31 +4,29 @@ log-level = "info";
# Shadow # Shadow
shadow = true; shadow = true;
shadow-radius = 24; shadow-radius = 30;
shadow-offset-x = -24; shadow-offset-x = -30;
shadow-offset-y = -24; shadow-offset-y = -24;
shadow-opacity = 0.6; shadow-opacity = 0.4;
# shadow-red = 0.0; shadow-color = "#000000";
# shadow-green = 0.0;
# shadow-blue = 0.0;
shadow-exclude = [ shadow-exclude = [
"class_g = 'slop'", "class_g = 'slop'",
"class_g = 'Conky'", "class_g = 'Conky'",
"class_g ?= 'Notify-osd'", "class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'", "class_g = 'firefox' && argb && (window_type = 'utility' || window_type = 'popup_menu')",
"class_g = 'firefox' && argb",
"name = 'Notification'", "name = 'Notification'",
"name = 'cpt_frame_window'", "name = 'cpt_frame_window'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
]; ];
# shadow-exclude = "n:e:Notification"; # shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0"; # shadow-exclude-reg = "x10+0+0";
# shadow-ignore-shaped = true;
xinerama-shadow-crop = true; xinerama-shadow-crop = true;
# Opacity # Opacity
frame-opacity = 1.0; frame-opacity = 1.0;
# active-opacity = 0.8; active-opacity = 1.0;
inactive-opacity = 0.6; inactive-opacity = 0.5;
inactive-opacity-override = true; inactive-opacity-override = true;
# inactive-dim = 0.2; # inactive-dim = 0.2;
# inactive-dim-fixed = true; # inactive-dim-fixed = true;
@ -40,7 +38,7 @@ opacity-rule = [
blur: blur:
{ {
method = "dual_kawase"; method = "dual_kawase";
strength = 8; strength = 12;
}; };
blur-background-frame = true; blur-background-frame = true;
blur-background-fixed = true; blur-background-fixed = true;
@ -49,56 +47,106 @@ blur-background-exclude = [
"class_g = 'Onboard'", "class_g = 'Onboard'",
"class_g = 'slop'", "class_g = 'slop'",
"class_g = 'Polybar'", "class_g = 'Polybar'",
"class_g = 'firefox' && argb", "class_g = 'firefox' && argb && (window_type = 'utility' || window_type = 'popup_menu')",
"window_type = 'dock'", "window_type = 'dock'",
"window_type = 'desktop'", "window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
]; ];
# Corners
corner-radius = 9;
# Fading # Fading
fading = true; fading = true;
fade-delta = 10; fade-delta = 10;
fade-in-step = 0.04 fade-in-step = 0.035;
fade-out-step = 0.06; fade-out-step = 0.06;
no-fading-openclose = false; no-fading-openclose = false;
no-fading-destroyed-argb = false; no-fading-destroyed-argb = false;
# fade-exclude = [ ]; # fade-exclude = [ ];
# Other # Focus
backend = "glx";
mark-wmwin-focused = true;
mark-ovredir-focused = true;
use-ewmh-active-win = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
# vsync = true;
# sw-opti = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
focus-exclude = [ focus-exclude = [
"i:ai:chromium", "i:ai:chromium",
"class_g = 'firefox'", "class_g = 'firefox'",
"class_g = 'zoom'" "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;
detect-rounded-corners = true;
detect-client-opacity = true;
use-ewmh-active-win = true;
# unredir-if-possible = true;
# unredir-if-possible-delay = 5000;
# unredir-if-possible-exclude = [ ];
detect-transient = true; detect-transient = true;
detect-client-leader = true; detect-client-leader = true;
invert-color-include = [ ]; invert-color-include = [ ];
# resize-damage = 1; resize-damage = 1;
# GLX backend # GLX backend
glx-no-stencil = true; glx-no-stencil = true;
glx-no-rebind-pixmap = true; glx-no-rebind-pixmap = true;
xrender-sync-fence = true; # xrender-sync-fence = true;
# no-use-damage = false;
use-damage = true; use-damage = true;
# Window type settings # Window type settings
wintypes: wintypes: {
{ tooltip = {
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; opacity = 0.75;
dock = { shadow = false; } full-shadow = false;
dnd = { shadow = false; } blur-background = false;
popup_menu = { opacity = 0.8; } }
dropdown_menu = { opacity = 0.8; }
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;
}
}; };
#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

@ -267,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,48 +4,66 @@ 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=12
CURSOR_SIZE=28
CORNER_RADIUS=9
xrdbget() { xrdbget() {
set -o pipefail set -o pipefail
xrdb -query | grep -i -m1 "$1" | sed 's/^.*:\s//g' || echo "$2" xrdb -query | grep -i -m1 "$1" | sed 's/^.*:\s//g' || echo "$2"
} }
dpi=$1 xsetting_bool() {
case "$1" in
true) echo 1;;
false) echo 0;;
default) echo -1;;
*) echo -1;;
esac
}
if [ -z "$1" ]; then
>&2 printf "Usage\n\t%s: <dpi>" "$(basename "$0")" 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")"
exit 1 exit 1
fi fi
# Update picom and xorg dpi=$1
sed -i "s/strength =.*$/strength = $(( dpi*8/96 ));/" "$CONF_DIR/picom/picom.conf" &
xrandr --dpi "$dpi" &
scale=$(( dpi/96 )) scale=$(( dpi/96 ))
cursor=$(( dpi/6 )) cursor=$(( (dpi*CURSOR_SIZE)/96 ))
# 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" &
# Build xsettingsd.conf # Build xsettingsd.conf
mkdir -p "$CONF_DIR/xsettingsd" mkdir -p "$CONF_DIR/xsettingsd"
{ {
cat "$CONF_DIR/xsettingsd.local" 2>/dev/null || true cat "$CONF_DIR/xsettingsd.local" 2>/dev/null || :
echo "Xcursor/size $cursor" echo "Xcursor/size $cursor"
echo "Gtk/CursorThemeSize $cursor" echo "Gtk/CursorThemeSize $cursor"
echo "Gtk/CursorThemeName \"$(xrdbget Xcursor.theme Adwaita)\"" echo "Gtk/CursorThemeName \"$(xrdbget Xcursor.theme Adwaita)\""
echo "Xft/HintStyle \"$(xrdbget Xft.hintstyle hintfull)\"" echo "Xft/HintStyle \"$(xrdbget Xft.hintstyle hintfull)\""
echo "Xft/Hinting \"$(xrdbget Xft.hinting -1)\"" echo "Xft/Hinting $(xsetting_bool "$(xrdbget Xft.hinting default)")"
echo "Xft/RGBA \"$(xrdbget Xft.rgba rgb)\"" echo "Xft/RGBA \"$(xrdbget Xft.rgba rgb)\""
echo "Xft/DPI $(( dpi*1024 ))" echo "Xft/DPI $(( dpi*1024 ))"
echo "Gdk/WindowScalingFactor $scale" echo "Gdk/WindowScalingFactor $scale"
echo "Gdk/UnscaledDPI $(( dpi*1024/scale ))" echo "Gdk/UnscaledDPI $(( dpi*1024/scale ))"
} > "$CONF_DIR/xsettingsd/xsettingsd.conf" } > "$CONF_DIR/xsettingsd/xsettingsd.conf"
{ xrdb -merge <<EOF &
echo "Xft.dpi: $dpi" Xft.dpi: $dpi
echo "Xcursor.size: $cursor" Xcursor.size: $cursor
} | xrdb -merge & EOF
xrandr --dpi "$dpi" &
systemctl --user reload-or-restart xsettingsd & systemctl --user reload-or-restart xsettingsd &
wait wait
systemctl --user reload \ systemctl --user reload \
i3 \ i3 \
polybar@i3bar polybar@i3bar &
systemctl --user restart \
dunst &
wait

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

@ -16,9 +16,10 @@ if exists tty && tty -s; then
fi fi
# Configure less and add colours # Configure less and add colours
export LESS="-RI --mouse --wheel-lines=3" export LESS="-nRIFRSXM --mouse --wheel-lines=3"
export PAGER="less" export PAGER="less"
export MANPAGER="less -+N" export MANPAGER="less -+N"
export SYSTEMD_LESS="$LESS"
export SYSTEMD_PAGER="less $LESS" export SYSTEMD_PAGER="less $LESS"
# Disable histfile # Disable histfile
export LESSHISTFILE=- export LESSHISTFILE=-
@ -127,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