all repos — website-hugo @ gh-pages

My personal blog, built with Hugo!

articles/void-xfce/index.html (view raw)

 1<!doctype html><html><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><title>BiRabittoh - Modernizing XFCE</title><meta name=viewport content="width=device-width,initial-scale=1"><meta name=description content="This article is more of a memo for myself. Since I often re-install Linux systems, I spend a lot of time doing repetitive tasks and often forget some steps, which leads me to waste even more time figuring out what&rsquo;s wrong.
 2These instructions allow you to get a fully functional and modern-looking XFCE desktop on a fresh install of Void Linux (even though they can be adapted to work in any distro)."><meta property="og:image" content><meta property="og:title" content="Modernizing XFCE"><meta property="og:description" content="This article is more of a memo for myself. Since I often re-install Linux systems, I spend a lot of time doing repetitive tasks and often forget some steps, which leads me to waste even more time figuring out what&rsquo;s wrong.
 3These instructions allow you to get a fully functional and modern-looking XFCE desktop on a fresh install of Void Linux (even though they can be adapted to work in any distro)."><meta property="og:type" content="article"><meta property="og:url" content="https://birabittoh.github.io/articles/void-xfce/"><meta property="article:section" content="articles"><meta property="article:published_time" content="2023-02-05T16:58:16+01:00"><meta property="article:modified_time" content="2023-02-05T16:58:16+01:00"><meta name=twitter:card content="summary"><meta name=twitter:title content="Modernizing XFCE"><meta name=twitter:description content="This article is more of a memo for myself. Since I often re-install Linux systems, I spend a lot of time doing repetitive tasks and often forget some steps, which leads me to waste even more time figuring out what&rsquo;s wrong.
 4These instructions allow you to get a fully functional and modern-looking XFCE desktop on a fresh install of Void Linux (even though they can be adapted to work in any distro)."><script src=https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js></script>
 5<link href="https://fonts.bunny.net/css2?family=Fira+Sans&display=swap2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel=stylesheet><link href="https://fonts.bunny.net/css2?family=Fira+Sans&display=swap" rel=stylesheet><link href="https://fonts.bunny.net/css?family=Roboto+Mono" rel=stylesheet><link rel=stylesheet type=text/css media=screen href=https://birabittoh.github.io/css/main.823a02873f9d13d4e370d9c1cd104ef671b4bdae30491788f8cb01eff700eaf4.css><link id=darkModeStyle rel=stylesheet type=text/css href=https://birabittoh.github.io/css/dark.726cd11ca6eb7c4f7d48eb420354f814e5c1b94281aaf8fd0511c1319f7f78a4.css disabled></head><body><div class=content><header><div class=main><a href=https://birabittoh.github.io/>BiRabittoh</a></div><nav><a href=/articles>Articles</a>
 6| <span id=dark-mode-toggle onclick=toggleTheme()></span>
 7<script src=https://birabittoh.github.io/js/themetoggle.js></script></nav></header><main><article><div class=title><h1 class=title>Modernizing XFCE</h1><div class=meta>Posted 2023-02-05</div></div><section class=body><p>This article is more of a memo for myself. Since I often re-install Linux systems, I spend a lot of time doing repetitive tasks and often forget some steps, which leads me to waste even more time figuring out what&rsquo;s wrong.</p><p>These instructions allow you to get a fully functional and modern-looking XFCE desktop on a fresh install of <a href>Void Linux</a> (even though they can be adapted to work in any distro).</p><h2 id=initial-system-update>Initial system update</h2><p>First thing I tried was to update the system, but the ISO was quite old. I had to update <code>xbps</code> before anything else:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>sudo xbps-install -u xbps
 8</span></span><span style=display:flex><span>sudo xbps-install -Su
 9</span></span></code></pre></div><h2 id=avoid-session-saving>Avoid session saving</h2><p>One thing I hate about XFCE is its fixation to save sessions. A lot of times I get my session saved and restored even with all settings turned off.</p><p>A quick and easy solution to disable session saving entirely is just to create an empty file in place of the <code>sessions</code> directory.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>rm ~/.cache/sessions -rf
10</span></span><span style=display:flex><span>touch ~/.cache/sessions
11</span></span></code></pre></div><p>This way, even with everything turned on, XFCE fails create a folder with that name and everything works (or doesn&rsquo;t, in this case) like a charm.</p><h2 id=change-that-shell>Change that shell</h2><p>Your shell is the main tool you use to communicate with your system, so it makes sense to replace <code>bash</code> with something more modern and feature-rich.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>sudo xbps-install -S zsh zsh-completions curl
12</span></span><span style=display:flex><span>chsh -s /bin/zsh
13</span></span><span style=display:flex><span>zsh
14</span></span><span style=display:flex><span>curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
15</span></span></code></pre></div><h2 id=get-some-good-sound-quality>Get some good sound quality</h2><p>I don&rsquo;t like <code>pulseaudio</code>. Let&rsquo;s replace it with <code>pipewire</code> and <code>wireplumber</code>.</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>su
16</span></span><span style=display:flex><span>xbps-install pipewire wireplumber
17</span></span><span style=display:flex><span>mkdir -p /etc/pipewire/pipewire.conf.d
18</span></span><span style=display:flex><span>sed &#39;/path.*=.*pipewire-media-session/s/{/#{/&#39; /usr/share/pipewire/pipewire.conf &gt; /etc/pipewire/pipewire.conf
19</span></span><span style=display:flex><span>echo &#39;context.exec = [ { path = &#34;/usr/bin/wireplumber&#34; args = &#34;&#34; } ]&#39; &gt; /etc/pipewire/pipewire.conf.d/10-wireplumber.conf
20</span></span><span style=display:flex><span>ln -s /usr/share/applications/pipewire* /etc/xdg/autostart
21</span></span><span style=display:flex><span>xbps-remove pulseaudio alsa-plugins-pulseaudio
22</span></span><span style=display:flex><span>reboot
23</span></span></code></pre></div><h2 id=make-firefox-more-secure>Make Firefox more secure</h2><p>I like Firefox as a browser, but it doesn&rsquo;t come with sane defaults as far as privacy&rsquo;s concerned.</p><p>First, visit <a href=https://ffprofile.com/>Firefox Profilemaker</a> and create a customized <code>profile.zip</code>.</p><p>Then, extract your zip file to the correct destination:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>sudo xbps-install zip unzip p7zip xarchiver thunar-archive-plugin
24</span></span><span style=display:flex><span>unzip -o ~/Downloads/profile.zip -d ~/.mozilla/firefox/xxxxxxxx.default-default/
25</span></span></code></pre></div><p>Some useful extensions I always install are:</p><ul><li><a href=https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager>Bitwarden</a>, a password manager;</li><li><a href=https://addons.mozilla.org/en-US/firefox/addon/decentraleyes>Decentraleyes</a>, to serve common JS libraries locally;</li><li><a href=https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies>I still don&rsquo;t care about cookies</a>, to hide and auto-reject cookie warnings;</li><li><a href=https://addons.mozilla.org/en-US/firefox/addon/libredirect>LibRedirect</a>, a redirector for <a href=https://github.com/mendel5/alternative-front-ends>alternative front-ends</a>;</li><li><a href=https://addons.mozilla.org/en-US/firefox/addon/sponsorblock>SponsorBlock</a>, to skip YouTube sponsorships automagically;</li><li><a href=https://addons.mozilla.org/en-US/firefox/addon/ublock-origin>uBlock Origin</a>, the best ad-blocker.</li></ul><h2 id=customize-your-de>Customize your DE</h2><p>Install the last required packages for desktop usability:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>sudo xbps-install -S xfce4-whiskermenu-plugin xfce4-clipman-plugin xfce4-pulseaudio-plugin xfce4-screenshooter xclip micro neovim mpv yt-dlp
26</span></span></code></pre></div><p>Remove orphaned and cached packages:</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-fallback data-lang=fallback><span style=display:flex><span>sudo xbps-remove -Oo
27</span></span></code></pre></div><p>Now, open XFCE&rsquo;s Settings Manager and set the following options:</p><ul><li>Appearance → Style → Choose &ldquo;Adwaita-dark&rdquo;</li><li>Desktop → Background → <em>&lt;Choose your favorite wallpaper></em></li><li>Desktop → Icons → Set &ldquo;Icon type&rdquo; to &ldquo;None&rdquo;</li><li>Panel → <em>&lt;Customize your panels></em></li><li>Screensaver → Disable &ldquo;Enable Screensaver&rdquo;</li><li>Text Editor Settings → Enable:<ul><li>&ldquo;Show line numbers&rdquo;,</li><li>&ldquo;Highlight matching brackets&rdquo;,</li><li>&ldquo;Wrap long lines&rdquo;</li></ul></li><li>Window Manager → Style → Button layout → Remove &ldquo;Shade&rdquo; button from title bar</li><li>Window Manager → Advanced → Windows snapping → Enable &ldquo;To other windows&rdquo;</li><li>Window Manager → Advanced → Wrap workspaces when reaching the screen edge → Disable &ldquo;With a dragged window&rdquo;</li><li>Window Manager Tweaks → Cycling → Enable:<ul><li>&ldquo;Cycle through minimized windows in most recently used order&rdquo;,</li><li>&ldquo;Cycle through windows on all workspaces&rdquo;,</li><li>&ldquo;Raise windows while cycling&rdquo;</li></ul></li><li>Window Manager Tweaks → Accessibility → Disable:<ul><li>&ldquo;Raise windows when any mouse button is pressed&rdquo;,</li><li>&ldquo;Use mouse wheel on title bar to roll up the window&rdquo;</li></ul></li><li>Window Manager Tweaks → Accessibility → Enable &ldquo;Notify of urgency by making window&rsquo;s decoration blink&rdquo;</li><li>Window Manager Tweaks → Compositor → Enable &ldquo;Show shadows under popup windows&rdquo;</li><li>Xfce Terminal Settings → General → Scrolling → Set &ldquo;Scrollbar is&rdquo; to &ldquo;Disabled&rdquo;</li><li>Xfce Terminal Settings → Appearance →<ul><li>enable &ldquo;Use system font&rdquo;,</li><li>set &ldquo;Background&rdquo; to &ldquo;Transparent background&rdquo;,</li><li>set Opacity to 0.80;</li></ul></li><li>Xfce Terminal Settings → Colors → Presets → Choose &ldquo;Tango&rdquo;</li><li>Keyboard → Behavior → Enable &ldquo;Restore num lock state on startup&rdquo;</li></ul><h2 id=shortcuts>Shortcuts</h2><p>Finally, set the following shortcuts:</p><ul><li>Keyboard → Application Shortcuts</li></ul><table><thead><tr><th>Command</th><th>Shortcut</th></tr></thead><tbody><tr><td><code>exo-open --launch TerminalEmulator</code></td><td><code>Super</code> + <code>Return</code></td></tr><tr><td><code>xfce4-popup-whiskermenu</code></td><td><code>Super</code></td></tr><tr><td><code>xfce4-screenshooter --clipboard --region</code></td><td><code>Shift</code> + <code>Super</code> + <code>S</code></td></tr><tr><td><code>xfce4-screenshooter --clipboard --window</code></td><td><code>Shift</code> + <code>S</code></td></tr><tr><td><code>xfce4-screenshooter --clipboard --fullscreen</code></td><td><code>Print</code></td></tr><tr><td><code>sh -c 'xclip -selection clipboard -t image/png -o > "$HOME/Pictures/$(date +%Y-%m-%d_%T).png"'</code></td><td><code>Shift</code> + <code>Super</code> + <code>V</code></td></tr><tr><td><code>xflock4</code></td><td><code>Super</code> + <code>L</code></td></tr><tr><td><code>loginctl suspend</code></td><td><code>Shift</code> + <code>Super</code> + <code>L</code></td></tr></tbody></table></section><div class=post-tags><nav class="nav tags"><ul class=tags><li><a href=/tags/foss>foss</a></li><li><a href=/tags/advice>advice</a></li></ul></nav></div></article></main><footer><div style=display:flex><a class=border></a><a class=soc href=/articles/index.xml rel=me title="RSS Feed"><i data-feather=rss></i></a>
28<a class=border></a><a class=soc href=https://github.com/BiRabittoh rel=me title=GitHub><i data-feather=github></i></a>
29<a class=border></a><a class=soc href=https://www.linkedin.com/in/marco-andronaco/ rel=me title=LinkedIn><i data-feather=linkedin></i></a>
30<a class=border></a><a class=soc href=mailto:birabittoh@duck.com rel=me title=E-Mail><i data-feather=mail></i></a>
31<a class=border></a></div></footer><script>feather.replace()</script></div></body></html>