<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3989&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / yad tips and tricks.]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3989</link>
		<description><![CDATA[The most recent posts in yad tips and tricks..]]></description>
		<lastBuildDate>Sun, 02 Oct 2022 14:57:49 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=37754#p37754</link>
			<description><![CDATA[<p>I&#039;m not sure how I missed this thread. I&#039;ve used YAD for various GUIs on MiyoLinux since I started it. I recently uploaded a lot of the scripts to the MiyoLinux Sourceforge page if anyone is interested. Some of them are very basic, and some of them are more involved. They all are licensed as Public Domain, so feel free to do with them what you want. <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Here is a list of what I posted there...</p><p>Extra Software (a GUI to easily install some commonly used applications)<br />Live Keyboard Layout (a GUI to easily change keyboard layouts)<br />my-crappy-media-player-v2 (a crappy media player that uses ffplay)<br />my-crappy-music-player (a crappy music player that uses ffplay)<br />miyo-welcome (one version of the MiyoLinux Welcome Screen)<br />miyo-control-center (well, it&#039;s a basic Control Center)<br />miyo-touchpad (a GUI to temporarily turn certain touchpad controls on/off)<br />miyo-picom (temporarily turn picom on/off)<br />miyo-exit (an exit menu)<br />miyo-conky (temporarily turn conky on/off)<br />miyo-calendar (an edited version on the YAD Calendar that I use on MiyoLinux)</p><p>Download page - <a href="https://sourceforge.net/projects/miyolinux/files/YAD-scripts/" rel="nofollow">https://sourceforge.net/projects/miyoli … D-scripts/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (MiyoLinux)]]></author>
			<pubDate>Sun, 02 Oct 2022 14:57:49 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=37754#p37754</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=35630#p35630</link>
			<description><![CDATA[<p>I had not paid very much attention to yad, thanks to this thread cames to help me having a better gui for logout, reboot and poweroff.</p><p>I used dialog for those stuff, but yad to a better rescue.</p>]]></description>
			<author><![CDATA[dummy@example.com (Nili)]]></author>
			<pubDate>Sat, 16 Apr 2022 18:45:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=35630#p35630</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=31742#p31742</link>
			<description><![CDATA[<p>this one uses yad, imagemagick and xwallpaper to quickly create an plain-colored wallpaper</p><div class="codebox"><pre><code>#!/bin/sh
FILE=&quot;$HOME/.local/wallpaper.png&quot;

# use yad to select color value
COLOR=&quot;$(yad --title=&quot;Set Wallpaper&quot; --color)&quot;

# use imagemagick to create the png file
if [ &quot;$COLOR&quot; ]; then
  [ -e &quot;$FILE&quot; ] &amp;&amp; rm &quot;$FILE&quot;
  convert -size $(xdpyinfo | awk &#039;/dimensions/ {print $2}&#039;) canvas:$COLOR &quot;$FILE&quot;

# use xwallpaper to set the wallpaper
  xwallpaper --zoom &quot;$FILE&quot;
fi
exit 0</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (alphalpha)]]></author>
			<pubDate>Mon, 27 Sep 2021 12:32:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=31742#p31742</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=30575#p30575</link>
			<description><![CDATA[<p>messing about in yad again with my openbox/tint2 setup.</p><p>Here is a nice script you could use as a Places dialog button in tint2. I use spacefm as file manager, you could use pcmanfm etc etc.<br />What this does is bring up small yad dialog you can choose to open your file manager and cd into various directories.</p><div class="codebox"><pre><code>#!/bin/sh	

dialog=$(yad --window-icon=gtk-directory --mouse --timeout=3 --title &quot;Select Directory&quot; --form --field=Choose:DIR)
path=$(echo $dialog | awk &#039;BEGIN {FS=&quot;|&quot; } { print $1 }&#039;)

spacefm &quot;$path&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 08 Jul 2021 07:20:23 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=30575#p30575</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=27720#p27720</link>
			<description><![CDATA[<p>here is something i picked up today in regards to having a tray menu app to logout and shutdown, the first script calls the exit.sh menu similar to how gnome-desktop does it but with dwm statusbar systray and you can easily lock and logout the session here, then when the shutdown is pressed the exit menu appears with reboot or shutdown. The tray icon needs to be specified directly within yad. This is for dwm using the systray patch as shown in screens but could be used for any panel with tray app i think.</p><div class="codebox"><pre><code>#!/bin/sh

PIPE=&quot;/tmp/.pipe.tmp&quot;
rm          &quot;$PIPE&quot;
mkfifo      &quot;$PIPE&quot;
exec 3&lt;&gt;    &quot;$PIPE&quot;

yad --notification --listen &lt;&amp;3 &amp;
echo &quot;menu:\
Lock                    !i3lock-fancy!system-lock-screen-symbolic||\
Logout                  !loginctl kill-user &quot;$USER&quot;!exit||\
Shutdown                !exit.sh!system-shutdown-symbolic&quot; &gt;&amp;3

echo &quot;icon:$HOME/.icons/system-shutdown-symbolic.svg&quot; &gt;&amp;3 
echo &quot;tooltip:Right click to choose option&quot; &gt;&amp;3</code></pre></div><p>exit.sh script</p><div class="codebox"><pre><code>#!/bin/bash

yad_cancel () {
        kill -USR1 &quot;$YAD_PID&quot;
}

export -f yad_cancel

yad --no-buttons --geometry=150x100+1300+0 --form --columns=1 --borders=10 --keep-icon-size --on-top \
        --field=&#039;!/usr/share/icons/Papirus-Dark/24x24/panel/system-restart-panel.svg!reboot&#039;:fbtn &quot;loginctl reboot&quot; \
        --field=&#039;!/usr/share/icons/Papirus-Dark/24x24/panel/system-shutdown-panel.svg!poweroff&#039;:fbtn &quot;loginctl poweroff&quot; \
        --field=&#039;!/usr/share/icons/Papirus-Dark/24x24/actions/button_cancel.svg!cancel&#039;:fbtn &quot;bash -c &#039;yad_cancel&#039;&quot;</code></pre></div><p>screens</p><p><a href="https://postimg.cc/G4Qk9J9D" rel="nofollow"><span class="postimg"><img src="https://i.postimg.cc/G4Qk9J9D/2021-02-26-004145-1366x768-scrot.png" alt="2021-02-26-004145-1366x768-scrot.png" /></span></a> <a href="https://postimg.cc/NyCmks6f" rel="nofollow"><span class="postimg"><img src="https://i.postimg.cc/NyCmks6f/2021-02-26-004209-1366x768-scrot.png" alt="2021-02-26-004209-1366x768-scrot.png" /></span></a></p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Thu, 25 Feb 2021 14:50:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=27720#p27720</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26181#p26181</link>
			<description><![CDATA[<p><del>as promised, the yad exit icons. They are just recolored #15539E papirus 24x24 action and panel icons done in inkscape, all credit to papirus icons.</del></p><p><del><a href="https://notabug.org/dice_1/dotfiles/src/master/yad-exit-menu-with-icons" rel="nofollow">https://notabug.org/dice_1/dotfiles/src … with-icons</a></del></p><p>no longer available, deleted repo. The idea was no good anyway, i cant figure out how to save svg file properly.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Wed, 09 Dec 2020 08:49:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26181#p26181</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26180#p26180</link>
			<description><![CDATA[<p>Im very novice at scripts, i had thought that they could just be /bin/sh, thanks.</p><p>Ahh yes i forgot yad had a calendar function, i will have to incorporate that instead maybe, although does gsimplecal have a bit more functionality than yad calendar? i will have to find out.</p>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Wed, 09 Dec 2020 00:46:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26180#p26180</guid>
		</item>
		<item>
			<title><![CDATA[Re: yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26163#p26163</link>
			<description><![CDATA[<p>Nice, thanks for sharing.</p><p>Apologies if this is an irritating point to raise but your scripts do not use bashisms so they could (should?) have a <span class="bbc">/bin/sh</span> shebang instead.</p><p>EDIT: and did you know that <span class="bbc">yad</span> already has a calendar?</p><div class="codebox"><pre><code>yad --calendar</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Tue, 08 Dec 2020 16:59:46 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26163#p26163</guid>
		</item>
		<item>
			<title><![CDATA[yad tips and tricks.]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=26158#p26158</link>
			<description><![CDATA[<p>Having discovered the wonderful yad program awhile back i have revisited it and give you the following cool scripts. The calendar is mainly a good script to use for the dwm statusbar with the systray patch.</p><p>Yad exit menu with papirus icons, this needs elogind to work, you could swap out the commands with sudo though.<br />Xscreensaver for locking, all other locking programs dont quite compare to it.</p><div class="codebox"><pre><code>#!/usr/bin/env bash

yad-cancel() {
	kill -USR1 $YAD_PID
}

export -f yad-cancel
	
yad --no-buttons --close-on-unfocus --width 200 --height 50 --form --columns 5 --borders=20 --center --on-top \
        --field=Lock!&quot;$HOME/bin/exit-icons/lock.svg&quot;:fbtn &quot;xscreensaver-command -l&quot; \
        --field=Logout!&quot;$HOME/bin/exit-icons/logout.svg&quot;:fbtn &quot;pkill -U $USER&quot; \
        --field=Reboot!&quot;$HOME/bin/exit-icons/reboot.svg&quot;:fbtn &quot;loginctl reboot&quot; \
        --field=Poweroff!&quot;$HOME/bin/exit-icons/poweroff.svg&quot;:fbtn &quot;loginctl poweroff&quot; \
        --field=Cancel!&quot;$HOME/bin/exit-icons/close.svg&quot;:fbtn &quot;bash -c yad-cancel&quot;</code></pre></div><p>Yad notification calendar using gsimplecal.</p><div class="codebox"><pre><code>#!/usr/bin/env bash

yad --notification \
	--image=&quot;/usr/share/icons/Papirus-Dark/24x24/apps/office-calendar.svg&quot; \
	--command=&quot;gsimplecal&quot; --text=&quot;$(date)&quot; \</code></pre></div><p>Some scrots</p><p><a href="https://postimg.cc/YjzxJDL7" rel="nofollow"><span class="postimg"><img src="https://i.postimg.cc/YjzxJDL7/2020-12-08-234940-1366x768-scrot.png" alt="2020-12-08-234940-1366x768-scrot.png" /></span></a> <a href="https://postimg.cc/ppVBxQKF" rel="nofollow"><span class="postimg"><img src="https://i.postimg.cc/ppVBxQKF/2020-12-08-235059-1366x768-scrot.png" alt="2020-12-08-235059-1366x768-scrot.png" /></span></a></p><p>EDIT: calendar tooltip <span class="bbc">--text=&quot;$(date)&quot;</span> needs a 60 second loop, not sure how to implement that alongside yad?</p><p>UPDATE 12/12/20 : for yad exit menu using a newer version of yad (on artixlinux), i can call the icons from /usr/share/icons/Papirus as per below.</p><div class="codebox"><pre><code>#!/bin/bash

yad-cancel() {
	kill -USR1 $YAD_PID
}

export -f yad-cancel

yad --no-buttons --close-on-unfocus --width 500 --height 50 --form --columns=5 --borders=10 --center --on-top \
        --field=&#039;!database-lock!lock&#039;:fbtn &quot;xscreensaver-command -l&quot; \
        --field=&#039;!application-exit!logout&#039;:fbtn &quot;loginctl kill-user $USER&quot; \
        --field=&#039;!reload!reboot&#039;:fbtn &quot;loginctl reboot&quot; \
        --field=&#039;!system-shutdown-panel!poweroff&#039;:fbtn &quot;loginctl poweroff&quot; \
        --field=&#039;!button_cancel!cancel&#039;:fbtn &quot;bash -c yad-cancel&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (dice)]]></author>
			<pubDate>Tue, 08 Dec 2020 13:56:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=26158#p26158</guid>
		</item>
	</channel>
</rss>
