literate-dotfiles/docs/polybar.html
2021-10-25 14:37:10 +02:00

1234 lines
76 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-10-25 lun. 14:33 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Polybar Configuration</title>
<meta name="author" content="Dehaeze Thomas" />
<meta name="generator" content="Org Mode" />
<link rel="stylesheet" type="text/css" href="./dist/style.css"/>
<script type="text/javascript" src="./dist/script.js"></script>
</head>
<body>
<div id="org-div-home-and-up">
<a accesskey="h" href="./index.html"> UP </a>
|
<a accesskey="H" href="./index.html"> HOME </a>
</div><div id="content" class="content">
<h1 class="title">Polybar Configuration</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org3781e1e">Colors</a></li>
<li><a href="#org445e1c9">VM</a></li>
<li><a href="#org4821d11">Top Bar</a></li>
<li><a href="#orgf8c6a7f">Show Windows Title</a></li>
<li><a href="#org094ba94">I3 - Information about workspaces and active one</a></li>
<li><a href="#org9a4155c">Music using MPD</a></li>
<li><a href="#org3d0e06d">Backlight level</a></li>
<li><a href="#orgca1fe67">CPU Usage</a></li>
<li><a href="#org0e67661">Date</a></li>
<li><a href="#org557cf0e">Sound Volume</a></li>
<li><a href="#orgfca1780">Battery</a></li>
<li><a href="#org7a087c2">Temperature</a></li>
<li><a href="#orgc54e0a9">Unread Mails</a>
<ul>
<li><a href="#org3c6d643">Unread Mail Scripts</a></li>
<li><a href="#org5774795">Refresh Mail Scripts</a></li>
<li><a href="#org892ac5a">Open Mails</a></li>
</ul>
</li>
<li><a href="#org239a736">Unread News</a>
<ul>
<li><a href="#orgab7b816">Unread News Scripts</a></li>
<li><a href="#orgb3629f6">Refresh News Scripts</a></li>
<li><a href="#org4b2dabe">Open Newsboat</a></li>
</ul>
</li>
<li><a href="#orgf87e470">Calendar</a>
<ul>
<li><a href="#orgbc1d594">Calendar Status Scripts</a></li>
<li><a href="#org8c169a3">Open Calendar</a></li>
</ul>
</li>
<li><a href="#org3d13512">Redshift</a>
<ul>
<li><a href="#org00942a2">Redshift - Status</a></li>
<li><a href="#org42979cb">Toggle Redshift</a></li>
</ul>
</li>
<li><a href="#orgaca766b">Packages</a>
<ul>
<li><a href="#org3d928b2">Packages Status script</a></li>
<li><a href="#org90118f0">Refresh New Packages script</a></li>
<li><a href="#org9a148af">Packages Update</a></li>
</ul>
</li>
<li><a href="#orgb0dd4b9">Dunst</a>
<ul>
<li><a href="#orga70d12f">Dunst Status script</a></li>
<li><a href="#orgd512f93">Dunst Toggle</a></li>
</ul>
</li>
<li><a href="#org4b27499">Lock Screen</a>
<ul>
<li><a href="#org6059ab7">Lock screen Status script</a></li>
<li><a href="#orgdb07c1d">Toggle Automatic Lock Screen</a></li>
</ul>
</li>
<li><a href="#org5dd1b17">Network</a>
<ul>
<li><a href="#org4f57e9b">Run Network Manager</a></li>
<li><a href="#org32bdecf">Toggle Wifi or Ethernet</a></li>
</ul>
</li>
<li><a href="#org02c08ea">Bluetooth</a>
<ul>
<li><a href="#org6e014b9"><code>bluetooth-run.sh</code> - Bluetooth Run Manager</a></li>
<li><a href="#org6db713c"><code>bluetooth-status.sh</code> - Bluetooth Connection Status</a></li>
<li><a href="#orgac4e24e"><code>bluetooth-toggle.sh</code> - Toggle Bluetooth Connection</a></li>
</ul>
</li>
<li><a href="#org6f8b363">NordVPN</a>
<ul>
<li><a href="#org4effa5e">Nordvpn Status script</a></li>
<li><a href="#org4e1d6b0">Nordvpn Toggle</a></li>
</ul>
</li>
<li><a href="#orgb2ea4f9">Wireguard</a>
<ul>
<li><a href="#orgab5de35">Wireguard Connection Status</a></li>
<li><a href="#org50d7715">Toggle Wireguard Connection</a></li>
</ul>
</li>
<li><a href="#org2c20f99">Microphone loopback</a>
<ul>
<li><a href="#orgd4b550f">Loopback Status</a></li>
<li><a href="#orgf2e2fb0">Toggle Loopback</a></li>
</ul>
</li>
<li><a href="#org01c2810">High cursor</a>
<ul>
<li><a href="#org28d4776">Cursor - Status</a></li>
<li><a href="#org6f6d991">Toggle Cursor</a></li>
</ul>
</li>
<li><a href="#org1243118">Screenshot</a></li>
</ul>
</div>
</div>
<div id="outline-container-org3781e1e" class="outline-2">
<h2 id="org3781e1e">Colors</h2>
<div class="outline-text-2" id="text-org3781e1e">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">colors</span>]
<span class="org-variable-name">bg</span> = ${xrdb:background}
<span class="org-variable-name">red</span> = ${xrdb:color1}
<span class="org-variable-name">green</span> = ${xrdb:color2}
<span class="org-variable-name">yellow</span> = ${xrdb:color3}
<span class="org-variable-name">blue</span> = ${xrdb:color4}
<span class="org-variable-name">purple</span> = ${xrdb:color5}
<span class="org-variable-name">aqua</span> = ${xrdb:color6}
<span class="org-variable-name">gray</span> = ${colors.color7}
<span class="org-variable-name">darkgray</span> = ${colors.color8}
<span class="org-variable-name">darkred</span> = ${xrdb:color9}
<span class="org-variable-name">darkgreen</span> = ${xrdb:color10}
<span class="org-variable-name">darkyellow</span> = ${xrdb:color11}
<span class="org-variable-name">darkblue</span> = ${xrdb:color12}
<span class="org-variable-name">darkpurple</span> = ${xrdb:color13}
<span class="org-variable-name">darkaqua</span> = ${xrdb:color14}
<span class="org-variable-name">fg</span> = ${xrdb:foreground}
</pre>
</div>
</div>
</div>
<div id="outline-container-org445e1c9" class="outline-2">
<h2 id="org445e1c9">VM</h2>
<div class="outline-text-2" id="text-org445e1c9">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">global/wm</span>]
<span class="org-variable-name">margin-top</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">margin-bottom</span> = <span class="org-highlight-numbers-number">0</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org4821d11" class="outline-2">
<h2 id="org4821d11">Top Bar</h2>
<div class="outline-text-2" id="text-org4821d11">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">bar/top</span>]
<span class="org-variable-name">enable-ipc</span> = true
<span class="org-comment-delimiter"># </span><span class="org-comment">override-redirect = false</span>
<span class="org-variable-name">bottom</span> = false
<span class="org-variable-name">fixed-center</span> = false
<span class="org-variable-name">width</span> = 100%
<span class="org-variable-name">height</span> = <span class="org-highlight-numbers-number">27</span>
<span class="org-variable-name">radius</span> = <span class="org-highlight-numbers-number">0.0</span>
<span class="org-variable-name">background</span> = ${colors.bg}
<span class="org-variable-name">foreground</span> = ${colors.fg}
<span class="org-variable-name">line-size</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">border-size</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">padding-left</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">padding-right</span> = <span class="org-highlight-numbers-number">12</span>
<span class="org-variable-name">module-margin-left</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-variable-name">module-margin-right</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-variable-name">font-0</span> = Hack Nerd Font:style=Medium,Regular:pixelsize=<span class="org-highlight-numbers-number">10</span>;<span class="org-highlight-numbers-number">1</span>
<span class="org-variable-name">font-1</span> = unifont:fontformat=truetype:size=<span class="org-highlight-numbers-number">8</span>:antialias=false;<span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">font-2</span> = Weather Icons:size=<span class="org-highlight-numbers-number">10</span>;<span class="org-highlight-numbers-number">1</span>
<span class="org-variable-name">modules-left</span> = i3 xwindow
<span class="org-variable-name">modules-center</span> =
<span class="org-variable-name">modules-right</span> = pulseaudio wired-network wireless-network wireguard nordvpn bluetooth redshift cursor lockscreen dunst packages unread_news unread_mail calendar temperature battery date
<span class="org-comment-delimiter"># </span><span class="org-comment">wm-restack = i3</span>
<span class="org-variable-name">tray-position</span> = right
<span class="org-variable-name">tray-detached</span> = true
<span class="org-variable-name">tray-padding</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">tray-background</span> = ${colors.bg}
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf8c6a7f" class="outline-2">
<h2 id="orgf8c6a7f">Show Windows Title</h2>
<div class="outline-text-2" id="text-orgf8c6a7f">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/xwindow</span>]
<span class="org-variable-name">type</span> = internal/xwindow
<span class="org-variable-name">label</span> = %title:<span class="org-highlight-numbers-number">0</span>:<span class="org-highlight-numbers-number">30</span>:...%
</pre>
</div>
</div>
</div>
<div id="outline-container-org094ba94" class="outline-2">
<h2 id="org094ba94">I3 - Information about workspaces and active one</h2>
<div class="outline-text-2" id="text-org094ba94">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/i3</span>]
<span class="org-variable-name">type</span> = internal/i3
<span class="org-variable-name">enable-scroll</span> = false
<span class="org-variable-name">wrapping-scroll</span> = false
</pre>
</div>
<div class="org-src-container">
<pre class="src src-conf"><span class="org-variable-name">format</span> = &lt;label-state&gt; &lt;label-mode&gt;
<span class="org-variable-name">index-sort</span> = true
</pre>
</div>
<div class="org-src-container">
<pre class="src src-conf"><span class="org-variable-name">label-mode-foreground</span> = ${colors.bg}
<span class="org-variable-name">label-mode-background</span> = ${colors.fg}
<span class="org-variable-name">label-mode-padding</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">focused = Active workspace on focused monitor</span>
<span class="org-variable-name">label-focused</span> = %icon% %index%
<span class="org-variable-name">label-focused-foreground</span> = ${colors.fg}
<span class="org-variable-name">label-focused-background</span> = ${colors.bg}
<span class="org-variable-name">label-focused-underline</span> = ${colors.aqua}
<span class="org-variable-name">label-focused-padding</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">unfocused = Inactive workspace on any monitor</span>
<span class="org-variable-name">label-unfocused</span> = %icon% %index%
<span class="org-variable-name">label-unfocused-foreground</span> = ${colors.fg}
<span class="org-variable-name">label-unfocused-background</span> = ${colors.bg}
<span class="org-variable-name">label-unfocused-underline</span> = ${colors.bg}
<span class="org-variable-name">label-unfocused-padding</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">visible = Active workspace on unfocused monitor</span>
<span class="org-variable-name">label-visible</span> = %icon% %index%
<span class="org-variable-name">label-visible-background</span> = ${colors.bg}
<span class="org-variable-name">label-visible-underline</span> = ${colors.aqua}
<span class="org-variable-name">label-visible-padding</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">urgent = Workspace with urgency hint set</span>
<span class="org-variable-name">label-urgent</span> = %icon% %index%
<span class="org-variable-name">label-urgent-background</span> = ${colors.red}
<span class="org-variable-name">label-urgent-padding</span> = <span class="org-highlight-numbers-number">1</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org9a4155c" class="outline-2">
<h2 id="org9a4155c">Music using MPD</h2>
<div class="outline-text-2" id="text-org9a4155c">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/mpd</span>]
<span class="org-variable-name">type</span> = internal/mpd
<span class="org-variable-name">format-online</span> = &lt;icon-prev&gt; &lt;toggle&gt; &lt;icon-next&gt; %{A1:$TERMINAL -e ncmpcpp &amp;:}&lt;label-song&gt;%{A}
<span class="org-variable-name">format-online-spacing</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">format-online-padding</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">label-offline</span> = mpd is offline
<span class="org-variable-name">format-offline</span> = &lt;label-offline&gt;
<span class="org-variable-name">format-offline-foreground</span> = <span class="org-comment-delimiter">#</span><span class="org-comment">777</span>
<span class="org-variable-name">label-song</span> = %artist% - %title%
<span class="org-variable-name">label-song-maxlen</span> = <span class="org-highlight-numbers-number">30</span>
<span class="org-variable-name">label-song-ellipsis</span> = true
<span class="org-variable-name">icon-prev</span> = &#63914;
<span class="org-variable-name">icon-stop</span> = &#63962;
<span class="org-variable-name">icon-play</span> = &#63753;
<span class="org-variable-name">icon-pause</span> = &#63715;
<span class="org-variable-name">icon-next</span> = &#63915;
<span class="org-variable-name">icon-random</span> = &#63902;
<span class="org-variable-name">icon-repeat</span> = &#63829;
<span class="org-comment-delimiter"># </span><span class="org-comment">Used to display the state of random/repeat/repeatone/single</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Only applies if &lt;icon-[random|repeat|repeatone|single]&gt; is used</span>
<span class="org-variable-name">toggle-on-foreground</span> = ${colors.fg}
<span class="org-variable-name">toggle-off-foreground</span> = ${colors.gray}
<span class="org-variable-name">bar-progress-width</span> = <span class="org-highlight-numbers-number">15</span>
<span class="org-variable-name">bar-progress-indicator</span> = |
<span class="org-variable-name">bar-progress-fill</span> = &#9472;
<span class="org-variable-name">bar-progress-empty</span> = &#9472;
</pre>
</div>
</div>
</div>
<div id="outline-container-org3d0e06d" class="outline-2">
<h2 id="org3d0e06d">Backlight level</h2>
<div class="outline-text-2" id="text-org3d0e06d">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/xbacklight</span>]
<span class="org-variable-name">type</span> = internal/xbacklight
<span class="org-variable-name">format</span> = &lt;ramp&gt;
<span class="org-variable-name">ramp-0</span> = &#58312;
<span class="org-variable-name">ramp-1</span> = &#58313;
<span class="org-variable-name">ramp-2</span> = &#58314;
<span class="org-variable-name">ramp-3</span> = &#58315;
<span class="org-variable-name">ramp-4</span> = &#58316;
<span class="org-variable-name">ramp-5</span> = &#58317;
<span class="org-variable-name">ramp-6</span> = &#58319;
<span class="org-variable-name">ramp-7</span> = &#58320;
<span class="org-variable-name">ramp-8</span> = &#58321;
<span class="org-variable-name">ramp-9</span> = &#58322;
<span class="org-variable-name">ramp-10</span> = &#58323;
<span class="org-variable-name">ramp-11</span> = &#58324;
</pre>
</div>
</div>
</div>
<div id="outline-container-orgca1fe67" class="outline-2">
<h2 id="orgca1fe67">CPU Usage</h2>
<div class="outline-text-2" id="text-orgca1fe67">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/cpu</span>]
<span class="org-variable-name">type</span> = internal/cpu
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">format-prefix-foreground</span> = ${colors.fg}
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">label</span> = %{A1:$TERMINAL -e htop &amp;:}&#64281; %percentage:2%%%{A}
</pre>
</div>
</div>
</div>
<div id="outline-container-org0e67661" class="outline-2">
<h2 id="org0e67661">Date</h2>
<div class="outline-text-2" id="text-org0e67661">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/date</span>]
<span class="org-variable-name">type</span> = internal/date
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">1</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Open google calendar on left right</span>
<span class="org-variable-name">date</span> = %{A1:$TERMINAL --title khal -e ikhal &amp;:}&#62549; %d-%m%{A}
<span class="org-variable-name">date-alt</span> = <span class="org-string">"%{A1:$TERMINAL --title khal -e ikhal &amp;:}&#62549; %d-%m-%Y%{A}"</span>
<span class="org-variable-name">time</span> = &#58251; %H:%M
<span class="org-variable-name">time-alt</span> = &#58251; %H:%M:%S
<span class="org-variable-name">label</span> = %date% %time%
</pre>
</div>
</div>
</div>
<div id="outline-container-org557cf0e" class="outline-2">
<h2 id="org557cf0e">Sound Volume</h2>
<div class="outline-text-2" id="text-org557cf0e">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/pulseaudio</span>]
<span class="org-variable-name">type</span> = internal/pulseaudio
<span class="org-variable-name">sink</span> = alsa_output.pci-0000_00_1f.3.analog-stereo
<span class="org-comment-delimiter"># </span><span class="org-comment">Open pavucontrol on left right</span>
<span class="org-variable-name">format-volume</span> =%{A1:pavucontrol &amp;:}&lt;label-volume&gt; &lt;bar-volume&gt;%{A}
<span class="org-variable-name">label-volume</span> = %percentage%%
<span class="org-variable-name">label-volume-foreground</span> = ${root.foreground}
<span class="org-variable-name">label-muted</span> = &#64605; muted
<span class="org-variable-name">bar-volume-width</span> = <span class="org-highlight-numbers-number">10</span>
<span class="org-variable-name">bar-volume-foreground-0</span> = ${colors.green}
<span class="org-variable-name">bar-volume-foreground-1</span> = ${colors.green}
<span class="org-variable-name">bar-volume-foreground-2</span> = ${colors.blue}
<span class="org-variable-name">bar-volume-foreground-3</span> = ${colors.blue}
<span class="org-variable-name">bar-volume-foreground-4</span> = ${colors.red}
<span class="org-variable-name">bar-volume-foreground-5</span> = ${colors.red}
<span class="org-variable-name">bar-volume-foreground-6</span> = ${colors.red}
<span class="org-variable-name">bar-volume-gradient</span> = false
<span class="org-variable-name">bar-volume-indicator</span> = |
<span class="org-variable-name">bar-volume-indicator-font</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">bar-volume-fill</span> = &#9472;
<span class="org-variable-name">bar-volume-fill-font</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">bar-volume-empty</span> = &#9472;
<span class="org-variable-name">bar-volume-empty-font</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">bar-volume-empty-foreground</span> = ${colors.fg}
</pre>
</div>
</div>
</div>
<div id="outline-container-orgfca1780" class="outline-2">
<h2 id="orgfca1780">Battery</h2>
<div class="outline-text-2" id="text-orgfca1780">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/battery</span>]
<span class="org-variable-name">type</span> = internal/battery
<span class="org-variable-name">battery</span> = BAT0
<span class="org-variable-name">adapter</span> = AC
<span class="org-variable-name">full-at</span> = <span class="org-highlight-numbers-number">95</span>
<span class="org-variable-name">format-charging</span> = %{A1:xfce4-power-manager-settings &amp;:}&lt;ramp-capacity&gt; &lt;label-charging&gt;%{A}
<span class="org-variable-name">format-charging-underline</span> = ${colors.blue}
<span class="org-variable-name">format-discharging</span> = %{A1:xfce4-power-manager-settings &amp;:}&lt;ramp-capacity&gt; &lt;label-discharging&gt;%{A}
<span class="org-variable-name">format-discharging-underline</span> = ${colors.red}
<span class="org-variable-name">label-full</span> = %{A1:xfce4-power-manager-settings &amp;:}&#62016; %{A}
<span class="org-variable-name">format-full-underline</span> = ${colors.bg}
<span class="org-variable-name">ramp-capacity-0</span> = &#62020;
<span class="org-variable-name">ramp-capacity-1</span> = &#62019;
<span class="org-variable-name">ramp-capacity-2</span> = &#62018;
<span class="org-variable-name">ramp-capacity-3</span> = &#62017;
<span class="org-variable-name">ramp-capacity-4</span> = &#62016;
</pre>
</div>
</div>
</div>
<div id="outline-container-org7a087c2" class="outline-2">
<h2 id="org7a087c2">Temperature</h2>
<div class="outline-text-2" id="text-org7a087c2">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/temperature</span>]
<span class="org-variable-name">type</span> = internal/temperature
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
<span class="org-variable-name">thermal-zone</span> = <span class="org-highlight-numbers-number">0</span>
<span class="org-variable-name">base-temperature</span> = <span class="org-highlight-numbers-number">50</span>
<span class="org-variable-name">warn-temperature</span> = <span class="org-highlight-numbers-number">80</span>
<span class="org-variable-name">hwmon-path</span> = /sys/class/thermal/thermal_zone10/temp
<span class="org-variable-name">units</span> = false
<span class="org-variable-name">format</span> = %{A1:$TERMINAL --title=<span class="org-string">"Sensors"</span> -e watch sensors &amp;:}&lt;ramp&gt; &lt;label&gt;%{A}
<span class="org-variable-name">format-warn</span> = &lt;ramp&gt; &lt;label-warn&gt;
<span class="org-variable-name">label</span> = %temperature-c%&#176;C
<span class="org-variable-name">label-warn</span> = %temperature-c%&#176;C
<span class="org-variable-name">label-warn-foreground</span> = ${colors.fg}
<span class="org-variable-name">format-warn-underline</span> = ${colors.red}
<span class="org-variable-name">ramp-0</span> = &#62155;
<span class="org-variable-name">ramp-1</span> = &#62154;
<span class="org-variable-name">ramp-2</span> = &#62153;
<span class="org-variable-name">ramp-3</span> = &#62152;
<span class="org-variable-name">ramp-4</span> = &#62151;
<span class="org-variable-name">ramp-foreground</span> = ${colors.fg}
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc54e0a9" class="outline-2">
<h2 id="orgc54e0a9">Unread Mails</h2>
<div class="outline-text-2" id="text-orgc54e0a9">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/unread_mail</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/mail-open.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">click-right</span> = ~/.config/polybar/scripts/mail-refresh.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/mail-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org3c6d643" class="outline-3">
<h3 id="org3c6d643">Unread Mail Scripts</h3>
<div class="outline-text-3" id="text-org3c6d643">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">mail_nb</span>=<span class="org-sh-quoted-exec">`du -a ~/.mail/*/Inbox/new/* 2&gt;/dev/null | wc -l`</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">mail_nb</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#63215;"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#63215; </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">mail_nb</span></span><span class="org-string">%{F-}"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org5774795" class="outline-3">
<h3 id="org5774795">Refresh Mail Scripts</h3>
<div class="outline-text-3" id="text-org5774795">
<div class="org-src-container">
<pre class="src src-bash">dunstify --replace=<span class="org-highlight-numbers-number">98465</span> <span class="org-string">"Mails &#62511;"</span> <span class="org-string">"Syncing..."</span>;
checkmail -q &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-variable-name">mail_nb</span>=<span class="org-sh-quoted-exec">`du -a ~/.mail/*/Inbox/new/* 2&gt;/dev/null | wc -l`</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">mail_nb</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
dunstify --replace=<span class="org-highlight-numbers-number">98465</span> <span class="org-string">"Mails &#62511;"</span> <span class="org-string">"No new mail"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org892ac5a" class="outline-3">
<h3 id="org892ac5a">Open Mails</h3>
<div class="outline-text-3" id="text-org892ac5a">
<div class="org-src-container">
<pre class="src src-bash">$<span class="org-variable-name">TERMINAL</span> -e tmux new-session -A -s neomutt neomutt
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org239a736" class="outline-2">
<h2 id="org239a736">Unread News</h2>
<div class="outline-text-2" id="text-org239a736">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/unread_news</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/news-open.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">click-right</span> = ~/.config/polybar/scripts/news-refresh.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/news-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">60</span>
</pre>
</div>
</div>
<div id="outline-container-orgab7b816" class="outline-3">
<h3 id="orgab7b816">Unread News Scripts</h3>
<div class="outline-text-3" id="text-orgab7b816">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">news_nb</span>=<span class="org-sh-quoted-exec">`newsboat -x print-unread 2&gt;/dev/null | cut -d " " -f1`</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">news_nb</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span> || <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">news_nb</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#61930;"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#61930; </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">news_nb</span></span><span class="org-string">%{F-}"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgb3629f6" class="outline-3">
<h3 id="orgb3629f6">Refresh News Scripts</h3>
<div class="outline-text-3" id="text-orgb3629f6">
<div class="org-src-container">
<pre class="src src-bash">dunstify --replace=<span class="org-highlight-numbers-number">38492</span> <span class="org-string">"Newsboat &#61763;"</span> <span class="org-string">"Reloading..."</span>;
<span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"newsboat"</span> &gt;/dev/null; <span class="org-keyword">then</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">If newsboat is already running, try to refresh in the tmux session</span>
tmux send-keys -t newsboat R
<span class="org-keyword">else</span>
newsboat -x reload &amp;&amp; /
<span class="org-variable-name">news_nb</span>=<span class="org-sh-quoted-exec">`newsboat -x print-unread | cut -d " " -f1`</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">38492</span> <span class="org-string">"Newsboat &#61763;"</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">news_nb</span></span><span class="org-string"> Unread News"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org4b2dabe" class="outline-3">
<h3 id="org4b2dabe">Open Newsboat</h3>
<div class="outline-text-3" id="text-org4b2dabe">
<div class="org-src-container">
<pre class="src src-bash">$<span class="org-variable-name">TERMINAL</span> -e tmux new-session -A -s newsboat newsboat
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgf87e470" class="outline-2">
<h2 id="orgf87e470">Calendar</h2>
<div class="outline-text-2" id="text-orgf87e470">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/calendar</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/calendar-open.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/calendar-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">5</span>
</pre>
</div>
</div>
<div id="outline-container-orgbc1d594" class="outline-3">
<h3 id="orgbc1d594">Calendar Status Scripts</h3>
<div class="outline-text-3" id="text-orgbc1d594">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">next_events</span>=<span class="org-sh-quoted-exec">$</span><span class="org-sh-quoted-exec"><span class="org-rainbow-delimiters-depth-1">(</span></span><span class="org-sh-quoted-exec">khal list </span><span class="org-string"><span class="org-sh-quoted-exec">"$(</span></span><span class="org-sh-quoted-exec">date</span><span class="org-string"><span class="org-sh-quoted-exec"> +"%H:%M")</span></span><span class="org-string">"</span> 23:59 --format <span class="org-string">"{start-time} - {title}"</span> -df <span class="org-string">'SKIPME'</span> | <span class="org-type">grep</span> -v <span class="org-string">'SKIPME'</span> | <span class="org-type">grep</span> -v <span class="org-string">'No events'</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-variable-name">cal_icon</span>=<span class="org-string">"&#62549;"</span>
<span class="org-variable-name">cal_nb</span>=<span class="org-string">""</span>
<span class="org-variable-name">cal_desc</span>=<span class="org-string">""</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -n <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">next_events</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-variable-name">events_number</span>=<span class="org-string">"</span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">echo</span><span class="org-string"><span class="org-sh-quoted-exec"> "</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">next_events</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">" | wc -l)</span></span><span class="org-string">"</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">events_number</span></span><span class="org-string">"</span> -gt <span class="org-string">"1"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-variable-name">cal_nb</span>=<span class="org-string">" (</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">events_number</span></span><span class="org-string">)"</span>
<span class="org-keyword">fi</span>
<span class="org-variable-name">next_timed_events</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">echo</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">next_events</span></span><span class="org-string">"</span> | sed -e <span class="org-string">'/^[^0-9]/d'</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">next_timed_events</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-comment-delimiter"># </span><span class="org-comment">Only full day events</span>
<span class="org-variable-name">cal_desc</span>=<span class="org-string">" </span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">echo</span><span class="org-string"><span class="org-sh-quoted-exec"> "</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">next_events</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">" | sed -e '/^[0-9]/d;s/^ - //' | head -n 1 | cut -c 1-15)</span></span><span class="org-string">"</span>
<span class="org-keyword">else</span>
<span class="org-variable-name">cal_desc</span>=<span class="org-string">" </span><span class="org-string"><span class="org-sh-quoted-exec">$(</span></span><span class="org-sh-quoted-exec">echo</span><span class="org-string"><span class="org-sh-quoted-exec"> "</span></span><span class="org-string"><span class="org-constant"><span class="org-sh-quoted-exec">$</span></span></span><span class="org-string"><span class="org-variable-name"><span class="org-sh-quoted-exec">next_timed_events</span></span></span><span class="org-string"><span class="org-sh-quoted-exec">" | head -n 1 | cut -c 1-20)</span></span><span class="org-string">"</span>
<span class="org-keyword">fi</span>
<span class="org-keyword">fi</span>
<span class="org-type">echo</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{cal_icon}</span></span><span class="org-string">${cal_nb}</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">{cal_desc}</span></span><span class="org-string">"</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org8c169a3" class="outline-3">
<h3 id="org8c169a3">Open Calendar</h3>
<div class="outline-text-3" id="text-org8c169a3">
<div class="org-src-container">
<pre class="src src-bash">$<span class="org-variable-name">TERMINAL</span> --title=khal -e ikhal
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org3d13512" class="outline-2">
<h2 id="org3d13512">Redshift</h2>
<div class="outline-text-2" id="text-org3d13512">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/redshift</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/redshift-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/redshift-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org00942a2" class="outline-3">
<h3 id="org00942a2">Redshift - Status</h3>
<div class="outline-text-3" id="text-org00942a2">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"redshift"</span> &gt;/dev/null; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#64147;"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#64167;"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org42979cb" class="outline-3">
<h3 id="org42979cb">Toggle Redshift</h3>
<div class="outline-text-3" id="text-org42979cb">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"redshift"</span> &gt;/dev/null; <span class="org-keyword">then</span>
killall redshift &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">36492</span> <span class="org-string">"Redshift &#64147;"</span> <span class="org-string">"Turned off"</span>;
<span class="org-keyword">else</span>
nohup redshift &gt; /dev/null <span class="org-highlight-numbers-number">2</span>&gt;&amp;<span class="org-highlight-numbers-number">1</span> &amp;
dunstify --replace=<span class="org-highlight-numbers-number">36492</span> <span class="org-string">"Redshift &#64147;"</span> <span class="org-string">"Starting..."</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgaca766b" class="outline-2">
<h2 id="orgaca766b">Packages</h2>
<div class="outline-text-2" id="text-orgaca766b">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/packages</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/packages-update.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">click-right</span> = ~/.config/polybar/scripts/packages-refresh.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/packages-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">600</span>
</pre>
</div>
</div>
<div id="outline-container-org3d928b2" class="outline-3">
<h3 id="org3d928b2">Packages Status script</h3>
<div class="outline-text-3" id="text-org3d928b2">
<div class="org-src-container">
<pre class="src src-bash">paru -Sy &gt; /dev/null <span class="org-highlight-numbers-number">2</span>&gt;&amp;<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-variable-name">package_nb</span>=<span class="org-sh-quoted-exec">`paru -Qu 2&gt; /dev/null | wc -l`</span> || <span class="org-sh-escaped-newline">\</span>
<span class="org-variable-name">package_nb</span>=<span class="org-highlight-numbers-number">0</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">package_nb</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#62211;"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#62211; </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">package_nb</span></span><span class="org-string">%{F-}"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org90118f0" class="outline-3">
<h3 id="org90118f0">Refresh New Packages script</h3>
<div class="outline-text-3" id="text-org90118f0">
<div class="org-src-container">
<pre class="src src-bash">dunstify --replace=<span class="org-highlight-numbers-number">64654</span> <span class="org-string">'Packages &#62211;'</span> <span class="org-string">"Refreshing..."</span>
paru -Sy &gt; /dev/null <span class="org-highlight-numbers-number">2</span>&gt;&amp;<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-variable-name">package_nb</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">paru</span> -Qu <span class="org-highlight-numbers-number">2</span>&gt; /dev/null | wc -l<span class="org-rainbow-delimiters-depth-1">)</span> || <span class="org-sh-escaped-newline">\</span>
<span class="org-variable-name">package_nb</span>=<span class="org-highlight-numbers-number">0</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">package_nb</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
dunstify --replace=<span class="org-highlight-numbers-number">64654</span> <span class="org-string">'Packages &#62211;'</span> <span class="org-string">"No upgrade available"</span>
<span class="org-keyword">else</span>
dunstify --replace=<span class="org-highlight-numbers-number">64654</span> <span class="org-string">'Packages &#62211;'</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">package_nb</span></span><span class="org-string"> upgrade(s) available"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org9a148af" class="outline-3">
<h3 id="org9a148af">Packages Update</h3>
<div class="outline-text-3" id="text-org9a148af">
<div class="org-src-container">
<pre class="src src-bash">$<span class="org-variable-name">TERMINAL</span> -e paru
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-orgb0dd4b9" class="outline-2">
<h2 id="orgb0dd4b9">Dunst</h2>
<div class="outline-text-2" id="text-orgb0dd4b9">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/dunst</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/dunst-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/dunst-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-orga70d12f" class="outline-3">
<h3 id="orga70d12f">Dunst Status script</h3>
<div class="outline-text-3" id="text-orga70d12f">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">tmpfile</span>=<span class="org-string">"/tmp/dunststatus"</span>;
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -f $<span class="org-variable-name">tmpfile</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-keyword">if</span> <span class="org-type">grep</span> -q <span class="org-string">"on"</span> $<span class="org-variable-name">tmpfile</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#61683;"</span>;
<span class="org-keyword">elif</span> <span class="org-type">grep</span> -q <span class="org-string">"off"</span> $<span class="org-variable-name">tmpfile</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#61942;"</span>;
<span class="org-keyword">fi</span>
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#61683;"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgd512f93" class="outline-3">
<h3 id="orgd512f93">Dunst Toggle</h3>
<div class="outline-text-3" id="text-orgd512f93">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">tmpfile</span>=<span class="org-string">"/tmp/dunststatus"</span>;
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -f $<span class="org-variable-name">tmpfile</span> <span class="org-rainbow-delimiters-depth-1">]</span> &amp;&amp; <span class="org-type">grep</span> -q <span class="org-string">"off"</span> $<span class="org-variable-name">tmpfile</span> ; <span class="org-keyword">then</span>
killall -SIGUSR2 dunst &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-type">echo</span> <span class="org-string">"on"</span> &gt; $<span class="org-variable-name">tmpfile</span>;
dunstify --replace=<span class="org-highlight-numbers-number">16549</span> <span class="org-string">"Notifications &#61683;"</span> <span class="org-string">"Activated"</span>;
<span class="org-keyword">else</span>
dunstify --replace=<span class="org-highlight-numbers-number">16549</span> <span class="org-string">"Notifications &#61683;"</span> <span class="org-string">"Deactivated"</span>;
<span class="org-type">sleep</span> <span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
killall -SIGUSR1 dunst &amp;&amp; <span class="org-sh-escaped-newline">\</span>
<span class="org-type">echo</span> <span class="org-string">"off"</span> &gt; $<span class="org-variable-name">tmpfile</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org4b27499" class="outline-2">
<h2 id="org4b27499">Lock Screen</h2>
<div class="outline-text-2" id="text-org4b27499">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/lockscreen</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/lockscreen-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">click-right</span> = ~/.local/bin/lockscreen &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/lockscreen-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org6059ab7" class="outline-3">
<h3 id="org6059ab7">Lock screen Status script</h3>
<div class="outline-text-3" id="text-org6059ab7">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"xautolock"</span> &gt;/dev/null
<span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#61475;"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#61596;"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgdb07c1d" class="outline-3">
<h3 id="orgdb07c1d">Toggle Automatic Lock Screen</h3>
<div class="outline-text-3" id="text-orgdb07c1d">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"xautolock"</span> &gt;/dev/null ; <span class="org-keyword">then</span>
<span class="org-type">pkill</span> xautolock &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">13602</span> <span class="org-string">'Lock Screen &#61475;'</span> <span class="org-string">'Desactivated'</span>
<span class="org-keyword">else</span>
xautolock -locker <span class="org-string">"~/.local/bin/lockscreen"</span> -detectsleep -time <span class="org-highlight-numbers-number">30</span> -notify <span class="org-highlight-numbers-number">60</span> -notifier <span class="org-string">"dunstify --replace=31846 -u critical -t 10000 -- 'Locking Screen' '60 seconds'"</span> &amp;
dunstify --replace=<span class="org-highlight-numbers-number">13602</span> <span class="org-string">'Lock Screen &#61475;'</span> <span class="org-string">'Activated'</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org5dd1b17" class="outline-2">
<h2 id="org5dd1b17">Network</h2>
<div class="outline-text-2" id="text-org5dd1b17">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/wired-network</span>]
<span class="org-variable-name">type</span> = internal/network
<span class="org-variable-name">interface</span> = enp57s0u2u4u4
<span class="org-variable-name">label-connected</span> = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh &gt;/dev/null 2&gt;%1 &amp;:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh enp57s0u2u4u4 &gt;/dev/null 2&gt;%1 &amp;:}&#63231; %local_ip%%{A}%{A}
<span class="org-variable-name">label-connected-foreground</span> = ${colors.fg}
<span class="org-variable-name">label-disconnected</span> = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh &gt;/dev/null 2&gt;%1 &amp;:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh enp57s0u2u4u4 &gt;/dev/null 2&gt;%1 &amp;:}&#63231;%{A}%{A}
<span class="org-variable-name">label-disconnected-foreground</span> = <span class="org-comment-delimiter">#</span><span class="org-comment">777</span>
</pre>
</div>
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/wireless-network</span>]
<span class="org-variable-name">type</span> = internal/network
<span class="org-variable-name">interface</span> = wlp2s0
<span class="org-variable-name">format-connected</span> = &lt;label-connected&gt;
<span class="org-variable-name">format-disconnected</span> = &lt;label-disconnected&gt;
<span class="org-variable-name">label-connected</span> = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh &gt;/dev/null 2&gt;%1 &amp;:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 &gt;/dev/null 2&gt;%1 &amp;:}&#64168; %essid%%{A}%{A}
<span class="org-variable-name">label-connected-foreground</span> = ${colors.fg}
<span class="org-variable-name">label-disconnected</span> = %{A3:bash ~/.config/polybar/scripts/connection-manager.sh &gt;/dev/null 2&gt;%1 &amp;:}%{A1:bash ~/.config/polybar/scripts/connection-toggle.sh wlp2s0 &gt;/dev/null 2&gt;%1 &amp;:}&#64168;%{A}%{A}
<span class="org-variable-name">label-disconnected-foreground</span> = <span class="org-comment-delimiter">#</span><span class="org-comment">777</span>
</pre>
</div>
</div>
<div id="outline-container-org4f57e9b" class="outline-3">
<h3 id="org4f57e9b">Run Network Manager</h3>
<div class="outline-text-3" id="text-org4f57e9b">
<div class="org-src-container">
<pre class="src src-bash">$<span class="org-variable-name">TERMINAL</span> -e <span class="org-type">sudo</span> nmtui
</pre>
</div>
</div>
</div>
<div id="outline-container-org32bdecf" class="outline-3">
<h3 id="org32bdecf">Toggle Wifi or Ethernet</h3>
<div class="outline-text-3" id="text-org32bdecf">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-comment-delimiter"># </span><span class="org-comment">Check if an argument is passed</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>
<span class="org-keyword">then</span>
<span class="org-keyword">exit</span> <span class="org-highlight-numbers-number">1</span>
<span class="org-keyword">fi</span>
<span class="org-variable-name">isdevicedown</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">nmcli</span> device status | <span class="org-type">grep</span> ^$<span class="org-highlight-numbers-number">1</span> | <span class="org-type">grep</span> disconnected<span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">isdevicedown</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>
<span class="org-keyword">then</span>
dunstify --replace=<span class="org-highlight-numbers-number">84847</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-string">"Disconnecting..."</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
nmcli device disconnect $<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">84847</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-string">"Disconnected"</span>
<span class="org-keyword">else</span>
dunstify --replace=<span class="org-highlight-numbers-number">84847</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-string">"Connection..."</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
nmcli device connect $<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">84847</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">1</span></span><span class="org-string">"</span> <span class="org-string">"Connected"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org02c08ea" class="outline-2">
<h2 id="org02c08ea">Bluetooth</h2>
<div class="outline-text-2" id="text-org02c08ea">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/bluetooth</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/bluetooth-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">click-right</span> = ~/.config/polybar/scripts/bluetooth-run.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/bluetooth-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org6e014b9" class="outline-3">
<h3 id="org6e014b9"><code>bluetooth-run.sh</code> - Bluetooth Run Manager</h3>
<div class="outline-text-3" id="text-org6e014b9">
<div class="org-src-container">
<pre class="src src-bash">blueman-manager &amp;&amp; <span class="org-type">pkill</span> blueman-applet
</pre>
</div>
</div>
</div>
<div id="outline-container-org6db713c" class="outline-3">
<h3 id="org6db713c"><code>bluetooth-status.sh</code> - Bluetooth Connection Status</h3>
<div class="outline-text-3" id="text-org6db713c">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">controllerid</span>=<span class="org-string">"9C:B6:D0:96:6E:C0"</span>
<span class="org-variable-name">isconnected</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">bluetoothctl</span> show $<span class="org-variable-name">controllerid</span> | <span class="org-type">grep</span> Powered | <span class="org-type">grep</span> yes<span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">isconnected</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>
<span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#62897;"</span>
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#62099;%{F-}"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgac4e24e" class="outline-3">
<h3 id="orgac4e24e"><code>bluetooth-toggle.sh</code> - Toggle Bluetooth Connection</h3>
<div class="outline-text-3" id="text-orgac4e24e">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">controllerid</span>=<span class="org-string">"9C:B6:D0:96:6E:C0"</span>
<span class="org-variable-name">isconnected</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">bluetoothctl</span> show $<span class="org-variable-name">controllerid</span> | <span class="org-type">grep</span> Powered | <span class="org-type">grep</span> yes<span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -z <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">isconnected</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>
<span class="org-keyword">then</span>
bluetoothctl power on &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">88498</span> <span class="org-string">"Bluetooth"</span> <span class="org-string">"Power ON"</span>
<span class="org-keyword">else</span>
bluetoothctl power off &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">88498</span> <span class="org-string">"Bluetooth"</span> <span class="org-string">"Power OFF"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org6f8b363" class="outline-2">
<h2 id="org6f8b363">NordVPN</h2>
<div class="outline-text-2" id="text-org6f8b363">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/nordvpn</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.local/bin/nordvpn-toggle &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/nordvpn-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org4effa5e" class="outline-3">
<h3 id="org4effa5e">Nordvpn Status script</h3>
<div class="outline-text-3" id="text-org4effa5e">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">tmpfile</span>=<span class="org-string">"/tmp/vpnstatus"</span>;
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> -f $<span class="org-variable-name">tmpfile</span> <span class="org-rainbow-delimiters-depth-1">]</span> &amp;&amp; <span class="org-type">grep</span> -q <span class="org-string">"on"</span> $<span class="org-variable-name">tmpfile</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#63022;%{F-}"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#63022;"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org4e1d6b0" class="outline-3">
<h3 id="org4e1d6b0">Nordvpn Toggle</h3>
<div class="outline-text-3" id="text-org4e1d6b0">
<p>
The script is accessible <a href="binaries.html#nordvpn-toggle">here</a>.
</p>
</div>
</div>
</div>
<div id="outline-container-orgb2ea4f9" class="outline-2">
<h2 id="orgb2ea4f9">Wireguard</h2>
<div class="outline-text-2" id="text-orgb2ea4f9">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/wireguard</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/wireguard-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/wireguard-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-orgab5de35" class="outline-3">
<h3 id="orgab5de35">Wireguard Connection Status</h3>
<div class="outline-text-3" id="text-orgab5de35">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">config</span>=<span class="org-string">"homelab"</span>
<span class="org-variable-name">connection</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">sudo</span> wg show <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> <span class="org-highlight-numbers-number">2</span>&gt;/dev/null | head -n <span class="org-highlight-numbers-number">1</span> | awk <span class="org-string">'{print $NF }'</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">connection</span></span><span class="org-string">"</span> = <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#63511;%{F-}"</span>
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#63512;"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org50d7715" class="outline-3">
<h3 id="org50d7715">Toggle Wireguard Connection</h3>
<div class="outline-text-3" id="text-org50d7715">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">config</span>=<span class="org-string">"homelab"</span>
<span class="org-variable-name">connection</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">sudo</span> wg show <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> <span class="org-highlight-numbers-number">2</span>&gt;/dev/null | head -n <span class="org-highlight-numbers-number">1</span> | awk <span class="org-string">'{print $NF }'</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">connection</span></span><span class="org-string">"</span> = <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">sudo</span> wg-quick down <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">83244</span> <span class="org-string">"Wireguard"</span> <span class="org-string">"Disconnected from </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span>
<span class="org-keyword">else</span>
<span class="org-type">sudo</span> wg-quick up <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">83244</span> <span class="org-string">"Wireguard"</span> <span class="org-string">"Connected to </span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">config</span></span><span class="org-string">"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org2c20f99" class="outline-2">
<h2 id="org2c20f99">Microphone loopback</h2>
<div class="outline-text-2" id="text-org2c20f99">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/loopback</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/loopback-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/loopback-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-orgd4b550f" class="outline-3">
<h3 id="orgd4b550f">Loopback Status</h3>
<div class="outline-text-3" id="text-orgd4b550f">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">loopback</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pactl</span> list <span class="org-highlight-numbers-number">2</span>&gt;/dev/null | <span class="org-type">grep</span> module-loopback | wc -l<span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">loopback</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"&#61744;"</span>
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#61744;%{F-}"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orgf2e2fb0" class="outline-3">
<h3 id="orgf2e2fb0">Toggle Loopback</h3>
<div class="outline-text-3" id="text-orgf2e2fb0">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-variable-name">loopback</span>=$<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-sh-quoted-exec">pactl</span> list <span class="org-highlight-numbers-number">2</span>&gt;/dev/null | <span class="org-type">grep</span> module-loopback | wc -l<span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-keyword">if</span> <span class="org-rainbow-delimiters-depth-1">[</span> <span class="org-string">"</span><span class="org-string"><span class="org-constant">$</span></span><span class="org-string"><span class="org-variable-name">loopback</span></span><span class="org-string">"</span> -eq <span class="org-string">"0"</span> <span class="org-rainbow-delimiters-depth-1">]</span>; <span class="org-keyword">then</span>
pactl load-module module-loopback <span class="org-variable-name">latency_msec</span>=<span class="org-highlight-numbers-number">1</span> &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">82244</span> <span class="org-string">"Loopback"</span> <span class="org-string">"Enabled"</span>
<span class="org-keyword">else</span>
pactl unload-module module-loopback &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">82244</span> <span class="org-string">"Loopback"</span> <span class="org-string">"Disabled"</span>
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org01c2810" class="outline-2">
<h2 id="org01c2810">High cursor</h2>
<div class="outline-text-2" id="text-org01c2810">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/cursor</span>]
<span class="org-variable-name">type</span> = custom/script
<span class="org-variable-name">format-underline</span> = ${colors.bg}
<span class="org-variable-name">click-left</span> = ~/.config/polybar/scripts/cursor-toggle.sh &gt;/dev/null 2&gt;%1 &amp;
<span class="org-variable-name">format</span> = &lt;label&gt;
<span class="org-variable-name">exec</span> = ~/.config/polybar/scripts/cursor-status.sh
<span class="org-variable-name">interval</span> = <span class="org-highlight-numbers-number">2</span>
</pre>
</div>
</div>
<div id="outline-container-org28d4776" class="outline-3">
<h3 id="org28d4776">Cursor - Status</h3>
<div class="outline-text-3" id="text-org28d4776">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"highlight-point"</span> &gt;/dev/null; <span class="org-keyword">then</span>
<span class="org-type">echo</span> <span class="org-string">"%{F#859900}&#63155;%{F-}"</span>;
<span class="org-keyword">else</span>
<span class="org-type">echo</span> <span class="org-string">"&#63155;"</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org6f6d991" class="outline-3">
<h3 id="org6f6d991">Toggle Cursor</h3>
<div class="outline-text-3" id="text-org6f6d991">
<div class="org-src-container">
<pre class="src src-bash"><span class="org-keyword">if</span> <span class="org-type">pgrep</span> -x <span class="org-string">"highlight-point"</span> &gt;/dev/null; <span class="org-keyword">then</span>
killall highlight-point &amp;&amp; <span class="org-sh-escaped-newline">\</span>
dunstify --replace=<span class="org-highlight-numbers-number">46492</span> <span class="org-string">"Cursor"</span> <span class="org-string">"Turned off"</span>;
<span class="org-keyword">else</span>
nohup highlight-pointer -r <span class="org-highlight-numbers-number">10</span> &gt; /dev/null <span class="org-highlight-numbers-number">2</span>&gt;&amp;<span class="org-highlight-numbers-number">1</span> &amp;
dunstify --replace=<span class="org-highlight-numbers-number">46492</span> <span class="org-string">"Cursor"</span> <span class="org-string">"Highlight..."</span>;
<span class="org-keyword">fi</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org1243118" class="outline-2">
<h2 id="org1243118">Screenshot</h2>
<div class="outline-text-2" id="text-org1243118">
<div class="org-src-container">
<pre class="src src-conf">[<span class="org-type">module/screenshot</span>]
<span class="org-variable-name">type</span> = custom/text
<span class="org-variable-name">content</span> = <span class="org-string">"&#62975;"</span>
<span class="org-variable-name">click-left</span> = ~/.local/bin/screenshot &gt;/dev/null 2&gt;%1 &amp;
</pre>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2021-10-25 lun. 14:33</p>
</div>
</body>
</html>