我现在有一个非常简单实用的桌面环境了: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. js访问对象属性的两种方法

    var obj={name:'fuuf',age:19} 第一种,用.访问 obj.name 第二种 用[]访问 obj['name']  //此时name是字符串,要加引号 注意事项 使用第二种方法 ...

  2. HDU 1027 打印沙漏

    https://pintia.cn/problem-sets/994805260223102976/problems/994805294251491328 本题要求你写个程序把给定的符号打印成沙漏的形 ...

  3. [知乎]老狼:UFS VS NVMe

    https://zhuanlan.zhihu.com/p/26652622 最近某手机厂商的闪存门在知乎上被人踢爆,在所谓“爵士水军”和“友商水军”的口水大战中,至少eMMC, UFS等火星名词被广泛 ...

  4. [转帖]SQLSERVER的兼容级别

    SQL Server数据库的兼容级别 http://www.cnblogs.com/sosoft/archive/2017/07/08/sqljrjb.html 改天尝试一下 在SQLSERVER20 ...

  5. jQuery文件上传插件uploadify

    官方网站:http://www.uploadify.com/ 参考博客:jQuery Uploadify在ASP.NET MVC3中的使用 参考博客:使用uploadify上传图片时返回“Cannot ...

  6. spring1 注册value与ref的区别

  7. 【原创】 PLSQL 索引排序优化

    转载请注明出处 select /*+INDEX_DESC(T IDX_SYS_MESS_CREATE_DATE)*/ * FROM sys_message T where t.create_date ...

  8. 创建一个背景透明的UIViewController

    有时候想让UIViewController背景透明,让我们可以看到下层的UI,直接设置它的背景颜色为clearColor(),还是有黑色的默认背景在那里.下面是解决该问题的例子: 在storyboar ...

  9. Mybatis笔记八:MyBatis中#{}和${}的区别

    先给大家介绍下MyBatis中#{}和${}的区别,具体介绍如下: 1. $将传入的数据直接显示生成在sql中 2. #方式能够很大程度防止sql注入. 3.$方式无法防止Sql注入. 4.$方式一般 ...

  10. 使用EntitysCodeGenerate

    http://bbs.csdn.net/topics/360256700 public DataSet xxx(DateTime start, DateTime end, string type)   ...