我现在有一个非常简单实用的桌面环境了: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. 微信小程序入门一: 简易form、本地存储

    实例内容 登陆界面 处理登陆表单数据 处理登陆表单数据(异步) 清除本地数据 实例一: 登陆界面 在app.json中添加登陆页面pages/login/login,并设置为入口. 保存后,自动生成相 ...

  2. requests爬取豆瓣热门电视剧

    # *_*coding:utf-8 *_* import requests payload = {'key1': 'value1', 'key2': 'value2'} headers = {'use ...

  3. set_magic_quotes_runtime

    在php的配置文件中,有个布尔值的设置,就是magic_quotes_runtime,当它打开时,php的大部分函数自动的给从外部引入的(包括数据库或者文件)数据中的溢出字符加上反斜线. 当然如果重复 ...

  4. PHP学习心得2

    对于PHP的语法结构,刚开始真的很不习惯,真搞不懂为什么每个变量之前都要加个“$”符号,每个语句写完之后都必须加上“分号”来表示此句已经结束,还有,PHP对字母的大小写是敏感的,写的时候一定要注意大小 ...

  5. BugScan插件编写高(gǎo)级(jī)教程

    声明:本文最先发布在:http://q.bugscan.net/t/353 转载请注明出处 有问题可以和我交流 邮件(Medici.Yan@gmail.com) 个人博客地址:http://www.c ...

  6. BZOJ2806_Cheat

    Ctsc2012的题目.做完感觉自己瞬间变高富帅了. 不过回想其实也觉得不难,想到用单调队列就很简单了,还有二分= =.呵 对于给出的一篇文章,如果你们将它分成若干段,并在所有长度不小于L的片段在字典 ...

  7. java super

    用法: 1.子类构造器里面默认调用父类构造器 2.调用父类的属性,方法

  8. BZOJ3157/BZOJ3516 国王奇遇记(矩阵快速幂/数学)

    由二项式定理,(m+1)k=ΣC(k,i)*mi.由此可以构造矩阵转移,将mi*ik全部塞进去即可,系数即为组合数*m.复杂度O(m3logn),因为大常数喜闻乐见的T掉了. #include< ...

  9. MySql数据库迁移图文展示

    MySql数据库的数据从一台服务器迁移到另外一台服务器需要将数据库导出,再从另外一台服务器导入.方法有很多,MySql配套的相关工具都有这个功能.phpMyAdmin就可以做,但是这个加载起来慢,推荐 ...

  10. 【BZOJ1011】遥远的行星(???)

    题面 BZOJ 洛谷 题解 大概就是分个块,然后每块取平均数算贡献啥的. BZOJ上过不去??? #include<iostream> #include<cstdio> usi ...