LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Precarious work-around to the inability of setting a default pre-selected/focused button on Y.A.D.

Posted 01-31-2024 at 06:11 PM by the dsc (linux-related notes)
Updated 01-31-2024 at 06:17 PM by the dsc
Tags bash, yad

While apparently default button sets like ok/cancel pair or some other that has some additional over those have a default set automatically, so one can just press enter without mouse-clicking the button. But for more custom buttoms it seems that the default focus disappears, and hitting enter does nothing. At least depending on the entirety of the dialog, maybe it has some nonsensical focus on some other area where it doesn't really respond to "enter," like "--picture," maybe...
Member
Posted in Uncategorized
Views 51 Comments 0 the dsc is offline
Old

Ridiculous work-around for kdialog ignoring geometry parameters

Posted 11-30-2023 at 03:55 PM by the dsc (linux-related notes)
Updated 01-29-2024 at 01:25 PM by the dsc

Have kdialog preceeded by (or succeeded after an "&" if the context allows it, and if it's preferable for some reason) a loop that has wmctrl "grepping"/activating" the unique name of the kdialog window, followed by xdotool resizing it, and breaking the loop.

Code:
( while  true ; do
sleep 0.2 # reduces CPU load if the loop never breaks for some reason
wmctrl -a "relevant and ideally unique title for kdialog window"  &&
...
Member
Posted in Uncategorized
Views 126 Comments 0 the dsc is offline
Old

Simple idea for a debug verbosity tool on bash scripts

Posted 09-07-2021 at 09:06 AM by the dsc (linux-related notes)
Updated 08-05-2023 at 08:37 PM by the dsc
Tags bash, debug

I used to just have lots of "echos" around my scripts printing where it is on a loop or whatever, so I have a better idea of whats happening, often somewhat more clear than with "bash -x", even though that also may help, of course. But the odds are that I'd at some point just leave such debug echos there while the script runs on a daily basis on the background, just helping .xsession-errors to become enormous, for no good reason, since it's working and I'm not reading it. And...
Member
Posted in Uncategorized
Views 439 Comments 0 the dsc is offline
Old

Simple script-command to mount partitions by label

Posted 08-15-2021 at 02:43 PM by the dsc (linux-related notes)

Largely based on this answer on askubuntu. I hope nothing atrocious results from some situation where it ends up trying to mount something a given user should not, or something. May require tweaking either the script or one's sudo permissions for the commands doing the hard work, I don't know how "default" my settings are.

Code:
#!/bin/bash

echo ${@} | while read input ; do 

for label in /dev/disk/by-label/${input} ; do 

label=$(basename
...
Member
Posted in Uncategorized
Views 620 Comments 0 the dsc is offline
Old

TheOuterLinux Mμse - An interesting way to make a text-based game using catimg and play

Posted 06-22-2020 at 05:30 PM by TheOuterLinux

Cross-posted from: https://theouterlinux.gitlab.io/Publ...CatimgGame.txt
RSS for website version: https://theouterlinux.gitlab.io/Publ...ticleFeed.atom

The following is a BASH script that with the help of 'catimg' and the 'play' command, you can create a classic text-adventure game but have an image shown just above the text. See notes inside of the script.

Code:
#Discussion URL: https://www.reddit.com/r/TheOuterLinux/comments/esgvmf/catimg_and_play_to_for_textbased_games/.compact
...
LQ Newbie
Posted in Uncategorized
Views 408 Comments 0 TheOuterLinux is offline

  



All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration