「awesomeメモ」の編集履歴(バックアップ)一覧はこちら
「awesomeメモ」(2014/05/03 (土) 22:18:56) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
*バッテリー残量を表示する
acpiコマンドを使う
-- http://d.hatena.ne.jp/tmatsuu/20090124/1232776094
-- Show battery
bat_text = widget({ type = "textbox", align = "right" })
bat_refresh = function()
local charge_level = string.gsub(awful.util.pread("acpi -b"), "Battery %d: %u%l+, ", "")
bat_text.text = "B"..charge_level
return true
end
bat_status = bat_refresh()
-- Set timer
-- http://awesome.naquadah.org/wiki/Widgets_in_awesome
bat_timer = timer({ timeout = 15 })
bat_timer:add_signal("timeout", bat_refresh)
bat_timer:start()
-- Show battery
**コメント
aweful.until.pread()
-引数に与えた文字列をコマンドとして実行した結果を返す
string.gsub()
-第1引数の文字列の中で、第2引数のパターンに一致する部分文字列を、第3引数の文字列で置換する
timer
-インスタンス生成時の"timeout"は秒単位
[[公式のAPIドキュメント>http://awesome.naquadah.org/doc/api/modules/timer.html#timer]]では、タイムアウト時のハンドラの追加が"connect_signal()"と紹介されているが、
これをやると
attempt to call method 'connect_signal' (a nil value)
と言われる
[[3.3から3.4へのアップデート情報>http://awesome.naquadah.org/wiki/Awesome_3.3_to_3.4]]に書かれているが、
"add_signal()"を使うこと
*設定についての記事
-http://hpv.cc/~maty/pukiwiki1/index.php?kobo/debian
-[[https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)>https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)]]
-http://zentoo.hatenablog.com/entry/20100223/1266951112
-http://lohsnk.blogspot.jp/2009/08/wmawesome.html
-http://nimorin-nimono.blogspot.jp/2010/10/awesome2awesome3.html
-http://matea2.blogspot.jp/2010/09/awesome_24.html#more
-http://samemiso.blogspot.jp/2009/06/awesomefirefox.html
*テーマを変更する
~/.config/awesome/rc.lua
の
beautiful.init()
でテーマの設定を行なっています。
標準では以下のようにデフォルトのテーマを設定しています
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
/usr/share/awesome/themes/
以下に、標準では数は少ないですが、いくつかテーマの格納されたディレクトリがあります
例えば、以下のようにテーマを変更できます
&bold(){コマンドラインでの操作}
$ mkdir -p ~/.config/awesome/themes/
$ cp -r /usr/share/awesome/themes/sky ~/.config/awesome/themes/
&bold(){rc.luaの修正}
beautiful.init(awful.util.getdir("config").."/themes/sky/theme.lua")
**参考
-[[https://wiki.archlinux.org/index.php/Awesome_(日本語)>https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)]]
*バッテリー残量を表示する
acpiコマンドを使う
-- http://d.hatena.ne.jp/tmatsuu/20090124/1232776094
-- Show battery
bat_text = widget({ type = "textbox", align = "right" })
bat_refresh = function()
local charge_level = string.gsub(awful.util.pread("acpi -b"), "Battery %d: %u%l+, ", "")
bat_text.text = "B"..charge_level
return true
end
bat_status = bat_refresh()
-- Set timer
-- http://awesome.naquadah.org/wiki/Widgets_in_awesome
bat_timer = timer({ timeout = 15 })
bat_timer:add_signal("timeout", bat_refresh)
bat_timer:start()
-- Show battery
**コメント
aweful.until.pread()
-引数に与えた文字列をコマンドとして実行した結果を返す
string.gsub()
-第1引数の文字列の中で、第2引数のパターンに一致する部分文字列を、第3引数の文字列で置換する
timer
-インスタンス生成時の"timeout"は秒単位
[[公式のAPIドキュメント>http://awesome.naquadah.org/doc/api/modules/timer.html#timer]]では、タイムアウト時のハンドラの追加が"connect_signal()"と紹介されているが、
これをやると
attempt to call method 'connect_signal' (a nil value)
と言われる
[[3.3から3.4へのアップデート情報>http://awesome.naquadah.org/wiki/Awesome_3.3_to_3.4]]に書かれているが、"add_signal()"を使うこと
*設定についての記事
-http://hpv.cc/~maty/pukiwiki1/index.php?kobo/debian
-[[https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)>https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)]]
-http://zentoo.hatenablog.com/entry/20100223/1266951112
-http://lohsnk.blogspot.jp/2009/08/wmawesome.html
-http://nimorin-nimono.blogspot.jp/2010/10/awesome2awesome3.html
-http://matea2.blogspot.jp/2010/09/awesome_24.html#more
-http://samemiso.blogspot.jp/2009/06/awesomefirefox.html
*テーマを変更する
~/.config/awesome/rc.lua
の
beautiful.init()
でテーマの設定を行なっています。
標準では以下のようにデフォルトのテーマを設定しています
beautiful.init("/usr/share/awesome/themes/default/theme.lua")
/usr/share/awesome/themes/
以下に、標準では数は少ないですが、いくつかテーマの格納されたディレクトリがあります
例えば、以下のようにテーマを変更できます
&bold(){コマンドラインでの操作}
$ mkdir -p ~/.config/awesome/themes/
$ cp -r /usr/share/awesome/themes/sky ~/.config/awesome/themes/
&bold(){rc.luaの修正}
beautiful.init(awful.util.getdir("config").."/themes/sky/theme.lua")
**参考
-[[https://wiki.archlinux.org/index.php/Awesome_(日本語)>https://wiki.archlinux.org/index.php/Awesome_(%E6%97%A5%E6%9C%AC%E8%AA%9E)]]