LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > Lumak's Guide to Random Things
User Name
Password

Notices

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
Code:
# Group all xterms into tabs
[group]
 [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}
[end]
edit ~/.fluxbox/keys
Code:
# (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:
session.screen0.tab.placement: 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 1766 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration