<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/rss.xsl" type="text/xsl" ?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Framework | Bacardi55&#39;s Web Cave</title>
    <link>https://bacardi55.io/tags/framework/</link>
    <description>Recent content in Framework on Bacardi55&#39;s Web Cave</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>bac@rdi55.pl (bacardi55)</managingEditor>
    <webMaster>bac@rdi55.pl (bacardi55)</webMaster>
    <copyright>2010-2025 bacardi55</copyright>
    <lastBuildDate>Mon, 14 Oct 2024 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://bacardi55.io/tags/framework/index.xml" rel="self" type="application/rss+xml" />
    <item>
      
      <title>« Last night the backup saved my life 🎵 »</title><link>https://bacardi55.io/2024/10/14/last-night-the-backup-saved-my-life/</link><pubDate>Mon, 14 Oct 2024 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2024/10/14/last-night-the-backup-saved-my-life/</guid><description>&lt;p&gt;Behind this weird title stolen from the disco hit « Last night the DJ saved my life » from the 80s by the group Indeep, another laptop issue that could have been very painful but ended up just being a bit of wasted time.&#xA;Same as the song says « Last night the DJ saved my life from a broken heart », I could rephrase it to « Last night the backups saved my life from a broken Archlinux update ».&lt;/p&gt;&#xA;&lt;p&gt;What happened? I&amp;rsquo;m not sure… I went through my usual Sunday evening routine where I backup my data to 2 different devices. A full copy except a few folders to an external encrypted SDD and a partial copy (mainly my &lt;code&gt;~/.ssh&lt;/code&gt;, &lt;code&gt;~/.gnupg&lt;/code&gt;, &lt;code&gt;~/.password-store&lt;/code&gt; and &lt;code&gt;~/.config&lt;/code&gt; folders) to an encrypted flash drive. &lt;a href=&#34;https://bacardi55.io/2024/06/07/create-an-encrypted-external-hard-drive/&#34;&gt;I wrote about this&lt;/a&gt; already so no more details needed.&lt;/p&gt;&#xA;&lt;p&gt;Then, I usually update my system. Using &lt;a href=&#34;https://archlinux.org/&#34;&gt;Archlinux&lt;/a&gt; (more specifically &lt;a href=&#34;https://endeavouros.com/&#34;&gt;EndeavourOS&lt;/a&gt;, which is based on Archlinux), I don&amp;rsquo;t update it daily but weekly as I don&amp;rsquo;t want any surprises during the week. And 99% of the time, updates don&amp;rsquo;t bring surprises, but last night it went sideways… After the updates, I usually reboot my computer, a way to ensure I&amp;rsquo;m using the latest installed kernel version and software that were updated.&lt;/p&gt;&#xA;&lt;p&gt;But the computer didn&amp;rsquo;t reboot… It failed to decrypt my internal hard drive where the system and my home data are… Leaving me with just a more or less broken prompt to try to fix things. The error was something like « Failed to start cryptography setup luks ». Not sure what went wrong, maybe a dracut related issue but I&amp;rsquo;m not sure. As it was almost 1AM, I decided to go to bed and see this morning.&lt;/p&gt;&#xA;&lt;p&gt;This morning, after a couple of checks and tests, nothing fixed it… As I needed my computer to work, I had 2 options: either spend possibly hours trying to debug using the small screen of my phone to find a way to solve it… Or reinstall the system and use my external SSD with almost all my home to retrieve data.&lt;/p&gt;&#xA;&lt;p&gt;Deciding to go the later road, I put the EndeavourOS USB key and started the computer. From the live install, I had access to the encrypted internal drive, so I even took the time to copy to my external drive the 2 folders that are not synced every Sunday (my ~/Téléchargements - aka downloads in French - and my ~/Videos folders). I didn&amp;rsquo;t mind loosing what was in there, but as I had still access to it, why not waste 20 minutes or so copying them to avoid loosing anything 🤷…&lt;/p&gt;&#xA;&lt;p&gt;Once the copy was done, I went through the installation process, which thankfully is easy and fast using the EndeavourOS installer. More or less and an hour after booting my computer with the EndeavourOS usb key, I had again access to a working system (additional backups included).&lt;/p&gt;&#xA;&lt;p&gt;All I needed was to copy all files back to my internal drive and reinstall some software with pacman / yay and they were configured just as before (even things like opened tabs in Firefox were still here). Just for future use, these 2 commands could really help speed things up:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S vim neovim pass autorandr alacritty rofi rofi-pass zsh tmux mupdf htop dfc bat mpv ttf-firacode-nerd xss-lock xautolock emacs hunspell-fr hunspell-en_us rofimoji thunderbird nheko signal-desktop chromium libadwaita torbrowser-launcher hugo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yay -S zoom factorio streamcontroller vcmi&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;m sure I&amp;rsquo;m still missing things here, but with these 2 commands I have most of the tools needed to get back on track!&lt;/p&gt;&#xA;&lt;p&gt;Also, a quick thanks to myself for some of my own blog posts to quickly find some things to do on top of just installing software. Things like the &lt;a href=&#34;&#34;&gt;udev rule for my streamdeck&lt;/a&gt; or the &lt;a href=&#34;https://bacardi55.io/2023/02/18/new-laptop-part-5-power-management/&#34;&gt;configuration needed for hibernation and power management&lt;/a&gt; and so on!&lt;/p&gt;&#xA;&lt;p&gt;As I said in a previous blog post where &lt;a href=&#34;https://bacardi55.io/2024/06/25/thanking-myself-for-writing-here/&#34;&gt;I weirdly thanked myself for blogging&lt;/a&gt;: keep on blogging! And keep on weekly backups! (or even pre-update backups, whenever that happens!).&lt;/p&gt;&#xA;&lt;p&gt;A story that could have been way worse but ended up being a couple of wasted hours. I&amp;rsquo;m happy to have just lost those hours and no data though, so happy trade off :-).&lt;/p&gt;&#xA;&lt;p&gt;TLDR; Make backups, they saved me yet again this morning!&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>A clean ssh (client) configuration thanks to includes</title><link>https://bacardi55.io/2024/06/17/a-clean-ssh-client-configuration-thanks-to-includes/</link><pubDate>Mon, 17 Jun 2024 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2024/06/17/a-clean-ssh-client-configuration-thanks-to-includes/</guid><description>&lt;p&gt;This post could be resumed as &amp;ldquo;TIL: &lt;code&gt;~/.ssh/config&lt;/code&gt; can now include other files&amp;rdquo;, but in the end I opted for a longer version of that :).&lt;/p&gt;&#xA;&lt;p&gt;Since I had to redo my full laptop setup from scratch, one thing I had to redo was my ssh configuration. First, creating the ssh keys, which is easy enough by using the &lt;code&gt;ssh-keygen&lt;/code&gt; command (in my case, I used &lt;code&gt;ssh-keygen -t ed25519&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;But the second step was to use the &lt;code&gt;~/.ssh/config&lt;/code&gt; file. It isn&amp;rsquo;t mandatory, as you can simply write your ssh command with the right options each time, but using many different ssh keys for different usage, as well as prefering using the server name than the full hostname, the &lt;code&gt;~/.ssh/config&lt;/code&gt; file can be very useful. For the latest part, I used to manage it via &lt;code&gt;/etc/hosts&lt;/code&gt;, but I think this is a cleaner way (very subjective).&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m sure most people stumbling on this blog will know this, but here is an example of an entry in my config file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Host &amp;lt;name&amp;gt;&#xA;    Hostname &amp;lt;hostname&amp;gt;&#xA;    User &amp;lt;user&amp;gt;&#xA;    IdentityFile ~/.ssh/&amp;lt;sshKeyForThisHostname&amp;gt;&#xA;    IdentitiesOnly yes&#xA;    AddKeysToAgent yes&#xA;    PreferredAuthentications publickey&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It is just an example, there are more options but these are the one I used the most. In this example:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;Hostname&lt;/code&gt; is the address of your server&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;IdentityFile&lt;/code&gt; contains the path to the ssh key to use&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;IdentitiesOnly&lt;/code&gt; will limit for this host this identiy, even if other are already unlocked via ssh-agent&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;PreferredAuthentications&lt;/code&gt; indicates the preferred order for authentication, in my case only public key&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;AddKeysToAgent&lt;/code&gt; add the key to the ssh-agent to avoid typing your password every time (see below)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;User&lt;/code&gt; if you need to connect with a different user than the current one&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;code&gt;Host&lt;/code&gt; can either be the server name or something more complex including a wildcard. For example, my sourcehut entry is &lt;code&gt;Host *sr.ht&lt;/code&gt;, so that evey ssh/scp command for the sr.ht hostname or any subdomain will used this configuration (and thus the dedicated ssh key). In such case, the &lt;code&gt;Hostname&lt;/code&gt; line can even be ignored:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Host *sr.ht&#xA;    IdentityFile ~/.ssh/sourcehut&#xA;    IdentitiesOnly yes&#xA;    AddKeysToAgent yes&#xA;    PreferredAuthentications publickey&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For my local server that use only a local DNS (subdomain of bacardi55.local), a typical entry would look like below:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Host luffy&#xA;    Hostname luffy.bacardi55.local&#xA;    IdentityFile ~/.ssh/proxmox&#xA;    IdentitiesOnly yes&#xA;    AddKeysToAgent yes&#xA;    PreferredAuthentications publickey&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I could potentially simplify this by using more advanced options with wildcard and hostname patterns like &lt;code&gt;!&lt;/code&gt;, but I find it less clear and do prefer an entry per server / VM / Container.&lt;/p&gt;&#xA;&lt;p&gt;Little by little, my &lt;code&gt;~/.ssh/config&lt;/code&gt; started to become very long… Too long for my taste… Granted it was also the case before, but adding so many entries in such a short amount of time in a large file really annoyed me. And after a quick search to see if it was possible, I learned that &lt;code&gt;~/.ssh/config&lt;/code&gt; can include other files! I should have known this as apparently is has been there for many years now… But I didn&amp;rsquo;t (old habits die hard). To do so, simply use &lt;code&gt;Include path/to/file&lt;/code&gt;. The path needs to be relative to where the config file is. My config file is now much cleaner now and simply has 5 lines:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Include config.d/proxmox&#xA;Include config.d/local&#xA;Include config.d/work&#xA;Include config.d/sourcehut&#xA;Include config.d/digitalocean&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As you can see, I now split per ssh key the configuration. All &amp;ldquo;subconfig&amp;rdquo; files are in &lt;code&gt;~/.ssh/config.d&lt;/code&gt;. The &lt;code&gt;config.d/proxmox&lt;/code&gt; contains the configuration for all proxmox related hosts, VMs and containers, &lt;code&gt;config.d/local&lt;/code&gt; contains other local servers (eg: my raspberry pi), and so on…&lt;/p&gt;&#xA;&lt;p&gt;I could have simplified even more using a wildcard:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Include config.d/*&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But I prefer manually including the files. It would allow me to stop including one without deleting the config if one day that is needed for any reason.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;strong&gt;EDIT October 2025&lt;/strong&gt;&lt;/strong&gt;: To avoid your identity (keys) to all be tested when trying to connect to an ssh server not yet declared in your config, you should add at the top of the &lt;code&gt;~/.ssh/config&lt;/code&gt; file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Host *&#xA;  IdentitiesOnly=yes&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;https://bacardi55.io/2025/10/03/many-ssh-keys-and-authentication-failures&#34;&gt;Read more about this here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now one last thing to avoid typing the password multiple time in a row while using the same key. For that I use the &lt;code&gt;ssh-agent&lt;/code&gt; service included with systemd. I use it at the user level, not globally. To enable and start it, simply run:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl --user enable ssh-agent.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Created symlink /home/bacardi55/.config/systemd/user/default.target.wants/ssh-agent.service → /home/bacardi55/.config/systemd/user/ssh-agent.service.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;systemctl --user start ssh-agent.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the goal of the &lt;code&gt;AddKeysToAgent yes&lt;/code&gt; option in the ssh config above, to add the key to the running ssh-agent and unlock your key only once.&lt;/p&gt;&#xA;&lt;p&gt;To make it work, you also need your shell to be aware of the &lt;code&gt;SSH_AUTH_SOCK&lt;/code&gt; that must contain the path to the socket. To do so, add the following either in your &lt;code&gt;~/.zshrc&lt;/code&gt; (or &lt;code&gt;~/.bashrc&lt;/code&gt;, …) or in your &lt;code&gt;~/.profile&lt;/code&gt; (I choose the former):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;export SSH_AUTH_SOCK=&amp;#34;$XDG_RUNTIME_DIR/ssh-agent.socket&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And that should be it, you should be able to unlock your ssh key for your entire session at its first use.&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 7: Firefox extensions</title><link>https://bacardi55.io/2023/07/25/new-laptop-part-7-firefox-extensions/</link><pubDate>Tue, 25 Jul 2023 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/07/25/new-laptop-part-7-firefox-extensions/</guid><description>&lt;p&gt;I mostly use firefox as my main browser. I say mostly because I open chromium from time to time on website that refuse to work on firefox. The main reason I&amp;rsquo;m using firefox is because it isn&amp;rsquo;t based on webkit / blink… Yes that really why… It is more a militant act fighting against Alphabet/Google dictating their low about web standards&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; (they already do but they will do worse and worse the more people use their web engine). If that wasn&amp;rsquo;t for this main reason, I&amp;rsquo;d probably use &lt;a href=&#34;https://www.qutebrowser.org/&#34;&gt;qutebrowser&lt;/a&gt; a lot more.&lt;/p&gt;&#xA;&lt;p&gt;This is why I&amp;rsquo;m always sad when I see news from mozilla I don&amp;rsquo;t like. Their latest change allowing them to &lt;strong&gt;silently&lt;/strong&gt; block add-on on specific site is not only very scary in term of security, it is also a direct attack to users freedom and a clear breach of trust (once again)… But there is no real alternative without giving up to webkit / blink based browser. I use 2 version of firefox, nightly for my day to day browsing and stable for my work related web browsing. Each use a specific profile. While &lt;a href=&#34;https://bacardi55.io/tags/framework/&#34;&gt;reinstalling my laptop&lt;/a&gt; earlier this year, I thought it would be an interesting short blog post to talk about the different extensions I use.&lt;/p&gt;&#xA;&lt;p&gt;Before that, just a quick tip to unsure nightly is the default browser used (chromium changes that config after installing it):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xdg-mime default firefox-nightly.desktop x-scheme-handler/https&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xdg-mime default firefox-nightly.desktop x-scheme-handler/http&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above 2 commands should do the trick.&lt;/p&gt;&#xA;&lt;p&gt;Regarding extensions, I&amp;rsquo;m using the following ones:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/sidebery/&#34;&gt;SideBery&lt;/a&gt;: The best add-on (IMHO) to manage tabs if, like me, you are a tab addict! Not only it has a clean and slick vertical UI, but it works perfectly (and better than my experience with &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/&#34;&gt;Tree Style Tab&lt;/a&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/&#34;&gt;uBlock Origin&lt;/a&gt;: Famous add-on to block adds&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.eff.org/https-everywhere&#34;&gt;HTTPS Everywhere&lt;/a&gt;: To force traffic to https on all sites. &lt;strong&gt;/!\&lt;/strong&gt; As nice reader shared with me that this is actually not needed on desktop version of firefox anymore as the option is not in Firefox by default. See their &lt;a href=&#34;https://www.eff.org/https-everywhere/set-https-default-your-browser&#34;&gt;blog post&lt;/a&gt; for more information.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/libredirect/&#34;&gt;LibRedirect&lt;/a&gt;: To use alternative website to GAFAM ones&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/privacy-badger17/&#34;&gt;Privacy Badger&lt;/a&gt;: Block trackers&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/wallabagger/&#34;&gt;Wallabager&lt;/a&gt;: Allow sending web pages to &lt;a href=&#34;https://wallabag.org/&#34;&gt;wallabag&lt;/a&gt;, a read-it-later opensource service&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/linkding-injector/&#34;&gt;Linkding Injector&lt;/a&gt;: When doing a web search, this add-on will also look into my bookmark library (managed via &lt;a href=&#34;https://github.com/sissbruecker/linkding&#34;&gt;linkding&lt;/a&gt;) to show me matching results if any.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not sure if this is too much or not, but that&amp;rsquo;s what I&amp;rsquo;ve been using since I moved to this new laptop. What about you?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;strong&gt;TIPS&lt;/strong&gt;&lt;/strong&gt;: If you use sidebery and want to hide the default horizontal tab bar, you need to write a small css file.&lt;/p&gt;&#xA;&lt;p&gt;Edit &lt;code&gt;~/.mozilla/firefox/&amp;lt;profileName&amp;gt;/chrome/userChrome.css&lt;/code&gt; (or create it if it doesn&amp;rsquo;t exist yet) to add:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#TabsToolbar {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;none&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#sidebar-header {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#66d9ef&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#66d9ef&#34;&gt;none&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And voilà! Just for fun, a quick screenshot:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/07/firefox.png&#34;&#xA;    alt=&#34;Figure 1: Firefox screenshot&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 1: &lt;/span&gt;Firefox screenshot&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;&#xA;&lt;hr&gt;&#xA;&lt;ol&gt;&#xA;&lt;li id=&#34;fn:1&#34;&gt;&#xA;&lt;p&gt;Just the latest example: &lt;a href=&#34;https://github.com/RupertBenWiser/Web-Environment-Integrity/blob/main/explainer.md&#34;&gt;Web Environment Integrity&lt;/a&gt;&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/div&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 6: Managing multi screens with i3wm and autorandr</title><link>https://bacardi55.io/2023/07/10/new-laptop-part-6-managing-multi-screens-with-i3wm-and-autorandr/</link><pubDate>Mon, 10 Jul 2023 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/07/10/new-laptop-part-6-managing-multi-screens-with-i3wm-and-autorandr/</guid><description>&lt;p&gt;For some time now, I&amp;rsquo;ve been using 3 external screens connected to my laptop. With my previous laptop, 3 screens was the maximum so I couldn&amp;rsquo;t use the laptop screen with the 3 external ones. A problem I don&amp;rsquo;t have anymore since &lt;a href=&#34;https://bacardi55.io/tags/framework/&#34;&gt;I switched to the framework laptop&lt;/a&gt; :). But even though I could use 4 screens, I don&amp;rsquo;t. I prefer to &amp;ldquo;limit&amp;rdquo; myself to the 3 external screens.&#xA;The screens are mounted on a 3 arms monitor stand similar to &lt;a href=&#34;https://www.amazon.com/Monitor-Screens-Adjustable-Rotation-Mounting/dp/B0B2RBSDF4/ref=sr_1_20&#34;&gt;this one (/!\ Amazon link, sorry)&lt;/a&gt; and I don&amp;rsquo;t like looking down on the 4th screen.&lt;/p&gt;&#xA;&lt;p&gt;But it is still a laptop, which means I move it a lot. Sometime just as a laptop, sometime connected to a transportable screen or a TV or others. Also sometime I go into &amp;ldquo;ultra focus mode&amp;rdquo; where I enable only the middle screen and disable the 3 others (where usually I have chat(s) and/or emails). So I need a way to switch quickly between these modes.&lt;/p&gt;&#xA;&lt;p&gt;For that, I use xrandr to setup my screens as I want, autorandr to automate the switch to the mode corresponding to the number of screens plugged in and i3wm scripts with rofi for manual change.&lt;/p&gt;&#xA;&lt;p&gt;To configure the screens position, I use xrandr GUI. Pretty rough UI but does the job. Once I&amp;rsquo;m happy, I save the configuration with autorandr with the following command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;autorandr --save &amp;lt;name&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Do that each time you have a setup you want to reuse quickly. When a screen is (un)plugged, autorandr will try to find the saved profile that match the current situation. If any, config is applied automatically (whether you want it or not :p). It is that easy :).&lt;/p&gt;&#xA;&lt;p&gt;While it is usually good enough, it doesn&amp;rsquo;t work for when I want to go into &amp;ldquo;focus mode&amp;rdquo; (only 1 screen enabled even though 3 screens are plugged in). I don&amp;rsquo;t want to unplug screens, just disable them until I change my mind. To do so, I created a small script that I launch via a keybind (&lt;code&gt;super + shift + space&lt;/code&gt;). This script will open a rofi pop-up asking me for one of the mode. They are hardcoded for now, I should improve that in the future to automatically find for the different existing profile in the autorandr config… But that&amp;rsquo;s for another time! Then the selected value is used within a &lt;code&gt;i3-msg&lt;/code&gt; command to start the right autorandr command. The content of the script is as follow (or always &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/.config/i3/scripts/autorandr&#34;&gt;up to date version on sourcehut&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Define an associative array:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;typeset -A mode&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# And its content:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mode&lt;span style=&#34;color:#f92672&#34;&gt;=(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Home&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;autorandr --load home&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Laptop&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;autorandr --load laptop&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Focus&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;autorandr --load focus1screen&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Presentation&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;autorandr --load dualprez&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;4screens&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;autorandr --load 4screens&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Cancel&lt;span style=&#34;color:#f92672&#34;&gt;]=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mode_nrows&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${#&lt;/span&gt;mode[@]&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;selected&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;printf &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;%s\n&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;!mode[@]&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; | sort | rofi -dmenu -p &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Monitor setup&amp;#34;&lt;/span&gt; -i -lines 2&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;i3-msg -q &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;exec --no-startup-id &lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;mode[&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;selected&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;]&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And voilà, pressing the &lt;code&gt;super + shift + space&lt;/code&gt; keybind, I have the above pop-up asking me for the mode to use:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/07/autorandr-rofi-popup.png&#34;&#xA;    alt=&#34;Figure 1: A rofi pop-up asking for different autorandr profiles&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 1: &lt;/span&gt;A rofi pop-up asking for different autorandr profiles&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;</description></item>
    <item>
      
      <title>New laptop part 5b: Prevent sleep / hibernation when home and in charge</title><link>https://bacardi55.io/2023/07/09/new-laptop-part-5b-prevent-sleep-/-hibernation-when-home-and-in-charge/</link><pubDate>Sun, 09 Jul 2023 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/07/09/new-laptop-part-5b-prevent-sleep-/-hibernation-when-home-and-in-charge/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://bacardi55.io/2023/02/18/new-laptop-part-5-power-management/&#34;&gt;In a previous post&lt;/a&gt;, I talked about my configuration for managing power (lock, suspend, hibernation, …). It works as expected, meaning it locks the screen after 10min via &lt;code&gt;xautolock&lt;/code&gt;, and auto suspend via systemd &lt;code&gt;logind.conf&lt;/code&gt;  and &lt;code&gt;sleep.conf&lt;/code&gt; files.&lt;/p&gt;&#xA;&lt;p&gt;It is all fine, but usually when I am home I tend to leave the laptop switched on if I know I&amp;rsquo;m going to reuse it more or less quickly. And usually when I go back to it I don&amp;rsquo;t like seeing the laptop powered off. When I know I want it to go in sleep or hibernation, either I just unplug it or directly put it to sleep. Normally, software that needs to prevent system lock sends a signal to inhibit the system to shutdown/sleep. Read the &lt;a href=&#34;https://www.freedesktop.org/wiki/Software/systemd/inhibit/&#34;&gt;freedesktop.org documentation&lt;/a&gt; to learn about the 7 inhibitor lock types and what you can do with it. In specific case, I couldn&amp;rsquo;t really use that so I went another way with systemd.&lt;/p&gt;&#xA;&lt;p&gt;So what about my requirements? Well it is simple, I want to prevent lock/sleep/hibernation when I the laptop is used at home and the battery is charging.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not at all an expert in systemd (I tried for a long time to avoid distro with systemd), so there might be errors or unnecessary things in this post, but I made it work for me… Let me know if you know how I could improve it :).&lt;/p&gt;&#xA;&lt;h2 id=&#34;let-s-try&#34;&gt;Let&amp;rsquo;s try!&lt;/h2&gt;&#xA;&lt;h3 id=&#34;the-wrong-start&#34;&gt;The wrong start&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;strong&gt;Nota&lt;/strong&gt;&lt;/strong&gt;: Don&amp;rsquo;t copy past code from that section, they don&amp;rsquo;t work as expected.&lt;/p&gt;&#xA;&lt;p&gt;To do so, I started creating a systemd service that will run before the sleep related services. To find sleep related services, one can list all available systemd target using this command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;systemctl list-unit-files --type target&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this example, the new service needs to run before the following target:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;sleep.target&#xA;hibernate.target&#xA;hybrid-sleep.target&#xA;suspend.target&#xA;suspend-then-hibernate.target&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Knowing the target, we can create a simple service that will run before any of these sleep related events. I created &lt;code&gt;/etc/systemd/system/inhibitsleep.service&lt;/code&gt; with the following content:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;[Unit]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Description&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;Inhibit suspend when home and plugged to electricity&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Before&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;sleep.target hibernate.target hybrid-sleep.target suspend.target suspend-then-hibernate.target&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;[Service]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Type&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;oneshot&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;ExecStart&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/usr/local/bin/inhibitsleep.sh&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;[Install]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;RequiredBy&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;sleep.target hibernate.target hybrid-sleep.target suspend.target suspend-then-hibernate.target&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Important part here are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the &lt;code&gt;Before=&lt;/code&gt; in the &lt;code&gt;[Unit]&lt;/code&gt; that tells this service needs to run before the mentioned services&lt;/li&gt;&#xA;&lt;li&gt;the &lt;code&gt;RequiredBy=&lt;/code&gt; in the &lt;code&gt;[Install]&lt;/code&gt; that indicates that this service is required by the sleep related services&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;[service]&lt;/code&gt; is of type &lt;code&gt;oneshot&lt;/code&gt; so the service manager will consider the unit up after the main process exits . The &lt;code&gt;ExecStart=&lt;/code&gt; is just pointing to a simple shell script.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To enable this new service, a simple &lt;code&gt;systemctl enable inhibitsleep.service&lt;/code&gt; will do the trick.&lt;/p&gt;&#xA;&lt;p&gt;In my head, I would simply need to check if I was connected to my home wifi and if the laptop battery was charging… And I did just that in a small shell script that basically looked like this:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wifi&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;nmcli -t -f device,state,connection d | grep &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;ssid&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; | wc -l&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;battery&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep state | /usr/bin/awk &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;{print $2}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;wifi&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;battery&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;charging&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  /usr/bin/echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Preventing sleep.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  exit &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  /usr/bin/echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Not preventing sleep.&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  exit &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;What I didn&amp;rsquo;t know is that when that script is triggered, some other services ran before and wifi was already disconnected before sleep… So that didn&amp;rsquo;t work at all!&lt;/p&gt;&#xA;&lt;h3 id=&#34;switching-gears&#34;&gt;Switching gears&lt;/h3&gt;&#xA;&lt;p&gt;The new idea was:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Creating a udev rule to run on AC plug that would trigger a shell script that would look at the status (charging or not) as well as the ssid I&amp;rsquo;m connected to (if any). Based on that, I write a value of the status in a file.&lt;/li&gt;&#xA;&lt;li&gt;In the script fired by the systemd service above (&lt;code&gt;inhibitsleep.service&lt;/code&gt;), check that value and act upon it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Using this strategy would also simplify the manual trigger to enable/disable sleep (more on that in another post).&lt;/p&gt;&#xA;&lt;h4 id=&#34;udev-rule-on-ac--un--plug&#34;&gt;Udev rule on AC (un)plug&lt;/h4&gt;&#xA;&lt;p&gt;To run script when AC is (un)plugged, create the file &lt;code&gt;/etc/udev/rules.d/90-ac-on.rules&lt;/code&gt; with the following content:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;SUBSYSTEM==&amp;#34;power_supply&amp;#34;, ATTR{online}==&amp;#34;1&amp;#34;, RUN+=&amp;#34;/usr/local/bin/powerSupplyCharging.sh&amp;#34;&#xA;SUBSYSTEM==&amp;#34;power_supply&amp;#34;, ATTR{online}==&amp;#34;0&amp;#34;, RUN+=&amp;#34;/usr/local/bin/powerSupplyDischarging.sh&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, of course, we need to create both scripts (&lt;code&gt;powerSupplyCharging.sh&lt;/code&gt; and &lt;code&gt;powerSupplyDischarging&lt;/code&gt;)&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;/usr/local/bin/powerSupplyCharging.sh&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssid&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&amp;lt;MySSID&amp;gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wifi&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;/usr/bin/nmcli -t -f device,state,connection d | /usr/bin/grep &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;ssid&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; | wc -l&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;wifi&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  /usr/bin/echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt; &amp;gt; /tmp/.preventSleep&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  /usr/bin/echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &amp;gt; /tmp/.preventSleep&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;/usr/local/bin/powerSupplyDischarging.sh&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/usr/bin/echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt; &amp;gt; /tmp/.preventSleep&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then reload udev rules:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;sudo udevadm control --reload&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now I have either 0 or 1 in &lt;code&gt;/tmp/.preventSleep&lt;/code&gt; each time to (un)plug the laptop. Now let&amp;rsquo;s use that to block locking.&lt;/p&gt;&#xA;&lt;h4 id=&#34;update-the-script-launched-by-systemd&#34;&gt;Update the script launched by systemd&lt;/h4&gt;&#xA;&lt;p&gt;Update the script launched by systemd (see above) &lt;code&gt;/usr/local/bin/inhibitsleep.sh&lt;/code&gt; to:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;toggle&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;cat /tmp/.preventSleep&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;toggle&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  exit &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  exit &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then enable the systemd service:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl enable inhibitsleep.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And voilà, it should prevent sleeping when charging and on my home WIFI. Every other situation, the usual happens, meaning that the laptop will go into suspend-then-hibernate mode.&lt;/p&gt;&#xA;&lt;h2 id=&#34;drawback-of-the-solution&#34;&gt;Drawback of the solution&lt;/h2&gt;&#xA;&lt;p&gt;The solution isn&amp;rsquo;t perfect, though, and the issues I&amp;rsquo;ve noticed so far are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The wifi get disconnected. Only for a short period and after hibernation is prevented, the wifi is connected again. Usually it doesn&amp;rsquo;t create any issue as the reconnection is fast.&lt;/li&gt;&#xA;&lt;li&gt;The screen is still getting locked. This is both a good and a bad thing. Most of the time, I do prefer the automatic screen locking, even home (since now it is easy to &lt;a href=&#34;https://bacardi55.io/2023/07/07/i3lock-and-fingerprint/&#34;&gt;unlock i3lock via fingerprint&lt;/a&gt;). But sometime I would prefer it didn&amp;rsquo;t. I have a manual weird way of blocking this that I&amp;rsquo;ll describe in the next post.&lt;/li&gt;&#xA;&lt;li&gt;It also prevent manual sleep / hibernation if in the same set of conditions (in this case, at home and battery charging). I don&amp;rsquo;t mind because if I manually put the laptop to sleep, I want to make sure I&amp;rsquo;ve unplugged it anyway, so it is always a good reminder.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;is for now, you can find the latest version of these scripts are on &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/&#34;&gt;sr.ht&lt;/a&gt;, more specifically &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/bin&#34;&gt;the bash scripts&lt;/a&gt;, &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/yadm-config/etc/systemd&#34;&gt;the systemd config&lt;/a&gt; and the &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/yadm-config/etc/udev/rules.d/&#34;&gt;udev rules&lt;/a&gt;.&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>i3lock and fingerprint</title><link>https://bacardi55.io/2023/07/07/i3lock-and-fingerprint/</link><pubDate>Fri, 07 Jul 2023 00:00:00 +0200</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/07/07/i3lock-and-fingerprint/</guid><description>&lt;p&gt;This is going to be a very short blog post. In a &lt;a href=&#34;https://bacardi55.io/2023/01/17/new-laptop-part-1-endeavouros-/-archlinux-on-the-framework-laptop/&#34;&gt;previous post&lt;/a&gt;, I talked about installing &lt;a href=&#34;https://endeavouros.com/&#34;&gt;endeavourOS&lt;/a&gt; (based on &lt;a href=&#34;https://archlinux.org/&#34;&gt;archlinux&lt;/a&gt;) on the &lt;a href=&#34;https://frame.work/fr/fr&#34;&gt;framework laptop&lt;/a&gt;. In that post, I explained how to use the fingerprint reader to connect to my session (via lightdm) and instead of typing my password when using sudo.&lt;/p&gt;&#xA;&lt;p&gt;The TLDR; from that previous post is:&#xA;1/ Install &lt;code&gt;fprintd&lt;/code&gt;&#xA;2/ Add &lt;code&gt;auth      sufficient pam_fprintd.so&lt;/code&gt; in &lt;code&gt;/etc/pam.d/sudo&lt;/code&gt; above &lt;code&gt;auth      include   system-login&lt;/code&gt;.&#xA;3/ Add at the top of &lt;code&gt;/etc/pam.d/lightdm&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth        sufficient  pam_unix.so try_first_pass likeauth nullok&#xA;auth        sufficient  pam_fprintd.so&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Well, easily enough, it is the same for i3lock that I use to lock my screen after a period of time or after suspend/hibernate… And didn&amp;rsquo;t think about checking if I could do the same with the fingerprint reader. The habit of unlocking via password was too strong for me to connect the 2 ideas. But eventually I did think about it and found out that the solution to make it work was dead simple!&lt;/p&gt;&#xA;&lt;p&gt;In &lt;code&gt;/etc/pam.d/i3lock&lt;/code&gt; add the line:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth            sufficient      pam_fprintd.so&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;before the line:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth include system-auth&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And now, to unlock i3lock, just press &amp;ldquo;enter&amp;rdquo; on the lock screen and put your finger on the fingerprint reader while it says &amp;ldquo;verifying&amp;rdquo; on the lock screen. That should work and unlock your screen without manually entering the password :).&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 5: power management</title><link>https://bacardi55.io/2023/02/18/new-laptop-part-5-power-management/</link><pubDate>Sat, 18 Feb 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/02/18/new-laptop-part-5-power-management/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;This blog post is about a few things I put in place for screen locking and automatically suspend. It isn&amp;rsquo;t about battery optimisation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;i3lock&#34;&gt;i3lock&lt;/h2&gt;&#xA;&lt;p&gt;To lock the screen, I&amp;rsquo;m using &lt;a href=&#34;https://github.com/i3/i3lock&#34;&gt;i3lock&lt;/a&gt;. As for the lock image, instead of using a &amp;ldquo;static&amp;rdquo; image, I&amp;rsquo;m using a blur image of the current screen. I find it more dynamic.&lt;/p&gt;&#xA;&lt;p&gt;To create a blur image of the desktop and use with i3lock, I use this script from EndeavourOS i3wm configuration:&lt;/p&gt;&#xA;&lt;p&gt;The script is &lt;code&gt;~/.config/i3/scripts/blur-lock&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PICTURE&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/tmp/i3lock.png&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SCREENSHOT&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;scrot -z &lt;/span&gt;$PICTURE&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;BLUR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;20x16&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$SCREENSHOT&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;convert $PICTURE -blur $BLUR $PICTURE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;i3lock -i $PICTURE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;rm $PICTURE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I just changed the &lt;code&gt;BLUR&lt;/code&gt; variable (from &lt;code&gt;5x4&lt;/code&gt; to &lt;code&gt;20x16&lt;/code&gt;) to blur even more the image. With that, even if I leave the screen on a chat app, it will blurry enough to not be readable at all.&lt;/p&gt;&#xA;&lt;p&gt;Original script can be found &lt;a href=&#34;https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/.config/i3/scripts/blur-lock&#34;&gt;on github&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;xss-lock&#34;&gt;xss-lock&lt;/h2&gt;&#xA;&lt;p&gt;As the archlinux wiki says:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;xss-lock subscribes to the systemd-events suspend, hibernate, lock-session, and unlock-session with appropriate actions (run locker and wait for user to unlock or kill locker). xss-lock also reacts to DPMS events and runs or kills the locker in response.&#xA;&amp;ndash; &lt;a href=&#34;https://wiki.archlinux.org/title/Power_management#xss-lock&#34;&gt;https://wiki.archlinux.org/title/Power_management#xss-lock&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This means that when a &lt;code&gt;lock-session&lt;/code&gt; events will be launched, &lt;code&gt;xss-lock&lt;/code&gt; will trigger a command. In my case, the script above that start i3lock with the blurred image.&lt;/p&gt;&#xA;&lt;p&gt;To install it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S xss-lock&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To test it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xss-lock -- /home/bacardi55/.config/i3/scripts/blur-lock&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, to start it at the start of the session, I put in my i3 config (&lt;code&gt;~/.config/i3/config&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exec --no-startup-id xss-lock -- /home/bacardi55/.config/i3/scripts/blur-lock&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;rofi-script&#34;&gt;Rofi script&lt;/h2&gt;&#xA;&lt;p&gt;The power menu allow easy select to hibernate, suspend, lock, logout, reboot or shutdown:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_power-menu.png&#34;&#xA;    alt=&#34;Figure 1: Screenshots of the power menu&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 1: &lt;/span&gt;Screenshots of the power menu&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;This script comes from &lt;a href=&#34;https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/.config/i3/scripts/powermenu&#34;&gt;EndeavourOS i3wm configuration&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lock-screen-automatically&#34;&gt;Lock screen automatically&lt;/h2&gt;&#xA;&lt;p&gt;To lock the screen automatically after 10min, I use &lt;code&gt;xautolock&lt;/code&gt; and start it within my i3 config:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exec --no-startup-id xautolock -time &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt; -locker &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;~/.config/i3/scripts/blur-lock&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After installing &lt;code&gt;xautolock&lt;/code&gt;, of course:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S xautolock&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;suspend-automatically&#34;&gt;Suspend automatically&lt;/h2&gt;&#xA;&lt;p&gt;To suspend the screen automatically after 15 minutes, edit the &lt;code&gt;/etc/systemd/logind.conf&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;logind.conf&lt;/code&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;[Login]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HandlePowerKey&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;suspend-then-hibernate&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HandleLidSwitch&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;suspend-then-hibernate&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HandleLidSwitchExternalPower&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;suspend-then-hibernate&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HandleLidSwitchDocked&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;ignore&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;IdleAction&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;suspend-then-hibernate&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;IdleActionSec&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;15min&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above will start &lt;code&gt;suspend-then-hibernate&lt;/code&gt; that will first suspend and then hibernate. To configure it, edit &lt;code&gt;sleep.conf&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-ini&#34; data-lang=&#34;ini&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;[Sleep]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;AllowHibernation&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;yes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;AllowSuspendThenHibernate&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;yes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HibernateState&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;disk&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;HibernateDelaySec&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;30min&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Normally, it should suspend after 15min and move to hibernation 30min later.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fixing-hibernation&#34;&gt;Fixing hibernation&lt;/h2&gt;&#xA;&lt;p&gt;I finally managed to fix hibernation on my installation. This was due to dracut configuration missing. EndeavourOS switched to &lt;code&gt;dracut&lt;/code&gt; from &lt;code&gt;mkinitcpio&lt;/code&gt;. All I needed to do was to add:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;add_dracutmodules&lt;span style=&#34;color:#f92672&#34;&gt;+=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34; resume &amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the &lt;code&gt;/etc/dracut.conf.d/calamares-luks.conf&lt;/code&gt; file. And then rebuild initramfs:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo dracut-rebuild&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Thanks a lot &lt;a href=&#34;https://www.lorenzobettini.it/2022/12/enabling-hibernation-in-endeavouros/&#34;&gt;Lorenzo&amp;rsquo;s post&lt;/a&gt; for this! Read his post for more information too.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it for this post, nothing crazy here. The main win for me was fixing the hibernation :).&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 4: Dracula theme</title><link>https://bacardi55.io/2023/02/06/new-laptop-part-4-dracula-theme/</link><pubDate>Mon, 06 Feb 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/02/06/new-laptop-part-4-dracula-theme/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;One thing I decided to do a bit better than usual with this new latpop is trying to apply the same theme everywhere for consistency. I&amp;rsquo;ve always preferred dark type of theme, while keeping good color contrast. Over the year, I tried many and very often selecting &lt;a href=&#34;https://kippura.org/zenburnpage/&#34;&gt;zenburn&lt;/a&gt;. But few years ago, I discoverd the &lt;a href=&#34;https://draculatheme.com/&#34;&gt;Dracula UI guideline&lt;/a&gt; and became very found of it. That&amp;rsquo;s why this will be the theme applied everywhere I can on this laptop.&lt;/p&gt;&#xA;&lt;p&gt;A quick screenshot trying to showcase some of it (i3wm, zsh / xfce4-terminal, dunst, roffi, thunar, firefox):&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/02/dracula.png&#34;&#xA;    alt=&#34;Figure 1: My dracula theme desktop:&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 1: &lt;/span&gt;My dracula theme desktop:&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;applying-the-dracula-theme&#34;&gt;Applying the Dracula theme&lt;/h2&gt;&#xA;&lt;p&gt;Global note: I clone all related dracula repo within &lt;code&gt;~/workspace/contrib/dracula&lt;/code&gt;, and then symlink or copy depending on the tool to theme. It will be used as &lt;code&gt;$DRACULA_REPOS&lt;/code&gt; in this post.&lt;/p&gt;&#xA;&lt;h3 id=&#34;zsh&#34;&gt;zsh&lt;/h3&gt;&#xA;&lt;p&gt;As discussed in the &lt;a href=&#34;https://bacardi55.io/2023/01/18/new-laptop-part-2-core-tools/&#34;&gt;part 2&lt;/a&gt; of this series, I use &lt;a href=&#34;https://www.zsh.org/&#34;&gt;zsh&lt;/a&gt;. To apply a dracula theme to it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/zsh.git ~/workspace/contrib/dracula/zsh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s ~/workspace/contrib/dracula/zsh/dracula.zsh-theme ~/.oh-my-zsh/themes/dracula.zsh-theme&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then add in your &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ZSH_THEME&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;dracula&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;i3&#34;&gt;i3&lt;/h3&gt;&#xA;&lt;p&gt;I detailed at length my &lt;a href=&#34;https://i3wm.org/&#34;&gt;i3wm&lt;/a&gt; configuration in &lt;a href=&#34;https://bacardi55.io/2023/01/19/new-laptop-part-3-i3wm-configuration/&#34;&gt;part 3&lt;/a&gt; of this blog post series, if you are interested. To apply the dracula theme:&lt;/p&gt;&#xA;&lt;p&gt;Simply paste the content of this in &lt;code&gt;~/.config/i3/config&lt;/code&gt;:&#xA;&lt;a href=&#34;https://github.com/dracula/i3/blob/master/.config/i3/config&#34;&gt;https://github.com/dracula/i3/blob/master/.config/i3/config&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;gtk--for-thunar&#34;&gt;Gtk (for thunar)&lt;/h3&gt;&#xA;&lt;p&gt;Installed with EndeavourOS, thunar is the default file browser. I&amp;rsquo;m more than not browsing file in a terminal, but sometime I like having a GUI file browser. And thunar is light and do more than I need from such software. So only thing to do was to dracula-ize it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/gtk ~/workspace/contrib/dracula/gtk&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p ~/.local/share/themes&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s ~/workspace/contrib/dracula/gtk ~/.local/share/themes/Dracula&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# copy old files just in case:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.config/gtk-3.0/settings.ini ~/.config/gtk-3.0/settings.ini.endeavouros&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp ~/.config/gtk-4.0/settings.ini ~/.config/gtk-4.0/settings.ini.endeavouros&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then edit &lt;code&gt;~/.config/gtk-3.0/settings.ini&lt;/code&gt; and &lt;code&gt;~/.config/gtk-4.0/settings.ini&lt;/code&gt; to change &lt;code&gt;gtk-theme-name&lt;/code&gt; line:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gtk-theme-name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Dracula&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;tmux&#34;&gt;tmux&lt;/h3&gt;&#xA;&lt;p&gt;I install tmux plugin via TPM (see &lt;a href=&#34;https://bacardi55.io/2023/01/18/new-laptop-part-2-core-tools/&#34;&gt;post 2&lt;/a&gt; of this series), and there is a Dracula plugin for tmux. To install it, add to your configuration file (in my case &lt;code&gt;~/.config/tmux/tmux.conf&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;dracula/tmux&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @dracula-plugins &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;time&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @dracula-show-powerline true&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @dracula-refresh-rate &lt;span style=&#34;color:#ae81ff&#34;&gt;60&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Adapt the option according to your needs.&lt;/p&gt;&#xA;&lt;p&gt;And then &lt;code&gt;prefix (ctrl+a) + I&lt;/code&gt; to install the new plugin, then &lt;code&gt;tmux source ~/.config/tmux/tmux.conf&lt;/code&gt; to reload (if inside tmux, otherwise just launch tmux :)).&lt;/p&gt;&#xA;&lt;h3 id=&#34;xfce4-terminal&#34;&gt;xfce4-terminal&lt;/h3&gt;&#xA;&lt;p&gt;Xfce4-terminal is the default terminal emulator with EndeavourOS, never used it before (never used xfce), so I decided to give it a shot… So far, it is nice and fast, so I&amp;rsquo;m still using it, but after changing its theme to Dracula.&lt;/p&gt;&#xA;&lt;p&gt;Clone the repo and add it to xfce4-terminal colorschemes directory:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/xfce4-terminal.git ~/workspace/contrib/dracula/xfce4-terminal&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p ~/.local/share/xfce4/terminal/colorschemes/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s ~/workspace/contrib/dracula/xfce4-terminal/Dracula.theme ~/.local/share/xfce4/terminal/colorschemes/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then right click in xfce4-terminal to open preferences panel. Go to colors and choose your theme in the list at the bottom.&lt;/p&gt;&#xA;&lt;h3 id=&#34;dunst&#34;&gt;Dunst&lt;/h3&gt;&#xA;&lt;p&gt;Clone the repo and copy the config file. Be carreful if you had custom config in your dunstrc, make sure you won&amp;rsquo;t loose anything.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/dunst.git ~/workspace/contrib/dracula/dunst&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# preserve EndeavourOS default dunstrc:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mv ~/.config/dunst/dunstrc ~/.config/dunst/dunstrc.endeavouros&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s ~/workspace/contrib/dracula/dunst/dunstrc ~/.config/dunst/dunstrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;emacs&#34;&gt;Emacs&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;rsquo;m using &lt;a href=&#34;https://www.gnu.org/software/emacs/&#34;&gt;emacs&lt;/a&gt; via &lt;a href=&#34;https://github.com/doomemacs/doomemacs&#34;&gt;doom-emacs&lt;/a&gt;, which makes it even simpler to enable dracula theme, by adding in your configuration:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-elisp&#34; data-lang=&#34;elisp&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;(setq doom-theme &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;doom-dracula&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;neomutt&#34;&gt;Neomutt&lt;/h3&gt;&#xA;&lt;p&gt;I haven&amp;rsquo;t talk yet about my neomutt configuration, maybe more on that later, but to configure the theme with Dracula:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/mutt.git ~/workspace/contrib/dracula/mutt&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ln -s ~/workspace/contrib/dracula/mutt/dracula.muttrc ~/.config/neomutt/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then in &lt;code&gt;~/.config/neomutt/neomuttrc&lt;/code&gt; add:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;source ~/.config/neomutt/draculatheme/dracula.muttrc&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;firefox&#34;&gt;Firefox&lt;/h3&gt;&#xA;&lt;p&gt;Simply search for dracula in &lt;code&gt;about:addons&lt;/code&gt; or go there:&#xA;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/dracula-dark/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search&#34;&gt;https://addons.mozilla.org/en-US/firefox/addon/dracula-dark/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;chromium&#34;&gt;Chromium&lt;/h3&gt;&#xA;&lt;p&gt;Simply search for dracula in &lt;code&gt;chrome://extensions/&lt;/code&gt; or go there:&#xA;&lt;a href=&#34;https://chrome.google.com/webstore/detail/dracula-chrome-theme/gfapcejdoghpoidkfodoiiffaaibpaem&#34;&gt;https://chrome.google.com/webstore/detail/dracula-chrome-theme/gfapcejdoghpoidkfodoiiffaaibpaem&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;rofi&#34;&gt;Rofi&lt;/h3&gt;&#xA;&lt;p&gt;Same as before, clone the repo and store the file at the right place.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/rofi&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp rofi/theme/config1.rasi ~/.config/rofi/config.rasi&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;wallpaper&#34;&gt;Wallpaper&lt;/h3&gt;&#xA;&lt;p&gt;For fun, I went all the way and decided to use the &amp;ldquo;official&amp;rdquo; Dracula wallpaper for EndeavourOS:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/02/endeavour_dracula.png&#34;&#xA;    alt=&#34;Figure 2: Dracula EndeavourOS wallpaper&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 2: &lt;/span&gt;Dracula EndeavourOS wallpaper&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://raw.githubusercontent.com/dracula/wallpaper/master/endeavour.png ~/Images/endeavour.png&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit &lt;code&gt;~/.fehbg&lt;/code&gt; and change the command to:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;feh --no-fehbg --bg-fill &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/home/bacardi55/Images/endeavour.os&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But most distro have their &amp;ldquo;official&amp;rdquo; Dracula wallpaper:&#xA;&lt;a href=&#34;https://github.com/dracula/wallpaper&#34;&gt;https://github.com/dracula/wallpaper&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;amfora&#34;&gt;Amfora&lt;/h3&gt;&#xA;&lt;p&gt;While I&amp;rsquo;m using lagrange as a day to day gemini browser, I like using Amfora too sometimes. There is a dracula theme for amfora already as well! Lagrange has already some nice dark themes available but doesn&amp;rsquo;t allow this full level of customization.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/dracula/amfora.git ~/workspace/contrib/dracula/amfora&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then copy the content of &lt;code&gt;~/workspace/contrib/dracula/amfora/&lt;/code&gt; in &lt;code&gt;~/.config/amfora/config.toml&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it for this post, it is nice to have everything consistent, even though this never has been a real focus for me :).&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 3: i3wm configuration</title><link>https://bacardi55.io/2023/01/19/new-laptop-part-3-i3wm-configuration/</link><pubDate>Thu, 19 Jan 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/01/19/new-laptop-part-3-i3wm-configuration/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Continuing the &lt;a href=&#34;https://bacardi55.io/tags/framework/&#34;&gt;framework laptop blog post series&lt;/a&gt;, where I first wrote about &lt;a href=&#34;https://bacardi55.io/2023/01/16/new-laptop-part-0-discovering-the-framework-laptop/&#34;&gt;my impression of the framework laptop&lt;/a&gt;, then about what &lt;a href=&#34;https://bacardi55.io/2023/01/17/new-laptop-part-1-endeavouros-/-archlinux-on-the-framework-laptop/&#34;&gt;I had to do to fix EndeavourOS / Archlinux on it&lt;/a&gt; and lastely about the &lt;a href=&#34;https://bacardi55.io/2023/01/18/new-laptop-part-2-core-tools/&#34;&gt;installation and configuration of some &amp;ldquo;core&amp;rdquo; softwares&lt;/a&gt;. This post is about my i3wm configuration that I have redone from scratch, heavily inspired by &lt;a href=&#34;https://discovery.endeavouros.com/window-tiling-managers/i3-wm/2021/03/&#34;&gt;EndeavourOS one&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The TLDR; as usual, is look at &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/.config/i3&#34;&gt;my dotfiles&lt;/a&gt; :)&lt;/p&gt;&#xA;&lt;p&gt;Mandatory screenshot:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_overview.png&#34;&#xA;    alt=&#34;Figure 1: My desktop screenshot&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 1: &lt;/span&gt;My desktop screenshot&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;h2 id=&#34;configuring-i3wm&#34;&gt;Configuring i3wm&lt;/h2&gt;&#xA;&lt;h3 id=&#34;the-basics&#34;&gt;The basics&lt;/h3&gt;&#xA;&lt;p&gt;The basic settings, with comments that shouldn&amp;rsquo;t need more explaination:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# set the mod key to the winkey:&#xA;set $mod Mod4&#xA;# default i3 tiling mode:&#xA;workspace_layout default&#xA;# Back and forth between workspaces&#xA;workspace_auto_back_and_forth yes&#xA;&#xA;#border indicator on windows:&#xA;new_window pixel 1&#xA;&#xA;# Set inner/outer gaps&#xA;gaps inner 3&#xA;gaps outer 2&#xA;&#xA;# Use Mouse+$mod to drag floating windows to their wanted position&#xA;floating_modifier $mod&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;workspaces&#34;&gt;Workspaces&lt;/h3&gt;&#xA;&lt;h4 id=&#34;workspaces-naming-convention&#34;&gt;Workspaces naming convention&lt;/h4&gt;&#xA;&lt;p&gt;First, let&amp;rsquo;s define the different workspaces. I have both &amp;ldquo;personal&amp;rdquo; and &amp;ldquo;work&amp;rdquo; related workspace. To visualy separate them, I add &amp;ldquo;🌢&amp;rdquo; in front of the &amp;ldquo;name&amp;rdquo; of each work related workspace (yes there is a connection^^).&lt;/p&gt;&#xA;&lt;p&gt;I use 10 workspaces each, they are the same: browsers (web and gemini, in tabbed mode), &amp;ldquo;terminal&amp;rdquo;, emails, chats, files, 7, 8, 9, 10.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;## Personal workspaces&#xA;set $ws1 &amp;#34;1:&amp;#34;&#xA;set $ws2 &amp;#34;2:&amp;#34;&#xA;set $ws3 &amp;#34;3:✉️&amp;#34;&#xA;set $ws4 &amp;#34;4:&amp;#34;&#xA;set $ws5 &amp;#34;5:&amp;#34;&#xA;set $ws6 &amp;#34;6:&amp;#34;&#xA;set $ws7 &amp;#34;7:7&amp;#34;&#xA;set $ws8 &amp;#34;8&amp;#34;&#xA;set $ws9 &amp;#34;9&amp;#34;&#xA;set $ws10 &amp;#34;10&amp;#34;&#xA;## Work workspaces&#xA;set $wsw1 &amp;#34;11:🌢&amp;#34;&#xA;set $wsw2 &amp;#34;12:🌢&amp;#34;&#xA;set $wsw3 &amp;#34;13:🌢✉️&amp;#34;&#xA;set $wsw4 &amp;#34;14:🌢&amp;#34;&#xA;set $wsw5 &amp;#34;15:🌢&amp;#34;&#xA;set $wsw6 &amp;#34;16:🌢&amp;#34;&#xA;set $wsw7 &amp;#34;17:🌢7&amp;#34;&#xA;set $wsw8 &amp;#34;18:🌢8&amp;#34;&#xA;set $wsw9 &amp;#34;19:🌢9&amp;#34;&#xA;set $wsw10 &amp;#34;20:🌢10&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;assigning-workspaces-to-screens&#34;&gt;Assigning workspaces to screens&lt;/h4&gt;&#xA;&lt;p&gt;To assign workspace to specific screens, it is easy:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;workspace $ws1 output DP1&#xA;workspace $ws2 output DP2-2&#xA;workspace $ws3 output DP2-2&#xA;workspace $ws4 output eDP1&#xA;workspace $wsw1 output DP1&#xA;workspace $wsw2 output DP2-2&#xA;workspace $wsw3 output DP1&#xA;workspace $wsw4 output DP2-1&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;switching-between-workspaces&#34;&gt;Switching between workspaces&lt;/h4&gt;&#xA;&lt;p&gt;Of course, naming is fine, but more important is to switch between them. To switch between personal workspaces, I&amp;rsquo;m using the &lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) key and a number key. To switch between work workspaces, I&amp;rsquo;m using the &lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) key + &lt;code&gt;Alt&lt;/code&gt; (&lt;code&gt;Mod1&lt;/code&gt;) key + a number key.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# switch to workspace&#xA;## Personal workspaces&#xA;bindsym $mod+1    workspace  $ws1&#xA;bindsym $mod+2    workspace  $ws2&#xA;bindsym $mod+3    workspace  $ws3&#xA;bindsym $mod+4    workspace  $ws4&#xA;bindsym $mod+5    workspace  $ws5&#xA;bindsym $mod+6    workspace  $ws6&#xA;bindsym $mod+7    workspace  $ws7&#xA;bindsym $mod+8    workspace  $ws8&#xA;bindsym $mod+9    workspace  $ws9&#xA;bindsym $mod+0    workspace  $ws10&#xA;## Work workspaces&#xA;bindsym $mod+Mod1+1    workspace  $wsw1&#xA;bindsym $mod+Mod1+2    workspace  $wsw2&#xA;bindsym $mod+Mod1+3    workspace  $wsw3&#xA;bindsym $mod+Mod1+4    workspace  $wsw4&#xA;bindsym $mod+Mod1+5    workspace  $wsw5&#xA;bindsym $mod+Mod1+6    workspace  $wsw6&#xA;bindsym $mod+Mod1+7    workspace  $wsw7&#xA;bindsym $mod+Mod1+8    workspace  $wsw8&#xA;bindsym $mod+Mod1+9    workspace  $wsw9&#xA;bindsym $mod+Mod1+0    workspace  $wsw10&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;moving-workspaces-around&#34;&gt;Moving workspaces around&lt;/h4&gt;&#xA;&lt;p&gt;To move workspaces between screens (outputs), &lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) + &lt;code&gt;shift&lt;/code&gt; + Left/Right/Up/Down:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# Move workspaces to output&#xA;bindsym $mod+Shift+Mod1+Left move workspace to output left&#xA;bindsym $mod+Shift+Mod1+Right move workspace to output right&#xA;bindsym $mod+Shift+Mod1+Up move workspace to output up&#xA;bindsym $mod+Shift+Mod1+Down move workspace to output down&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;switch-between-workspace&#34;&gt;Switch between workspace&lt;/h4&gt;&#xA;&lt;p&gt;To replicate the usual &amp;ldquo;alt+tab&amp;rdquo; but for workspaces, I use &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;tab&lt;/code&gt; (with &lt;code&gt;shift&lt;/code&gt; to go backward).&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# switch/iterate between workspaces&#xA;bindsym $mod+Tab workspace next&#xA;bindsym $mod+Shift+Tab workspace prev&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;renaming-workspace&#34;&gt;Renaming workspace&lt;/h4&gt;&#xA;&lt;p&gt;I very often rename workspace, specially for work related workspace, I usually rename them with a customer or specific project name. For this I&amp;rsquo;m using &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;x&lt;/code&gt; to rename personal workspace (ask for name and use it as is) and &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;alt&lt;/code&gt; + &lt;code&gt;x&lt;/code&gt; to rename a work related workspace (use the name with &amp;ldquo;🌢&amp;rdquo; before).&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# rename workspace&#xA;bindsym $mod+x exec &amp;#34;i3-input -F &amp;#39;move container to workspace %s; workspace %s&amp;#39; -P &amp;#39;Rename workspace to: &amp;#39;&amp;#34;&#xA;bindsym $mod+Mod1+x exec &amp;#34;i3-input -F &amp;#39;move container workspace 🌢%s; workspace 🌢%s&amp;#39; -P &amp;#39;Rename workspace to: 🌢&amp;#39;&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;open-new-empty-workspace&#34;&gt;Open new empty workspace&lt;/h4&gt;&#xA;&lt;p&gt;In case all workspace are taken (never really happens…), I use &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;n&lt;/code&gt; to open a new empty one using a script called &lt;code&gt;empty_workspace&lt;/code&gt;. The script came with the i3wm configuration of EndeavourOS, thanks to them!&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# open new empty workspace&#xA;bindsym $mod+Shift+n exec ~/.config/i3/scripts/empty_workspace&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;empty_workspace&lt;/code&gt; script:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/usr/bin/env bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;MAX_DESKTOPS&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WORKSPACES&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;seq -s &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;MAX_DESKTOPS&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;EMPTY_WORKSPACE&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;i3-msg -t get_workspaces | tr &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;\n&amp;#39;&lt;/span&gt; | grep num | awk -F:  &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;{print int($2)}&amp;#39;&lt;/span&gt; ; &lt;span style=&#34;color:#ae81ff&#34;&gt;\&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;            echo -e &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;WORKSPACES&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt; | sort -n | uniq -u | head -n 1&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;i3-msg workspace &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;EMPTY_WORKSPACE&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;containers-window&#34;&gt;Containers / Window&lt;/h3&gt;&#xA;&lt;h4 id=&#34;changing-focus-between-windows&#34;&gt;Changing focus between windows&lt;/h4&gt;&#xA;&lt;p&gt;Using &lt;code&gt;window&lt;/code&gt; + Left/Up/Right/Down keys:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# change focus&#xA;bindsym $mod+Left focus left&#xA;bindsym $mod+Down focus down&#xA;bindsym $mod+Up focus up&#xA;bindsym $mod+Right focus right&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also, for the usual &amp;ldquo;alt+tab&amp;rdquo; behaviour:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# alt tab old school style&#xA;bindsym Mod1+Tab focus right&#xA;bindsym Mod1+Shift+Tab focus left&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For focusing the parent container:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# focus the parent container&#xA;bindsym $mod+a focus parent&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Moving to the latest &amp;ldquo;urgent&amp;rdquo; window&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# urgent&#xA;bindsym $mod+Escape [urgent=latest] focus&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;move-focused-window-around&#34;&gt;Move focused window around&lt;/h4&gt;&#xA;&lt;p&gt;&lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) + &lt;code&gt;shift&lt;/code&gt; + a Left/Up/Down/Right to windows around.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# move focused window&#xA;bindsym $mod+Shift+Left move left&#xA;bindsym $mod+Shift+Down move down&#xA;bindsym $mod+Shift+Up move up&#xA;bindsym $mod+Shift+Right move right&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;moving-focused-containers--windows--between-workspaces&#34;&gt;Moving focused containers (windows) between workspaces&lt;/h4&gt;&#xA;&lt;p&gt;Easy, &lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) + &lt;code&gt;shift&lt;/code&gt; + a key number to move to a personal workspace. &lt;code&gt;window&lt;/code&gt; (&lt;code&gt;$mod&lt;/code&gt;) + &lt;code&gt;alt&lt;/code&gt; (&lt;code&gt;Mod1&lt;/code&gt;) + &lt;code&gt;shift&lt;/code&gt; + a key number to move to a work workspace.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# move focused container to workspace&#xA;## Personal workspaces&#xA;bindsym $mod+Shift+1    move container to workspace  $ws1&#xA;bindsym $mod+Shift+2    move container to workspace  $ws2&#xA;bindsym $mod+Shift+3    move container to workspace  $ws3&#xA;bindsym $mod+Shift+4    move container to workspace  $ws4&#xA;bindsym $mod+Shift+5    move container to workspace  $ws5&#xA;bindsym $mod+Shift+6    move container to workspace  $ws6&#xA;bindsym $mod+Shift+7    move container to workspace  $ws7&#xA;bindsym $mod+Shift+8    move container to workspace  $ws8&#xA;bindsym $mod+Shift+9    move container to workspace  $ws9&#xA;bindsym $mod+Shift+0    move container to workspace  $ws10&#xA;## Work workspaces&#xA;bindsym $mod+Mod1+Shift+1    move container to workspace  $wsw1&#xA;bindsym $mod+Mod1+Shift+2    move container to workspace  $wsw2&#xA;bindsym $mod+Mod1+Shift+3    move container to workspace  $wsw3&#xA;bindsym $mod+Mod1+Shift+4    move container to workspace  $wsw4&#xA;bindsym $mod+Mod1+Shift+5    move container to workspace  $wsw5&#xA;bindsym $mod+Mod1+Shift+6    move container to workspace  $wsw6&#xA;bindsym $mod+Mod1+Shift+7    move container to workspace  $wsw7&#xA;bindsym $mod+Mod1+Shift+8    move container to workspace  $wsw8&#xA;bindsym $mod+Mod1+Shift+9    move container to workspace  $wsw9&#xA;bindsym $mod+Mod1+Shift+0    move container to workspace  $wsw10&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;floating-and-resizing&#34;&gt;Floating and resizing&lt;/h4&gt;&#xA;&lt;p&gt;Toggle tiling / floating of a window:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# toggle tiling / floating&#xA;bindsym $mod+Shift+f floating toggle&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Switch focus between tiling and floating windows:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# change focus between tiling / floating windows&#xA;bindsym $mod+space focus mode_toggle&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Resizing is done via &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;s&lt;/code&gt; and then arrow keys or h/j/k/l:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# resize window (you can also use the mouse for that):&#xA;mode &amp;#34;resize&amp;#34; {&#xA;# These bindings trigger as soon as you enter the resize mode&#xA;# Pressing left will shrink the window&amp;#39;s width.&#xA;# Pressing right will grow the window&amp;#39;s width.&#xA;# Pressing up will shrink the window&amp;#39;s height.&#xA;# Pressing down will grow the window&amp;#39;s height.&#xA;  bindsym j resize shrink width 10 px or 10 ppt&#xA;  bindsym k resize grow height 10 px or 10 ppt&#xA;  bindsym l resize shrink height 10 px or 10 ppt&#xA;  bindsym h resize grow width 10 px or 10 ppt&#xA;&#xA;# same bindings, but for the arrow keys&#xA;  bindsym Left resize shrink width 10 px or 10 ppt&#xA;  bindsym Down resize grow height 10 px or 10 ppt&#xA;  bindsym Up resize shrink height 10 px or 10 ppt&#xA;  bindsym Right resize grow width 10 px or 10 ppt&#xA;&#xA;# back to normal: Enter or Escape&#xA;  bindsym Return mode &amp;#34;default&amp;#34;&#xA;  bindsym Escape mode &amp;#34;default&amp;#34;&#xA;}&#xA;bindsym $mod+Shift+s mode &amp;#34;resize&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;scratchpad&#34;&gt;Scratchpad&lt;/h4&gt;&#xA;&lt;p&gt;From time to time, I like putting windows as scratchpad windows, for this I use &lt;code&gt;window&lt;/code&gt; (+ &lt;code&gt;shift&lt;/code&gt;) + &lt;code&gt;²&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# scratchpad&#xA;bindsym $mod+Shift+twosuperior move scratchpad&#xA;bindsym $mod+twosuperior scratchpad show&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;layouts&#34;&gt;Layouts&lt;/h3&gt;&#xA;&lt;h4 id=&#34;spliting-layout&#34;&gt;Spliting layout&lt;/h4&gt;&#xA;&lt;p&gt;I like creating a horizontal split with &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;v&lt;/code&gt; and a vertical split with &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;h&lt;/code&gt;. It&amp;rsquo;s the opposite of the default, but it makes more sense for me^^.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# split in horizontal orientation&#xA;bindsym $mod+h split v&#xA;# split in vertical orientation&#xA;bindsym $mod+v split h&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;workspace-layout&#34;&gt;Workspace layout&lt;/h4&gt;&#xA;&lt;p&gt;Layout selection is done via &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;s&lt;/code&gt; (stacking), &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;z&lt;/code&gt; (tabbed) or &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;e&lt;/code&gt; (split toggle):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# change container layout (stacked, tabbed, toggle split)&#xA;bindsym $mod+s layout stacking&#xA;bindsym $mod+z layout tabbed&#xA;bindsym $mod+e layout toggle split&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;i3bar&#34;&gt;i3bar&lt;/h3&gt;&#xA;&lt;h4 id=&#34;config&#34;&gt;config&lt;/h4&gt;&#xA;&lt;p&gt;Basically, having the i3bar at the top of each screen. System tray displayed on the primary screen (in my case the central one). For the status part, I use &lt;a href=&#34;https://github.com/vivien/i3blocks&#34;&gt;i3blocks&lt;/a&gt; (see next paragraph).&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bar {&#xA;    font pango: Noto Sans Regular 10&#xA;    status_command i3blocks -c ~/.config/i3/i3blocks.conf&#xA;    position top&#xA;    tray_output primary&#xA;    tray_padding 0&#xA;    strip_workspace_numbers yes&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;i3blocks&#34;&gt;i3blocks&lt;/h4&gt;&#xA;&lt;p&gt;My status looks like this:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_i3blocks.png&#34;&#xA;    alt=&#34;Figure 2: Screenshots of i3 status with i3blocks&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 2: &lt;/span&gt;Screenshots of i3 status with i3blocks&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;This example includes the system tray, which represent the last 4 icons, from right to left: syncthing, redshift, nm-applet and blueman-applet.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m using mostly default stuff from i3blocks, except 2 custom scripts:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;One for checking I&amp;rsquo;ve made recent backup (more on that later in a blog post series about backup with borg)&lt;/li&gt;&#xA;&lt;li&gt;One for toggling notification, see below.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;!--listend--&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;[dunst]&#xA;command=~/workspace/contrib/i3blocks-contrib/dunst/dunst&#xA;format=json&#xA;interval=-1&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;~/workspace/contrib/i3blocks-contrib/dunst/dunst&lt;/code&gt; comes from &lt;a href=&#34;https://github.com/vivien/i3blocks-contrib&#34;&gt;i3blocks-contrib&lt;/a&gt; and can be found &lt;a href=&#34;https://github.com/vivien/i3blocks-contrib/tree/master/dunst&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;qol-improvements-with-rofi&#34;&gt;QoL improvements with rofi&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main&#34;&gt;All my rofi configuration can be found on sourcehut&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;application-launcher&#34;&gt;Application launcher&lt;/h4&gt;&#xA;&lt;p&gt;To launch application, I start the launcher with &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;d&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_app-launcher.png&#34;&#xA;    alt=&#34;Figure 3: Screenshots of the application launcher&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 3: &lt;/span&gt;Screenshots of the application launcher&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+d exec rofi -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;window-selector&#34;&gt;Window selector&lt;/h4&gt;&#xA;&lt;p&gt;Open a window listing all windows (in any workspace) with filter to quickly jump to it. Example:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_window-selector.png&#34;&#xA;    alt=&#34;Figure 4: Screenshots of the window selector&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 4: &lt;/span&gt;Screenshots of the window selector&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+t exec rofi -show window -config ~/.config/rofi/rofidmenu.rasi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;workspace-selector&#34;&gt;Workspace selector&lt;/h4&gt;&#xA;&lt;p&gt;Open a window listing all workspaces with filter to quickly jump to it. Example:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_workspace-selector.png&#34;&#xA;    alt=&#34;Figure 5: Screenshots of the workspace selector&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 5: &lt;/span&gt;Screenshots of the workspace selector&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# keybinding in fancy rofi (automated):&#xA;bindsym $mod+mod1+Tab exec ~/.config/i3/scripts/keyhint-2&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;clipboard&#34;&gt;Clipboard&lt;/h4&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_clipboard-selector.png&#34;&#xA;    alt=&#34;Figure 6: Screenshots of the clipboard selector&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 6: &lt;/span&gt;Screenshots of the clipboard selector&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+c exec --no-startup-id rofi -modi &amp;#34;clipboard:greenclip print&amp;#34; -show clipboard -config ~/.config/rofi/rofidmenu.rasi&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;password-store-integration&#34;&gt;Password store integration&lt;/h4&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_password.png&#34;&#xA;    alt=&#34;Figure 7: Screenshots of the password selector&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 7: &lt;/span&gt;Screenshots of the password selector&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Configuration or rofi-pass:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;mkdir ~/.config/rofi-pass &amp;amp;&amp;amp; cp /etc/rofi-pass.conf ~/.config/rofi-pass/config&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And i3wm configuration:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+p exec /usr/bin/rofi-pass&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;power-menu&#34;&gt;Power menu&lt;/h4&gt;&#xA;&lt;p&gt;The power menu allow easy select to hibernate, suspend, lock, logout, reboot or shutdown:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_power-menu.png&#34;&#xA;    alt=&#34;Figure 8: Screenshots of the power menu&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 8: &lt;/span&gt;Screenshots of the power menu&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+Shift+e exec ~/.config/i3/scripts/powermenu&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;power-profiles-switcher&#34;&gt;Power profiles switcher&lt;/h4&gt;&#xA;&lt;p&gt;The power profiles menu allow easy select different power profiles: performance, balanced or power saver:&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://bacardi55.io/images/posts/2023/01/i3wm_power-profiles-menu.png&#34;&#xA;    alt=&#34;Figure 9: Screenshots of the power menu&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&lt;span class=&#34;figure-number&#34;&gt;Figure 9: &lt;/span&gt;Screenshots of the power menu&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+Shift+p exec ~/.config/i3/scripts/power-profiles&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;some-keybinds&#34;&gt;Some keybinds&lt;/h3&gt;&#xA;&lt;h4 id=&#34;audio-related&#34;&gt;Audio related&lt;/h4&gt;&#xA;&lt;p&gt;Audio specific keybind:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# volume&#xA;bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ &amp;amp;&amp;amp; pkill -RTMIN+1 i3blocks&#xA;bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- &amp;amp;&amp;amp; pkill -RTMIN+1 i3blocks&#xA;&#xA;# gradular volume control&#xA;bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ &amp;amp;&amp;amp; pkill -RTMIN+1 i3blocks&#xA;bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- &amp;amp;&amp;amp; pkill -RTMIN+1 i3blocks&#xA;&#xA;# mute&#xA;bindsym XF86AudioMute exec amixer sset Master toggle &amp;amp;&amp;amp; killall -USR1 i3blocks&#xA;&#xA;# audio control&#xA;bindsym XF86AudioPlay exec playerctl play&#xA;bindsym XF86AudioPause exec playerctl pause&#xA;bindsym XF86AudioNext exec playerctl next&#xA;bindsym XF86AudioPrev exec playerctl previous&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;backlight-control&#34;&gt;Backlight control&lt;/h4&gt;&#xA;&lt;p&gt;&lt;em&gt;Remember to fix the backlight control as described in the previous post.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# Backlight control&#xA;bindsym XF86MonBrightnessUp exec xbacklight +5 &amp;amp;&amp;amp; notify-send &amp;#34;Brightness - $(xbacklight -get | cut -d &amp;#39;.&amp;#39; -f 1)%&amp;#34;&#xA;bindsym XF86MonBrightnessDown exec xbacklight -5 &amp;amp;&amp;amp; notify-send &amp;#34;Brightness - $(xbacklight -get | cut -d &amp;#39;.&amp;#39; -f 1)%&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;screenshots&#34;&gt;Screenshots&lt;/h4&gt;&#xA;&lt;p&gt;3 possibility to take screenshots with &lt;code&gt;scrot&lt;/code&gt;: Full screenshots (all screens) with &lt;code&gt;Print Screen&lt;/code&gt;, screenshot of the focused window with &lt;code&gt;window&lt;/code&gt; + &lt;code&gt;Print Screen&lt;/code&gt; or a screenshot of a manually selected area with &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;Print Screen&lt;/code&gt; (and then just click and select the area to screenshot):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym Print exec scrot ~/Téléchargements/screenshots/%Y-%m-%d-%T-screenshot.png &amp;amp;&amp;amp; notify-send &amp;#34;Screenshot saved&amp;#34;&#xA;bindsym $mod+Print exec scrot --focus ~/Téléchargements/screenshots/%Y-%m-%d-%T-screenshot.png &amp;amp;&amp;amp; notify-send &amp;#34;Screenshot saved&amp;#34;&#xA;bindsym --release Shift+Print exec scrot --select ~/Téléchargements/screenshots/%Y-%m-%d-%T-screenshot.png &amp;amp;&amp;amp; notify-send &amp;#34;Screenshot saved&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;applications&#34;&gt;Applications&lt;/h3&gt;&#xA;&lt;h4 id=&#34;open-app-via-keybinds&#34;&gt;Open app via Keybinds&lt;/h4&gt;&#xA;&lt;p&gt;Just giving an example, it&amp;rsquo;s that easy:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;bindsym $mod+w exec /usr/bin/firefox-nightly -P bacardi55&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;bind-app-to-workspaces&#34;&gt;Bind app to workspaces&lt;/h4&gt;&#xA;&lt;p&gt;I have some app being binded to specific workspace:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;# bind program to workspace and focus to them on startup:&#xA;assign [class=&amp;#34;(?i)firefox-nightly&amp;#34;] $ws1&#xA;assign [class=&amp;#34;(?i)firefox&amp;#34;] $wsw1&#xA;assign [class=&amp;#34;Thunar&amp;#34;] $ws5&#xA;assign [class=&amp;#34;Emacs&amp;#34;] $ws2&#xA;&#xA;# automatic set focus new window if it opens on another workspace than the current:&#xA;for_window [class=Xfce4-terminal] focus&#xA;for_window [class=(?i)firefox] focus&#xA;for_window [class=Thunar] focus&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;floating-rules&#34;&gt;Floating rules&lt;/h4&gt;&#xA;&lt;p&gt;For some specific windows, I want them to be automatically floating:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;for_window [class=&amp;#34;Galculator&amp;#34; instance=&amp;#34;galculator&amp;#34;] floating enable&#xA;for_window [class=&amp;#34;Pavucontrol&amp;#34; instance=&amp;#34;pavucontrol&amp;#34;] floating enable&#xA;for_window [window_role=&amp;#34;About&amp;#34;] floating enable&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;others&#34;&gt;Others&lt;/h3&gt;&#xA;&lt;p&gt;There are other things in my config, such as autostarted programs, theming (will be part of another post regarding the global &amp;ldquo;theming&amp;rdquo; of my laptop) or keybind to open window (self explanatory based on the documention). To have a full view, feel free to read the &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/.config/i3/config&#34;&gt;full configuration file on source hut&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 2: Core tools</title><link>https://bacardi55.io/2023/01/18/new-laptop-part-2-core-tools/</link><pubDate>Wed, 18 Jan 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/01/18/new-laptop-part-2-core-tools/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Continuing the &lt;a href=&#34;https://bacardi55.io/tags/framework/&#34;&gt;framework laptop blog post series&lt;/a&gt;, where I first wrote about &lt;a href=&#34;https://bacardi55.io/2023/01/16/new-laptop-part-0-discovering-the-framework-laptop/&#34;&gt;my impression of the framework laptop&lt;/a&gt;, then about what &lt;a href=&#34;https://bacardi55.io/2023/01/17/new-laptop-part-1-endeavouros-/-archlinux-on-the-framework-laptop/&#34;&gt;I had to do to fix EndeavourOS / Archlinux on it&lt;/a&gt;. Now this post is about making this laptop &amp;ldquo;mine&amp;rdquo; and ready for daily use by adding the necessary tools. I&amp;rsquo;m not covering my &lt;a href=&#34;https://i3wm.org&#34;&gt;i3wm&lt;/a&gt; setup, that will be for a dedicated post.&lt;/p&gt;&#xA;&lt;p&gt;TLDR; browse &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles&#34;&gt;my dotfiles on sourcehut&lt;/a&gt; :).&lt;/p&gt;&#xA;&lt;h2 id=&#34;software-installation-and-configuration&#34;&gt;Software installation and configuration&lt;/h2&gt;&#xA;&lt;h3 id=&#34;installing-core-utilities&#34;&gt;Installing core utilities&lt;/h3&gt;&#xA;&lt;p&gt;Starting with the basics:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pacman -S ripgrep mupdf htop dfc bat mplayer&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/sharkdp/bat&#34;&gt;bat&lt;/a&gt;: An awesome cat (and &lt;code&gt;more&lt;/code&gt; to some extent) replacement&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/Rolinh/dfc&#34;&gt;dfc&lt;/a&gt;: A df replacement&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://mupdf.com/&#34;&gt;mupdf&lt;/a&gt;: A minimal pdf viewer&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/BurntSushi/ripgrep&#34;&gt;ripgrep&lt;/a&gt;: A &amp;ldquo;recursively searches directories for a regex pattern&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://mplayerhq.hu/design7/news.html&#34;&gt;mplayer&lt;/a&gt;: Do I need to say it?&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;xdg-config-home&#34;&gt;XDG_CONFIG_HOME&lt;/h3&gt;&#xA;&lt;p&gt;For some reason, the environment variable &lt;code&gt;XDG_CONFIG_HOME&lt;/code&gt; was not set by default, to fix this, I edited &lt;code&gt;~/.profile&lt;/code&gt; and added:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export XDG_CONFIG_HOME&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;$HOME&lt;span style=&#34;color:#e6db74&#34;&gt;/.config&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;ssh&#34;&gt;Ssh&lt;/h3&gt;&#xA;&lt;p&gt;As many people, I have many ssh keys, all with a passphrase. In order to avoid having to enter each passphrase each time I use ssh (or git, rsync, …), I would need to enter my passphrase. As said on Archlinux wiki:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;An SSH agent is a program which caches your decrypted private keys and provides them to SSH client programs on your behalf. In this arrangement, you must only provide your passphrase once, when adding your private key to the agent&amp;rsquo;s cache. This facility can be of great convenience when making frequent SSH connections.&#xA;&amp;ndash; &lt;a href=&#34;https://wiki.archlinux.org/title/SSH_keys#SSH_agents&#34;&gt;https://wiki.archlinux.org/title/SSH_keys#SSH_agents&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I&amp;rsquo;m using the default built-in agent &lt;code&gt;ssh-agent&lt;/code&gt;. To enable it via systemd, create the file &lt;code&gt;~/.config/systemd/user/ssh-agent.service&lt;/code&gt; with the following content:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Unit&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Description&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;SSH key agent&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Service&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Type&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;simple&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Environment&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;SSH_AUTH_SOCK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;%t/ssh-agent.socket&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# DISPLAY required for ssh-askpass to work&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Environment&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;DISPLAY&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;:0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ExecStart&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Install&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;WantedBy&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;default.target&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And of course, add the different keys to the ssh agent, so for each key:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-add ~/.ssh/&amp;lt;key&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;zsh&#34;&gt;Zsh&lt;/h3&gt;&#xA;&lt;p&gt;I use &lt;a href=&#34;https://www.zsh.org/&#34;&gt;zsh&lt;/a&gt; with &lt;a href=&#34;https://ohmyz.sh/&#34;&gt;oh-my-zsh&lt;/a&gt;, so to install it:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Install zsh&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S zsh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Install oh-my-zsh&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sh -c &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# To make it the default shell:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;chsh -s /usr/bin/zsh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/.zshrc&#34;&gt;~/.zshrc&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;tmux&#34;&gt;Tmux&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;rsquo;m using &lt;a href=&#34;https://github.com/tmux-plugins/tpm&#34;&gt;Tmux TPM&lt;/a&gt; to manage &lt;a href=&#34;https://github.com/tmux/tmux&#34;&gt;tmux&lt;/a&gt; plugins.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Install tmux&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S tmux&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Install TPM&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit tmux config &lt;code&gt;~/.config/tmux/tmux.conf&lt;/code&gt; file to add plugins to the config. Here is what I added:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# List of plugins&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tmux-plugins/tpm&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tmux-plugins/tmux-sensible&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tmux-plugins/tmux-logging&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ChanderG/tmux-notify&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tmux-plugins/tmux-pain-control&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g @plugin &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;tmux-plugins/tmux-urlview&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# use $XDG_CONFIG_HOME&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set-environment -g TMUX_PLUGIN_MANAGER_PATH &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;~/.config/tmux/plugins/&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Less aggressive interval than tmux-sensible:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set -g status-interval &lt;span style=&#34;color:#ae81ff&#34;&gt;15&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;run &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;~/.config/tmux/plugins/tpm/tpm&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#+end_quote&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;For &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;tmux-urlview&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; to work, install either &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;extract_url&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; or &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;urlview&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;. The later hasn&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt;t been updated since 2013, the former since 2018, so I installed the former.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#+begin_src shell&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yay -S extract_url&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For some reason, it doesn&amp;rsquo;t work with my config in &lt;code&gt;~/.config/tmux/tmux.conf&lt;/code&gt;, so I added an alias in my &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;alias tmux&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;tmux -f ~/.config/tmux/tmux.conf&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;My full &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles/tree/main/item/.config/tmux/tmux.conf&#34;&gt;tmux.conf&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;clipboard&#34;&gt;Clipboard&lt;/h3&gt;&#xA;&lt;p&gt;I installed &lt;code&gt;rofi-greenclip&lt;/code&gt; via &lt;code&gt;aur&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yay -S rofi-greenclip&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And use it in a keybind in my i3wm config:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bindsym $mod+c exec --no-startup-id rofi -modi &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;clipboard:greenclip print&amp;#34;&lt;/span&gt; -show clipboard -config ~/.config/rofi/rofidmenu.rasi&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;redshift&#34;&gt;Redshift&lt;/h3&gt;&#xA;&lt;p&gt;To reduce eyes fatigue, I use &lt;a href=&#34;https://github.com/jonls/redshift&#34;&gt;RedShift&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;yay -S redshift-gtk&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir ~/.config/redshift/ &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; cd ~/.config/redshift/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://raw.githubusercontent.com/jonls/redshift/master/redshift.conf.sample&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mv redshift.conf.sample redshift.conf&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit config file, mainly latitude and longitude.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it for this post, next one should be about my i3wm configuration. As said in the intro, you can find the &lt;a href=&#34;https://git.sr.ht/~bacardi55/dotfiles&#34;&gt;dotfiles on sourcehut&lt;/a&gt;.&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 1: EndeavourOS / Archlinux on the FrameWork laptop</title><link>https://bacardi55.io/2023/01/17/new-laptop-part-1-endeavouros-/-archlinux-on-the-framework-laptop/</link><pubDate>Tue, 17 Jan 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/01/17/new-laptop-part-1-endeavouros-/-archlinux-on-the-framework-laptop/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;Following my previous post in this serie, &lt;a href=&#34;https://bacardi55.io/2023/01/16/new-laptop-part-0-discovering-the-framework-laptop/&#34;&gt;New laptop part 0: Discovering the FrameWork laptop&lt;/a&gt;, the goal of this post is to explain the steps I had to go through after installing &lt;a href=&#34;https://endeavouros.com/&#34;&gt;EndeavourOS&lt;/a&gt; (a gnu/linux distribution based on &lt;a href=&#34;https://archlinux.org/&#34;&gt;Archlinux&lt;/a&gt;) on the &lt;a href=&#34;https://frame.work&#34;&gt;FrameWork laptop&lt;/a&gt; and all the small things I had to tweak. It isn&amp;rsquo;t 100% perfect and finished, but I&amp;rsquo;ll try to update this page (or link a new entry) if I improve the following information.&lt;/p&gt;&#xA;&lt;p&gt;Before going into all the details, I wanted to thank the &lt;a href=&#34;https://endeavouros.com/community/&#34;&gt;EndeavourOS community&lt;/a&gt;, &lt;a href=&#34;https://wiki.archlinux.org/title/Framework_Laptop&#34;&gt;Archlinux wiki&lt;/a&gt; and &lt;a href=&#34;https://community.frame.work/&#34;&gt;FrameWork communities&lt;/a&gt; where I found all those informations in a way or another.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;p&gt;As said in my previous post, I just went through the GUI installer to install EndeavourOS, selected full encryption for the hard drive and let it ran. See the &lt;a href=&#34;https://discovery.endeavouros.com/category/installation/&#34;&gt;official documentation&lt;/a&gt; for help.&lt;/p&gt;&#xA;&lt;h2 id=&#34;post-installation&#34;&gt;Post installation&lt;/h2&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start by installing vim to edit all the configuration with a real editor :).&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S vim&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you look for a complete out of the box vim config, I suggest &lt;a href=&#34;https://vim.spf13.com/&#34;&gt;spf13 vim config&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;brightness&#34;&gt;Brightness&lt;/h3&gt;&#xA;&lt;p&gt;The brightness keys (via fn+F7/8) did not work out of the box (while others do work fine). To fix this, I edited the file &lt;code&gt;/etc/modprobe.d/framework-als-deactivate.conf&lt;/code&gt; and added:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;blacklist hid_sensor_hub&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;hidpi&#34;&gt;HiDPI&lt;/h3&gt;&#xA;&lt;p&gt;I had to change the default HiDPI setting as the screen resolution is so high (2256x1504). To do so, edit the &lt;code&gt;~/.Xresources&lt;/code&gt; file, and add:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Xft.dpi: 120&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;fixing-old-opengl-driver--i965&#34;&gt;Fixing Old OpenGL driver (i965)&lt;/h3&gt;&#xA;&lt;p&gt;I had issue with software running with openGL driver. Namely chromium and &lt;a href=&#34;https://github.com/skyjake/lagrange&#34;&gt;lagrange&lt;/a&gt; (a gemini browser).&lt;/p&gt;&#xA;&lt;p&gt;TLDR; from archlinux wiki:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In Mesa 20.0, a new OpenGL driver, Iris, is promoted to be the default for Gen8+. Certain applications run faster with it. You may disable it and revert to use the old i965 driver by setting the MESA_LOADER_DRIVER_OVERRIDE=i965 environment variable before starting any OpenGL application. This setting does not affect Vulkan applications.&#xA;&amp;ndash; &lt;a href=&#34;https://wiki.archlinux.org/title/Intel_graphics#Old_OpenGL_driver_(i965)&#34;&gt;https://wiki.archlinux.org/title/Intel_graphics#Old_OpenGL_driver_(i965)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going the per application road, so I need to create a &lt;code&gt;&amp;lt;application&amp;gt;.desktop&lt;/code&gt; file in &lt;code&gt;~/.local/share/applications/&lt;/code&gt; (and create the directory if doesn&amp;rsquo;t exist).&lt;/p&gt;&#xA;&lt;p&gt;For Chromium, there is already an existing &lt;code&gt;/usr/share/applications/chromium.desktop&lt;/code&gt; file, so copy it in the &lt;code&gt;~/.local/share/applications/&lt;/code&gt; directory and then edit it. Change all &lt;code&gt;exec&lt;/code&gt; lines (3 times in my case) from&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Exec=/usr/bin/chromium %U&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;to&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/chromium %U&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For Lagrange, copy &lt;code&gt;/usr/share/applications/fi.skyjake.Lagrange.desktop&lt;/code&gt; to &lt;code&gt;~/.local/share/applications/fi.skyjake.Lagrange.desktop&lt;/code&gt; and edit the &lt;code&gt;Exec&lt;/code&gt; line to be:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/lagrange %U&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The complete file for lagrange:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;[Desktop Entry]&#xA;Name=Lagrange&#xA;Comment=A Beautiful Gemini Client&#xA;Categories=Network;&#xA;Exec=env MESA_LOADER_DRIVER_OVERRIDE=i965 /usr/bin/lagrange %U&#xA;Terminal=false&#xA;Type=Application&#xA;StartupWMClass=lagrange&#xA;Icon=fi.skyjake.Lagrange&#xA;MimeType=x-scheme-handler/gemini;x-scheme-handler/gopher;x-scheme-handler/spartan;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;fingerprint&#34;&gt;fingerprint&lt;/h3&gt;&#xA;&lt;p&gt;To add support for the fingerprint reader, first install fprintd:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;pacman -S fprintd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, to enable sudo via fingerprint, edit &lt;code&gt;/etc/pam.d/sudo&lt;/code&gt;, and add:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth      sufficient pam_fprintd.so&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;above&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth      include   system-login&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you don&amp;rsquo;t want to use the fingerprint for a sudo command, use &lt;code&gt;ctrl+c&lt;/code&gt; and then enter your password.&lt;/p&gt;&#xA;&lt;p&gt;For lightdm, edit &lt;code&gt;/etc/pam.d/lightdm&lt;/code&gt; and add at the top:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;auth        sufficient  pam_unix.so try_first_pass likeauth nullok&#xA;auth        sufficient  pam_fprintd.so&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This allow to use either password or the fingerprint. To activate the fingerprint, enter a empty password, and then use the fingerprint :). Using only the second line will require the fingerprint and won&amp;rsquo;t allow password alternative (which I wanted).&lt;/p&gt;&#xA;&lt;h3 id=&#34;fan-management&#34;&gt;Fan management&lt;/h3&gt;&#xA;&lt;p&gt;So far, I have only followed the archlinux wiki installation steps. I haven&amp;rsquo;t pushed much the CPU yet and the few times the fan went on it was loud but ok. I need more testing on this when I&amp;rsquo;ll daily drive completely this laptop.&lt;/p&gt;&#xA;&lt;p&gt;Install &lt;code&gt;thermald&lt;/code&gt; and &lt;code&gt;dptfxtract-bin&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;pacman -S thermald&#xA;yay -S dptfxtract-bin&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And then configure thermald and start the service.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;sudo dptfxtract-bin&#xA;sudo cp /etc/thermald/thermal-conf.xml.auto /etc/thermald/thermal.conf.xml&#xA;sudo systemctl enable themarld.service&#xA;sudo systemctl start themarld.service&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;bluetooth&#34;&gt;Bluetooth&lt;/h3&gt;&#xA;&lt;p&gt;Install the necessary software:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo pacman -S bluez bluez-utils blueman&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Add yourself to the &lt;code&gt;lp&lt;/code&gt; group in case you need bluetooth tethering.&#xA;Connect the external bluetooth device using the GUI &lt;code&gt;blueman-applet&lt;/code&gt;.&#xA;Sounds from laptop to bluetooth (and inverse) works without any additional configuration.&lt;/p&gt;&#xA;&lt;p&gt;Autostart bluetooth:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl enable bluetooth.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# start if now if you want:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo systemctl start bluetooth.service&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Autostart blueman applet in the i3 config (or use your own autostart process):&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exec --no-startup-id blueman-applet&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Bluetooth is disabled by default though and I only activate it on demand via the blueman-applet.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sound&#34;&gt;Sound&lt;/h3&gt;&#xA;&lt;p&gt;Sound speaker works out of the box, switching from speaker to jack port works also. Pipewire is really awesome :). Microphone works also out of the box and the kill switch is a nice touch on the framework laptop :).&lt;/p&gt;&#xA;&lt;p&gt;Switching sound between bluetooth and &amp;ldquo;local&amp;rdquo; works also very smoothly and quickly.&lt;/p&gt;&#xA;&lt;h3 id=&#34;don-t-care&#34;&gt;Don&amp;rsquo;t care&lt;/h3&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t even try to use the ambient light sensor. I prefer changing it myself when needed. Could be used with &lt;code&gt;iio-sensor-proxy&lt;/code&gt; apparently.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion-and-next-steps&#34;&gt;Conclusion and next steps&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it for this post, I still need to manage the hibernation, but hopefully there will be a new post later that fix the missing things :). Next post will be about additional software installation needed to make this laptop a full working workstation :).&lt;/p&gt;&#xA;</description></item>
    <item>
      
      <title>New laptop part 0: Discovering the FrameWork laptop</title><link>https://bacardi55.io/2023/01/16/new-laptop-part-0-discovering-the-framework-laptop/</link><pubDate>Mon, 16 Jan 2023 00:00:00 +0100</pubDate><author>bac@rdi55.pl (bacardi55)</author><guid>https://bacardi55.io/2023/01/16/new-laptop-part-0-discovering-the-framework-laptop/</guid><description>&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;As I&amp;rsquo;ve shared on the &lt;a href=&#34;https://social.bacardi55.io/@bacardi55/statuses/01GMX5SSD0QX9KFA2M8R27YTB7&#34;&gt;Fediverse&lt;/a&gt; and my &lt;a href=&#34;gemini://gmi.bacardi55.io/&#34;&gt;gemini capsule&lt;/a&gt;, I have purchased at the end of last year a new laptop. I decided to go with the &lt;a href=&#34;https://frame.work&#34;&gt;FrameWork&lt;/a&gt;, with the 12th generation of intel processor. A new laptop wasn&amp;rsquo;t planed but as I had to, I decided to go with the FrameWork brand, hoping it will help me reduce some hardware waste. Like &lt;a href=&#34;https://bacardi55.io/2020/03/15/buying-a-linux-laptop/&#34;&gt;last time&lt;/a&gt;, I wanted to give money to a company promoting linux installation, which is the case with the FrameWork (fully supported distros are Fedora, Ubuntu, Pop!OS, Manjaro and Linux Mint).&lt;/p&gt;&#xA;&lt;p&gt;This post starts a series of posts documenting the full installation (and pre/post installation) and configuration of this framework laptop with &lt;a href=&#34;https://endeavouros.com/&#34;&gt;EndeavourOS&lt;/a&gt;. While writing this first post, the only thing I couldn&amp;rsquo;t configure properly is the hibernation. It seems to work for some people but not for me yet. It might be due to disk encryption but I believe I&amp;rsquo;ve followed the documentation correctly so not sure what is missing yet.&lt;/p&gt;&#xA;&lt;h2 id=&#34;hardware-installation&#34;&gt;Hardware installation&lt;/h2&gt;&#xA;&lt;p&gt;The DIY kit comes with almost everything being installed and wired, except the RAM and Nvme drive. As opposed to &lt;a href=&#34;gemini://republic.circumlunar.space/users/korruptor/blog/2023-01-11-FrameworkLaptop.gmi&#34;&gt;Korruptor&lt;/a&gt;, I was pleased to see almost everything setup :). I&amp;rsquo;ve never opened a laptop before so it was a nice small step to just open it and stick the RAM/Nvme parts and be done with it. Normally, the next time will be in a few years, but for a lot more work :).&lt;/p&gt;&#xA;&lt;p&gt;I am very happy with the hardware quality, from the inside where everything is neatly placed with QR codes to quick access docs, to the magnetic cover that simplifies closing the input cover, to the screen and keyboard. I&amp;rsquo;m usually very harsh against laptop keyboards as I&amp;rsquo;ve used many that I disliked. But I admit this one is very nice to type on! Of course, far from the pleasure of typing on a mechanical keyboard with cherry MX blue, but what is :). For a laptop keyboard, I give it an A!&lt;/p&gt;&#xA;&lt;p&gt;The screen, while bright, is very confortable and seems to be of good quality. I&amp;rsquo;ve never been a big expert on screens, but working on this one pleasant so far :).&#xA;The touchpad is ok. I&amp;rsquo;ve never been a huge fan of touchpads even though I&amp;rsquo;m fine using them. I prefer having a real mouse but this one is usable when on the move. I&amp;rsquo;ve used worse.&lt;/p&gt;&#xA;&lt;p&gt;The online guides to open the laptop and set everything up are very detailed with pictures and texts, that was quick and painless to do, kudos to the framework team for this great laptop and documentation. My only hopes now is that it stays great for a long time, and that the framework team will continue to provide improvements over the years.&lt;/p&gt;&#xA;&lt;p&gt;In term of Expansion cards, I decided to buy 1 USB A, 3 USB C and 1 HDMI. At home, I use 1 USB A, 2 USB C and the HDMI. One USB C is used for power, one for a USB C dongle where I connect external keyboard and mouse and 2 screens (via hdmi). The HDMI expansion card is connected to the 3rd external screen. The 3rd USB C may replace the USB A if I buy a smaller USB C dongle because I need a USB A on the move, at least for a &lt;a href=&#34;https://www.yubico.com/&#34;&gt;yubikey&lt;/a&gt; for work (but more on that in a later post).&lt;/p&gt;&#xA;&lt;p&gt;I haven&amp;rsquo;t calculated yet the full time the battery can keep running, but seems I could reach 5/6h in power saving mode. But I need to do real tests to check this more.&lt;/p&gt;&#xA;&lt;h2 id=&#34;linux-distribution&#34;&gt;Linux distribution&lt;/h2&gt;&#xA;&lt;p&gt;As said above, their are many supported distributions: Fedora, Ubuntu, Pop!OS, Linux Mint and Manjoro XFCE. I didn&amp;rsquo;t want to use Ubuntu (or derivated) because of the use of Snap packages that I personally don&amp;rsquo;t like. I went against Fedora for the same reasons about Flatpak packages. While I understand the ideas and concepts, so far the experience for me has been more negative than positive with these two. I only use them when I have no other choices (eg on the steam deck).&lt;/p&gt;&#xA;&lt;p&gt;I wanted to use &lt;a href=&#34;https://archlinux.org/&#34;&gt;Archlinux&lt;/a&gt; again. I&amp;rsquo;ve used Arch some years ago and always liked it. I moved to Ubuntu when purchasing a dell xps a long time ago with Ubuntu on it and decided to keep it at that time for some reasons. So of course I looked at Archlinux and derivated.&lt;/p&gt;&#xA;&lt;p&gt;A simple choice was &lt;a href=&#34;https://manjaro.org/&#34;&gt;Manjaro&lt;/a&gt;, as it is based on Archlinux and officially supports the framework laptop. But I have some personal issue with Manjaro. The separate repo, some past choices and community related stories makes me avoid this distro. Also, the supported Manjaro install is based on xfce, which I don&amp;rsquo;t want either.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://endeavouros.com/&#34;&gt;EndeavourOS&lt;/a&gt; seemed interesting. It has a pre-configured &lt;a href=&#34;https://i3wm.org/&#34;&gt;i3wm&lt;/a&gt; installation that is really nice with &lt;a href=&#34;https://github.com/davatorium/rofi&#34;&gt;rofi&lt;/a&gt; scripts to manage a launcher, a power profile (performance, power saver, balanced) or power management (lock, suspend, reboot, …). Also, it didn&amp;rsquo;t change much from the based Archlinux. There is a special EndeavourOS repo but only for specific EndeavourOS tools. Otherwise it uses the Archlinux mirrors.&lt;/p&gt;&#xA;&lt;p&gt;Also, I loved that &lt;a href=&#34;https://pipewire.org/&#34;&gt;pipewire&lt;/a&gt; is configured out of the box (and works perfectly)!&lt;/p&gt;&#xA;&lt;p&gt;The installer is easy to use and worked without a glitch :). So I won&amp;rsquo;t need to cover it, just look at the &lt;a href=&#34;https://discovery.endeavouros.com/category/installation/&#34;&gt;documentation&lt;/a&gt; and you&amp;rsquo;ll be fine. There was some things I had to do after the installation process though for the framework laptop itself, but that will be the goal of the next post. The only important detail is that I selected to encrypt fully my hard drive.&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it for the first post, next one will be about the post installation setup, to fix some of the issue I found after installing EndeavourOS. There wasn&amp;rsquo;t many but I&amp;rsquo;ll cover the basic setup of my laptop also.&lt;/p&gt;&#xA;</description></item>
  </channel>
</rss>
