Compare commits

..

No commits in common. "c19dbefb2cfd55c7a905613211087635297a66a6" and "9f4b3b14e77b2faa209064dab224e91b7a35b073" have entirely different histories.

6 changed files with 42 additions and 115 deletions

View file

@ -8,23 +8,6 @@ time_to_lockscreen=300
time_to_screendim=600
time_to_suspend=900
NO_RESTART="$1"
should_start() { # 1=program binary name
# not running, start
if ! pidof "$1"; then
return 0
fi
# only reload, no restarting
if [ "$NO_RESTART" = "no-restart" ]; then
return 1
else
# kill then it can restart
killall "$1"
return 0
fi
}
## OPTIONS
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl focus-follows-cursor normal
@ -48,8 +31,7 @@ riverctl rule-add -app-id "org.pwmt.zathura" csd
## DEBUG
# Reload river configuration
riverctl map normal $mod+Shift F12 spawn "$HOME/.config/river/init no-restart"
riverctl map normal $mod+Shift+Control F12 spawn "$HOME/.config/river/init"
riverctl map normal $mod+Shift F12 spawn "$HOME/.config/river/init"
## HOTKEYS
# close focused view
@ -285,31 +267,26 @@ done
setxkbmap -option "compose:menu"
# start dynamic display configuration
should_start kanshi && riverctl spawn kanshi
[ "$(pidof kanshi)" -eq 0 ] || riverctl spawn kanshi
# set a nice wallpaper
if exist swaybg; then
killall swaybg
riverctl spawn "swaybg \
-o 'LG Electronics W2442 0x000574E1' -i pictures/wall_l.jpg \
-o 'LG Electronics W2442 0x000574FD' -i pictures/wall_r.jpg \
"
elif exist swww; then
riverctl spawn "swww-daemon"
if exist swww; then
riverctl spawn "swww init"
outputs=$(swww query | cut -d':' -f1)
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_r.jpg"
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg"
elif [ -e "$HOME/pictures/wall.jpg" ]; then
swww img "$HOME/pictures/wall.jpg"
fi
fi
# start status bar
should_start waybar && riverctl spawn waybar
killall waybar
riverctl spawn waybar
# start redshift-like sundown warming using current location or standard values
if should_start wlsunset; then
killall wlsunset
loc=$(curl ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/')
if [ -n "$loc" ]; then
riverctl spawn "wlsunset -l \"$(echo "$loc" | cut -d, -f1)\" -L \"$(echo "$loc" | cut -d, -f2)\""
@ -317,25 +294,25 @@ if should_start wlsunset; then
riverctl spawn "wlsunset -S \"09:00\" -s \"21:00\" -d \"3600\""
fi
unset loc
fi
# start screen idle locking/dimming/sleep tool
should_start swayidle && riverctl spawn "swayidle \
killall swayidle
riverctl spawn "swayidle \
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
timeout ${time_to_screendim} \"wlopm --off '*'\" \
resume \"wlopm --on '*'\" \
timeout ${time_to_lockscreen} \"pidof waylock || lockscreen\" \
after-resume \"wlopm --on '*'\" \
before-sleep \"pidof waylock || lockscreen\" &"
should_start wl-paste && riverctl spawn "wl-paste -t text --watch clipman store"
killall clipman
riverctl spawn "wl-paste -t text --watch clipman store"
# bash ~/.config/bin/gtktheme # setting our gtk variables
# killall polkit-gnome-authentication-agent-1
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
# start layouting engine
killall $layout
riverctl spawn "$layout --tags all --output all main-ratio 0.65,\
riverctl spawn "$layout\
--tags all --output all main-ratio 0.65,\
--tags all --output all view-padding 6,\
--tags all --output all outer-padding 0,\
--tags all --output all smart-padding on,\

View file

@ -71,9 +71,7 @@ return { -- file/item pickers and managers
previewers = {
builtin = {
extensions = {
["png"] = { "chafa", "--format=symbols", "{file}" },
["jpg"] = { "chafa", "--format=symbols", "{file}" },
["gif"] = { "chafa", "--format=symbols", "{file}" },
["png"] = { "viu" },
["svg"] = { "chafa", "--format=symbols", "{file}" },
},
},

View file

@ -1,4 +1,5 @@
format = """
$custom\
$sudo\
$username\
$directory\
@ -76,7 +77,3 @@ disabled = false
symbol = " 󱍔 "
style = 'bold yellow'
format = "[$symbol]($style)"
# TODO: Would be lovely to have jujutsu support here
# An example implementation: https://github.com/jj-vcs/jj/wiki/Starship
# But currently very slow. Can be added with e.g. '${custom.jj}\' in format above

View file

@ -36,8 +36,6 @@
[commit]
gpgsign = true # sign commits as me
verbose = true # Always show diff when preparing commit message
[tag]
gpgsign = true
[fetch]
prune = true # remove references to non-existent remote branches
[pull]

View file

@ -3,39 +3,14 @@ email = "marty.oehme@gmail.com"
name = "Marty Oehme"
[signing]
sign-all = false
backend = "gpg"
key = "73BA40D5AFAF49C9"
[git]
sign-on-push = true
subprocess = true
private-commits = "description(glob:'wip:*')" # refuse to push WIP commits
[ui]
default-command = "log"
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
pager = "delta"
[ui.diff]
format = "git" # for the time being to use delta well
[templates]
draft_commit_description = '''
concat(
description,
surround(
"\nJJ: This commit contains the following changes:\n", "",
indent("JJ: ", diff.stat(72)),
),
"\nJJ: ignore-rest\n",
diff.git(),
)
'''
[revsets]
log = "@ | ancestors(trunk()..(visible_heads() & mine()), 2) | trunk()"
[revset-aliases]
"bases" = "dev"
"downstream(x,y)" = "(x::y) & y"
"branches" = "downstream(trunk(), bookmarks()) & mine()"
"curbranch" = "latest(branches::@- & branches)"

View file

@ -4,44 +4,19 @@ if ! exist jj; then
return 1
fi
alias j="jj"
alias j='jj' # necessary for a thing as easy to type?
if exist lazyjj; then
alias lj="lazyjj"
fi
alias js="jj status"
alias jd="jj diff"
alias jn="jj new"
alias jds="jj describe"
alias jc="jj commit"
# finding out the current snapshot
js() {
if [ "$#" -eq 0 ]; then
jj status
else
jj show "$*"
fi
}
alias jw="jj show"
alias jd="jj diff"
# for describe-and-edit workflows
# https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-edit-workflow.html
alias je="jj edit"
alias jee="jj next --edit"
# for squash-and-go workflows
# https://steveklabnik.github.io/jujutsu-tutorial/real-world-workflows/the-squash-workflow.html
alias jss="jj squash"
alias jsi="jj squash --interactive"
# oops buttons
alias ju="jj undo"
# for damn,-forgot-to-split-this-commit workflow
# Creates a new commit before with your selected changes, lets you describe it and carry on
alias ji="jj new -B@ --no-edit && jj squash --interactive && jj edit '@-' && jj describe && jj edit '@+'"
# revset info
alias jl="jj log -T builtin_log_oneline"
alias jln="jj log -T builtin_log_oneline"
alias jl="jj log -r '@ | ancestors(remote_bookmarks().., 2) | trunk()'"
alias jL="jj log -r 'all()'"
alias jlo="jj log --summary"
alias jLO="jj log --summary -r 'all()'"
@ -57,10 +32,17 @@ jloof() {
jj log --patch -r "description($*)"
}
# show branches (i.e. head commits) w a couple previous commits
alias jss="jj squash"
alias jsi="jj squash --interactive"
alias je="jj edit"
alias jee="jj next --edit"
# show branches w a couple commits
alias jb="jj log -r 'ancestors(heads(all()), 3)'"
alias jrb="jj rebase"
alias ju="jj undo"
alias jp="jj git push"