Created
March 13, 2020 18:17
-
-
Save notanimposter/952ec7aefad1825ee9a30cbbbc4a6453 to your computer and use it in GitHub Desktop.
make a second plank for your second monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
plank -n dock2 & | |
kill $! | |
printf "Monitor: " | |
read monitor | |
echo "Using $monitor as monitor" | |
gsettings reset-recursively net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock2/ | |
for key in $(gsettings list-keys net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/); do | |
val=$(gsettings get net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ $key) | |
gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock2/ $key "$val" | |
done | |
gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock2/ monitor $monitor | |
mkdir -p $HOME/.config/plank/dock2/ | |
rm -rf $HOME/.config/plank/dock2/launchers | |
ln -s $HOME/.config/plank/dock1/launchers $HOME/.config/plank/dock2/launchers | |
killall plank |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this, was exactly what I needed. Also thanks @angela-d, your modifications worked spot on.