Thaodan's personal bloghttps://thaodan.de/2022-12-08T00:00:00+02:00Software engineer and sailor at @JollaHQ. My personal blogSoftware engineer and sailor at @JollaHQ. My personal blogOrg-Mode: Show clock status in frame title2022-11-12T00:00:00+02:002022-12-08T00:00:00+02:00Björn Bidartag:thaodan.de,2022-11-12:/org-clock-frame-title.htmlHow to show the Org-Clock status in frame title<p>
I use Org-Mode to track my work time. While refactoring my Emacs setup to increase my
productivity I tried for example to make my Org-Mode setup better. One issue I have
is that I tend to forget the things around me, I have trouble tracking time.
</p>
<p>
To make that easier I wanted to see the time spend on the current task and it’s
heading into the frame title.
</p>
<p>
While searching for solution on my issue I found <a href="https://lists.gnu.org/r/emacs-orgmode/2012-02/msg00854.html">this</a> post on the org-mode mailing list
ow to add the time spend on the current task and it’s heading into the frame title.
</p>
<p>
I’ve modified it to also include the file modified status in the title and make
it look a little better.
</p>
<p>
To do so we have to modify the Emacs frame title and update it in an given interval.
</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="p">(</span><span class="k">defvar</span><span class="w"> </span><span class="nv">base-frame-title-format</span><span class="w"> </span><span class="no">nil</span><span class="w"></span>
<span class="w"> </span><span class="s">"Like frame-title-format to be used as a base for to modify it by"</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="k">setq</span><span class="w"> </span><span class="nv">base-frame-title-format</span><span class="w"></span>
<span class="w"> </span><span class="o">'</span><span class="p">((</span><span class="nb">:eval</span><span class="w"> </span><span class="p">(</span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="nf">buffer-file-name</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">abbreviate-file-name</span><span class="w"> </span><span class="p">(</span><span class="nf">buffer-file-name</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="s">"%b"</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nb">:eval</span><span class="w"> </span><span class="p">(</span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="nf">buffer-modified-p</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="s">" •"</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="s">" — Emacs"</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nb">defun</span><span class="w"> </span><span class="nv">clock-in-frame-title</span><span class="w"> </span><span class="p">()</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="nv">org-clocking-p</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="k">setq</span><span class="w"> </span><span class="nv">frame-title-format</span><span class="w"> </span><span class="p">(</span><span class="nf">list</span><span class="w"> </span><span class="nv">base-frame-title-format</span><span class="w"></span>
<span class="w"> </span><span class="s">" — 🕓: "</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">org-clock-get-clock-string</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="s">" — ⟳:"</span><span class="w"></span>
<span class="w"> </span><span class="nv">org-timer-mode-line-string</span><span class="p">))</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="k">setq</span><span class="w"> </span><span class="nv">frame-title-format</span><span class="w"> </span><span class="nv">base-frame-title-format</span><span class="p">)))</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">run-at-time</span><span class="w"> </span><span class="no">t</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="ss">'clock-in-frame-title</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">add-hook</span><span class="w"> </span><span class="ss">'org-clock-in-hook</span><span class="w"> </span><span class="ss">'clock-in-frame-title</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">add-hook</span><span class="w"> </span><span class="ss">'org-clock-out-hook</span><span class="w"> </span><span class="ss">'clock-in-frame-title</span><span class="p">)</span><span class="w"></span>
<span class="w"> </span><span class="p">(</span><span class="nv">add-hook</span><span class="w"> </span><span class="ss">'org-clock-cancel-hook</span><span class="w"> </span><span class="ss">'clock-in-frame-title</span><span class="p">)</span><span class="w"></span>
</pre></div>
How to use Sailfish OS Exchange Active Sync with Office 3652021-03-11T00:00:00+02:002021-03-11T00:00:00+02:00Björn Bidartag:thaodan.de,2021-03-11:/how_to_use_office_365_with_sailfishos_exchange.htmlGuide how to use Sailfish <span class="caps">OS</span> Exchange Active Sync with Office 365
<div id="outline-container-orgbee2eb8" class="outline-2">
<h2 id="orgbee2eb8">Intro</h2>
<div class="outline-text-2" id="text-orgbee2eb8">
<p>
I recently saw that some users had problems using their Office 365 with Sailfish <span class="caps">OS</span>, so I decided to create a guide
about how to use that when multi factor authentication is enabled. This guide should also help other users
that have to use multi factor authentication with their Exchange account.
</p>
</div>
</div>
<div id="outline-container-org722d70c" class="outline-2">
<h2 id="org722d70c">Multi-Factor Authentication</h2>
<div class="outline-text-2" id="text-org722d70c">
<p>
If multi-factor authentication(sometimes also called two-factor authentication) is enabled Exchange enforces the use of <b>OAuth</b> to be able to login.
Apps that do not support OAuth such as the Sailfish <span class="caps">OS</span> Exchange Active Sync break because of that.
You have to use <b>App-Passwords</b> to make it work with that.
</p>
</div>
</div>
<div id="outline-container-org3dd7a4a" class="outline-2">
<h2 id="org3dd7a4a">App-Passwords</h2>
<div class="outline-text-2" id="text-org3dd7a4a">
</div>
<div id="outline-container-org95c4fdb" class="outline-3">
<h3 id="org95c4fdb">Before you create an App-Pasword read this!</h3>
<div class="outline-text-3" id="text-org95c4fdb">
<p>
<b>Things to Know about App Passwords:</b>
</p>
<ul class="org-ul">
<li>You should create a separate App Password for each device that uses one.</li>
<li>The same App Password can be used for multiple applications on the same device.</li>
<li>Once an App Password is created, there is no way to go back and get the value.<br />
You must create a new App Password and delete the old one.</li>
<li>If an account becomes compromised, it is a standard operating procedure to clear all App Passwords.</li>
<li>Never install an App Password on a device you do not have complete control over.</li>
<li>If exposed, App Passwords are dangerous as they bypass the account password and multi-factor authentication.<br />
Keep them in a safe place like <i>KeePassXC</i> until you have them safely configured on the device.</li>
</ul>
</div>
</div>
<div id="outline-container-org2c8653e" class="outline-3">
<h3 id="org2c8653e">How to create an App-Password</h3>
<div class="outline-text-3" id="text-org2c8653e">
<div id="org73c88b5" class="figure">
<p><img src="./images/how_to_use_office_365_with_sailfishos_exchange_papp_password.png" alt="how_to_use_office_365_with_sailfishos_exchange_papp_password.png" />
</p>
<p><span class="figure-number">Figure 1: </span>Office 365 app passwords Page</p>
</div>
<ol class="org-ol">
<li>Visit <i><a href="https://account.activedirectory.windowsazure.com/AppPasswords.aspx">https://account.activedirectory.windowsazure.com/AppPasswords.aspx</a></i> with your browser.</li>
<li>Click on the <b><i>Create</i></b> button.</li>
<li>Give the App Password a name that references the device for which it will be used.</li>
<li>Click on the <b><i>Next</i></b> button.</li>
<li>Copy the App Password to the clipboard for use when configuring your device.</li>
<li>Close the window.</li>
</ol>
</div>
</div>
</div>
<div id="outline-container-orge34428e" class="outline-2">
<h2 id="orge34428e">Create an Exchange Account in Sailfish <span class="caps">OS</span></h2>
<div class="outline-text-2" id="text-orge34428e">
<p>
Now create a exchange account like you usually would except:
</p>
<ul class="org-ul">
<li>Instead of using your password use the app-password.</li>
<li>Click <b><i>More</i></b> to set address to ‘<i>outlook.office365.com</i>‘.</li>
<li>Swift left to finish creating your account.</li>
</ul>
<div id="org98fccb2" class="figure">
<p><img src="./images/how_to_use_office_365_with_sailfishos_exchange_exchange_account_creation.png" alt="how_to_use_office_365_with_sailfishos_exchange_exchange_account_creation.png" style="height:70%;width:70%" />
</p>
<p><span class="figure-number">Figure 2: </span>Your exchange account creation page now should look like this.</p>
</div>
</div>
</div>
<div id="outline-container-orgf323d6a" class="outline-2">
<h2 id="orgf323d6a">Final Words</h2>
<div class="outline-text-2" id="text-orgf323d6a">
<p>
This should be everything.<br />
If you restore a Sailfish <span class="caps">OS</span> backup make sure that you either copy your old application password
from a safe place or create new one.<br />
<br />
If there any issues after this feel free to create a post in the <a href="https://forum.sailfishos.org">sailfish os forum</a>.
</p>
</div>
</div>
Org-Mode Presentation C4 Cologne2019-12-06T00:00:00+02:002019-12-12T00:00:00+02:00Björn Bidartag:thaodan.de,2019-12-06:/org_mode_presentation.htmlOrg-Mode Presentation I held last week in cologne<p>
Last Monday I held a presentation about Org-Mode in at <a href="https://koeln.ccc.de">C4</a> in Cologne.<br />
I have to add that I that the presentation was in German for those that can’t read German.
If you want to view the slides of this presentation click <a href="https://cloud.thaodan.de/index.php/s/DByss4S5C3YSnSC">here</a> to view them.<br />
</p>
<p>
The topics of this talk were:
</p>
<ul class="org-ul">
<li>A basic introduction to Emacs to explain the basics needed for this talk</li>
<li>What is Org-Mode?</li>
<li>How does it work?</li>
<li>Examples what you can do with org-mode besides tracking agendas</li>
</ul>
<p>
My performance was recorded and uploaded to <a href="https://www.youtube.com/watch?v=5e7uBosamic">Youtube</a> and <a href="https://media.ccc.de/v/fsacgn.2019.12.org-mode">media.ccc.de</a>.
</p>
<div id="outline-container-org6368646" class="outline-2">
<h2 id="org6368646">Update 2019-12-12 Do</h2>
<div class="outline-text-2" id="text-org6368646">
<p>
I added links to both sources where the presentation was uploaded as the upload is done now.
</p>
</div>
</div>
Test main page2019-07-31T00:00:00+03:002019-07-31T00:00:00+03:00Bjoern Bidartag:thaodan.de,2019-07-31:/main.html<p>
test6
</p>