diff --git a/awesome/rc.lua b/awesome/rc.lua
index 874ee06..6bfda12 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -38,6 +38,7 @@ end
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
+--beautiful.init("/home/arcanis/.config/awesome/theme.lua")
beautiful.init("/home/arcanis/.config/awesome/theme.lua")
-- This is used later as the default terminal and editor to run.
@@ -54,6 +55,7 @@ torrent = "transmission-qt"
musplay = "amarok"
messager = "qutim"
prtscreen = "/home/arcanis/bin/screenshots"
+screensaver = "xscreensaver-command -activate"
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
@@ -105,7 +107,14 @@ myawesomemenu = {
{ "quit", awesome.quit }
}
+exitmenu = {
+ { "suspend", "systemctl suspend" },
+ { "reboot", "systemctl reboot" },
+ { "shutdown", "systemctl poweroff" }
+}
+
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
+ { "exit" , exitmenu },
{ "open terminal", terminal }
}
})
@@ -122,31 +131,35 @@ menubar.utils.terminal = terminal -- Set the terminal for applications that requ
mytextclock = awful.widget.textclock()
vicious = require("vicious")
-battext = wibox.widget.textbox("battext")
+battext = wibox.widget.textbox("battext")
function battery_status_text(widget, args)
local perc = args[2]
if perc < 15 then
- return '' .. 'BAT: ' .. perc .. '% '
+ return '| BAT: ' .. '' .. perc .. '%'
elseif perc < 50 then
- return '' .. 'BAT: ' .. perc .. '% '
+ return '| BAT: ' .. '' .. perc .. '%'
end
- return '' .. 'BAT: ' .. perc .. '% '
+ return '| BAT: ' .. '' .. perc .. '%'
end
-
vicious.register(battext, vicious.widgets.bat, battery_status_text, 120, "BAT0")
-
-cputext_format = "CPU: $1% "
+cputext_format = 'CPU: ' .. '$1%' .. ' | '
cputext = wibox.widget.textbox("cputext")
vicious.register(cputext, vicious.widgets.cpu, cputext_format, 3)
-
-memtext_format = "MEM: $1%"
+memtext_format = 'MEM: ' .. '$1%' .. ' | '
memtext = wibox.widget.textbox("memtext")
-vicious.register(memtext, vicious.widgets.mem, memtext_format, 13)
+vicious.register(memtext, vicious.widgets.mem, memtext_format, 15)
+swaptext_format = 'SWAP: ' .. '$5%' .. ' |'
+swaptext = wibox.widget.textbox("swaptext")
+vicious.register(swaptext, vicious.widgets.mem, swaptext_format, 15)
+
+datetext_format = nil
+datetext = wibox.widget.textbox("datetext")
+vicious.register(datetext, vicious.widgets.date, datetext_format, 1)
-- Create a wibox for each screen and add it
mywibox = {}
@@ -227,7 +240,8 @@ for s = 1, screen.count() do
if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(cputext)
right_layout:add(memtext)
- right_layout:add(mytextclock)
+ right_layout:add(swaptext)
+ right_layout:add(datetext)
right_layout:add(battext)
right_layout:add(mylayoutbox[s])
@@ -298,14 +312,15 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, "Control" }, "n", awful.client.restore),
-- My key
- awful.key({ }, "XF86Calculator", function () awful.util.spawn(terminal) end),
- awful.key({ }, "XF86MyComputer", function () awful.util.spawn(fileman) end),
- awful.key({ modkey, }, "F1", function () awful.util.spawn(net) end),
- awful.key({ modkey, }, "F2", function () awful.util.spawn(messager) end),
- awful.key({ modkey, }, "F3", function () awful.util.spawn(mailcli) end),
- awful.key({ modkey, }, "F4", function () awful.util.spawn(torrent) end),
- awful.key({ modkey, }, "F5", function () awful.util.spawn(musplay) end),
- awful.key({ modkey, }, "F6", function () awful.util.spawn(libre) end),
+ awful.key({ }, "XF86Calculator", function () awful.util.spawn(terminal) end),
+ awful.key({ }, "XF86MyComputer", function () awful.util.spawn(fileman) end),
+ awful.key({ modkey, }, "l", function () awful.util.spawn(screensaver) end),
+ awful.key({ modkey, }, "F1", function () awful.util.spawn(net) end),
+ awful.key({ modkey, }, "F2", function () awful.util.spawn(messager) end),
+ awful.key({ modkey, }, "F3", function () awful.util.spawn(mailcli) end),
+ awful.key({ modkey, }, "F4", function () awful.util.spawn(torrent) end),
+ awful.key({ modkey, }, "F5", function () awful.util.spawn(musplay) end),
+ awful.key({ modkey, }, "F6", function () awful.util.spawn(libre) end),
awful.key({ }, "Print", function () awful.util.spawn(prtscreen,false) end),
-- Prompt
@@ -405,6 +420,8 @@ awful.rules.rules = {
properties = { tag = tags[1][3] } },
{ rule = { class = "Qutim" },
properties = { tag = tags[1][6] } },
+ { rule = { class = "psi" },
+ properties = { tag = tags[1][6] } },
{ rule = { class = "Amarok" },
properties = { tag = tags[1][5] } },
{ rule = { class = "Gvim" },
diff --git a/awesome/theme.lua b/awesome/theme.lua
index 7409289..cc0f578 100644
--- a/awesome/theme.lua
+++ b/awesome/theme.lua
@@ -1,98 +1,130 @@
----------------------------
--- Default awesome theme --
----------------------------
+-------------------------------
+-- "Zenburn" awesome theme --
+-- By Adrian C. (anrxc) --
+-------------------------------
+-- Alternative icon sets and widget icons:
+-- * http://awesome.naquadah.org/wiki/Nice_Icons
+
+-- {{{ Main
theme = {}
+--if tag == tags[1][1] then
+-- theme.wallpaper = "/home/arcanis/.kde4/wallpapers/Detroit_pan2.jpg"
+--end
+--else
+-- theme.wallpaper = "/home/arcanis/.kde4/wallpapers/Detroit_pan1.bmp"
+-- }}}
-theme.font = "sans 8"
+-- {{{ Styles
+theme.font = "droid sans 9"
-theme.bg_normal = "#222222"
-theme.bg_focus = "#535d6c"
-theme.bg_urgent = "#ff0000"
-theme.bg_minimize = "#444444"
-theme.bg_systray = theme.bg_normal
+-- {{{ Colors
+theme.fg_normal = "#DCDCCC"
+theme.fg_focus = "#F0DFAF"
+theme.fg_urgent = "#CC9393"
+theme.bg_normal = "#3F3F3F"
+theme.bg_focus = "#1E2320"
+theme.bg_urgent = "#3F3F3F"
+theme.bg_systray = theme.bg_normal
+-- }}}
-theme.fg_normal = "#aaaaaa"
-theme.fg_focus = "#ffffff"
-theme.fg_urgent = "#ffffff"
-theme.fg_minimize = "#ffffff"
+-- {{{ Borders
+theme.border_width = 2
+theme.border_normal = "#3F3F3F"
+theme.border_focus = "#6F6F6F"
+theme.border_marked = "#CC9393"
+-- }}}
-theme.border_width = 1
-theme.border_normal = "#000000"
-theme.border_focus = "#535d6c"
-theme.border_marked = "#91231c"
+-- {{{ Titlebars
+theme.titlebar_bg_focus = "#3F3F3F"
+theme.titlebar_bg_normal = "#3F3F3F"
+-- }}}
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- [taglist|tasklist]_[bg|fg]_[focus|urgent]
--- titlebar_[bg|fg]_[normal|focus]
+-- titlebar_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
--- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- Example:
---theme.taglist_bg_focus = "#ff0000"
-
--- Display the taglist squares
-theme.taglist_squares_sel = "/usr/share/awesome/themes/default/taglist/squarefw.png"
-theme.taglist_squares_unsel = "/usr/share/awesome/themes/default/taglist/squarew.png"
-
--- Variables set for theming the menu:
--- menu_[bg|fg]_[normal|focus]
--- menu_[border_color|border_width]
-theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
-theme.menu_height = 15
-theme.menu_width = 100
+--theme.taglist_bg_focus = "#CC9393"
+-- }}}
+-- {{{ Widgets
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
---theme.bg_widget = "#cc0000"
+--theme.fg_widget = "#AECF96"
+--theme.fg_center_widget = "#88A175"
+--theme.fg_end_widget = "#FF5656"
+--theme.bg_widget = "#494B4F"
+--theme.border_widget = "#3F3F3F"
+-- }}}
--- Define the image to load
-theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png"
-theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png"
+-- {{{ Mouse finder
+theme.mouse_finder_color = "#CC9393"
+-- mouse_finder_[timeout|animate_timeout|radius|factor]
+-- }}}
-theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png"
-theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png"
-theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png"
-theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png"
+-- {{{ Menu
+-- Variables set for theming the menu:
+-- menu_[bg|fg]_[normal|focus]
+-- menu_[border_color|border_width]
+theme.menu_height = 15
+theme.menu_width = 100
+-- }}}
-theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_normal_inactive.png"
-theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png"
-theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png"
-theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.png"
+-- {{{ Icons
+-- {{{ Taglist
+theme.taglist_squares_sel = "/usr/share/awesome/themes/zenburn/taglist/squarefz.png"
+theme.taglist_squares_unsel = "/usr/share/awesome/themes/zenburn/taglist/squarez.png"
+--theme.taglist_squares_resize = "false"
+-- }}}
-theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/floating_normal_inactive.png"
-theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png"
-theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png"
-theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png"
+-- {{{ Misc
+theme.awesome_icon = "/usr/share/awesome/themes/zenburn/awesome-icon.png"
+theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
+-- }}}
-theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png"
-theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png"
-theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png"
-theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.png"
+-- {{{ Layout
+theme.layout_tile = "/usr/share/awesome/themes/zenburn/layouts/tile.png"
+theme.layout_tileleft = "/usr/share/awesome/themes/zenburn/layouts/tileleft.png"
+theme.layout_tilebottom = "/usr/share/awesome/themes/zenburn/layouts/tilebottom.png"
+theme.layout_tiletop = "/usr/share/awesome/themes/zenburn/layouts/tiletop.png"
+theme.layout_fairv = "/usr/share/awesome/themes/zenburn/layouts/fairv.png"
+theme.layout_fairh = "/usr/share/awesome/themes/zenburn/layouts/fairh.png"
+theme.layout_spiral = "/usr/share/awesome/themes/zenburn/layouts/spiral.png"
+theme.layout_dwindle = "/usr/share/awesome/themes/zenburn/layouts/dwindle.png"
+theme.layout_max = "/usr/share/awesome/themes/zenburn/layouts/max.png"
+theme.layout_fullscreen = "/usr/share/awesome/themes/zenburn/layouts/fullscreen.png"
+theme.layout_magnifier = "/usr/share/awesome/themes/zenburn/layouts/magnifier.png"
+theme.layout_floating = "/usr/share/awesome/themes/zenburn/layouts/floating.png"
+-- }}}
-theme.wallpaper = "/home/arcanis/.kde4/wallpapers/Detroit_pan2.jpg"
+-- {{{ Titlebar
+theme.titlebar_close_button_focus = "/usr/share/awesome/themes/zenburn/titlebar/close_focus.png"
+theme.titlebar_close_button_normal = "/usr/share/awesome/themes/zenburn/titlebar/close_normal.png"
--- You can use your own layout icons like this:
-theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png"
-theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png"
-theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png"
-theme.layout_magnifier = "/usr/share/awesome/themes/default/layouts/magnifierw.png"
-theme.layout_max = "/usr/share/awesome/themes/default/layouts/maxw.png"
-theme.layout_fullscreen = "/usr/share/awesome/themes/default/layouts/fullscreenw.png"
-theme.layout_tilebottom = "/usr/share/awesome/themes/default/layouts/tilebottomw.png"
-theme.layout_tileleft = "/usr/share/awesome/themes/default/layouts/tileleftw.png"
-theme.layout_tile = "/usr/share/awesome/themes/default/layouts/tilew.png"
-theme.layout_tiletop = "/usr/share/awesome/themes/default/layouts/tiletopw.png"
-theme.layout_spiral = "/usr/share/awesome/themes/default/layouts/spiralw.png"
-theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png"
+theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_active.png"
+theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_active.png"
+theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_inactive.png"
+theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_inactive.png"
-theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
+theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/sticky_focus_active.png"
+theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/sticky_normal_active.png"
+theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/sticky_focus_inactive.png"
+theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/sticky_normal_inactive.png"
--- Define the icon theme for application icons. If not set then the icons
--- from /usr/share/icons and /usr/share/icons/hicolor will be used.
-theme.icon_theme = NITRIX
+theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_focus_active.png"
+theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_normal_active.png"
+theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/floating_focus_inactive.png"
+theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/floating_normal_inactive.png"
+
+theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/maximized_focus_active.png"
+theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/maximized_normal_active.png"
+theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/maximized_focus_inactive.png"
+theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/maximized_normal_inactive.png"
+-- }}}
+-- }}}
return theme
--- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
diff --git a/vimrc b/vimrc
index 594b80d..ed8b432 100644
--- a/vimrc
+++ b/vimrc
@@ -32,6 +32,8 @@ set showmatch
" Показывать номер строки
set number
+" Красная полоска на 80 символе
+set colorcolumn=80
" Включить табы в начале строки
set list
diff --git a/zshrc b/zshrc
index f6df0ee..c35602f 100644
--- a/zshrc
+++ b/zshrc
@@ -54,13 +54,32 @@ autoload zcalc
if [[ $EUID == 0 ]]
then
# [root@host dir]#
- PROMPT=$'%{\e[1;37m%}[%{\e[1;31m%}%n%{\e[1;37m%}@%{\e[1;31m%}%m %{\e[1;33m%}%1/%{\e[1;37m%}]#%{\e[0m%} '
+ PROMPT=$'%{\e[1;37m%}[%{\e[1;31m%}%n%{\e[1;37m%}@%{\e[0;31m%}%m %{\e[1;33m%}%1/%{\e[1;37m%}]#%{\e[0m%} '
else
# [user@host dir]$
- PROMPT=$'%{\e[1;37m%}[%{\e[1;32m%}%n%{\e[1;37m%}@%{\e[1;32m%}%m %{\e[1;33m%}%1/%{\e[1;37m%}]$%{\e[0m%} '
+ PROMPT=$'%{\e[1;37m%}[%{\e[1;32m%}%n%{\e[1;37m%}@%{\e[0;32m%}%m %{\e[1;33m%}%1/%{\e[1;37m%}]$%{\e[0m%} '
fi
+precmd () {
+ # Battery charge
+ function batcharge {
+ bat_perc=`acpi | awk {'print $4;'} | sed -e "s/\s//" -e "s/%.*//"`
+
+ if [[ $bat_perc < 15 ]]
+ then
+ col='%{\e[1;31m%}'
+ elif [[ $bat_perc < 50 ]]
+ then
+ col='%{\e[1;33m%}'
+ else
+ col='%{\e[1;32m%}'
+ fi
+
+ echo '%{\e[1;37m%}['$col$bat_perc'%{\e[1;37m%}%%]%{\e[0m%}'
+ }
+ RPROMPT=$'%{\e[1;37m%}[%T]%{\e[0m%} '$(batcharge)
+}
# right prompt with time
-RPROMPT=$'%{\e[1;37m%}%T, %D%{\e[0m%}'
+#RPROMPT=$'%{\e[1;37m%}%T, %D%{\e[0m%}'
## alias
@@ -72,7 +91,6 @@ alias chromtor='chromium --proxy-server="socks://localhost:9050" --incognito'
alias chromi2p='chromium --proxy-server="http=http://127.0.0.1:4444;https=https://127.0.0.1:4445" --incognito'
alias df='df -h'
alias du='du -c -h'
-alias kdm='kdm && exit'
alias su='su -'
alias ls='ls --color=auto'
@@ -140,6 +158,8 @@ then
alias fat32mnt='mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000'
# MTS 3G modem
alias mts_3g='eject /dev/sr1 && sleep 5 && wvdial mts3g & disown'
+ alias mp3mount='mtpfs -o allow_other'
+ alias kdm='kdm && exit'
else
alias fat32mnt='sudo mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000'
alias umount='sudo umount'
@@ -148,7 +168,9 @@ else
alias netcfg='sudo netcfg'
# MTS 3G modem
alias mts_3g='sudo eject /dev/sr1 && sleep 5 && sudo wvdial mts3g & disown'
- alias desktop='sudo netcfg-menu && sudo kdm && exit'
+ alias desktop='sudo netcfg-menu && sudo systemctl start smbd.service && sudo systemctl start nmbd.service && sudo kdm && exit'
+ alias mp3mount='sudo mtpfs -o allow_other'
+ alias kdm='sudo kdm && exit'
fi
# global alias