Chinaunix首页 | 论坛 | 博客
  • 博客访问: 808949
  • 博文数量: 222
  • 博客积分: 4341
  • 博客等级: 上校
  • 技术积分: 2155
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-16 13:50
个人简介

...

文章分类

全部博文(222)

文章存档

2019年(1)

2016年(9)

2015年(7)

2014年(14)

2013年(11)

2012年(10)

2011年(6)

2010年(25)

2009年(37)

2008年(21)

2007年(81)

我的朋友

分类: LINUX

2014-05-21 21:32:32

1. apt-get install gdm3 awesome

2. /usr/share/xsessions/awesome.desktop

注: /usr/share/xsessions/为 gdm3 的会话菜单目录

点击(此处)折叠或打开
  1. [Desktop Entry]
  2. Encoding=UTF-8
  3. Name=awesome
  4. Comment=Highly configurable framework window manager
  5. NoDisplay=true  --> false
  6. TryExec=awesome
  7. Exec=awesome
  8. Type=Application
3. mkdir  ~/.config/awesome 
cp /etc/xdg/awesome/rc.lua ~/.config/awesome/
~/.config/awesome/rc.lua

点击(此处)折叠或打开


  1. -- Load Debian menu entries
  2. require("debian.menu")
  3. -- 载入菜单文件



点击(此处)折叠或打开

  1. -- {{{ Variable definitions
  2. -- Themes define colours, icons, and wallpapers
  3. beautiful.init("/usr/share/awesome/themes/wombat/theme.lua")
  4. --指定主题

点击(此处)折叠或打开

  1. modkey = "Mod4"
  2. -- 定义[win] 为功能键


点击(此处)折叠或打开

  1. -- Table of layouts to cover with awful.layout.inc, order matters.
  2. --定义布局
  3. layouts =
  4. {
  5. awful.layout.suit.floating, --浮动
  6. awful.layout.suit.tile,
  7. awful.layout.suit.tile.left,
  8. awful.layout.suit.tile.bottom,
  9. awful.layout.suit.tile.top,
  10. awful.layout.suit.fair,
  11. awful.layout.suit.fair.horizontal,
  12. awful.layout.suit.spiral,
  13. awful.layout.suit.spiral.dwindle,
  14. awful.layout.suit.max,
  15. awful.layout.suit.max.fullscreen,
  16. awful.layout.suit.magnifier
  17. }


点击(此处)折叠或打开

  1. -- {{{ Tags
  2. -- Define a tag table which hold all screen tags.
  3. tags = {}
  4. for s = 1, screen.count() do
  5. -- Each screen has its own tag table.
  6. tags[s] = awful.tag({ '1|模拟终端 ', '2|文本编辑 ', '3|网络浏览 ', '4|媒体浏览 ', '5|文件管理 ', '6|其他操作 ' }, s, layouts[1])
  7. --指定标签(虚拟桌面之)名称
  8. end
  9. -- }}}

点击(此处)折叠或打开

  1. -- 定义菜单
  2. -- {{{ Menu
  3. -- Create a laucher widget and a main menu
  4. myawesomemenu = {
  5. { "manual", terminal .. " -e man awesome" },
  6. { "edit config", editor_cmd .. " " .. awesome.conffile },
  7. { "restart", awesome.restart },
  8. { "quit", awesome.quit }
  9. }
  10. mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
  11. { "Debian", debian.menu.Debian_menu.Debian },
  12. { "WPS", 'wps' },
  13. { "open terminal", terminal }
  14. }
  15. })
  16. mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
  17. menu = mymainmenu })
  18. -- }}}


点击(此处)折叠或打开

  1. -- {{{ Rules
  2. awful.rules.rules = {
  3. -- All clients will match this rule.
  4. { rule = { },
  5. properties = { border_width = beautiful.border_width,
  6. border_color = beautiful.border_normal,
  7. focus = true,
  8. keys = clientkeys,
  9. buttons = clientbuttons } },
  10. { rule = { class = "MPlayer" },
  11. properties = { floating = true } },
  12. { rule = { class = "pinentry" },
  13. properties = { floating = true } },
  14. { rule = { class = "gimp" },
  15. properties = { floating = true } },
  16. { rule = { class = "X-terminal-emulator" },
  17. properties = { tag = tags[1][1] } },
  18. { rule = { class = "Wps" },
  19. properties = { tag = tags[1][2] } },
  20. { rule = { class = "Leafpad" },
  21. properties = { tag = tags[1][2] } },
  22. { rule = { class = "Evince" },
  23. properties = { tag = tags[1][2] } },
  24. { rule = { class = "Google-chrome-beta" },
  25. properties = { tag = tags[1][3] } },
  26. { rule = { class = "Google-chrome" },
  27. properties = { tag = tags[1][3] } },
  28. { rule = { class = "Iceweasel" },
  29. properties = { tag = tags[1][3] } },
  30. { rule = { class = "Smplayer" },
  31. properties = { tag = tags[1][4] } },
  32. { rule = { class = "Gimp" },
  33. properties = { tag = tags[1][4] } },
  34. { rule = { class = "Nautilus" },
  35. properties = { tag = tags[1][5] } },
  36. { rule = { class = "Rox" },
  37. properties = { tag = tags[1][5] } },
  38. { rule = { class = "VirtualBox" },
  39. properties = { tag = tags[1][6] } },
  40. --设置特定程序在指定标签打开
  41. --程序CLASS 获取 xprop
  42. --tags[屏幕序号][标签序号需]
  43. --SmplayerGimp
  44. -- Set Firefox to always map on tags number 2 of screen 1.
  45. -- { rule = { class = "Firefox" },
  46. -- properties = { tag = tags[1][2] } },
  47. }
  48. -- }}}
4. 更换背景 theme.lua

点击(此处)折叠或打开

  1. theme.wallpaper_cmd = { "awsetbg /usr/share/awesome/themes/default/background.png" }

5. 自定义插件

~/.config/awesome/rc.lua
点击(此处)折叠或打开
  1. -- Standard awesome library
  2. require("awful")
  3. require("awful.autofocus")
  4. require("awful.rules")
  5. -- Theme handling library
  6. require("beautiful")
  7. -- Notification library
  8. require("naughty")
  9. require("vicious")
  10. require("mywidger")

点击(此处)折叠或打开

  1. mywibox[s].widgets = {
  2. {
  3. mylauncher,
  4. mytaglist[s],
  5. mypromptbox[s],
  6. layout = awful.widget.layout.horizontal.leftright
  7. },
  8. mylayoutbox[s],
  9. mytextclock,
  10. s == 1 and mysystray or nil,
  11. memwidget,
  12. cpuwidget,
  13. netwidget,
  14. layout = awful.widget.layout.horizontal.rightleft
  15. }

~/.config/awesome/mywidger.lua

点击(此处)折叠或打开

  1. -- Initialize widget
  2. memwidget = widget({ type = "textbox" })
  3. -- Register widget
  4. vicious.register(memwidget, vicious.widgets.mem, "mem: $1% ($2MB/$3MB)", 13)
  5. -- Initialize widget
  6. cpuwidget = widget({ type = "textbox" })
  7. -- Register widget
  8. vicious.register(cpuwidget, vicious.widgets.cpu, "CPU:$1%")
  9. --NET
  10. netwidget = widget({ type = "textbox" })
  11. vicious.register(netwidget, vicious.widgets.net, ' NET: ${eth0 down_kb}KB/${eth0 up_kb}KB', 1)
6. 自动启动
~/.config/awesome/rc.lua

点击(此处)折叠或打开

  1. --{{{ AUTO START
  2. awful.util.spawn_with_shell("kuaipan4uk")
  3. awful.util.spawn_with_shell("google-chrome")
  4. --}}}




阅读(1244) | 评论(0) | 转发(0) |
0

上一篇:apt-get download [package]

下一篇:niix-linux

给主人留下些什么吧!~~