Program/Fluxbox

Från Ubuntu Sverige

Hoppa till: navigering, sök

Innehåll

[redigera] Fluxbox

Fluxbox är en fönsterhanterare för X som bygger på koden från Blackbox 0.61.1. Målet med Fluxbox är att det ska vara en väldigt lättdriven och formbar fönsterhanterare, men samtidigt funktionell och med många finesser.

[redigera] Installation

sudo apt-get install fluxbox

För att börja använda Fluxbox loggar du ut och väljer Fluxbox i Sessions, sedan är det bara att logga in. Men innan du gör det, är det lämpligt att ordna till menyn, eftersom den är tom just nu.

[redigera] Meny

Menyn är enkel i Fluxbox och den är ganska logiskt uppbyggd. För att redigera menyn använder man sig av sin favoriteditor.

Menyn finner du här: ~./fluxbox/menu

[redigera] Exempel-meny

[begin] (Fluxbox)
[exec] (Terminal) {gnome-terminal}
[exec] (Nautilus)  {nautilus --no-desktop}
[exec] (Firefox) {firefox}
[separator]
     [submenu] (Accesories)
     [exec] (Calcylator) {gcalctool}
     [exec] (Disk Usage Analyzer) {baobab}
     [exec] (Terminal) {gnome-terminal}
     [exec] (Gedit) {gedit}
   [end]
   [submenu] (Games)
     [exec] (PokerTH) {~/.pokerth/PokerTH-0.5.bin}
   [end]
   [submenu] (Graphics)
     [exec] (Gcolor2) {gcolor2}
     [exec] (GIMP Image Editor) {gimp-remote-2.2 %U}
     [exec] (Nitrogen) {nitrogen /media/HDD4/Bilder/Väggpapper/}
   [end]
   [submenu] (Internet)
     [exec] (Firefox) {firefox %u}
     [exec] (Gmail Notify) {gmail-notify}
     [exec] (Kopete) {kopete}
     [exec] (Pidgin) {pidgin}
     [exec] (Terminal Server Client) {tsclient}
     [exec] (Deluge) {deluge}
     [exec] (gFTP) {gftp}
     [exec] (XChat) {xchat}
   [end]
   [submenu] (Sound & Video)
     [exec] (DVD Encoder OGMRip) {ogmrip}
     [exec] (GnomeBaker) {gnomebaker}
     [exec] (Totem) {totem}
     [exec] (RecordMyDesktop) {gtk-recordmydesktop}
     [exec] (Rhythmbox) {rhythmbox}
     [exec] (VLC) {wxvlc}
     [end]
[separator]
[submenu] (Fluxbox)
   [submenu] (Styles) {}
      [stylesdir] (/usr/share/fluxbox/styles)
      [stylesdir] (~/.fluxbox/styles)
      [end]
[separator]
   [exec] (Menu) {gedit ~/.fluxbox/menu}
   [exec] (Startup) {gedit ~/.fluxbox/startup}
[separator]
   [config] (Configuration)
   [reconfig] (Reconfigure)
   [end]
     [submenu] (Preferences)
     [exec] (Control Center) {gnome-control-center}
     [exec] (Hardinfo) {/usr/bin/hardinfo}
     [exec] (NVIDIA X Server Settings) {/usr/bin/nvidia-settings}
     [exec] (Synaptic Package Manager) {/usr/bin/gksu /usr/sbin/synaptic} 
   [end]
[submenu] (System)
   [restart] (Restart)
   [exit] (Exit)
   [end]
[end] 

[redigera] Taggarna i menyn

[begin] (label for root menu)

This tells Fluxbox to start parsing the menu file. This tag is required for Fluxbox to parse your menu file. If it cannot find it, the system default menu is used instead. 

[end]

This tells Fluxbox that it is at the end of a menu. This can either be a submenu or the main root menu. 
There must be at least one of these tags in your menu to correspond to the required [begin] tag.

[exec] (label for command) {shell command}

Inserts a command item into the menu. When you select the menu item from the menu, Fluxbox runs `shell command.'

[exit] (label for exit)

Inserts an item that shuts down and exits Fluxbox. Any open windows are reparented to the root window before Fluxbox exits.

[include] (filename)

Reads the file filename into the current menu. The file has to start with [begin] and end with [end]. 
The filename can be the full path to a file or it can begin with ~/, which will be expanded into your home directory 
(e.g. [include] (~/fluxbox/stylesmenu)will include /home/yourusername/fluxbox/stylesmenu in my menu). 
If the parameter to include directive is a directory, every file in this path will be included.

[nop] (label - optional)

Insert a non-operational item into the current menu. 
This can be used to help format the menu into blocks or sections if so desired. 
[nop] does accept a label, but it is not required, and a blank item will be used if none is supplied.

[separator]

will create a nice separator line.

[style] (label) {filename}

This tells Fluxbox to insert an item that, when selected, reads style file named filename and apply the new textures, colors and fonts to the current running session.

[stylesdir] (directory name)

Reads all filenames from the specified directory, assuming that they are all valid style files (directories are ignored), and creates menu items in the current menu for every filename, that, when selected by the user, apply the selected style file to the current session. 
The labels that are created in the menu are the filenames of the style files.

[stylesmenu] (label) {directory name}

Creates a submenu entry with label (that is also the title of the new submenu), and inserts in that submenu all filenames in the specified directory, assuming that they are all valid style files (directories are ignored) in the same way as the [stylesdir] command does. 
Both [stylesdir] and [stylesmenu] commands make it possible to install style files without editing your menu file.

[submenu] (label) {title for menu - optional}

This tells Fluxbox to create and parse a new menu. This menu is inserted as a submenu into the parent menu. 
These menus are parsed recursively, so there is no limit to the number of levels or nested submenus you can have. 
The title for the new menu is optional, if none is supplied, the new menu's title is the same as the item label. An [end] tag is required to end the submenu.

[reconfig] (label)

When selected, this item rereads the current style and menu files and apply any changes. 
This is useful for creating a new style or theme, as you don't have to constantly restart Fluxbox every time you save your style. 
However, Fluxbox automagically rereads the menu whenever it changes.

[restart] (label) {shell command - optional}

This tells Fluxbox to restart. If `shell command' is supplied, it shuts down and runs the command (which is commonly the name of another window manager). 
If the command is omitted, Fluxbox restarts itself.

[config] (label)

Inserts a Fluxbox native submenu item, containing numerous configuration options concerning window placement, focus style, window moving style etc.

[workspaces] (label)

This tells Fluxbox to insert a link to the workspaces menu directly into your menu. 
This is handy for those users who can't access the workspace menu directly (e.g. if you don't have a 3 button mouse, it's rather hard to middle click to show the workspace menu).

[redigera] Autostarta program

Om du vill att program ska starta automatiskt så måste du lägga till programmet i filen: ~/.fluxbox/startup

Filen är väldigt tydlig, så jag tror att ingen närmare beskrivning behövs för hur den fungerar.

[redigera] Bakgrundsbild

För att använda sig av bakgrundsbilder så rekommenderar jag Nitrogen.

Se först till att du har paketen build-essential och libgtkmm-2.4-dev installerade. Ladda sedan hem Nitrogen till skrivbordet och packa upp den. Bläddra sedan till mappen:

cd nitrogen-1.0

Och för att installera programmet:

./bootstrap
./configure
make
make install

När du har installerat det, så öppnar du sedan Nitrogen med kommandot:

nitrogen /platsen/för/dina/bakgrundsbilder/

Om du vill ha snabb åkomst till Nitrogen och denna plats i menyn, så lägger du bara till denna syntax i menyn:

[exec] (Nitrogen) {nitrogen /platsen/för/dina/bakgrundsbilder/}

Nästa gång du startar Fluxbox kommer din bakgrund inte att vara sparad, men det är enkelt att lösa, du lägger bara till denna rad i startup-filen:

nitrogen --restore &

[redigera] Teman

Teman finns på Box-Look att hämta. Dessa teman lägger du sedan här: ~/.fluxbox/styles/

Du kan sedan välja ditt nya tema via Fluxbox-menyn.

[redigera] Skugga

Det går faktiskt att få skugga på fönster etc.. För att ordna detta så måste du installera något som heter xcompmgr.

Lägg sedan till denna rad i din startup-fil:

xcompmgr -c -t-5 -l-5 -r4.2 -o.55 &

Nästa gång du startar om Fluxbox kommer du att mötas av en diskret och snygg skugga på fönster etc..

Personliga verktyg