nix: Make nix the root
Which means now I'll have to think about real prefixes in commit names.
This commit is contained in:
parent
550eed06e0
commit
ee178b7d57
190 changed files with 5 additions and 6 deletions
32
unprocessed/config/autorandr/postswitch
Executable file
32
unprocessed/config/autorandr/postswitch
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||
# From https://stackoverflow.com/a/246128
|
||||
|
||||
# Relaunch the bars
|
||||
# i3-msg exec ~/.config/polybar/launch.sh
|
||||
# TODO Make something better with that
|
||||
i3-msg exec ~/.config/lemonbar/launch.sh
|
||||
|
||||
# Resize background
|
||||
BGDIR="$HOME/.cache/background"
|
||||
mkdir -p "$BGDIR"
|
||||
|
||||
list="$DIR/bg"
|
||||
url="$(cat "$list" | sed -e 's/#.*$//' -e 's/ \+$//' -e '/^$/d' | sort -R | head -1)"
|
||||
|
||||
hash="$(printf "$url" | md5sum | cut -f1 -d' ')"
|
||||
filepath="$BGDIR/$hash"
|
||||
|
||||
if [ ! -e "$filepath" ]; then
|
||||
wget -c "$url" -O "$filepath"
|
||||
fi
|
||||
|
||||
feh --no-fehbg --bg-fill "$filepath"
|
||||
|
||||
# Make i3 distribute the workspaces on all screens
|
||||
monitors_json="$(xrandr --listmonitors | tail -n+2 | awk '{ print $4 }' | sed 's|.\+|"\0"|' | tr '\n' ',')"
|
||||
automatrop -e '{"x11_screens":['"$monitors_json"']}' --tags i3
|
||||
|
||||
# TODO Make sure it goes from left to right
|
||||
# Either with the "main" display or using the geometry data
|
Loading…
Add table
Add a link
Reference in a new issue