Register a domain and help support LQ
Go Back > Blogs
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.

It should be possible to add things like "while read $var" to "misspellings"/errors of spell/grammar checkers

Posted 03-31-2016 at 07:40 AM by the dsc (linux-related notes)

It would considerably reduce the odds of temporary insanity.
Posted in Uncategorized
Views 122 Comments 0 the dsc is offline

Mapping the tablet to monitor with the aid of an inkscape, plus fine-grained mouse accuracy

Posted 03-29-2016 at 06:05 PM by the dsc (linux-related notes)
Updated 03-29-2016 at 06:10 PM by the dsc
Tags mouse, tablet, wacom

I'm speaking of the wacom/genius/aiptek "drawing/writing" kind of tablets, not the "big smartphone", mini-PC-embedded-with-touchscreen type, even though cintiqs and the like blur the distinction a bit.

Without a GUI to actually map the correspondence between the tablet and monitor, one method is to first create an image that is just two rectangles: one representing the full area of your tablet, and another rectangle to the proportion you want to use of the tablet...
Posted in Uncategorized
Views 266 Comments 0 the dsc is offline

N00b method to toggle some verbosity on command for bash scripts

Posted 03-28-2016 at 11:32 PM by the dsc (linux-related notes)
Updated 03-28-2016 at 11:34 PM by the dsc
Tags bash, newbie

Just something I came up with that is probably not how actual programmers/scripters(?) would advise, specially the parameter/flag thing which is beside the point here.

if [[ $1 == "v" ]] ; then

echo $@


:    # ":" is a "do nothing" command



echo normal output

ver verbose output $a
Posted in Uncategorized
Views 197 Comments 0 the dsc is offline

Replace trash-cli with kioclient move $@ trash:/ for cross-partition trashing

Posted 03-27-2016 at 09:17 PM by the dsc (linux-related notes)
Tags trash

However arguable, some people want to trash by moving into another partition's trash folders. The linux/unix/whatever trash specifications theoretically prohibit that, but KDE's implementation doesn't. So a linked or bind-mounted trash into a different partition will behave normally, except it will move the file across, obviously.

If you also use trash-cli, which won't work with such hacks, it can be replaced with the kioclient command, that in turn can be scripted or perhaps even...
Posted in Uncategorized
Views 149 Comments 0 the dsc is offline

New file name generator script/function, to avoid overwrites w/o user input

Posted 03-27-2016 at 07:11 PM by the dsc (linux-related notes)

Usage examples:

cp/mv/ln/etc file11.txt $(newname "/some/path/file11.txt")

cp/mv/ln/etc file11.txt $(newname "/some/path/whatever.txt")

If there's a file11.txt or whatever.txt already there, it will rename automatically to file11(1).txt or whatever(1).txt, and (N+1) from then on.

The whole path/name must be between quotes because of spaces and such things.

May be dangerous and somehow make you lose files...
Posted in Uncategorized
Views 207 Comments 0 the dsc is offline


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

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