Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 Re: CrunchBang Talk » config files in Crunchbang » Today 03:25:39

If you use compositing you might want to tweak ~/.config/compton.conf

Others that sometimes come up: (all in ~/)
.Xdefaults and/or .Xresources

and adding
gives you some more tweaks

None of these are necessary to edit, but if you have some free time and google a bit you might find something interesting.

#2 Re: Help & Support (Stable) » mplayer2 icon on tint2 » Today 03:14:11

Nili, try the .deb file which Ohnonot linked to, it's a version or two older but it's working fine for me on #! Waldorf. Just right-click the file and choose gdebi to open it.

Choose the amd64 or i386 .deb file, depending on your machine.

#3 Re: Tips, Tricks & Scripts » Change Your Application's (ugly) Taskbar Icon Programmatically! » Yesterday 02:39:14

Hi ohnonot, I've been playing around with this a bit, and googling a bit. Can I make a couple of comments/suggestions? I've only used this with dillo so far, so forgive me if there are major snags in other situations.

1) Getting the PID of the app. The wrapper script has it in $!, which is 100% reliable while $(pidof "$APP" | awk '{print $1}') may not be in all cases. The wrapper could pass the PID to seticon as an argument.


/usr/bin/subl "$@" &
sleep 1
seticon "sublime_text" "$icon" "$PID"

2) This is incompatible with 1) unfortunately, but if you keep the main app at the end of the script, and fork off the icon-setting in a subshell with sleep, then you can launch command with exec. This means fewer processes remain, and in particular the wrapper script with the same name as command disappears, simplifying searching for ids.


(sleep 1;seticon "sublime_text" "$icon") &
exec /usr/bin/subl "$@"

3) After looking here I checked xdotool and it will give you a list of window ids matching a given name. You can use xseticon on each of those with a simple for loop, which seems to accomplish the same thing as the seticon script with rather less code. Timewise, as someone on that page mentioned, it may actually be slower but with a sleep of 1s, an extra 50ms might not matter too much.

for i in $(xdotool search --name $name);do xseticon -id $i "$icon";done

4) Unfortunately, not all apps report their PID to the window manager, as I found with dillo. (That was why seticon broke on line 35.) It might be better to give up on checking PIDs altogether, and just use names or classes to pin the app windows down?

#4 Re: Help & Support (Stable) » How to get a process in foreground again? No "jobs" available... » Yesterday 01:58:42

willobst wrote:

The command "jobs" does not bring any results, just a new line in my terminal.

That means that terminal had no background jobs. The command did its, er, job... If it wasn't available you'd have got an error message.

Meanwhile, Head_on_a_Stick's link looks interesting. smile

#6 Re: Tips, Tricks & Scripts » Change Your Application's (ugly) Taskbar Icon Programmatically! » 2014-10-29 04:27:58

PS Unfortunately dillo doesn't disclose its PID to these x-manipulator utilities which seemed to break seticon. sad

Still, the combination of xdotool and xseticon alone seems to do it for multiple windows, with dillo at least:

(sleep 0.3;for i in $(xdotool search --name dillo);do xseticon -id $i "$icon";done) &
exec /usr/local/bin/dillo "$@"

Maybe there would be issues in other cases?

#7 Re: Tips, Tricks & Scripts » Change Your Application's (ugly) Taskbar Icon Programmatically! » 2014-10-29 04:01:01

Ohnonot thank you for this, it scratches an itch I'd been leaving undealtwith for a while.

The offender for me was dillo, the minimal browser. Even after putting icons in all the approved freedesktop places I got the default icon only. xseticon was the fix.  cool

In my particular case the wrapper could be reduced to this:

(sleep 0.1;xseticon -id $(xdotool search --name dillo)  "$icon") &

But it only works for a single instance. neutral

#8 Re: Tips, Tricks & Scripts » Script Help » 2014-10-29 02:18:34

I think you want the 'terminator -e' outside the script itself.
Try changing the script back to its original form, then call it from another terminal with

terminator -e /path/to/script

#9 Re: Tips, Tricks & Scripts » Script Help » 2014-10-28 02:31:17

You don't need 'exec'.
Exec has it's own special effect, which you should read up on, but the rest of the script wouldn't be run!


on it's own line should work.

#10 Re: Tips, Tricks & Scripts » Script Help » 2014-10-28 01:21:31

aah... I think it's because the only thing being executed in terminator is "screenfetch". When that's done terminator closes and the rest of the script is run, without a terminal.

Try calling the whole script in terminator, from autostart eventually, but to test you could run 'terminator -e myscriptsname' in another terminal window.

And edit your script to call screenfetch directly instead of in terminator.

#13 Re: Help & Support (Stable) » How to randomly select and copy mp3 files to an SD card? » 2014-10-25 08:23:38

^yes you're quite right of course. Especially if you're doing something related to your system you need to be very careful whose code you use, and make big efforts to understand it first.

To be honest, I'm thinking more about things like config files for conky, tint2, compton... It can take a long time to get to grips with all the syntax and somebody's working example can make a good starting point for hacking.

That said, although pidsley's script breaks on filenames with spaces (the BBQ people abhor such things anyway) my own code posted above will handle filenames with spaces and linebreaks.  cool

I think it's important to try to write scripts that can stand up to anything that's thrown at them; not everything will always be under your control.

#15 Re: Tips, Tricks & Scripts » working, portable openbox menu gen. available » 2014-10-24 09:51:54

rmoe wrote:

I for one find icons useful. Not so much for mere attractivity but because they are an additional - and ergonomically powerful - element to quickly guide me through menus.

Me too, to be honest. But it depends on what the price will be... smile

#16 Re: Help & Support (Stable) » Pentium III 800MHz 128MB RAM 20GB HDD » 2014-10-24 09:47:01

If you really can't get any more RAM, run htop in a terminal and click "MEM%" at the top to see what apps and processes are using the most memory. It might give you some ideas for things to get rid of...

#17 Re: Help & Support (Stable) » How to randomly select and copy mp3 files to an SD card? » 2014-10-24 09:37:07

ohnonot wrote:
hooliganshark wrote:

Being lazy I am usually too ready to just copy paste....

if you do that only half understanding what it actually does you might easily create more work for yourself instead of less.

@ohnonot you're quite right of course, but we all have our learnig methods and mine, especially with something I've only just started dabbling with, is to take a piece of someone else's code that works and does something vaguely similar to what I'm trying to achieve - then change it here and there and see what happens. If it breaks I try to find out why, go back a step, try again...

Yes it's probably a longer process than doing all the reading first, but I find it more fun. smile

#18 Re: Off Topic / General Chat » the cool random internet stuff thread 1.0 » 2014-10-20 03:07:01

ohnonot wrote:

mysogyny/sexism is a sad & strangely retro (or should i say de-generate) internet phenomenon.

Really. I thought we had moved on from that years ago. neutral

#19 Re: Off Topic / General Chat » the cool random internet stuff thread 1.0 » 2014-10-20 03:01:11

This Bill Gates email has been available since 2008 and posted on many blogs, but I only found it today. Hilarious! Next time you get caught up in a Windows vs Linux discussion you can throw this in: … mail-rant/

...not that anyone here would want to get involved in any flame wars of course - just good-natured banter, right?  tongue

#20 Re: Help & Support (Stable) » How to randomly select and copy mp3 files to an SD card? » 2014-10-20 02:35:29

It just so happens, pidsley on the LinuxBBQ forum published a script to do this very thing:

Unfortunately, as he pointed out, pidsley's script, and most of the code on that stackoverflow page, breaks if file names have spaces or line breaks in them. Not a problem if you choose filenames yourself, but if they come from outside, who knows what kind of names they have?

I played with it a bit - I'm still working on the final script - but here are some snippets that might possibly help:

shopt -s globstar nullglob nocaseglob
list=( $SRC/**/*.mp3 )
shopt -u globstar nullglob nocaseglob

This puts all the mp3 filenames in the directory SRC into the array list.
Now ${!list[@]} contains all the array indices - no spaces, just integers. You can do

shuf -e ${!list[@]}

to get a randomized list of all the indices, which you can then use to access the filenames in random order. If DEST is the path to the destination folder on the card and MAX_SIZE is the maximum total size in kb then my script does something like this:

for i in $(shuf -e ${!list[@]}); do # shuffle indices
    tsize=$(($(du -c "$DEST" | awk '/total/{print $1}') + $(du "$song" | awk '{print $1}')))
    [[ $tsize -gt  $MAX_SIZE ]] && {
        break # stop if would go over max size
    cp "$song" "$DEST/$(printf 'mix%03d-' $n)${song##*/}" # add prefix to stop system from undoing randomness
    echo "added $n $song"

A numbered prefix is added to the names on the card so that the system at some point doesn't try to reorder them based on their names, undoing the randomness.

A bit bloated, but might give you some ideas. smile
edit Took out an unnecessary complication.

#21 Re: Tips, Tricks & Scripts » working, portable openbox menu gen. available » 2014-10-19 03:06:13

Thank you rmoe, that new version works nicely, and without icons the output comes in 38ms as opposed to 63ms before (even though I wasn't using the icons anyway).

The speed is really a main attraction here because it means there's no need to update a cached menu when apps are added or removed from the system. Just call the script when you need it.  cool

About icons - I can see why the intricacies and inconsistencies of the way they are provided will annoy you, or anyone... but - and I mean this in a totally positive way - if the user has to manually set up the links for icons of the apps they install, then some of the point of an auto-updating menu is lost.

There are already a number of much bulkier menus (gnome, xfce, lxde...) which go through all those icon folders and come up with an iconified menu, at the cost of speed and system load. If you can hone your script to cover all the corner cases and fill out the menu with all its icons, then that's fantastic! If not, it has a valuable role as a nice text-only menu which takes up no RAM when it's not used.

#22 Re: Off Topic / General Chat » What is the ideal partition? » 2014-10-16 02:24:23

May be wrong, but is 500MB enough for /tmp? What if you were doing some big media conversion process for example?

#23 Re: CrunchBang Talk » strange nvidia adventures using backports on wheezy » 2014-10-13 00:55:46

Sector11 wrote:

Also ... couldn't one just put the nvidia driver on hold?

I think the problem there would be that the new backports kernel doesn't support the old driver.

#24 Re: Tips, Tricks & Scripts » working, portable openbox menu gen. available » 2014-10-12 06:49:58

Thanks - the current version now works OK, though only about 1/2 the items get icons. No problem (for me) I don't use them anyway. It's a nice little text-based menu and is fast enough not to need caching, at least on this machine, so the menu generated is always up to date.  cool

#25 Re: Tips, Tricks & Scripts » working, portable openbox menu gen. available » 2014-10-12 05:15:22

Thank you for that, rmoe! It's working nicely for me in text-only mode, which is what I normally use, but not with icons. In the interests of science I enabled icons in openbox but they aren't being displayed. Here's a snippet of the code which obamenu is giving me:

<menu id="openbox-Office" label="Office"  >
<item icon="/usr/share/pixmaps//usr/share/pixmaps/evince.xpm" label="Document Viewer"><action name="Execute"><command><![CDATA[evince]]></command></action></item>
<item label="LibreOffice Draw"><action name="Execute"><command><![CDATA[libreoffice --draw]]></command></action></item>

As you can see, the string /usr/share/pixmaps/ is being doubled, and icons from /usr/share/icons/Faenza-CrunchBang/categories/24 aren't being output at all.
Here's my config section in the script:

applications_dirs = ("/usr/share/applications","/home/john/.local/share/applications" )
image_dir_base = "/usr/share" # without "pixmaps" -/usr/local/share in FreeBSD, /usr/share on linux
icon_Theme = "Faenza-Crunchbang"
image_cat_prefix = "applications-"
application_groups = ("Office",  "Development",  "Graphics", "Internet",  "Games", "System",  "Multimedia",  "Utilities",  "Settings")
group_aliases = {"Audio":"Multimedia","AudioVideo":"Multimedia","Game":"Games", "Utility":"Utilities", "GTK":"",  "GNOME":""}
ignoreList = ("evince-previewer", "Ted",  "wingide3.2", "python3.4", "feh","xfce4-power-manager-settings" )
terminal_string = "urxvt -e"         # your favourites terminal exec string

Anyway, it's fine for me as it is, but you might want to have a look at those icons. smile

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo