轻量级桌面 openbox + tint2 + conky + stalonetray + pcmanfm + xcompmgr
openbox+tint2+pnmixer+conky=輕量級(jí)archlinux桌面環(huán)境設(shè)置備忘緣起機(jī)器上的Ubuntu 12.04有一段時(shí)間沒有使用了,最近在用的時(shí)候發(fā)現(xiàn)頻繁死機(jī)的情況,開始以為是unity的原因,于是換成了gnome3,然而好景不長很快又頻繁死機(jī)了。作為一個(gè)懶得折騰的人,還是重裝系統(tǒng)最省事了。想來想去,還是裝了archlinux。設(shè)置安裝過程不必細(xì)說,arch的wiki上有詳細(xì)的說明。這里只是簡單的記錄下配置過程。網(wǎng)絡(luò)配置使用wicd替換了默認(rèn)的netctl
systemctl stop netctlsystemctl disable netctlpacman -S wicd wicd-gtksystemctl start wicdsystemctl enable wicd
并在~/.config/openbox/autostart中加入wicd-gtk -t &圖形界面圖形界面我選擇了輕量級(jí)的openbox。pacman -S openbox然后是openbox配置的一系列工具openbox主題及設(shè)置工具pacman -S openbox-themes obconfopenbox右鍵菜單我選用了AUR的obmenu-generator,其動(dòng)態(tài)菜單(pipe menu)功能尤其方便,在安裝了新的軟件后也無需重新設(shè)置右鍵菜單。yaourt -S obmenu-generator快捷鍵編輯工具obkey和菜單編輯工具obmenupacman -S obkey obmenu安裝輕量級(jí)登錄管理器slimpacman -S slim桌面環(huán)境面板使用了tint2,在啟動(dòng)腳本中添加tint2 &yaourt -S tint2-svn tint2-themes tint2wizard盡管安裝了tint2的設(shè)置工具,我目前使用的依然是tint2的默認(rèn)主題,因?yàn)榛旧夏軡M足我的需求:)。其他的面板工具可以嘗試下fbpanel、wbar、xfce4-panel等,總有一款panel適合你。音量控制使用了pnmixer,在啟動(dòng)腳本中加入pnmixer &yaourt -S pnmixer輕量級(jí)監(jiān)控工具conky及conky配置生成工具conky-colorsyaourt -S conky conky-colors在啟動(dòng)腳本中加入/usr/share/conkycolors/bin/conkyStart &壁紙工具使用了nittrogenpacman -S nittrogen選擇壁紙后在啟動(dòng)腳本中加入nitrogen --restore &陰影工具使用了compton-gityaourt -S compton-git在啟動(dòng)腳本中加入compton -cC -f -i 1.0 -e 1.0 -o 1.0 -r 6 -l -9 -t -9 -I 0.05 -O 0.05 -D 2 -G -b &其他工具文件管理器 pacman -S pcmanfm看圖工具 pacman -S geeqie gpicview圖片編輯 pacman -S gimp瀏覽器 pacman -S chromium輸入法 pacman -S fcitx fcitx-googlepinyin在~/.xinitrc中加入
export LANG=zhCN.UTF-8export LCALL="zhCN.UTF-8"export XMODIFIERS=@im=fcitxexport GTKIMMODULE=fcitxexport QTIM_MODULE=fcitx
并在啟動(dòng)腳本中加入fcitx &文字編輯工具 yaourt -S kingsoft-officepdf閱讀器 yaourt -S mupdf apvlv屏幕保護(hù)程序 yaourt -S xscreensaver
*****************************************************************************輕量級(jí)桌面 openbox + tint2 + conky + stalonetray + pcmanfm + xcompmgr
輕量級(jí)桌面果然很難弄..還好我之前是用gnome的比較起來會(huì)簡單一點(diǎn)首先是安裝需要的軟件了sudo aptitude install openbox obconf obmenu conky stalonetray pcmanfm xcompmgrtint2我是編譯安裝對(duì)的首先到tint2 google code下載源碼http://code.google.com/p/tint2/然后cd /home/wdstudio/Desktop/tint2-0.9./configure makesudo make install安裝完畢了暫時(shí)需要的軟件就有了logout在登錄時(shí)選則openbox-session不用在~/.xinitrc里加入exec openbox-session這么麻煩反正我們有g(shù)dm...到這里就進(jìn)入openbox了,看起來很糟糕首先先調(diào)用pcmanfm , 是用來代替nautilus的,雖然我很喜歡nautilus 不過貌似nautilus 和openbox經(jīng)常打架就換輕量級(jí)的pcmanfm恩,讓pcmanfm每次都啟動(dòng)的話要在~/.config/openbox/autostart.sh中添加( sleep 2 && pcmanfm -d ) &忘記哪里找來的語句了,和大多數(shù)人都不一樣... 記得sleep 2 &&是讓openbox和要啟動(dòng)的程序有一些緩沖時(shí)間 pcmanfm -d 則是讓pcmanfm在后臺(tái)運(yùn)行 每行結(jié)束都要加上 &各位自己去折騰一下pcmanfm把,壁紙等都能用他設(shè)定了# update-mime-database /usr/share/mime# update-desktop-database這兩行很重要,不然會(huì)丟失所有的文件關(guān)聯(lián)這個(gè)時(shí)候的openbox還很簡略沒有成型不過沒關(guān)系從終端運(yùn)行obmenu就可以定制openbox的右鍵了obconf是openbox的設(shè)定可以換主題等sudo aptitude install openbox-themes安裝主題,當(dāng)然gnome-look等地方還有很多好看的主題# Run the system-wide support stuff. $GLOBALAUTOSTART# feh --bg-scale /home/wdstudio/Pictures/Wallpaper/wallpaper_0150.jpg ompmgrif which xcompmgr > /dev/null; thenxcompmgr -Ss -n -Cc -fF -I-10 -O-10 -D1 -t-3 -l-4 -r4 &fi(sleep 2 && conky ) &(sleep 2 && /usr/local/bin/tint2 ) &(sleep 2 && pcmanfm -d ) &# (sleep 2 && nautilus --no-desktop ) &( sleep 2 && stalonetray ) &#( sleep 2 && /usr/bin/dmenu_run & ) &( sleep 2 && dropbox ) &( sleep 2 && gnote ) &這是我的autostart.sh
關(guān)于openbox的快捷鍵就要手動(dòng)編輯了vi ~/.config/openbox/rc.xml找到<keyboard>部分快捷鍵的編寫其實(shí)很見到找到規(guī)律就好了最長見的有<keybind key="KEY"><action name="Execute"<execute>command</execute></action></keybind>KEY代表你要的快捷鍵command就是指令了比如 <keybind key="A-t"> <action name="Execute"> <execute>gnome-terminal</execute> </action> </keybind> <keybind key="W-e"> <action name="Execute"> <execute>pcmanfm ~</execute> </action> </keybind>一個(gè)是terminal的一個(gè)是pcmanfm的具體可以看http://openbox.org/wiki/Help:Actions之后就是tint2了在上面的autostart.sh里面已經(jīng)看到tint2自動(dòng)啟動(dòng)了tint2的配置文件在./config/tint2/tint2rc怎么配置打架自己著墨吧
autostart.sh里面的xcompmgr -Ss -n -Cc -fF -I-10 -O-10 -D1 -t-3 -l-4 -r4 &就是調(diào)用xcompmgr讓窗口出現(xiàn)陰影效果,關(guān)于xcompmgr的具體我自己都不清楚,等下去google了
conky就不用多說了, ( sleep 2 && conky ) & 搞定,如此簡單附上我的配置background yes# Use Xft?use_xft yesxftfont Comic Sans MS:size=8
use_spacer top_right
# Update interval in secondsupdate_interval 1
# This is the number of times Conky will update before quitting.# Set to zero to run forever.total_run_times 0
# Create own window instead of using desktop (required in nautilus)own_window yesown_window_transparent yesown_window_type widgetown_window_hints undecorate,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)double_buffer yes
# Minimum size of text area#minimum_size 280 5
maximum_width 150
# Draw shades?draw_shades no
# Draw outlines?draw_outline no
# Draw borders around textdraw_borders no
# Stippled borders?stippled_borders 0
# border marginsborder_margin 5
# border widthborder_width 0
# Default colors and also border colorsdefault_color 4d4d4d#default_shade_color white#default_outline_color blackown_window_colour 262626
# Text alignment, other possible values are commented#alignment top_leftalignment top_right#alignment bottom_left#alignment bottom_right
# Gap between borders of screen and text# same thing as passing -x at command linegap_x 5gap_y 5
# Subtract file system buffers from used memory?no_buffers yes
# set to yes if you want all text to be in uppercaseuppercase no
# number of cpu samples to average# set to 1 to disable averagingcpu_avg_samples 2
# number of net samples to average# set to 1 to disable averagingnet_avg_samples 2
# Force UTF8? note that UTF8 support required XFToverride_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.use_spacer yes
TEXT${font OpenLogos:size=26} B${color 8F8F8F}${alignc 23}${font DotMatrix:size=16} ${time %k:%M}${font}${color EE6363}${alignc}${voffset -10}${time %B} ${time %Y}
${color 7C96B0}${font DejaVu Sans Mono:size=6}${execpi 300 DJS=`date +%_d`; cal | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.{21}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color 98AE68}'"$DJS"'${color 8F8F8F}'" "/}${font}
${color 7C96B0}Kernel:${color 8F8F8F}${alignr}$kernel${color 7C96B0}UpTime:${color 8F8F8F}${alignr}$uptime${color 7C96B0}CPU : ${color 8F8F8F}${alignr}AMD X4 630${color 7C96B0}Core One:${color 8F8F8F}${alignr}${cpu cpu1}% ${color EE6363}#${color 7C96B0}Core 1 temp:${color EE6363}${alignr}${execi 20 sensors it8718-isa-0290 |grep temp1 |cut -c15-16}°C${color 262626}${cpugraph cpu1 20,85 262626 1E1E1E}${color 7C96B0}Core Two:${color 8F8F8F}${alignr}${cpu cpu2}% ${color EE6363}#${color 7C96B0}Core 2 temp:${color EE6363}${alignr}${execi 20 sensors it8718-isa-0290 |grep temp2 |cut -c15-16}°C${color 262626}${cpugraph cpu2 20,85 262626 1E1E1E}${color 7C96B0}Ram:${color 8F8F8F}${alignr}$mem${color 1A1A1A}${membar 3,85}
#${color 7C96B0}Public Ip:${color EE6363}${alignr}${execi 1 ~/.scripts/ip.sh} ${color EE6363}|${color} ${color EE6363}${color 7C96B0}Public Ip: ${execi 3600 wget -O - http://whatismyip.org/ | tail}${color 98AE68}${font PizzaDude Bullets:size=10}N${font}${color EE6363}${alignr}${upspeed eth0}KB/s${color 262626}${upspeedgraph eth0 20,85 1E1E1E 1A1A1A}${color 7C96B0}Total: ${color 8F8F8F}${totalup eth0}${color 98AE68}${font PizzaDude Bullets:size=10}T${font}${color EE6363}${alignr}${downspeed eth0}KB/s${color 262626}${downspeedgraph eth0 20,85 1E1E1E 1A1A1A}${color 7C96B0}Total: ${color 8F8F8F}${totaldown eth0}
${color 98AE68}Disk IO:${color EE6363} ${alignr 4}$diskio#${color 7C96B0}Main HardDisk Temp:${color EE6363}${alignr}${execi 300 nc localhost 7634 | cut -c23-24;} °C${color 262626}${diskiograph 20,85 1E1E1E 1A1A1A}${color 7C96B0}WDSTUDIO:${color 8F8F8F}${alignr}${fs_free /home/wdstudio/}${color 1A1A1A}${fs_bar 3,85 /home/wdstudio/}${color 7C96B0}File:${color 8F8F8F}${alignr}${fs_free /media/File/}${color 1A1A1A}${fs_bar 3,85 /media/File/}${color 7C96B0}Data:${color 8F8F8F}${alignr}${fs_free /media/Data/}${color 1A1A1A}${fs_bar 3,85 /media/Data/}${color 7C96B0}eMule:${color 8F8F8F}${alignr}${fs_free /media/eMule/}${color 1A1A1A}${fs_bar 3,85 /media/eMule/}
${color 7C96B0}PROCESSES ${hr 2}${color 7C96B0}NAME ${goto 110}PID${goto 138}CPU%${goto 175}MEM%${color 7C96B0}${top name 1} ${goto 105}${top pid 1}${goto 138}${top cpu 1}${goto 175}${top mem 1}${color 7C96B0}${top name 2} ${goto 105}${top pid 2}${goto 138}${top cpu 2}${goto 175}${top mem 2}${color 7C96B0}${top name 3} ${goto 105}${top pid 3}${goto 138}${top cpu 3}${goto 175}${top mem 3}${color 7C96B0}${top name 4} ${goto 105}${top pid 4}${goto 138}${top cpu 4}${goto 175}${top mem 4}${color 7C96B0}${top name 5} ${goto 105}${top pid 5}${goto 138}${top cpu 5}${goto 175}${top mem 5}
#quod libet ${hr 2}
# ${voffset 4}${alignc 35}${font Buttons and Switches JL:size=26}wd${font}#${voffset 7}${execi 7 quodlibet --print-playing '<title>'}#${alignc 35} - ${execi 7 quodlibet --print-playing '<artist>'}
#Banshee ${hr 2}#${voffset 7}${exec banshee-1 --query-title}#${alignc 35} -- ${exec banshee-1 --query-artist}#${exec banshee-1 --query-track-number}# ${exec banshee-1 --query-album}#${exec banshee-1 --query-position}我的.conkyrc坑坑洼洼的,大家不要介意stalonetray是系統(tǒng)托盤,既然不在gnome了就沒有g(shù)nome-panel了用stalonetray來代替,配置文件在~/.stalonetrayrc第一件是就是透明transparent truegeometry 124x24+3-3icon_gravity NWwindow_layer bottomsticky true這是我的配置
繼續(xù)使用gtk主題和圖標(biāo)是我遇到最大的麻煩了,應(yīng)該是安裝lxappearance,gtk-chtheme就能解決問題的,可是我的圖標(biāo)被固定了不能換,自己寫.gtkrc-2.0也不可以.gtkrc.mine也不可以我就想到更簡單的方法了,直接調(diào)用gnome-panel來換$ gnone-panel換好了在kill掉$ pkill gnome-panel
以前習(xí)慣用gnome-do了,換到openbox當(dāng)然什么都要light那就上dmenu , 這個(gè)確實(shí)折騰了很長時(shí)間( sleep 2 && dmenu_run & ) & 細(xì)心的人注意到了,dmenu_run 后面還有一個(gè) &配合 <keybind key="W-space"> <action name="Execute"> <command>dmenu_run</command> </action> </keybind>剛剛好達(dá)到gnome-do的效果忘記說了W代表Super,A代表Alt,C代表Ctrl,小的字母才是A-Z
不能忘記gnome下的Alt+F2 ,代替他的是gmrun快捷鍵怎么寫大家應(yīng)該都知道了把
還有一個(gè)很重要的,那就是關(guān)于openbox的關(guān)機(jī)等腳本感謝tony3322提供的腳本cd /usr/local/binvi powerdown
#!/bin/bashans=$(zenity --list --title "Make your choice" --text "What should I do?"--radiolist --column "Choice" --column "Action" reboot reboot logout logout poweroff poweroff);echo $anscase $ans in'reboot')echo "reboot"sudo reboot;;'logout')echo "logout"killall openbox;;'poweroff')echo "poweroff"sudo poweroff;;esac保存起來sudo chmod a+x powerdownsudo visudo添加%users ALL=NOPASSWD: /sbin/haltALL ALL=NOPASSWD:/sbin/poweroffALL ALL=NOPASSWD:/sbin/reboot
在obmenu里面添加
差不多就是這樣了以后想到什么在添加把最后附上截圖
總結(jié)
以上是生活随笔為你收集整理的轻量级桌面 openbox + tint2 + conky + stalonetray + pcmanfm + xcompmgr的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微信JS-SDK上传多张照片
- 下一篇: Astah 使用 流程图、类图、时序