LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


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.
Uncategorized Entries with no category
Old

Semi-auto-generated, nicely formatted, apropos-like list of your custom bash functions

Posted 10-01-2015 at 12:35 AM by the dsc (linux-related notes)

Code:
bold=$(tput bold)
normal=$(tput sgr0)

lsfunctions ()
{
tail -n+10 /path/to/custom-bash-functions | grep "()" | sort | sed 's|(.*#||'  | sed "s|^|${bold}|;s|\ |${normal}\ |"
}
↑ Change the number "10" to whichever line you want to start grepping the functions

"lsfunctions" would be like "apropos /usr/bin/*", or whatever really works, but restricted to your custom...
Member
Posted in Uncategorized
Views 1563 Comments 0 the dsc is offline
Old

Collection of random small tricks

Posted 09-26-2015 at 08:40 PM by the dsc (linux-related notes)
Updated 01-16-2024 at 08:28 PM by the dsc (adding more trickery)

☻☻☻ Pipeing youtube-dl output to a given player (and having it as a mini-script)

Code:
youtube-dl -f ${2:-5} $1 -q -o - | mpv -
The first parameter is the youtube url, for a single video, and the second, optional, the quality code, like "best", "worst", or a given number. The default there (5) is the 240p flv.

Just "mpv youtube-URL" was supposed to work, but isn't working right now for me. It says the youtube-dl version is old,...
Member
Posted in Uncategorized
Views 2488 Comments 4 the dsc is offline
Old

KDE hidden command line tools

Posted 09-17-2015 at 02:03 PM by the dsc (linux-related notes)
Updated 09-24-2015 at 08:02 PM by the dsc

Haven't checked yet, posting as a "shared bookmark" and to myself:

http://www.bramschoenmakers.nl/node/610.html

I'm particularly interested in "kde-move". I've actually came up with bash-script approximations to the functionality of auto-renaming the moved files when the target directory has files with the same file names, but I've only made something that just does that by default, whereas KDE can do that but also allows one to compare and rename,...
Member
Posted in Uncategorized
Views 1506 Comments 0 the dsc is offline
Old

Adding a "copy image to clipboard" editor (not really) to geeqie

Posted 09-07-2015 at 01:22 AM by the dsc (linux-related notes)
Updated 11-17-2016 at 03:46 PM by the dsc (UPDATE!)

Edit: I've just found a method that seems much simpler and more lightweight

The copy to clipboard editor can be just xclip! (Therefore one of my first statements in the first version of this post is probably false, and possibly was wrong even then).

Code:
xclip -selection c -t image/jpg < "%f"
It doesn't matter that the source isn't a jpeg, you can even replace it for png, it's probably an on-the-fly reencoding or something, I'm not sure.
...
Member
Posted in Uncategorized
Views 2281 Comments 0 the dsc is offline
Old

[solved?] New GTK2 bug? Maybe it's a QtCurve bug. Theme changes randomly

Posted 08-30-2015 at 03:23 PM by the dsc (linux-related notes)
Updated 11-21-2015 at 06:22 PM by the dsc
Tags bugs, theme

UPDATE: whatever happened before, it seems that now it can be partly solved by simply commenting out the font-related lines in /usr/share/themes/QtCurve/gtk-2.0/kdeglobals (not to be confused with KDE's own file with the same name!).

After a while (after a massive upgrade) the randomness of the thing stopped, the correct theming consistently fails. More evidently fonts, icon theme, and colors (including tooltips' colors). I'm not sure the widget's "design" is also affected,...
Member
Posted in Uncategorized
Views 1272 Comments 3 the dsc is offline

  



All times are GMT -5. The time now is 06:02 AM.

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