Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-05-09 01:00:55

Sadfa
Member
Registered: 2021-03-27
Posts: 33

Viewnior icon - how to use previous version.

Spent too much time on this. I've tried the following folders to replace the new icon with the old pink one that is better on multiple fronts:

/usr/local/share/icons/hicolor/48x48/apps/
/usr/local/share/icons/hicolor/scalable/apps/

/usr/local/share/icons/Papirus/48x48/apps/
/usr/local/share/icons/Papirus/scalable/apps/

home folder

~/.local/share/icons/hicolor/48x48/apps/
/.local/share/icons/hicolor/scalable/apps/

~/.local/share/icons/Papirus/48x48/apps/
/.local/share/icons/Papirus/scalable/apps/

Each folder has the old (pink) multimedia-photo-viewer.svg and a symlink called viewnior.svg which points to it.

Nothing, even tried resetting with

'xfce4-panel -r'

Starting to think the icon is hard-coded?

Last edited by Sadfa (2022-05-09 10:57:57)

Offline

#2 2022-05-09 02:05:33

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 8,836

Re: Viewnior icon - how to use previous version.

Not sure if this is the case, but make sure you update the icon cache after placing a new icon into an existing icon's theme folders. For example:

sudo gtk-update-icon-cache -f /usr/share/icons/Papirus

Offline

#3 2022-05-09 11:14:47

Sadfa
Member
Registered: 2021-03-27
Posts: 33

Re: Viewnior icon - how to use previous version.

THE CACHE!!

Thanks ToZ, it's been a while.

The 'hicolor' wasn't going to work because I'm using Papirus, yes.

BTW the icon in the Whisker menu is not changing (yet? May require restart?).

For anyone that wants the code for themselves (keeping in mind that the Whisker menu might not update, or not update without a restart?)

 ## Image Viewer tweaks
 ## --------------------
 ##  Open the Image Viewer, Viewnoir
 ##    Scrollbars just get in the way when you're trying to enjoy images.
 ##      Right-click to untick Scrollbar (click and drag mouse to scroll)
 ##      (or)
viewnior & sleep 1;  kill -9 $(pidof viewnior)
sed -i 's/show-scrollbar=true/show-scrollbar=false/g' ~/.config/viewnior/viewnior.conf

 ##  Someone thought it would be an idea to change the icon of Viewnior to a
 ##   gaudy, samey, blue, green and yellow one. To fix:
sudo mkdir -p /usr/local/share/icons/Papirus/{16x16,22x22,24x24,32x32,48x48,64x64,scalable}/apps/

 ##  Create the icon svgs themselves (scraped from Papirus, sorry I didn't see
 ##   any 96x96 or 128x128 version)

sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1">
 <path fill="#ff766a" d="m1 1c-1 0-1 1-1 1v9h16v-9s0-1-1-1z"/>
 <path fill="#d22f7a" d="m0 11v3c0 1 1 1 1 1h14c1 0 1-1 1-1v-3z"/>
 <path fill="#fef8e2" fill-rule="evenodd" d="m11 4c1.1046 0 2 0.89543 2 2s-0.895 2-2 2c-1.1046 0-2-0.8954-2-2s0.8954-2 2-2z"/>
 <path style="fill:#3f3f3f" d="m 0,10.999997 v -0.52123 c 0,0 1.1538,-0.8686522 1.4782,-0.9444509 0.32439,-0.075821 0.70748,0.1857574 1.1012,0.2705865 0.39371,0.084373 0.98149,0.1986404 1.1649,0.2057784 0.18345,0.0068 0.51542,-0.018243 0.90113,-0.044923 0.38571,-0.025996 1.0244,-0.04994 1.2236,-0.047431 0.19921,0 0.6965,0.031241 1.2266,0.068182 0.5301,0.036942 1.2582,0.098853 1.4234,0.1161491 0.1652,0.0171 0.35938,0.04903 0.57974,0.08369 0.22036,0.03443 0.60186,0.08631 0.73683,0.100677 0.13496,0.01402 0.44784,0.06317 0.81088,0.101133 0.36303,0.03808 0.94399,0.05108 1.1118,0.03694 0.16778,-0.01414 0.51944,-0.355643 0.91135,-0.4861923 0.3919,-0.130527 0.82403,-0.2500399 1.1527,-0.2204866 0.329,0.029416 2.178,0.7603809 2.178,0.7603809 v 0.521219 h -14.058 z"/>
</svg>' > /usr/local/share/icons/Papirus/16x16/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" version="1">
 <path style="fill:#ff766a" d="m 2,2.00001 c -0.554,0 -1,0.446 -1,1 v 12 h 20 v -12 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 15,6.50011 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 15,6.00011 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="m 2.0005,2.00021 c -0.554,0 -1,0.446 -1,1 V 3.5002 c 0,-0.55399 0.44599,-0.99998 0.99998,-0.99998 h 18 c 0.554,0 1,0.446 1,1 v -0.5 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="fill:#d22f7a" d="m 1.0005,15.00001 v 3.9999 c 0,0.55399 0.44599,0.99998 0.99998,0.99998 h 18 c 0.554,0 1,-0.446 1,-1 v -3.9999 z"/>
 <path style="fill:#3f3f3f" d="m 1,15.00001 v -0.695046 c 0,0 1.4422,-1.158224 1.8477,-1.259254 0.40547,-0.101054 0.88433,-0.01879 1.3764,0.09416 0.49212,0.112583 1.2268,0.305762 1.4561,0.315285 0.2293,0.0097 0.64423,-0.02432 1.1264,-0.05978 0.48213,-0.03472 1.2804,-0.06672 1.5294,-0.06324 0.24899,0 0.87058,0.04171 1.5332,0.0909 0.66258,0.04932 1.5727,0.131764 1.7792,0.154835 0.20649,0.02292 0.44921,0.06532 0.72468,0.111538 0.27544,0.04585 0.75228,0.115149 0.92103,0.134195 0.16869,0.01873 0.55979,0.08416 1.0136,0.134962 0.45378,0.05072 1.18,0.06811 1.3897,0.04932 0.20971,-0.01879 0.64928,-0.486804 1.1392,-0.660891 0.48986,-0.174014 1.03,-0.333373 1.4409,-0.293968 0.411,0.03892 2.722,1.250118 2.722,1.250118 v 0.694985 h -17.571 z"/>
 <path style="opacity:0.2" d="M 1.0005,19.00001 V 19.5 c 0,0.554 0.446,1 1,1 h 18 c 0.554,0 1,-0.446 1,-1 v -0.49999 c 0,0.55399 -0.44599,0.99998 -0.99998,0.99998 h -18 c -0.55399,0 -0.99998,-0.44599 -0.99998,-0.99998 z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="20" height=".5" x="1" y="15"/>
</svg>' > /usr/local/share/icons/Papirus/22x22/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" version="1">
 <path style="fill:#ff766a" d="M 3,3 C 2.446,3 2,3.446 2,4 V 16 H 22 V 4 C 22,3.446 21.554,3 21,3 Z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 16,7.5001 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 16,7.0001 c 1.6568,0 2.9999,1.3431 2.9999,2.9999 0,1.6568 -1.3431,2.9999 -2.9999,2.9999 -1.6568,0 -2.9999,-1.3431 -2.9999,-2.9999 0,-1.6568 1.3431,-2.9999 2.9999,-2.9999 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="m 3.0005,3.0002 c -0.554,0 -1,0.446 -1,1 v 0.49999 c 0,-0.55399 0.44599,-0.99998 0.99998,-0.99998 h 18 c 0.554,0 1,0.446 1,1 v -0.5 c 0,-0.554 -0.446,-1 -1,-1 z"/>
 <path style="fill:#d22f7a" d="m 2.0005,16 v 3.9999 c 0,0.55399 0.44599,0.99998 0.99998,0.99998 h 18 c 0.554,0 1,-0.446 1,-1 v -3.9999 z"/>
 <path style="fill:#3f3f3f" d="m 2,16 v -0.695046 c 0,0 1.4422,-1.158224 1.8477,-1.259254 0.40547,-0.101054 0.88433,-0.01879 1.3764,0.09416 0.49212,0.112583 1.2268,0.305762 1.4561,0.315285 0.2293,0.0097 0.64423,-0.02432 1.1264,-0.05978 0.48213,-0.03472 1.2804,-0.06672 1.5294,-0.06324 0.24899,0 0.87058,0.04171 1.5332,0.0909 0.66258,0.04932 1.5727,0.131764 1.7792,0.154835 0.20649,0.02292 0.44921,0.06532 0.72468,0.111538 0.27544,0.04585 0.75228,0.115149 0.92103,0.134195 0.16869,0.01873 0.55979,0.08416 1.0136,0.134962 0.45378,0.05072 1.18,0.06811 1.3897,0.04932 0.20971,-0.01879 0.64928,-0.486804 1.1392,-0.660891 0.48986,-0.174014 1.03,-0.333373 1.4409,-0.293968 0.411,0.03892 2.722,1.250118 2.722,1.250118 v 0.694985 h -17.571 z"/>
 <path style="opacity:0.2" d="m 2.0005,20 v 0.49999 c 0,0.554 0.446,1 1,1 h 18 c 0.554,0 1,-0.446 1,-1 V 20 c 0,0.55399 -0.44599,0.99998 -0.99998,0.99998 h -18 C 2.44653,20.99998 2.00054,20.55399 2.00054,20 Z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="20" height=".5" x="2" y="16"/>
</svg>' > /usr/local/share/icons/Papirus/24x24/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" version="1">
 <path opacity=".2" d="m2 26.5v1c0 0.831 0.669 1.5 1.5 1.5h25c0.831 0 1.5-0.669 1.5-1.5v-1c0 0.831-0.669 1.5-1.5 1.5h-25c-0.831 0-1.5-0.669-1.5-1.5z"/>
 <path fill="#ff766a" d="m3.5 4c-0.831 0-1.5 0.669-1.5 1.5v16.5h28v-16.5c0-0.831-0.669-1.5-1.5-1.5h-25zm26.094 23.5c-0.25305 0.25267-0.6122 0.40475-1 0.40625l-25.094 0.094h25c0.43994 0 0.8198-0.20022 1.0938-0.5z"/>
 <path fill="#fff" opacity=".2" d="m3.5 4c-0.831 0-1.5 0.669-1.5 1.5v1c0-0.831 0.669-1.5 1.5-1.5h25c0.831 0 1.5 0.669 1.5 1.5v-1c0-0.831-0.669-1.5-1.5-1.5h-25z"/>
 <path fill-rule="evenodd" opacity=".2" d="m22 10c2.2091 0 4 1.7909 4 4s-1.7909 4-4 4-4-1.7909-4-4 1.7909-4 4-4z"/>
 <path fill="#fffee4" fill-rule="evenodd" d="m22 9c2.2091 0 4 1.7909 4 4s-1.7909 4-4 4-4-1.7909-4-4 1.7909-4 4-4z"/>
 <path fill="#d22f7a" d="m2 22v4.5s0 1.506 1.5 1.5l25.1-0.1c0.776-0.003 1.4-0.624 1.4-1.4v-4.5z"/>
 <path style="fill:#3f3f3f" d="m 2,21.999964 v -1.042419 c 0,0 2.0192793,-1.73732 2.5869016,-1.888862 0.5677023,-0.151568 1.2381487,-0.02828 1.9271757,0.141248 0.6890171,0.168871 1.7176675,0.897475 2.0386801,0.911756 0.3210526,0.01459 0.9020155,-0.03648 1.5770616,-0.08965 0.675027,-0.05212 1.792671,-0.100072 2.141285,-0.09486 0.348623,0 1.218947,0.06255 2.146584,0.136336 0.927706,0.07401 2.201886,0.197655 2.490998,0.232251 0.289111,0.0344 0.628934,0.09799 1.01464,0.167321 0.385645,0.0688 1.053341,0.172715 1.28945,0.201291 0.236179,0.02801 0.783751,0.126263 1.419056,0.202437 0.635325,0.0761 1.652065,0.102157 1.945676,0.07401 0.293622,-0.02828 0.909066,-0.211227 1.594963,-0.472352 0.685847,-0.261022 1.442157,-0.500048 2.017379,-0.440943 C 26.763873,20.097468 30,20.957698 30,20.957698 v 1.042418 H 5.3990335 Z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="28" height="1" x="2" y="22"/>
</svg>' > /usr/local/share/icons/Papirus/32x32/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" version="1">
 <path fill="#ff766a" d="m44 40v-32c0-1.108-0.892-2-2-2h-36c-1.108 0-2 0.892-2 2v32c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2z"/>
 <path fill-rule="evenodd" opacity=".2" d="m32 15c3.3137 0 6 2.6863 6 6s-2.6863 6-6 6-6-2.6863-6-6 2.6863-6 6-6z"/>
 <path fill="#fffee4" fill-rule="evenodd" d="m32 14c3.3137 0 6 2.6863 6 6s-2.6863 6-6 6-6-2.6863-6-6 2.6863-6 6-6z"/>
 <path fill="#fff" opacity=".2" d="m6 6c-1.108 0-2 0.892-2 2v1c0-1.108 0.892-2 2-2h36c1.108 0 2 0.892 2 2v-1c0-1.108-0.892-2-2-2z"/>
 <path fill="#d22f7a" d="m4 32v8c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2v-8z"/>
 <path style="fill:#3f3f3f" d="m 4,32 v -1.390108 c 0,0 2.8845,-2.316482 3.6955,-2.518491 0.81097,-0.202107 1.7687,-0.03759 2.7529,0.188328 0.98427,0.225177 2.4537,1.029502 2.9123,1.048535 0.45862,0.01945 1.2885,-0.04865 2.2528,-0.119546 0.96428,-0.06944 2.5609,-0.13344 3.0589,-0.12648 0.498,0 1.7412,0.08343 3.0665,0.181796 1.3252,0.09864 3.1455,0.263536 3.5584,0.309679 0.41299,0.04585 0.89844,0.130654 1.4494,0.223087 0.5509,0.09171 1.5046,0.230308 1.8421,0.268401 0.33739,0.03745 1.1196,0.168322 2.0272,0.269922 0.90758,0.101426 2.36,0.136213 2.7794,0.09864 0.41944,-0.03759 1.2986,-0.414608 2.2784,-0.762792 0.97975,-0.348037 2.0601,-0.666753 2.8818,-0.587943 C 39.37735,29.162187 44,30.609795 44,30.609795 v 1.389986 H 8.858 Z"/>
 <path opacity=".2" d="m4 40v1c0 1.108 0.892 2 2 2h36c1.108 0 2-0.892 2-2v-1c0 1.108-0.892 2-2 2h-36c-1.108 0-2-0.892-2-2z"/>
 <rect style="opacity:0.1;fill:#ffffff" width="40" height="1" x="4" y="32"/>
</svg>' > /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg


sudo echo '<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
 <path style="opacity:0.2" d="m 4,52 0,2 c 0,1.662 1.338,3 3,3 l 50,0 c 1.662,0 3,-1.338 3,-3 l 0,-2 c 0,1.662 -1.338,3 -3,3 L 7,55 C 5.338,55 4,53.662 4,52 Z"/>
 <path style="fill:#ff766a" d="M 7,8 C 5.338,8 4,9.338 4,11 l 0,33 56,0 0,-33 C 60,9.338 58.662,8 57,8 L 7,8 Z m 52.188,47 c -0.5061,0.50534 -1.2244,0.8095 -2,0.8125 L 7,56.0005 l 50,0 c 0.87988,0 1.6396,-0.40044 2.1876,-1 z"/>
 <path style="opacity:0.2;fill:#ffffff" d="M 7 8 C 5.338 8 4 9.338 4 11 L 4 12 C 4 10.338 5.338 9 7 9 L 57 9 C 58.662 9 60 10.338 60 12 L 60 11 C 60 9.338 58.662 8 57 8 L 7 8 z"/>
 <path style="opacity:0.2;fill-rule:evenodd" d="m 44,19 c 4.4182,0 8,3.5818 8,8 0,4.4182 -3.5818,8 -8,8 -4.4182,0 -8,-3.5818 -8,-8 0,-4.4182 3.5818,-8 8,-8 z"/>
 <path style="fill:#fffee4;fill-rule:evenodd" d="m 44,18 c 4.4182,0 8,3.5818 8,8 0,4.4182 -3.5818,8 -8,8 -4.4182,0 -8,-3.5818 -8,-8 0,-4.4182 3.5818,-8 8,-8 z"/>
 <path style="fill:#d22f7a" d="m 4,44 0,9 c 0,0 0,3.012 3,3 L 57.2,55.8 C 58.752,55.794 60,54.552 60,53 l 0,-9 z"/>
 <path style="fill:#3f3f3f" d="m 4,43.999979 v -1.737364 c 0,0 4.0385587,-2.895534 5.1738033,-3.148103 1.1354047,-0.252613 2.4762977,-0.04713 3.8543517,0.235412 1.378034,0.281453 3.435335,1.06208 4.07736,1.085883 0.642105,0.02432 1.804031,-0.06081 3.154124,-0.149414 1.350053,-0.08687 3.585341,-0.166786 4.282568,-0.1581 0.697247,0 2.437896,0.104242 4.293169,0.227226 1.855413,0.123354 4.403773,0.329426 4.981995,0.387085 0.578223,0.05733 1.25787,0.163313 2.02928,0.278869 0.77129,0.114666 2.106683,0.28786 2.578901,0.335485 0.472359,0.04669 1.567502,0.210438 2.838112,0.337396 1.27065,0.126828 3.30413,0.170261 3.891353,0.123352 0.587243,-0.04713 1.818131,-0.519043 3.189925,-0.954253 1.371694,-0.435036 2.884313,-0.833414 4.034759,-0.734905 C 53.527746,40.228448 60,42.262876 60,42.262876 V 44.00024 H 10.798067 Z"/>
 <path style="fill:#ffffff;opacity:0.1" d="M 4 44 L 4 45 L 60 45 L 60 44 L 4 44 z"/>
</svg>' > /usr/local/share/icons/Papirus/64x64/apps/multimedia-photo-viewer.svg


 ##   Create the actual viewnior links...
sudo ln -s /usr/local/share/icons/Papirus/16x16/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/16x16/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/22x22/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/22x22/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/24x24/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/24x24/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/32x32/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/32x32/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/48x48/apps/viewnior.svg
sudo ln -s /usr/local/share/icons/Papirus/64x64/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/64x64/apps/viewnior.svg

 ##   ...including what seems to be the thing to do, which is use the 48x48 icon as a 'scalable' icon?
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/scalable/apps/multimedia-photo-viewer.svg
sudo ln -s /usr/local/share/icons/Papirus/48x48/apps/multimedia-photo-viewer.svg \
           /usr/local/share/icons/Papirus/scalable/apps/viewnior.svg

 ##   Update icon cache
sudo gtk-update-icon-cache -f /usr/share/icons/Papirus

I may have removed my detest for GitHub in the OP but I do still detest GitHub strongly.

Offline

Board footer

Powered by FluxBB