1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
| --- /etc/xdg/awesome/rc.lua 2009-03-19 07:46:50.000000000 +0800
+++ .config/awesome/rc.lua 2009-03-20 03:34:40.981216823 +0800
@@ -8,7 +8,7 @@
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
-- The default is a dark theme
-theme_path = "/usr/share/awesome/themes/default/theme"
+theme_path = "/home/steamedfish/.config/awesome/default/theme"
-- Uncommment this for a lighter theme
-- theme_path = "/usr/share/awesome/themes/sky/theme"
@@ -16,8 +16,8 @@
beautiful.init(theme_path)
-- This is used later as the default terminal and editor to run.
-terminal = "xterm"
-editor = os.getenv("EDITOR") or "nano"
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
@@ -52,6 +52,11 @@
["MPlayer"] = true,
["pinentry"] = true,
["gimp"] = true,
+ ["SMPlayer"] = true,
+ ["Gimp"] = true,
+ ["Pidgin"] = true,
+ ["Kopete"] = true,
+ ["feh"] = true,
-- by instance
["mocp"] = true
}
@@ -75,12 +80,23 @@
-- Each screen has its own tag table.
tags[s] = {}
-- Create 9 tags per screen.
+ tags[s][1] = tag({ name = "bash" })
+ tags[s][2] = tag({ name = "firefox" })
+ tags[s][3] = tag({ name = "pidgin" })
+ tags[s][4] = tag({ name = "PCManX" })
+ tags[s][5] = tag({ name = "floating" })
+ tags[s][6] = tag({ name = "six" })
+ tags[s][7] = tag({ name = "seven" })
+ tags[s][8] = tag({ name = "eight" })
+ tags[s][9] = tag({ name = "nine" })
for tagnumber = 1, 9 do
- tags[s][tagnumber] = tag(tagnumber)
+ -- tags[s][tagnumber] = tag(tagnumber)
-- Add tags to screen one by one
tags[s][tagnumber].screen = s
awful.layout.set(layouts[1], tags[s][tagnumber])
end
+ -- Setup tag six to use floating layout.
+ awful.layout.set(layouts[10], tags[s][5])
-- I'm sure you want to see at least one tag.
tags[s][1].selected = true
end
@@ -90,18 +106,26 @@
-- Create a textbox widget
mytextbox = widget({ type = "textbox", align = "right" })
-- Set the default text in textbox
-mytextbox.text = "<b><small> " .. AWESOME_RELEASE .. " </small></b>"
+-- mytextbox.text = "<b><small> " .. AWESOME_RELEASE .. " </small></b>"
+mytextbox.text = "<b><small> Fisher Duan </small></b>"
-- Create a laucher widget and a main menu
myawesomemenu = {
+ { "lock", "xscreensaver-command -activate" },
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
}
-mymainmenu = awful.menu.new({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
- { "open terminal", terminal }
+mymainmenu = awful.menu.new({ items = {
+ { "open terminal", terminal },
+ { "firefox", "firefox" },
+ { "pidgin", "pidgin" },
+ { "emacs", "emacs" },
+ { "pcmanx", "pcmanx" },
+ { "Files", "pcmanfm" },
+ { "awesome", myawesomemenu, beautiful.awesome_icon }
}
})
@@ -145,7 +169,7 @@
mypromptbox[s] = widget({ type = "textbox", align = "left" })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
- mylayoutbox[s] = widget({ type = "imagebox", align = "right" })
+ mylayoutbox[s] = widget({ type = "imagebox", align = "left" })
mylayoutbox[s]:buttons({ button({ }, 1, function () awful.layout.inc(layouts, 1) end),
button({ }, 3, function () awful.layout.inc(layouts, -1) end),
button({ }, 4, function () awful.layout.inc(layouts, 1) end),
@@ -159,14 +183,14 @@
end, mytasklist.buttons)
-- Create the wibox
- mywibox[s] = wibox({ position = "top", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
+ mywibox[s] = wibox({ position = "bottom", fg = beautiful.fg_normal, bg = beautiful.bg_normal })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = { mylauncher,
mytaglist[s],
- mytasklist[s],
+ mylayoutbox[s],
mypromptbox[s],
+ mytasklist[s],
mytextbox,
- mylayoutbox[s],
s == 1 and mysystray or nil }
mywibox[s].screen = s
end
@@ -225,9 +249,10 @@
key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
+ key({ modkey, "Control" }, "l", function () awful.util.spawn("xscreensaver-command -activate") end),
-- Prompt
- key({ modkey }, "F1",
+ key({ modkey }, "F2",
function ()
awful.prompt.run({ prompt = "Run: " },
mypromptbox[mouse.screen],
@@ -428,8 +453,8 @@
end
end)
--- Hook called every minute
-awful.hooks.timer.register(60, function ()
- mytextbox.text = os.date(" %a %b %d, %H:%M ")
+-- Hook called every second
+awful.hooks.timer.register(1, function ()
+ mytextbox.text = os.date(" %Y-%m-%e, %H:%M:%S ")
end)
-- }}} |