Skip to content

Instantly share code, notes, and snippets.

@lillesvin
lillesvin / fix_dropbox_icons.sh
Last active August 29, 2015 14:21
Fixed broken Dropbox icons in i3 (and probably other WMs with a few adjustments).
#!/bin/bash
WD="$HOME/.dropbox-dist/dropbox-lnx*/images/hicolor/16x16/status"
BGCOLOR=`ruby -e "puts File.read(ENV['HOME'] + '/.i3/config').gsub(/^.*bar\s\{.*colors\s\{.*background\s(#[0-9a-f]{6}).*$/m, '\1')"`
cd $WD
mkdir backup
cp ./*.png backup/
for i in ./*.png; do
echo -n "Adding background ($BGCOLOR) to $i ... "