elementaryOS系統托盤解決方案


在用 eOS 的時候,你可能會遇到系統托盤的問題,有些需要托盤的軟件比如說 QQ,沒辦法在 eOS 的 Wingpanel 上顯示,一最小化就不見了,或者出現一個 System tray 的窗口,很麻煩。這是由於 elementaryOS 是沒有系統托盤的,只有 Wingpanel,如果軟件沒有 appindicator,就不會顯示在 Wingpanel 上顯示,這是官方解釋。本文章提供一種不是很完美的解決方案,能暫時解決系統托盤問題。

我的博客原文:

http://elementarycomminity.ml/journal/elementaryos%E7%B3%BB%E7%BB%9F%E6%89%98%E7%9B%98%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88

python-appindicator

python-appindicator只對python寫的程序有用,比如goagent、dropbox。打開終端並輸入:

sudo apt-get install python-appindicator

安裝完成之后,便可以顯示python程序的托盤。

stalonetray

但是其它非python的程序也無法顯示在Wingpad上,博主也找不到辦法讓它們顯示在Wingpad上,但是有一種折中的解決方案。就是把系統托盤獨立出來,需要用到stalonetray,安裝可參考這里。默認是顯示在左上方,需要修改一下配置文件~/.stalonetrayrc。

# background # 顏色可以是HTML十六進制形式,也可以是從rgb.txt中的顏色名稱,注意顏色前必須加#
background "#777777"

# decorations # 設置托盤顯示形式
# 可選值: all, title, border, none
decorations none

# display # as usual
# dockapp_mode # set dockapp mode, which can be either simple (for
# e.g. OpenBox, wmaker for WindowMaker, or none
# (default). NEW in 0.8.
dockapp_mode none
# fuzzy_edges [] # enable fuzzy edges and set fuzziness level. level
# can be from 0 (disabled) to 3; this setting works
# with tinting and/or transparent and/or pixmap
# backgrounds
fuzzy_edges 0

# geometry # 托盤的幾何形狀; 
geometry 1x1+0+0

# grow_gravity # 可選值有:N, S, E, W, NW, NE, SW, SE; 托盤圖標的增長方式。
grow_gravity NW

# icon_gravity # 托盤圖標的方向: NW, NE, SW, SE
icon_gravity NW

# icon_size # spe
icon_size 24

# log_level # controls the amount of logging output, level can
# be err (default), info, or trace (enabled only
# when stalonetray configured with --enable-debug)
# NEW in 0.8.
log_level err

# kludges kludge[,kludge] # enable specific kludges to work around
# non-conforming WMs and/or stalonetray bugs.
# NEW in 0.8. Argument is a
# comma-separated list of
# * fix_window_pos - fix tray window position on
# erroneous moves by WM
# * force_icon_size - ignore resize events on all
# icons; force their size to be equal to
# icon_size
# * use_icon_hints - use icon window hints to
# dtermine icon size

# max_geometry # maximal tray dimensions; 0 in width/height means
# no limit
max_geometry 0x0

# no_shrink [] # disables shrink-back mode
no_shrink false

# parent_bg [] # whether to use pseudo-transparency
# (looks better when reparented into smth like FvwmButtons)
parent_bg false

# pixmap_bg <path_to_xpm> # use pixmap from specified xpm file for (tiled) background
# pixmap_bg /home/user/.stalonetraybg.xpm

# scrollbars # enable/disable scrollbars; mode is either
# vertical, horizontal, all or none (default)
# NEW in 0.8.
scrollbars none

# scrollbars-size # scrollbars step in pixels; default is slot_size / 4
# scrollbars-step 8

# scrollbars-step # scrollbars step in pixels; default is slot_size / 2
# scrollbars-step 32

# slot_size # specifies size of icon slot, defaults to
# icon_size NEW in 0.8.

# skip_taskbar [] # hide tray`s window from the taskbar
skip_taskbar true

# sticky [] # make a tray`s window sticky across the
# desktops/pages
sticky true

# tint_color # set tinting color
tint_color white

# tint_level # set tinting level; level ranges from 0 (disabled)
# to 255
tint_level 0

# transparent [] # whether to use root-transparency (background
# image must be set with Esetroot or compatible utility)
transparent false

# vertical [] # whether to use vertical layout (horisontal layout
# is used by default)
vertical false

# window_layer # set the EWMH-compatible window layer; one of:
# bootom, normal, top
window_layer normal

# window_strut # enable/disable window struts for tray window (to
# avoid converting of tray window by maximized
# windows); mode defines to which screen border tray
# will be attached; it can be either top, bottom,
# left, right, none or auto (default)
window_strut auto

# window_type # set the EWMH-compatible window type; one of:
# desktop, dock, normal, toolbar, utility
window_type dock

# xsync [] # whether to operate on X server synchronously (SLOOOOW)
xsync false

這里介紹幾個重點的,這是我自己的配置文件:

geometry 1x1+2+30      #這個是位置及初始化大小,我這里的大小是1x1,坐標為(+2,+30),其+表示左邊與上邊,-表示下邊與右邊
transparent true       #是否透明
window_layer bottom    #窗口的層次
slot_size 24           #托盤圖標占用的大小
icon_size 16           #顯示圖標大小

這是效果圖:

2013-11-02 14:38:20的屏幕截圖


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM