WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How can I modify the FluxBox key bindings?  (Read 3304 times)

Offline nil_von_9wo

  • Newbie
  • *
  • Posts: 20
How can I modify the FluxBox key bindings?
« on: November 05, 2012, 06:48:45 AM »
Greetings All,

I'm a TinyCore newbie with very limited Linux experience.

After mucking about with several of Tiny Core Plus's included window's manager, FluxBox seems best to fit my needs and I'm now trying to customize it so it works the way I do... which means setting up the hotkeys.

While I found FluxBox's own great wiki page on Keyboard_shortcuts , I've been having trouble making use of said information.

Specifically, I'm not sure where "~/.fluxbox/keys" was intended to refer to, but I did find a link to the file at "/usr/local/share/fluxbox/keys", which linked to "/tmp/tcloop/fluxbox/usr//fluxbox/keys".

However, when I tried to edit this, I discovered the file is actually read-only (and I have some doubts whether it is persisted between reboots anyway).

* Is this the file I need to edit?  Or where do I find the master? 
* Can I edit the file while already in FluxBox or do I need to get out of FluxBox first?
* How can I make sure my finish file is persisted?


(Note: I've already set the boot line to include "desktop=fluxbox tce=sda7 home=sda7 opt=sda7 restore=sda7 norestore", among other things.)

Best regards,

-Brian

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: How can I modify the FluxBox key bindings?
« Reply #1 on: November 05, 2012, 07:01:16 AM »
Specifically, I'm not sure where "~/.fluxbox/keys" was intended to refer to, but I did find a link to the file at "/usr/local/share/fluxbox/keys", which linked to "/tmp/tcloop/fluxbox/usr//fluxbox/keys".

"~" = the current user's home - i.e. /home/tc by default in tinycore

You can probably copy /tmp/tcloop/fluxbox/usr/local/share/fluxbox/keys to /home/tc/.fluxbox to edit it. Note that the "." in ".fluxbox" makes it hidden and also that you might need to create the folder first.

Offline nil_von_9wo

  • Newbie
  • *
  • Posts: 20
Re: How can I modify the FluxBox key bindings?
« Reply #2 on: November 05, 2012, 07:10:34 AM »
Specifically, I'm not sure where "~/.fluxbox/keys" was intended to refer to, but I did find a link to the file at "/usr/local/share/fluxbox/keys", which linked to "/tmp/tcloop/fluxbox/usr//fluxbox/keys".
You can probably copy /tmp/tcloop/fluxbox/usr/local/share/fluxbox/keys to /home/tc/.fluxbox to edit it. Note that the "." in ".fluxbox" makes it hidden and also that you might need to create the folder first.

Cheers for the fast reply!

I think currently /home is empty, but I'll double check for hidden files.

If I need to copy the fluxbox folder, would I be correct in just copying the inner fluxbox folder instead of the outer one?


-Brian.

Offline nil_von_9wo

  • Newbie
  • *
  • Posts: 20
Re: How can I modify the FluxBox key bindings?
« Reply #3 on: November 05, 2012, 07:43:58 AM »
I think I can use a little more help.

The files were where you expected them to be, so that is fine, but now I am trying to set up the bindings to execute commands.

Specifically, I want to set up four bindings:

Control Mod1 j :ExecCommand Terminator
Control Mod1 f :ExecCommand Nautilus
Control Mod1 w :ExecCommand Chromium
Control Mod1 e :ExecCommand sublime_text

The first three applications were installed wherever TC's package manager put them.

The fourth, I downloaded from Sublime Text 2's website, untar'd into the tce/optional directory, within a subdirectory called "SublimeText".  I tried creating a link to this file in /usr/bin, but that link keeps disappearing.


Any further tips to get these hotkeys working?


Best regards,

-Brian.


Offline nil_von_9wo

  • Newbie
  • *
  • Posts: 20
Re: How can I modify the FluxBox key bindings?
« Reply #4 on: November 05, 2012, 08:26:35 AM »
Specifically, I want to set up four bindings:

Control Mod1 j :ExecCommand Terminator
Control Mod1 f :ExecCommand Nautilus
Control Mod1 w :ExecCommand Chromium
Control Mod1 e :ExecCommand sublime_text

Figured it out:

First, used Alt+F1 to open the default terminal.

Second, used "find -name" to find where the program lived.

Third, replaced each of the program names above with the path to the program, prefixing the path with ../../.. so I could be sure that the relative path led to the target.   (Maybe there is a better way, but I don't know it.)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How can I modify the FluxBox key bindings?
« Reply #5 on: November 05, 2012, 08:32:29 AM »

(Note: I've already set the boot line to include "desktop=fluxbox tce=sda7 home=sda7 opt=sda7 restore=sda7 norestore", among other things.)


Your last 2 boot codes are directly conflicting.

home= and opt= are advanced options for users who know exactly what they are doing, not recommended by default.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: How can I modify the FluxBox key bindings?
« Reply #6 on: November 05, 2012, 08:38:33 AM »


You could link to ~/.local/bin which is in $PATH

Not being a user of any of mentioned apps, but wondering if perhaps upper-/lowercase might matter there
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: How can I modify the FluxBox key bindings?
« Reply #7 on: November 05, 2012, 09:38:30 AM »
Hi nil_von_9wo
Remove the  norestore  boot code. You should also read up on persistence in Tinycore, check the Wiki.