Renamed dotfiles folder to assets
This commit is contained in:
13
assets/.screenlayout/launch.sh
Executable file
13
assets/.screenlayout/launch.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function load_script() {
|
||||
if [ -f "$1" ]; then
|
||||
bash "$1" &
|
||||
fi
|
||||
}
|
||||
|
||||
# I guess I have to run this twice? Fixes wallpaper rendering images.
|
||||
load_script "$HOME/.screenlayout/wallpapers.sh"
|
||||
load_script "$HOME/.screenlayout/layout.sh"
|
||||
load_script "$HOME/.screenlayout/wallpapers.sh"
|
||||
load_script "$HOME/.screenlayout/polybar.sh"
|
||||
9
assets/.screenlayout/polybar.sh
Executable file
9
assets/.screenlayout/polybar.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if which xrandr; then
|
||||
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||
MONITOR=$m polybar --reload example &
|
||||
done
|
||||
else
|
||||
polybar --reload example &
|
||||
fi
|
||||
11
assets/.screenlayout/wallpapers.sh
Executable file
11
assets/.screenlayout/wallpapers.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Dynamically load background with feh
|
||||
feh_command="feh"
|
||||
while read resolution; do
|
||||
echo "Assigning wallpaper-$resolution.jpg to $(xrandr | grep ' connected' | grep $resolution | awk '{print $1}')"
|
||||
feh_command="$feh_command --bg-fill ~/Pictures/wallpaper-$resolution.jpg"
|
||||
done < <(xrandr --listmonitors | grep -oP '[0-9]+\/[0-9]+x[0-9]+\/[0-9]+' | awk -F'[/x]' '{printf "%sx%s\n", $1, $3}')
|
||||
|
||||
echo "$feh_command"
|
||||
eval "$feh_command"
|
||||
Reference in New Issue
Block a user