/fglt/ - Friendly GNU/Linux Thread

Welcome to /fglt/ - Friendly GNU/Linux Thread.

Users of all levels are welcome to ask questions about GNU/Linux and share their experiences.

*** Please be civil, notice the "Friendly" in every Friendly GNU/Linux Thread ***

!!! GUIX 1.0.1 is released gnu.org/software/guix/blog/2019/gnu-guix-1.0.1-released/ !!!

Before asking for help, please check our list of resources.

If you would like to try out GNU/Linux you can do one of the following:
0) Install a GNU/Linux distribution of your choice in a Virtual Machine.
1) Use a live image and to boot directly into the GNU/Linux distribution without installing anything.
2) Dual boot the GNU/Linux distribution of your choice along with Windows or macOS.
3) Go balls deep and replace everything with GNU/Linux.

Resources: Please spend at least a minute to check a web search engine with your question.

$ man %command%
$ info %command%
$ %command% -h/--help
$ help %builtin/keyword%

Don't know what to look for?
$ apropos %something%

Check the Wikis (most troubleshoots work for all distros):
wiki.archlinux.org
wiki.gentoo.org

Jow Forums's Wiki on GNU/Linux:
wiki.installgentoo.com/index.php/Category:GNU/Linux

>What distro should I choose?
wiki.installgentoo.com/index.php/Babbies_First_Linux
>What are some cool programs?
wiki.archlinux.org/index.php/list_of_applications
directory.fsf.org/wiki/Main_Page
>What are some cool terminal commands?
commandlinefu.com/
cheat.sh/
>Where can I learn the command line?
mywiki.wooledge.org/BashGuide
grymoire.com/Unix/
overthewire.org/wargames/bandit/
>Where can I learn more about Free Software?
gnu.org/philosophy/philosophy.html
>Which web browser performs best on GNU/Linux?
linuxreviews.org/firefox-vs-chromium/

/fglt/'s website and copypasta collection:
fglt.nl && p.teknik.io/wJ9Zy

/t/'s GNU/Linux Games: Previous thread:

Attached: 1514417490756.jpg (1024x1347, 602K)

Other urls found in this thread:

stackoverflow.com/questions/25289482/installing-jdk8-on-ubuntu-unable-to-locate-package-update-doesnt-fix
blogs.unity3d.com/2019/05/30/announcing-the-unity-editor-for-linux/
twitter.com/SFWRedditVideos

first for freetards are dildoheads
based dildoheads

Second for first is wrong.
This post can’t be countered

Third for Debian Stable + Xfce is maximum comfy.

I'm working on a script that opens or reloads specified document in mupdf. It that can be used in
1) Makefiles for pdf, for example
INPUT=in.md
OUTPUT=out.pdf
PANDOCFLAGS=-V geometry:margin=1in

make:
pandoc "$(INPUT)" $(PANDOCFLAGS) -o "$(OUTPUT)" && mupdf_open_or_reload.sh "$(OUTPUT)"


2) Terminal, to open the file quickly.
I have the script aliased as mup for quicker use.
#!/bin/bash

if [[ "$#" -ne 1 ]]; then
echo 'USAGE: mupdf_open_or_reload.sh '
exit 1
fi

# get filename w/o extension
filename=$(basename "$1")

# get $PID of existing instance
PID=$(pgrep -u $USER -xf "mupdf.*$filename")
if [[ -z $PID ]]; then
# start mupdf, wait for the window to be created
mupdf "$1" & disown
sleep 0.1
#PID=$!
# make window visible in case it got stuck under other windows, adjust to screen height
#xdotool windowraise $(xdotool search --pid $PID) key H
xdotool windowraise $(xdotool search --name "$filename") key H
else
# make window visible in case it got stuck under other windows
#xdotool windowraise $(xdotool search --pid $PID)
xdotool windowraise $(xdotool search --name "$filename")
kill -s HUP $PID
fi

There are three issues with the script:
1) windowraise doesn't seem to work on KDE and I don't want to use activate or focus, as it'd make no sense to my use case.
2) I'm using way too many tools, I feel like it could be improved significantly. You can see the 3 commented lines I wanted to use instead of xdotool search, but for some reason they don't work with mupdf.
3) sleep 0.1 is just dumb, it may or may not work
I'm looking for directions on how to fix / improve it.

I'm trying to make Conky display the number of unread messages in my email inbox. I have a Conky object that represents that number, and I can make it display "0 unread messages", "1 unread messages", "2 unread messages", etc. What I would like is to make it say "message" instead of "messages" when there is only one. That is quite a common occurrence, and the poor grammar is not very aesthetic.

Conky allows you to run Lua scripts from within the configuration file that can do processing on Conky objects, and I could generate the correct output that way, but I do not know how to feed it back to Conky. The Conky documentation suggests writing directly to the screen from the Lua script using Cairo, but Conky will not compile with that feature enabled.

Conky also includes an object that displays the output of any program, but I don't think that Lua scripts run this way have access to Conky objects, and thus there is so simple way for such a program to know the number of unread messages. If it was possible to pass a conky object to a script as input that would solve my problem, but I have not been able to figure out how to do that.

It seems that I can either get the necessary info into a script but not out of it, or vice versa. Does anybody know what I should do?

This, freetards are not based. Fuck freetards, acidic fucks. Glad there are people like you who speak the truth.

while no mupdf window; sleep; done

Just got a job as a redhat sysadmin; what are the essential resources

install debian