我现在有一个非常简单实用的桌面环境了:Musca + conky + trayer。

当然Musca运行时需要dmenu,其实也不是非dmenu不可,据说 dzen 也不错。 我现在用的是dmenu。

先放一张我的桌面截图吧。

我的Musca配置

Musca 是我最近发现的非常喜欢的平铺式窗口管理器。 对于它的安装和使用我已经在 这里 做了介绍。 今天主要介绍一下它的配置, 也就是在 .musca_start 中写了哪些让musca启动后执行的命令:

# 告诉musca不要管理conky和trayer的窗口
manage off trayer
manage off Conky # 启动conky和trayer
exec conky
# 为了方便在网页中显示,我把trayer的命令拆为3行,
# 请复制后拼接为一行
exec trayer --edge top --align right --widthtype request
--height 20 --SetDockType true --transparent true
--alpha 255 --tint 0x00ff00 # 设定聚焦帧的边框颜色为橘黄,我喜欢的颜色
set border_focus Orange
# 如果有空帧,则新启动的程序会自动在空帧中打开,这点很方便
set window_open_frame empty
# 不需要单击,鼠标经过的时候窗口就聚焦
set focus_follow_mouse 1
# 设置dmenu的启动命令,我用的是自己编译的支持xft的dmenu
set dmenu /usr/local/bin/dmenu -i -b -fa Sans-12 -p $ # 因为我没有xterm,所以重新绑定Mod4+t启动系统的默认终端
bind off Mod4+t
bind on Mod4+t exec x-terminal-emulator
# 按Mod4+q退出musca,不知道为什么不管用
bind on Mod4+q quit
# 按Mod1(我这里是Alt) + 方向键移动选定的窗口
bind on Mod1+Left slide left
bind on Mod1+Right slide right
bind on Mod1+Up slide up
bind on Mod1+Down slide down # 按Mod4 + 数字键快速地切换工作组
bind on Mod4+1 use 0
bind on Mod4+2 use 1
bind on Mod4+3 use 2
bind on Mod4+4 use 3
bind on Mod4+5 use 4 # 确定每个工作组的活跃范围,屏幕上留出20像素给conky和trayer
pad 0 0 20 0
hook on ^add pad 0 0 20 0
# 添加一个叫web的工作组,并加载我导出的窗口布局,上网用
add web
load .mweb
# 切换到原来第一个工作组
use 0
load .mdefault

配合Musca的conky配置

大家可以看到我的conky中显示了当前工作组的窗口列表, 这个怎么实现的呢? conky自己能通过 ${exec cmd} 显示cmd的输出。 而我们能通过 musca -c 'show windows' 输出当前组的窗口列表, 但是输出的格式是每个窗口一行,这不是我们想要的, 我们可以通过awk,对这个字符串处理一下。 综合起来是: ${exec musca -c 'show windows'|awk '{printf " | %s",$0}'}

为了方便大家参考,我将我整个的conky配置文件贴在下面。

# jiqing's conky configuration

# set to yes if you want Conky to be forked in the background
background no # 使用xft字体
use_xft yes
# 默认的xft字体
xftfont Sans:size=10
# Text alpha when using Xft
xftalpha 1.0 # 每8秒更新一次
update_interval 8.0 # 更新的次数,设为0是永远更新
total_run_times 0 # 使用桌面,不用自己的窗口
own_window no # If own_window is yes, you may use type normal, desktop or override
own_window_type desktop
# Use pseudo transparency with own_window?
own_window_transparent yes
# If own_window_transparent is set to no, you can set the background colour here
own_window_colour black # If own_window is yes, these window manager hints may be used
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # 使用双缓冲,避免闪烁
double_buffer yes # Minimum size of text area
minimum_size 500 18
maximum_width 1340 # Draw shades?
draw_shades no
# Draw outlines?
draw_outline no # 让conky有边框,我觉得这样酷一点
draw_borders yes # Draw borders around graphs
draw_graph_borders no # 边框用实线,不用点画线
stippled_borders no # border margins
border_margin 3 # border width
border_width 1 # 定义一些颜色
color0 white
color1 yellow
default_color gray73
default_shade_color black
default_outline_color black # Text alignment, other possible values are commented
alignment top_left # Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 2 # Subtract file system buffers from used memory?
no_buffers yes # set to yes if you want all text to be in uppercase
uppercase no # number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2 # number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2 # Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes # Add spaces to keep things from moving about? This only affects certain objects.
#use_spacer none
use_spacer left # Maximum size of buffer for user text, i.e. below TEXT line.
#max_user_text 16384 # Allow for the creation of at least this number of port monitors (if 0 or not set, default is 16)
#min_port_monitors 16 # Allow each port monitor to track at least this many connections (if 0 or not set, default is 256)
#min_port_monitor_connections 256 # variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument # stuff after 'TEXT' will be formatted on screen
# 为了方便在网页中显示,我把conky输出的内容分为多行,
# 如果你想像我一样在一行中显示,请把TEXT后的内容拼为一行 TEXT
${font Bistream Vera Sans Mono:size=10:bold}${color green}
${time %Y年%m月%d日 %H:%M}$font $color
|$color0 开机时间:$color1 $uptime_short $color
|$color0 CPU:$color1 $cpu% $color
|$color0 内存:$color1 $mem/$memmax
${font Sans:size=9}${color pink}
${exec musca -c 'show windows'|awk '{printf " | %s",$0}'}

最后,说一点心得,其实手动平铺式窗口管理器并不是很难用, 大多数情况你都不需要使用浮动窗口模式,只要你合理安排窗口布局, gimp 你都能用得很舒服。

最小主义:我的Musca桌面环境的更多相关文章

  1. Centos6.4最小化安装后使用xfce桌面环境

    由于我个人使用的Centos是在虚拟机中最小化安装的,gnome实在是不喜欢,所以自己装了个xfce,安装后启动不起来,才发现x window等依赖环境没装,为了少走弯路,在此写下安装过程. 1.yu ...

  2. Arch最小化安装LXDE桌面环境

    安装最小化的LXDE桌面环境: pacman -S lxde-common 安装LXDE Session: pacman -S lxsession 不安装这个没法登录进桌面环境 安装LXDE面板: p ...

  3. Linux工作环境:CentOS7最小安装+Xfce桌面环境

    ref: https://blog.csdn.net/smstong/article/details/44802989 3.1 执行CentOS7 最小安装去官网下载CentOS-7.0-1406-x ...

  4. linux下Gnome桌面环境的安装

    在实际工作中,无论是生产环境还是公司内部环境.很多时候装的linux系统都是最小化安装的.即没有桌面环境, 那么如果有时我们又需要一个桌面环境.该怎么安装呢?其实不难,现笔者将安装方法分享如下. 测试 ...

  5. Debian 6配置GNOME桌面环境

      1.安装xorgroot@debian:~# apt-get install xorg 2.安装gdm(GNOME Display Manager)root@debian:~# apt-get i ...

  6. CentOS6.5 yum安装桌面环境

    安装原因 安装centos6.5时选择了minimal CentOS最小化安装方式 需要使用浏览器拨号连接内网 安装过程 通过yum grouplist查询在 group 软件包中,Desktop.D ...

  7. 我在GNU/Linux下使用的桌面环境工具组合

    为了使GNU/Linux桌面环境下加载的程序较少以节省内存资源和提高启动时间,我目前并不使用重量级的桌面环境KDE和Gnome,甚至连登录窗界面gdm或xdm都不用,而是直接启动到控制台,登录后调用s ...

  8. linux下的5款桌面环境

    以前都用Ubuntu,没有换过桌面环境,不会换,也担心换了不会(真是有病,担心用不习惯,还不如回去用windows) ubuntu 默认的是Unity,用过一段不长的时间,恩,说不出来有什么不好的,也 ...

  9. linux入门--Linux桌面环境(桌面系统)大比拼[附带优缺点]

    早期的 Linux 系统都是不带界面的,只能通过命令来管理,比如运行程序.编辑文档.删除文件等.所以,要想熟练使用 Linux,就必须记忆很多命令. 后来随着 Windows 的普及,计算机界面变得越 ...

随机推荐

  1. 第七周PSP&进度条

    团队项目PSP 一.表格:     C类型 C内容 S开始时间 E结束时间 I时间间隔 T净时间(mins) 预计花费时间(mins) 讨论 讨论beta阶段任务 10:00 12:30 28 270 ...

  2. Delphi : keydown与keypress的区别,组合键

    Shift 是一个集合变量. type TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDoubl ...

  3. 最小费用流spfa算法模板(pascal)

    以前写过,现在的码风与以前有些变化,主要是用数组模拟邻接表存图,以前是用指针存图. 以前的博文:http://www.cnblogs.com/Currier/p/6387732.html 洛谷可评测. ...

  4. linux eclipse add desktop shortcut with root permission

    gedit ~/.local/share/applications/opt_eclipse.desktop sudo apt-get install gksu [Desktop Entry] Type ...

  5. python selenium判断元素是否存在的问题

    爬虫的时候经常用到这个,找到了一个比较好用的方法 原文链接:http://blog.csdn.net/u012189659/article/details/36391837 背景:selenium+p ...

  6. c++11 右尖括号>改进

    c++11 右尖括号>改进 #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> # ...

  7. Crawl(2)

    http://cuiqingcai.com/3179.html # *-* coding: UTF-8 *-* import urllib2 import cookielib import re im ...

  8. [Codeforces Gym] 100162B Circle of Stones

    题意: 桌子上有 n 个石头围成一个环.每个石头都有一种颜色.每种颜色可以由小写英文字母表示.如果每一对相邻的石头都是不同颜色的,则称这 n 个石头构成的环是美丽的.现在,你可以从这 n 个石头中拿走 ...

  9. c语言条件编译和预编译

    转自http://www.cnblogs.com/rusty/archive/2011/03/27/1996806.html 一.C语言由源代码生成的各阶段如下: C源程序->编译预处理-> ...

  10. 解决“mongoengine.fields.ImproperlyConfigured: PIL library was not found”报错

    解决方案: pip install Pillow