Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
make a second plank for your second monitor
#!/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