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

Compare commits

...

5 Commits

Author SHA1 Message Date
9331a74266
aliases: Fix gfrb/gfrbi with slash-delimited branches
Multi-part branch names would be incorrectly split on the last slash and
not the first, causing these aliases to do the wrong thing. These need
the remote name which is the first element. Everything after the first
slash is the branch name, not the last slash.

Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-24 15:24:19 +00:00
cfbe6d6f0f
git: Allow git cleanmerged/defbranch to take args
These aliases now make zero assumptions about either branch or origin
names. They default to origin, and the primary branch is determined from
the refs/remotes/$remote/HEAD symbolic-ref, which will be pulled from
the remote if it's not known locally.
With these it is now possible to act on any remote/branch combination:

    # Get default branch for 'upstream' remote
    $ git defbranch upstream

    # Delete branches merged into the default branch of the 'upstream'
    # remote
    $ git cleanmerged upstream

    # Delete branches merged into the upstream/foo branch
    $ git cleanmerged upstream foo

Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-24 14:51:42 +00:00
509551f717
git: Add mv/reflog/clean-merged aliases
Signed-off-by: Joe Groocock <me@frebib.net>
2022-10-24 14:29:40 +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
7 changed files with 36 additions and 13 deletions

View File

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

View File

@ -119,6 +119,7 @@ alias gau="git add -u"
alias gaN="git add -N"
alias gaa="ga -A"
alias grm="git rm"
alias gmv="git mv"
alias gc="git commit -s"
alias gcm="git commit -s -em"
alias gca="git commit -s --amend --date=\"\$(date -R)\""
@ -126,6 +127,7 @@ alias gcn="git commit -s --no-edit"
alias gcan="gca -s --no-edit"
alias gcam="gca -s -m"
alias gst="git status"
alias grl="git reflog"
alias gm="git merge"
alias gma="git merge --abort"
@ -137,8 +139,8 @@ 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 "$@"; }
gfrb() { remote="${1%%/*}"; git fetch "$remote" && git rebase "$@"; }
gfrbi() { remote="${1%%/*}"; git fetch "$remote" && git rebase -i "$@"; }
alias gam="git am"
alias gama="git am --abort"
@ -175,6 +177,7 @@ alias glog="git log --color --oneline --decorate --graph"
alias grst="git reset"
alias gundo="git reset --keep @~1"
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 gtg="git tag"

View File

@ -37,7 +37,23 @@
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/@@\"
defbranch = "!defbranch() { \
r=\"${1:-origin}\"; \
{ \
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]
statusHints = false
pushUpdateRejected = false

View File

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

View File

@ -3,8 +3,8 @@ 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=Breeze_Obsidian
gtk-cursor-theme-size=16
gtk-cursor-theme-name=BreezeX-Black
gtk-cursor-theme-size=28
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1

View File

@ -38,7 +38,7 @@ opacity-rule = [
blur:
{
method = "dual_kawase";
strength = 8;
strength = 12;
};
blur-background-frame = true;
blur-background-fixed = true;

View File

@ -4,6 +4,10 @@ set -eu
# 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
xrdbget() {
set -o pipefail
xrdb -query | grep -i -m1 "$1" | sed 's/^.*:\s//g' || echo "$2"
@ -26,11 +30,11 @@ fi
dpi=$1
scale=$(( dpi/96 ))
cursor=$(( dpi/6 ))
cursor=$(( (dpi*CURSOR_SIZE)/96 ))
# Update picom scale
sed -i -e "s/strength =.*$/strength = $(( dpi*8/96 ));/" \
-e "s/corner-radius =.*$/corner-radius = $(( dpi/13 ));/" \
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