<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[HyperForum — Need help fixing (creating) a script for Dwmblocks]]></title>
	<link rel="self" href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=932&amp;type=atom" />
	<updated>2023-11-23T14:38:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.hyperbola.info/viewtopic.php?id=932</id>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6778#p6778" />
			<content type="html"><![CDATA[<p>Thanks, much appreciated. With those information people will have better insights into. And I find it a pity that we are not able to include <strong>dwmblocks</strong> as I had thought more than once about its inclusion. Thanks also for pointing on <strong>rofi</strong>: I need to rework the PKGBUILD a bit, so this will come next for sure. <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[throgh]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=347</uri>
			</author>
			<updated>2023-11-23T14:38:52Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6778#p6778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6777#p6777" />
			<content type="html"><![CDATA[<p>Hello . Thank you for your answer . Got you, ok.<br /> I downloaded dwmblocks from github and installed it with the command (I wrote below )</p><p> To set up a bar there are many different sources, there are ready-made solutions <a href="https://github.com/joestandring/dwm-bar,">https://github.com/joestandring/dwm-bar,</a> <a href="https://github.com/UtkarshVerma/dwmblocks-async">https://github.com/UtkarshVerma/dwmblocks-async</a> <a href="https://github.com/ronniedroid/.dotfiles">https://github.com/ronniedroid/.dotfiles</a>&nbsp; or the user can independently set up his bar using different options or scripts, etc.</p><p>Since HyperbolaGNU lacks a large number of programs, it is impossible to take someone else’s build and copy it; it simply will not work correctly, despite the fact that Arch Linux may have the largest community on this topic.</p><div class="codebox"><pre><code>git clone https://git.suckless.org/dwm

git clone https://git.suckless.org/st

git clone https://git.suckless.org/dmenu</code></pre></div><div class="codebox"><pre><code>cd .suckless

cd dwm
make
doas make clean install</code></pre></div><div class="codebox"><pre><code>cd
сd st
make
doas make clean install</code></pre></div><div class="codebox"><pre><code>cd ..
cd dmenu
make
doas make clean install</code></pre></div><br /><div class="codebox"><pre><code>git clone https://github.com/torrinfail/dwmblocks.git #then cd into the dwmblocks
cd dwmblocks

make
doas make install</code></pre></div><p>I also find it very useful to use ROFI <a href="https://www.hyperbola.info/packages/extra/i686/rofi/,">https://www.hyperbola.info/packages/extra/i686/rofi/,</a> it will add to the graphics))</p><p>Some configuration examples <a href="https://github.com/dctxmei/rofi-themes">https://github.com/dctxmei/rofi-themes</a></p><p>dwm - dynamic window manager<br />============================<br />dwm is an extremely fast, small, and dynamic window manager for X.</p>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2023-11-23T14:19:35Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6777#p6777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6776#p6776" />
			<content type="html"><![CDATA[<p>Please take into perspective that no one can help you within this, when you don&#039;t provide all sources in usage. Beginning with: Which version of <strong>dwmblocks</strong> did you use? Which repository? Which build-flags? Patches for that corresponding project? Exactly out of this reasoning I have asked and said before: We do not provide a package for <strong>dwmblocks</strong> as there is no stable tarball-download towards my knowledge and exactly therefore we have now this point in the thread as you asked for help, but personal I don&#039;t see myself able as I have not more than those scripts and some notes. But the essential information is missing, as noted.</p><p>If someone else reading and having clues, that&#039;s fine. <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />But as said: You would need to provide more data aside your personal scripts.</p>]]></content>
			<author>
				<name><![CDATA[throgh]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=347</uri>
			</author>
			<updated>2023-11-23T10:24:09Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6776#p6776</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6774#p6774" />
			<content type="html"><![CDATA[<p>Hello . Yes, now I&#039;m setting it up, but for now I&#039;m in the process of setting it up and as soon as I finish it I&#039;ll definitely show it. Let users use it.</p><p>I have not conducted comparative tests, but it seems to me that HyperbolaGNU and DWM&nbsp; are an excellent option in terms of minimalism and RAM usage.</p><p>If someone knows better, write)</p><p> I would like to make an adjustment to the script.</p><p>I think this option would be better (example below)</p><p>I&#039;m looking for a solution, if anyone can help, I&#039;ll be grateful since I&#039;m doing this for us.</p><br /><p>Show wifi  ,networks name and percent strength or 睊 if none ,local ip,<br />status vpn connection (&nbsp; vpn is no active , vpn is active )</p><div class="codebox"><pre><code>[ 65% DWM 192.168.0.1  ]

[ 65% DWM  Budapest ]</code></pre></div><p>Show  if connected to ethernet or  if none, public ip,<br />status vpn connection (&nbsp; vpn is no active , vpn is active )</p><div class="codebox"><pre><code>[ DWM 192.168.0.1  ]

[ DWM  Budapest ]</code></pre></div><p>no ethernet,no wifi connection</p><div class="codebox"><pre><code>[ 睊  ]</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2023-11-22T16:43:27Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6774#p6774</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6773#p6773" />
			<content type="html"><![CDATA[<p>I was interested how you setup <strong>dwmblocks</strong>, especially if you did an own PKGBUILD. <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Please remember that if people help you, they need also your testing- and setup-grounds. If you do not provide the sources, nobody here is able to help or replicate the issues and solve them. So that&#039;s a nice meant point: Please share all back. Thanks!</p><p>Hyperbola is not meant to only grant a free and libre system, it is meant as community-work.</p>]]></content>
			<author>
				<name><![CDATA[throgh]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=347</uri>
			</author>
			<updated>2023-11-21T22:22:21Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6773#p6773</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6772#p6772" />
			<content type="html"><![CDATA[<p>Hello . Thank you for your answer . Do you mean you didn&#039;t provide a complete build of my config?<br />I&#039;m setting up dwmblocks myself and I need a script</p>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2023-11-21T19:31:20Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6772#p6772</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6770#p6770" />
			<content type="html"><![CDATA[<p>Sorry, but you have not provided anything more so someone could check that. We do not provide <strong>dwmblocks</strong>. As far from my understanding and information there is not even a stable tarball available for <strong>dwmblocks</strong>, so we are here at some git-version. Am I right?</p>]]></content>
			<author>
				<name><![CDATA[throgh]]></name>
				<uri>https://forums.hyperbola.info/profile.php?id=347</uri>
			</author>
			<updated>2023-11-21T10:17:20Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6770#p6770</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Need help fixing (creating) a script for Dwmblocks]]></title>
			<link rel="alternate" href="https://forums.hyperbola.info/viewtopic.php?pid=6769#p6769" />
			<content type="html"><![CDATA[<p>Hi all .</p><p>Please tell me how to correctly connect the scripts (each of them works correctly, attached below)<br />so that I have one script that shows this information in the bar:</p><br /><div class="codebox"><pre><code>[ 60%  192.168.0.1   ]</code></pre></div><p> # Shows wifi  and percent strength as well as local ip and vpn is not active </p><div class="codebox"><pre><code>[  192.168.0.1   ]</code></pre></div><p> # Same thing but with ethernet</p><div class="codebox"><pre><code>[ 60%  10.10.0.1   ]</code></pre></div><p> # Shows wifi and percent strength, as well as public ip and vpn is active </p><div class="codebox"><pre><code> [  192.168.0.1  ]</code></pre></div><p>&nbsp; # Same thing but with ethernet</p><div class="codebox"><pre><code>[睊  ]</code></pre></div><p>&nbsp; # When there is no wifi or ethernet connection, the bar should display these icons.</p><br /><p> I hope the icons are displayed correctly. I used &quot;awesome&quot; icons </p><p>&nbsp; </p><br /><p>ip_local<br />#=============#</p><div class="codebox"><pre><code>ip=&quot;$(ip a | grep .255 | grep -v wlp | cut -d&#039; &#039; -f6 | sed &#039;s/\/24//&#039;)&quot;

echo $ip</code></pre></div><br /><p>ip_public<br />#=============#</p><div class="codebox"><pre><code>#PREFIX=&#039; &#039;

get_pub_ip()
{
#    echo &quot;$PREFIX$(curl -s ifconfig.co)&quot;
echo &quot;$PREFIX$(wget -qO - ident.me)&quot;
}

get_pub_ip</code></pre></div><br /><br /><p>network_status<br />#=============#</p><div class="codebox"><pre><code>network() {
wire=&quot;$(ip a | grep &#039;eth0\|enp&#039; | grep inet | wc -l)&quot;
wifi=&quot;$(ip a | grep wl  | grep inet | wc -l)&quot;

if [ $wire = 1 ]; then
    echo &quot; &quot;
elif [ $wifi = 1 ]; then
    echo &quot; &quot;
else
    echo &quot;睊&quot;
fi
}

echo &quot;$(network)&quot;</code></pre></div><br /><br /><p>wifi_signal_indicator<br />#=====================#</p><div class="codebox"><pre><code># Show wifi   and percent strength or   if none.
# Show   if connected to ethernet or   if none.
# Show   if a vpn connection is active

case $BLOCK_BUTTON in
        1) &quot;$TERMINAL&quot; -e nmtui; pkill -RTMIN+4 dwmblocks ;;
        3) notify-send &quot;🌐 Internet module&quot; &quot;\- Click to connect
睊: wifi disabled
 : no wifi connection
 : wifi connection with quality
 : no ethernet
 : ethernet working
 : vpn is active
&quot; ;;
        6) &quot;$TERMINAL&quot; -e &quot;$EDITOR&quot; &quot;$0&quot; ;;
esac

if grep -xq &#039;up&#039; /sys/class/net/w*/operstate 2&gt;/dev/null ; then
        wifiicon=&quot;$(awk &#039;/^\s*w/ { print &quot; &quot;, int($3 * 100 / 70) &quot;% &quot; }&#039; /proc/net/wireless)&quot;
elif grep -xq &#039;down&#039; /sys/class/net/w*/operstate 2&gt;/dev/null ; then
        grep -xq &#039;0x1003&#039; /sys/class/net/w*/flags &amp;&amp; wifiicon=&quot;睊&quot;|| wifiicon=&quot;睊&quot;
fi

printf &quot;[%s%s%s]\n&quot; &quot;$wifiicon&quot; &quot;$(sed &quot;s/down/  /;s/up/  /&quot; /sys/class/net/e*/operstate 2&gt;/dev/null)&quot; &quot;$(sed &quot;s/.*/  /&quot; /sys/class/net/tun*/operstate 2&gt;/dev/null)&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jim]]></name>
			</author>
			<updated>2023-11-21T09:15:42Z</updated>
			<id>https://forums.hyperbola.info/viewtopic.php?pid=6769#p6769</id>
		</entry>
</feed>
