x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Helpful Linux Script, Perhaps, for Small-screened Computers

Jake Page Icon Posted 2019-03-05 10:51 PM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,826
Location:
Choking on the stench of ambition in Washington DC
Status:
Since some of us clench our HPC's with one hand while reaching out for alternatives with the other, here's a script that might help Linux users find more screen real estate on their GPD Pockets, etc.

The overarching issue: to save space, embed your panel *in* the window title bar:

https://imgur.com/a/Yrvhzh7

The Xubuntu panel is the only panel I could find that is both transparent and can be run directly in the window title bar. So that gives you more space, but a non-static window, especially browsers, will send the lengthy text of its site deep into your panel's read-outs. This is a script that renames the browser's window to prevent the text spillage:

#!/bin/sh
( sleep 1
while pgrep chrome
do xdotool search --name Chrome 2>/dev/null |
while read id
do xdotool set_window --name "Chrome" $id
done
sleep 1
done
) &
google-chrome-stable

Your window will be renamed, no matter where you browse, to "Chrome," safely tucked on the left side of the window title bar. Then the script will start Chrome. [My posted image is "Chromium" but I use this script for a variety of non-static windows simply changing the grep search, xdotool's renaming, and the script's last command]

This script also kills itself upon exiting the browser and that was no small feat for my limited programming skills.

I've been going to script forums to solicit a ton of needed help and those veterans are amazing. I mean, I can throw a baseball but so could Sandy Koufax--does that mean we're the same? I think not. At any rate, they helped me through this, even if this script appears so basic.

I've wondered if Autohotkey, one of the world's great Windows programs, could perform the same on the Microsoft side of non-static windows, but I so rarely use Windows on these small computers...

I installed Xubuntu's panel on Mate without problem, meaning I could keep the Mate desktop. Because I didn't want to run "mate-panel" as well, I had to rename it to mate-panel-old to keep it from restarting after it was killed.

That's ugly but if you try to uninstall mate-panel, it wants to uninstall the Mate desktop as well, which I don't want to do. If other Linux users can think of a cleaner approach, I'd be much obliged.

Obviously, if you're already running Xubuntu, everything above will work with no complaint.

Jake
 Top of the page
Mjolnir Page Icon Posted 2019-03-06 11:46 AM
#
Avatar image of Mjolnir
Factorite (Elite)

Posts:
210
Location:
United States
Status:
Nice work. If you run the browser window at full screen does the panel still show?
 Top of the page
Jake Page Icon Posted 2019-03-06 1:15 PM
#
Avatar image of Jake
Moderator
H/PC Vanguard

Posts:
2,826
Location:
Choking on the stench of ambition in Washington DC
Status:
Thanks--and no, fn-11 or the equivalent will continue to hide the panel.

Jake
 Top of the page
Jump to forum:
Seconds to generate: 0.171 - Cached queries : 60 - Executed queries : 9