Terminal zawsze się przydaje i najlepiej mieć go pod ręką na zawołanie. W Ubuntu domyślnym skrótem na otwarcie nowego okna gnome-terminal jest Ctrl+Alt+T. Lecz czy nie byłoby lepiej, gdyby wiersz poleceń nie gubił się w gąszczu otwartych aplikacji?
Tutaj z pomocą przychodzi pomysł rodem ze strzelanek – terminal, który opada z górnej krawędzi ekranu. Aplikacji tego typu jest co najmniej kilka – Yakuake, Tilda, Guake należą do najpopularniejszych. Niemniej każdy ma swoje wady: Yakuake, chyba najlepszy, w zależnościach ma biblioteki KDE (a nie każdy chce mieć je u siebie zainstalowane), Tilda i Guake z kolei nie potrafią przeszukiwać tekstu, który się w nich wyświetla, oraz kiepsko obsługują obecność wielu monitorów.
Ale jest jeszcze Stjerm. Co prawda on też nie pozwala na przeszukiwanie wyświetlonego tekstu (a szkoda, bo to bardzo przydatna funkcja), ale za to z obsługą wielu monitorów radzi sobie perfekcyjnie. Jest też dość ascetyczny, zwłaszcza jeśli chodzi o konfigurację, co jest raczej zaletą (bo nie zjada wielu zasobów), ale pewnie niektórzy uznają to za wadę.
Stjerm znajduje się w repozytoriach i można go zainstalować poleceniem:
sudo apt-get install stjerm
Jeśli chodzi o konfigurację, to albo trzeba go uruchamiać podając stosowne parametry, albo trzeba utworzyć plik konfiguracyjny.
Z pewnością przyda się pomoc na temat parametrów programu:
stjerm --help
oraz opcji pliku konfiguracyjnego:
stjerm --info
Tutaj przykładowa konfiguracja z zastosowaniem fonta Ubuntu mono, motywu kolorystycznego Solarized (o którym pisaliśmy niedawno) oraz klawiszem przywołania ustawionym na F12.
W pliku ~/.Xresources należy dodać linijkę:
#include ".Xresources.d/stjerm"
Natomiast w pliku ~/.Xresources.d/stjerm należy dodać to:
! STJERM configuration file ! Set the shortcut key. This is a required option. stjerm.key: f12 ! Uncomment the following line to set the modifier key, ! which has to be pressed together with the shortcut key, ! to show/hide stjerm. ! ! NOTE: some modifiers cause do not work on some computer (eg. control) ! stjerm displays an error then, that is was unable to grab the key. ! ! VALID modifiers: ! ctrl, alt, mod1, win ! ! Default: none !stjerm.mod: control ! Whether or not to hide stjerm when it looses focus. ! Default: true. stjerm.autohide: false ! Set the width/height of stjerms window. ! Default: width: 800, height: 400 stjerm.width: 90% !stjerm.height: 500 ! Set the background color. Valid values are Strings like "Red", "White" or hex codes. ! ! Default: black ! ! Uncomment this line to set a dark gray background: stjerm.background: #002b36 ! Set the foreground color. Acts the same like the background color. ! ! Default: white stjerm.foreground: #839496 ! Set the opacity of the terminal. ! ! Default: 100 !stjerm.opacity: 90 ! Set the used font ! FORMAT: FONTNAME SIZE ! ! Default: Bitstream Vera Sans Mono 10 stjerm.font: Ubuntu Mono 12 ! Set the border ! VALID values: ! thin, thick, none ! ! Default: none !stjerm.border: thick ! Enable or disable the scrollbar. ! VALID values: ! left, right ! ! Default: disabled. !stjerm.scrollbar: left ! Set the position of stjerms window ! VALID values: ! top, bottom, left, right, topleft, topright, bottomleft, bottomright ! ! Default: top !stjerm.position: bottom ! Set the used shell ! ! Default: users default shell ! To set zsh as default shell use this line: !stjerm.shell: /bin/zsh ! Set the scrollback line count. ! This specifies the number of lines you scan scrollback in terminal history. ! ! Default: 1000 stjerm.lines: 999999 ! Sets whether the tab bar is displayed always. Even if only one tab is opened. ! VALID values: ! never,one,always ! ! Default: one !stjerm.showtab: never ! Sets the tab bar position. ! VALID values: ! top, left, right, bottom ! ! Default: bottom !stjerm.tabpos: right ! Sets the default tab label. ! ! Default: term !stjerm.tablabel: terminal ! Whether to scroll the terminal on output. Default: true. ! ! Default: true stjerm.scroll: false ! Color palette for terminal. ! you must always specify a complete color palette (16 colors) or none. ! the colors are entered as hex codes. ! black dark/light stjerm.color0: #073642 stjerm.color8: #002b36 ! red dark/light stjerm.color1: #dc322f stjerm.color9: #cb4b16 ! green dark/light stjerm.color2: #859900 stjerm.color10: #586e75 ! yellow dark/light stjerm.color3: #b58900 stjerm.color11: #657b83 ! blue dark/light stjerm.color4: #268bd2 stjerm.color12: #839496 ! magenta dark/light stjerm.color5: #d33682 stjerm.color13: #6c71c4 ! cyan dark/light stjerm.color6: #2aa198 stjerm.color14: #93a1a1 ! white dark/light stjerm.color7: #eee8d5 stjerm.color15: #fdf6e3
Aby ustawienia zaczęły działać należy wydać polecenie:
xrdb -merge ~/.Xresources
Teraz wystarczy uruchomić stjerm
, bez dodatkowych parametrów.
Na boku: gdyby ktoś wiedział jak sprawić aby less dobrze wyglądał z motywem Solarized (kiepsko koloruje składnię, komentarze mają kolor tła), to zachęcam do podzielenia się tą wiedzą w komentarzu.
Ciekawe, spróbuję. Od chyba 2 lat korzystam z guake, ale poeksperymentuję z tym stworem