Dialog Tools – eirenicon llc https://eirenicon.org Working together for success! Fri, 22 May 2020 22:32:13 +0000 en-US hourly 1 https://wordpress.org/?v=6.7 https://i0.wp.com/eirenicon.org/wp-content/uploads/2019/03/cropped-eirenicon-1.png?fit=32%2C32&ssl=1 Dialog Tools – eirenicon llc https://eirenicon.org 32 32 61586100 Pop!OS my adventure(s) https://eirenicon.org/knowledge-base/popos-my-adventures/ Fri, 22 May 2020 17:13:25 +0000 https://eirenicon.org/?page_id=1934 Like many of my articles, this is a brief tutorial on some useful (to me) tweaks I have added to a new distro.  Be advised: this is my first foray back into the world of an Ubuntu-based distro in some 12+ years.  Yes, I used Ubuntu in the long ago and far away.

The reason I’m back playing in the *buntu sandbox has to do with a ‘new’ laptop I bought from Dell.  This little ‘bugger’ (laptop) is really not happy with arch distros or even Debian distros.  However, my new Inspiron is Ubuntu certified!  (Which is my normal test for qualifying a laptop for use in the Linux world; oh well, so much for that plan.)

Nonetheless, my Inspiron (problem child) does work well with Ubuntu.  Given I like tilers, I thought Pop! OS (a gnome-based tiler) would be fun to use.  And, it is. I like it quite a bit; although I have to admit, the OS is a tad resource hungry. But then, memory is cheap and my laptop has 24GB.

The specs on my machine running a bunch of open windows including Firefox, gnome-terminal, geany & calibre…may be found at the end (bottom) of the page.

Moving along to a couple small tweaks I have made on my Pop!OS install, and why I have chosen to add these ‘custom’ features.

Keybindings Viewer

First, I have added a Zenity dialog which provides a listing of my tiling keybindings. In this case, these are native Pop!OS tiling funtions. I use this Zenity dialog (and other similar dialogs) on my tilers, because I am old, feeble and as Winnie the Pooh says:

“When you are a Bear of Very Little Brain, and you Think of Things, you find sometimes that a Thing which seemed very Thingish inside you is quite different when it gets out into the open and has other people looking at it.”

— A.A. Milne, Winnie-the-Pooh

This is what the function looks like:

The code for the Zenity dialog is simple html:

Pop!OS shortcuts-keybindings

The keybinding I  use is for the F2 key.  and is:

zenity --text-info --width=800 --height=766 --html --filename=/home/mark/.local/share/help-files/shortcuts.html --ok-label="Quit"

The next function I added to my install is a rofi dialog that lists all active tasks. Yes, there is already such a function provided natively, I just like mine better. So, now I have two! Yay, me (as my daughter would say).

Workspace Viewers

Here’s what they look like…
Native Pop!OS Workspace viewer:

My rofi pop-up:

Here’s the keybinding to get rofi to work…
rofi -modi window -show window -show-icons -sidebar-mode

I re-wrote the rofi .rasi code so that the rofi layout matches my desktop, see:

the rofi code/ template.

Conky

The last item I have added (I’m sure I’m not done yet…) is a conky for the desktop. I love knowing what’s ‘going on’ on my machine(s).

Here’s what it looks like:

I will assume you know that you need to install conky and place it in your autostart in order to have it magically appear. You may need to tweak some of the settings to make them work correctly on your hardware also. Here’s the code for the conky:

conkyrc

Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!

Here are the specs I promised:

mark@pop-os:~$ inxi -Fxxxz
System:
Kernel: 5.4.0-7629-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
Desktop: Gnome 3.36.2 wm: gnome-shell dm: LightDM 1.30.0
Distro: Pop!_OS 20.04 LTS base: Ubuntu 20.04 LTS Focal
Machine:
Type: Laptop System: Dell product: Inspiron 5493 v: N/A serial:
Chassis: type: 10 serial:
Mobo: Dell model: 0M4FW1 v: A00 serial: UEFI: Dell v: 1.8.0
date: 03/24/2020
Battery:
ID-1: BAT0 charge: 39.9 Wh condition: 39.9/42.0 Wh (95%) volts: 13.0/11.4
model: BYD DELL 1VX1H9A type: Li-ion serial: status: Full
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M510
serial: charge: 55% (should be ignored) rechargeable: yes
status: Discharging
CPU:
Topology: Quad Core model: Intel Core i5-1035G1 bits: 64 type: MT MCP
arch: Ice Lake rev: 5 L2 cache: 6144 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
bogomips: 19046
Speed: 1215 MHz min/max: 400/3600 MHz Core speeds (MHz): 1: 978 2: 913
3: 962 4: 971 5: 1033 6: 929 7: 941 8: 941
Graphics:
Device-1: Intel vendor: Dell driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:8a56
Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa
compositor: gnome-shell resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel UHD Graphics (ICL GT1) v: 4.6 Mesa 20.0.4
direct render: Yes
Audio:
Device-1: Intel Smart Sound Audio vendor: Dell driver: snd_hda_intel
v: kernel bus ID: 00:1f.3 chip ID: 8086:34c8
Sound Server: ALSA v: k5.4.0-7629-generic
Network:
Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell
driver: r8169 v: kernel port: 3000 bus ID: 01:00.0 chip ID: 10ec:8136
IF: enp1s0 state: down mac:
Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
vendor: Dell driver: ath10k_pci v: kernel port: 3000 bus ID: 02:00.0
chip ID: 168c:0042
IF: wlp2s0 state: up mac:
Device-3: Qualcomm Atheros type: USB driver: btusb bus ID: 1-10:6
chip ID: 0cf3:e009
Drives:
Local Storage: total: 990.18 GiB used: 635.79 GiB (64.2%)
ID-1: /dev/nvme0n1 vendor: Silicon Power model: SPCC M.2 PCIe SSD
size: 953.87 GiB speed: 31.6 Gb/s lanes: 4 serial: rev: ECFM22.5
scheme: GPT
ID-2: /dev/sda type: USB vendor: Generic model: SD MMC MS PRO
size: 30.09 GiB serial: rev: 1.00 scheme: MBR
ID-3: /dev/sdb type: USB model: Kindle Internal Storage size: 6.22 GiB
serial: rev: 0401
Partition:
ID-1: / size: 59.10 GiB used: 15.00 GiB (25.4%) fs: ext4
dev: /dev/nvme0n1p4
ID-2: swap-1 size: 2.03 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/dm-0
Sensors:
System Temperatures: cpu: 68.0 C mobo: N/A
Fan Speeds (RPM): cpu: 0
Info:
Processes: 285 Uptime: 3h 53m Memory: 23.26 GiB used: 3.67 GiB (15.8%)
Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash
v: 5.0.16 running in: gnome-terminal inxi: 3.0.38
]]>
1934
Build & Maintain Help Across Distinct Desktops- Part 2 https://eirenicon.org/knowledge-base/build-maintain-help-across-distinct-desktops-part-2/ Wed, 27 Nov 2019 15:29:25 +0000 http://eirenicon.org/?page_id=1714 To begin this second post of shared help series,  I will provide a bit of detail on the environment this help system is designed to support. You should consider this description as an English language version of the use-case for this tutorial (in all its parts).

I have built the base system to support three different, distinct, and unique desktop arrangements and toolsets; these include:

  1. xfce4.14 with zentile (to provide tiling functions)
  2. bspwm (Binary Space Partitioning Window Manager)
  3. Herbst Luft Window Manager (herbstluftwm ~ hlwm)

Across the three desktops there exists a common base of applications including:

  • thunderbird (email)
  • firefox & chromium (browsers)
  • calibre (eBooks)
  • kitty multiplex-terminal
  • software development tools (ie. geany, ghostwriter, rofi, atom, zenity, yad, etc.)
  • graphics tools (ie. gimp, viewnior, gthumb, etc.)
  • Multi-system synchronization and dynamic backup via Dropbox

In order to make certain that users are able to both “access” and remember “how-to use” most of the complex tools across the differing desktops, I have elected to build a set of common “help-dialogs”.

I, also, elected to create as many consistent Keybindings as I dared. But beware!  Sometimes, “it is not nice to fool mother nature”. There are some situations where Keybindings are by nature linked to particular environments; and they are not easily or wisely altered. If you know which ones to avoid then don’t mess with them. Sadly in my experience, the best method for uncovering those “incompatible little buggers” is to watch your system crash, when you tread where you ought not.

After a lot of crash & burn experience, I believe the commonality I have here works well; at least it does for these Desktops (bspw, hlwm, and xfce).  Be advised, your mileage may vary when you do this at home.

Each of the dialogs (tools) are accessible from all desktops and operate per specification. They are in fact identical. Each of the Help Dialogs are accessible via Super + a function key. The Super key being the Windows key.  (Note: I do not do things on Apple hardware, sorry.)  Each of the first 6 dialogs presents itself as a Zenity Dialog box.  The last help-aid (Active Applications List) is presented via Rofi and was highlighted in the first post of our little series..

Super + F1 affords access to an Index of Keybinding (Indices). This functions essentially as the Table of Contents for all the Help Dialogs.

Super + F1- Keybinding Index shown on a bspwm Desktop.

Super + F2 provides a guide to all Standard (Common) Application & System Keybindings.

Super + F2- Common Keybindings shown on a bspwm Desktop.

Super + F3 provides guidance to specific/unique bspwm help & Keybindings. (You’ll note that there are internet links.  They actually work, yay.)

Super + F3- bspwm Keybindings shown on an xfce Desktop

Super + F4 offers guidance to specific/unique hlwm help & Keybindings. You will note that there is an internet link.  It, also, functions.

Super + F4- hlwm Keybindings shown on an xfce Desktop

Super + F5 affords guidance to specific/unique xfce4 with zentile help & Keybindings. You will note that there are internet links.  These, also, function. The material here is largely orient towards zentile Keybindings.

Super + F5- xfce-zentile Keybindings shown on an hlwm Desktop

Super + F6 offers a list of Kitty Terminal Keybindings. This is a huge list.  Kitty is one seriously functional multiplex-terminal.

Super + F6- Kitty Terminal Keybindings shohwn on an hlwm Desktop

The Help Dialogs were each built the following toolset.  I don’t know how many approaches and tools I tried before settling on these… too many. The tools I use include:

  • ghostwriter– This tool is used for initial help authoring and basic formatting. I, also, use the tool to export my initial markdown into an html format. Examples of my original markdown files are available here for download.
    Initial Markdown Download Files 
    The contained in this archive in draft form; the html files are revised from this initial markdown work. These files do not match the released html. (Caveat emptor). In development parlance, these are intermediate work products.
  • geany– is used to clean up and improve the Help Dialogs’ html as well as tweak image positioning and hmtl coloring/ formatting for use in zenity. (If you don’t do this then the Zenity popup dialogs will look odd and inconsistent.) Examples of my final html files are available here for download.
    Completed html Download Files
    These files should be usable, if you wish to work from them for your purposes.
  • zenity– is used as the presentation vehicle for the resultant help. The Zenity setup and commands are contained in the code block below.
  • sxhkd– provides the actual Keybindings for the hlwm & bspwm zenity Help Dialogs. Xfce is the odd-one out and requires its own set of links built into the xfce keyboard link function.

For an excerpt of the sxhkdrc code see below.

sxhkdrc code:


# rofi launcher
F1
rofi -modi drun,window,run,keys,ssh -show drun -show-icons -sidebar-mode -location 0  -width 360

# Show Keybinding Index
super + F1
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/keybinding-index.html --ok-label="Quit"

# Shared Keybindings
super + F2
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/shared-keys.html --ok-label="Quit"

# bspwm help
super +F3
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/bspwm-keys.html --ok-label="Quit"

# hlwm help
super + F4
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/hlwm-keys.html --ok-label="Quit"

# xfce-zentile help
super + F5
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/xfce-zentile-keys.html --ok-label="Quit"

# Kitty Keybindings
super + F6
zenity --text-info --width=640 --height=640 --html --filename=/home/mark/.local/share/help-files/kitty-keys.html --ok-label="Quit"

# rofi Active Tasks
super + F12
rofi -modi window -show window -show-icons -sidebar-mode

Now that you have the basics, you are free to embellish on the approach, as you see fit.  I encourage you to try this out; especially if you want help remembering odd tricks because the application options here are quite vast. Enjoy!

If you find tutorials like this useful and/or helpful, please…

or… Support us, get “bling”!

Buy “Cool” Linux “Stuff”.


Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!

 

]]>
1714
Build & Maintain Help Across Distinct Desktops- Part 1 https://eirenicon.org/knowledge-base/build-maintain-help-across-desktops-part-1/ Sat, 23 Nov 2019 17:35:20 +0000 http://eirenicon.org/?page_id=1680 Because my “remembry” (to quote Winnie the Pooh) is not what it used to be, I have begun a project to make it easier for me to access and remember keybindings, get help, etc.  across multiple ‘diverse’ desktops. Currently, I use three distinct desktop configurations: bspwm, hlwm and xfce. My primary work environment & desktop is bspwm.

Note: Although I use & maintain multiple environments, the tools and approaches I share in this series are equally applicable in a single environment.

In order to share and demonstrate how I am addressing this challenge, I have decided to provide and share a set of postings on my journey/adventure through this realm. As always, you are free to learn from and avoid my mistakes, or take the results of my learning and use them wherever you please.

The tools I am using to build this “help access system” include:

  • rofi: (because I like it; and, it is powerful and pretty easy to use)
  • zenity: (because it is better documented than yad… and, I only need uncomplicated/simple functionality.)
  • html: to make the zenity materials visible in a consistent format.
  • markup language (via ghostwriter): to write my help materials ‘simply’ and reformat my help documents into html automagically.

To effectively navigate my multiplex-environment (term invented by me???) one of the first things I need(ed) was an index to all my installed applications.  There are any number of tools that can be used to perform this function.  I chose rofi because it works well on the three desktops I’m using.  I tested, reviewed, tried but elected not to use a menu pop-up (like jgmenu) due to some typical menu limitations which are overcome by rofi.

One feature I wanted/ needed was a searchable listing (menu) of all installed applications. I want my menu listing to update and revise automagically as applications ‘come & go’. I, also, wanted my listing/menu to be theme-able across all of my desktops without the requirement of having to rework it from desktop to desktop.

Here’s the rofi command string that produces the menu:

rofi -modi drun,window,run,keys,ssh -show drun -show-icons -sidebar-mode -location 0 -width 360

Here’s what it looks like on hlwm (it looks the same on my other Desktops, trust me…)

Rofi Menu on hlwm

When I add apps, the menu is updated; when I delete them they are removed.  Rofi looks exactly the same on bspwm, hlwm, and xfce. Side benefits are that it is fast and frugal with respect to resource use.

Another feature  I wanted was the ability to see all active processes across the totality of my workspaces. I have 10 on each of hlwm & bspwm.

The beauty of rofi is that performing this task is simple and the list is active-  meaning I can click on any item to access any listed process. If rofi is installed on your system, entering the following into your terminal will produce the image immediately below.

Here’s the code:

rofi -modi window -show window -show-icons -sidebar-mode

Here’s what you get:

Rofi showing active workspaces on a bspwm desktop.

To invoke the rofi functions, I have created keybindings on all my desktops.  The rofi ‘menu/listing’ above is invoked via the F1 key which is the Help key on many PCs… (I figured I could ‘probably’ remember that one). The show active workspace rofi screen is invoked by Super+F12.  I figured I could remember that but I was wrong… so I had to develop additional help aid to point me to my help.

Yes, I need a lot of help!  More on the “help find help” function in my next posting in this series.

If you enjoy and value this work/article, please…

]]>
1680
YAD (Yet Another Dialog) Scripts/ Examples https://eirenicon.org/knowledge-base/yad-yet-another-dialog/ Fri, 30 Aug 2019 13:04:44 +0000 http://eirenicon.org/?page_id=1501

I have to say, I am a fan of Yad (Yet Another Dialog). I use Yad as my primary “dialog tool” (in bspwm) to manage actual work & task functions like:

  • accessing help (files & notes)
  • easing task work
  • helping me remember all my keybindings (I have more than my little brain can remember)
  • exit my desktop
  • and more..

Here are a couple of images of Yad “at work” on my bspwm Desktop:

Exit the Desktop:

Yad exit the bspwm desktop dialog

Accessing my Keybinding “Helps”

YAD Accessing Kitty (Terminal) Help

Accessing Free Office apps

YAD Free Office Access

Related/ example YAD scripts:

You may find these pages (links) helpful:

]]>
1501
Whiptail (online tutorials etc.) https://eirenicon.org/knowledge-base/whiptail-online-tutorials-etc/ Fri, 02 Aug 2019 14:12:56 +0000 http://eirenicon.org/?page_id=1458 This list is under development. Please let me know of good online tutorials.

]]>
1458
Zenity (online tutorials etc.) https://eirenicon.org/knowledge-base/zenity-online-tutorials-etc/ Fri, 02 Aug 2019 13:57:49 +0000 http://eirenicon.org/?page_id=1453 This list is under development. Please let me know of good online tutorials.

]]>
1453
Yad (online tutorials etc.) https://eirenicon.org/yad-online-tutorials-etc/ Fri, 02 Aug 2019 12:53:29 +0000 http://eirenicon.org/?page_id=1450 This list is under development. Please let me know of good online tutorials.

]]>
1450