Review your favorite Linux distribution.
Go Back > Blogs > Lumak's Guide to Random Things
User Name


OK I don't really have a good title yet but I figure I can post works in progress and other tips I've come across or other interesting things.
Rate this Entry

Fluxbox - Terminal Window PC Game Style

Posted 08-22-2009 at 02:26 AM by lumak
Updated 08-27-2009 at 09:13 PM by lumak

MOVED: I added this to the fluxbox wiki under "Category:Configuration howtos" Any changes may go on either. Enjoy.

Warning. I tried this on my much older 32 bit laptop and it didn't respond that quickly to toggling the consoles. I'm guessing that long bit of code for the key command actually takes more processing than I thought.

OK I realized I could make xterm (any terminal?) act like the command console in a FPS game. So here are all the settings to do that.

edit ~/.fluxbox/apps
# Group all xterms into tabs
 [app] (name=xterm) (class=XTerm)
  # edit to your screen size
  [Dimensions]  {1280 491}

  # I like it here.
  [Position] (TOPLEFT) {0 0}

  # Why not?
  [Alpha]   {190}

  # available on all work spaces regardless of Iconify
  [Sticky]  {yes}

  # optional - do not use [Hidden] or [FocusHidden]
  [IconHidden]  {yes}

  # set to be on top of everything
  [Layer] {2}

  # display only a tab and a border regardless of
  # window manager settings.  This looks nicer than
  # with all the window decorations.
  [Deco] {516}
edit ~/.fluxbox/keys
# (name!=xterm) prevents xterm from being included
# in the alt-tab cycle
# alt-tab
Mod1 Tab :NextWindow {groups} (name!=xterm)
Mod1 Shift Tab :PrevWindow {groups} (name!=xterm)

# Toggle xterms
# Control (tilde key):
# If there are xterms open then switch between showing
# them and hiding them.  If there are not any open, then
# open one up.

# all one line
Control 49 : If {Some Matches (xterm)}   {ToggleCmd {NextGroup (name=xterm)} {MacroCmd {NextGroup (name=xterm)} {Delay {Iconify} 1}}}    {Exec xterm}
edit ~/.fluxbox/init
# add/replace as needed or use menu options to select tab placement.
Code: BottomLeft

If you want to have the label on the tabs of the xterms numbered (purely aesthetics) then you can use the attached script. Instead of executing xterm with all your hot keys and menu options, you would want to execute this script. It's in the public domain and comes with no warranty.
Attached Files
File Type: txt open_term.txt (1.6 KB, 680 views)
Views 2108 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 12:35 AM.

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