Compare commits
12 commits
9f4b3b14e7
...
c19dbefb2c
| Author | SHA1 | Date | |
|---|---|---|---|
| c19dbefb2c | |||
| 1ab2b3a94f | |||
| 98dad64976 | |||
| cfa59ae9df | |||
| 25c6788247 | |||
| 14e3364155 | |||
| 98c54443e9 | |||
| 43aefd2369 | |||
| 9df2d06a06 | |||
| 0bd604298f | |||
| 7922e5285f | |||
| 2eccfe88ec |
6 changed files with 115 additions and 42 deletions
|
|
@ -8,6 +8,23 @@ time_to_lockscreen=300
|
||||||
time_to_screendim=600
|
time_to_screendim=600
|
||||||
time_to_suspend=900
|
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
|
## OPTIONS
|
||||||
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
|
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
|
||||||
riverctl focus-follows-cursor normal
|
riverctl focus-follows-cursor normal
|
||||||
|
|
@ -31,7 +48,8 @@ riverctl rule-add -app-id "org.pwmt.zathura" csd
|
||||||
|
|
||||||
## DEBUG
|
## DEBUG
|
||||||
# Reload river configuration
|
# Reload river configuration
|
||||||
riverctl map normal $mod+Shift F12 spawn "$HOME/.config/river/init"
|
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"
|
||||||
|
|
||||||
## HOTKEYS
|
## HOTKEYS
|
||||||
# close focused view
|
# close focused view
|
||||||
|
|
@ -125,7 +143,7 @@ riverctl map normal $mod+Control L snap right
|
||||||
# Mod+F to toggle fullscreen
|
# Mod+F to toggle fullscreen
|
||||||
riverctl map normal $mod F toggle-fullscreen
|
riverctl map normal $mod F toggle-fullscreen
|
||||||
# if we are running filtile we also have access to monocle mode
|
# if we are running filtile we also have access to monocle mode
|
||||||
if [ "$layout" = "filtile" ]; then
|
if [ "$layout" = "filtile" ]; then
|
||||||
riverctl map normal $mod+Shift F spawn "riverctl send-layout-cmd $layout monocle"
|
riverctl map normal $mod+Shift F spawn "riverctl send-layout-cmd $layout monocle"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -267,52 +285,57 @@ done
|
||||||
setxkbmap -option "compose:menu"
|
setxkbmap -option "compose:menu"
|
||||||
|
|
||||||
# start dynamic display configuration
|
# start dynamic display configuration
|
||||||
[ "$(pidof kanshi)" -eq 0 ] || riverctl spawn kanshi
|
should_start kanshi && riverctl spawn kanshi
|
||||||
|
|
||||||
# set a nice wallpaper
|
# set a nice wallpaper
|
||||||
if exist swww; then
|
if exist swaybg; then
|
||||||
riverctl spawn "swww init"
|
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"
|
||||||
outputs=$(swww query | cut -d':' -f1)
|
outputs=$(swww query | cut -d':' -f1)
|
||||||
if [ "$(echo "$outputs" | grep -c -e '^DP')" -eq 2 ] && [ -e "$HOME/pictures/wall_r.jpg" ]; then
|
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_r.jpg"
|
swww img -o "$(echo "$outputs" | head -n1)" "$HOME/pictures/wall_l.jpg"
|
||||||
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_l.jpg"
|
swww img -o "$(echo "$outputs" | tail -n1)" "$HOME/pictures/wall_r.jpg"
|
||||||
elif [ -e "$HOME/pictures/wall.jpg" ]; then
|
elif [ -e "$HOME/pictures/wall.jpg" ]; then
|
||||||
swww img "$HOME/pictures/wall.jpg"
|
swww img "$HOME/pictures/wall.jpg"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# start status bar
|
# start status bar
|
||||||
killall waybar
|
should_start waybar && riverctl spawn waybar
|
||||||
riverctl spawn waybar
|
|
||||||
|
|
||||||
# start redshift-like sundown warming using current location or standard values
|
# start redshift-like sundown warming using current location or standard values
|
||||||
killall wlsunset
|
if should_start wlsunset; then
|
||||||
loc=$(curl ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/')
|
loc=$(curl ipinfo.io | grep -e '"loc": ' | sed -e 's/^.*"loc": "\(.*\)",$/\1/')
|
||||||
if [ -n "$loc" ]; then
|
if [ -n "$loc" ]; then
|
||||||
riverctl spawn "wlsunset -l \"$(echo "$loc" | cut -d, -f1)\" -L \"$(echo "$loc" | cut -d, -f2)\""
|
riverctl spawn "wlsunset -l \"$(echo "$loc" | cut -d, -f1)\" -L \"$(echo "$loc" | cut -d, -f2)\""
|
||||||
else
|
else
|
||||||
riverctl spawn "wlsunset -S \"09:00\" -s \"21:00\" -d \"3600\""
|
riverctl spawn "wlsunset -S \"09:00\" -s \"21:00\" -d \"3600\""
|
||||||
|
fi
|
||||||
|
unset loc
|
||||||
fi
|
fi
|
||||||
unset loc
|
|
||||||
|
|
||||||
# start screen idle locking/dimming/sleep tool
|
# start screen idle locking/dimming/sleep tool
|
||||||
killall swayidle
|
should_start swayidle && riverctl spawn "swayidle \
|
||||||
riverctl spawn "swayidle \
|
|
||||||
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
|
timeout ${time_to_suspend} \"[ $(cat /sys/class/power_supply/AC/online) -eq 0 ] && systemctl suspend-then-hibernate\"
|
||||||
timeout ${time_to_screendim} \"wlopm --off '*'\" \
|
timeout ${time_to_screendim} \"wlopm --off '*'\" \
|
||||||
resume \"wlopm --on '*'\" \
|
resume \"wlopm --on '*'\" \
|
||||||
timeout ${time_to_lockscreen} \"pidof waylock || lockscreen\" \
|
timeout ${time_to_lockscreen} \"pidof waylock || lockscreen\" \
|
||||||
after-resume \"wlopm --on '*'\" \
|
after-resume \"wlopm --on '*'\" \
|
||||||
before-sleep \"pidof waylock || lockscreen\" &"
|
before-sleep \"pidof waylock || lockscreen\" &"
|
||||||
killall clipman
|
|
||||||
riverctl spawn "wl-paste -t text --watch clipman store"
|
should_start wl-paste && riverctl spawn "wl-paste -t text --watch clipman store"
|
||||||
|
|
||||||
# bash ~/.config/bin/gtktheme # setting our gtk variables
|
# bash ~/.config/bin/gtktheme # setting our gtk variables
|
||||||
# killall polkit-gnome-authentication-agent-1
|
# killall polkit-gnome-authentication-agent-1
|
||||||
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
# /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
||||||
# start layouting engine
|
# start layouting engine
|
||||||
killall $layout
|
killall $layout
|
||||||
riverctl spawn "$layout\
|
riverctl spawn "$layout --tags all --output all main-ratio 0.65,\
|
||||||
--tags all --output all main-ratio 0.65,\
|
|
||||||
--tags all --output all view-padding 6,\
|
--tags all --output all view-padding 6,\
|
||||||
--tags all --output all outer-padding 0,\
|
--tags all --output all outer-padding 0,\
|
||||||
--tags all --output all smart-padding on,\
|
--tags all --output all smart-padding on,\
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,9 @@ return { -- file/item pickers and managers
|
||||||
previewers = {
|
previewers = {
|
||||||
builtin = {
|
builtin = {
|
||||||
extensions = {
|
extensions = {
|
||||||
["png"] = { "viu" },
|
["png"] = { "chafa", "--format=symbols", "{file}" },
|
||||||
|
["jpg"] = { "chafa", "--format=symbols", "{file}" },
|
||||||
|
["gif"] = { "chafa", "--format=symbols", "{file}" },
|
||||||
["svg"] = { "chafa", "--format=symbols", "{file}" },
|
["svg"] = { "chafa", "--format=symbols", "{file}" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
format = """
|
format = """
|
||||||
$custom\
|
|
||||||
$sudo\
|
$sudo\
|
||||||
$username\
|
$username\
|
||||||
$directory\
|
$directory\
|
||||||
|
|
@ -77,3 +76,7 @@ disabled = false
|
||||||
symbol = " "
|
symbol = " "
|
||||||
style = 'bold yellow'
|
style = 'bold yellow'
|
||||||
format = "[$symbol]($style)"
|
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
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,14 @@
|
||||||
delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme
|
delta = "![ $TERM_DARK = false ] && delta --light || delta" # Take care that we always display right color scheme
|
||||||
|
|
||||||
# check out a github PR directly on the commandline, creates pr/4 or pr/<number> branch locally
|
# check out a github PR directly on the commandline, creates pr/4 or pr/<number> branch locally
|
||||||
pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^github || echo origin)} refs/pull/$1/head:pr/$1 }; f"
|
pr = "!f() { git fetch -fu ${2:-$(git remote |grep ^github || echo origin)} refs/pull/$1/head:pr/$1 }; f"
|
||||||
# remove all pr/<number> local branches
|
# remove all pr/<number> local branches
|
||||||
pr-clean = "!git for-each-ref refs/heads/pr/* --format='%(refname)' | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
|
pr-clean = "!git for-each-ref refs/heads/pr/* --format = '%(refname)' | while read ref ; do branch = ${ref#refs/heads/} ; git branch -D $branch ; done"
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true # sign commits as me
|
gpgsign = true # sign commits as me
|
||||||
verbose = true # Always show diff when preparing commit message
|
verbose = true # Always show diff when preparing commit message
|
||||||
|
[tag]
|
||||||
|
gpgsign = true
|
||||||
[fetch]
|
[fetch]
|
||||||
prune = true # remove references to non-existent remote branches
|
prune = true # remove references to non-existent remote branches
|
||||||
[pull]
|
[pull]
|
||||||
|
|
@ -45,7 +47,7 @@
|
||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool "difftastic"]
|
[difftool "difftastic"]
|
||||||
cmd = difft "$LOCAL" "$REMOTE"
|
cmd = difft "$LOCAL" "$REMOTE"
|
||||||
[color "diff"]
|
[color "diff"]
|
||||||
meta = "9"
|
meta = "9"
|
||||||
frag = "magenta bold"
|
frag = "magenta bold"
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,39 @@ email = "marty.oehme@gmail.com"
|
||||||
name = "Marty Oehme"
|
name = "Marty Oehme"
|
||||||
|
|
||||||
[signing]
|
[signing]
|
||||||
sign-all = false
|
|
||||||
backend = "gpg"
|
backend = "gpg"
|
||||||
key = "73BA40D5AFAF49C9"
|
key = "73BA40D5AFAF49C9"
|
||||||
|
|
||||||
|
[git]
|
||||||
|
sign-on-push = true
|
||||||
|
subprocess = true
|
||||||
|
private-commits = "description(glob:'wip:*')" # refuse to push WIP commits
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
default-command = "log"
|
|
||||||
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
diff-editor = ["nvim", "-c", "DiffEditor $left $right $output"]
|
||||||
pager = "delta"
|
pager = "delta"
|
||||||
|
|
||||||
[ui.diff]
|
[ui.diff]
|
||||||
format = "git" # for the time being to use delta well
|
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)"
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,44 @@ if ! exist jj; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alias j='jj' # necessary for a thing as easy to type?
|
alias j="jj"
|
||||||
if exist lazyjj; then
|
if exist lazyjj; then
|
||||||
alias lj="lazyjj"
|
alias lj="lazyjj"
|
||||||
fi
|
fi
|
||||||
alias js="jj status"
|
|
||||||
|
|
||||||
alias jd="jj diff"
|
|
||||||
alias jn="jj new"
|
alias jn="jj new"
|
||||||
alias jds="jj describe"
|
alias jds="jj describe"
|
||||||
alias jc="jj commit"
|
alias jc="jj commit"
|
||||||
|
|
||||||
alias jln="jj log -T builtin_log_oneline"
|
# finding out the current snapshot
|
||||||
alias jl="jj log -r '@ | ancestors(remote_bookmarks().., 2) | trunk()'"
|
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 jL="jj log -r 'all()'"
|
alias jL="jj log -r 'all()'"
|
||||||
alias jlo="jj log --summary"
|
alias jlo="jj log --summary"
|
||||||
alias jLO="jj log --summary -r 'all()'"
|
alias jLO="jj log --summary -r 'all()'"
|
||||||
|
|
@ -32,17 +57,10 @@ jloof() {
|
||||||
jj log --patch -r "description($*)"
|
jj log --patch -r "description($*)"
|
||||||
}
|
}
|
||||||
|
|
||||||
alias jss="jj squash"
|
# show branches (i.e. head commits) w a couple previous commits
|
||||||
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 jb="jj log -r 'ancestors(heads(all()), 3)'"
|
||||||
|
|
||||||
alias jrb="jj rebase"
|
alias jrb="jj rebase"
|
||||||
|
|
||||||
alias ju="jj undo"
|
|
||||||
|
|
||||||
alias jp="jj git push"
|
alias jp="jj git push"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue