Edited awesome, zsh and vim configuration files

This commit is contained in:
arcan1s 2013-02-11 16:40:26 +04:00
parent 36526c3588
commit a16601b4a1
4 changed files with 167 additions and 94 deletions

View File

@ -38,6 +38,7 @@ end
-- {{{ Variable definitions -- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers -- Themes define colours, icons, and wallpapers
--beautiful.init("/home/arcanis/.config/awesome/theme.lua")
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. -- This is used later as the default terminal and editor to run.
@ -54,6 +55,7 @@ torrent = "transmission-qt"
musplay = "amarok" musplay = "amarok"
messager = "qutim" messager = "qutim"
prtscreen = "/home/arcanis/bin/screenshots" prtscreen = "/home/arcanis/bin/screenshots"
screensaver = "xscreensaver-command -activate"
-- Default modkey. -- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt. -- Usually, Mod4 is the key with a logo between Control and Alt.
@ -105,7 +107,14 @@ myawesomemenu = {
{ "quit", awesome.quit } { "quit", awesome.quit }
} }
exitmenu = {
{ "suspend", "systemctl suspend" },
{ "reboot", "systemctl reboot" },
{ "shutdown", "systemctl poweroff" }
}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "exit" , exitmenu },
{ "open terminal", terminal } { "open terminal", terminal }
} }
}) })
@ -122,31 +131,35 @@ menubar.utils.terminal = terminal -- Set the terminal for applications that requ
mytextclock = awful.widget.textclock() mytextclock = awful.widget.textclock()
vicious = require("vicious") vicious = require("vicious")
battext = wibox.widget.textbox("battext")
battext = wibox.widget.textbox("battext")
function battery_status_text(widget, args) function battery_status_text(widget, args)
local perc = args[2] local perc = args[2]
if perc < 15 then if perc < 15 then
return '<span color="red">' .. 'BAT: ' .. perc .. '%</span> ' return '| BAT: ' .. '<span color="red">' .. perc .. '%</span>'
elseif perc < 50 then elseif perc < 50 then
return '<span color="yellow">' .. 'BAT: ' .. perc .. '%</span> ' return '| BAT: ' .. '<span color="yellow">' .. perc .. '%</span>'
end end
return '<span color="#8EAE6E">' .. 'BAT: ' .. perc .. '%</span> ' return '| BAT: ' .. '<span color="#8EAE6E">' .. perc .. '%</span>'
end end
vicious.register(battext, vicious.widgets.bat, battery_status_text, 120, "BAT0") vicious.register(battext, vicious.widgets.bat, battery_status_text, 120, "BAT0")
cputext_format = 'CPU: ' .. '<span color="lightgreen">$1%</span>' .. ' | '
cputext_format = "CPU: $1% "
cputext = wibox.widget.textbox("cputext") cputext = wibox.widget.textbox("cputext")
vicious.register(cputext, vicious.widgets.cpu, cputext_format, 3) vicious.register(cputext, vicious.widgets.cpu, cputext_format, 3)
memtext_format = 'MEM: ' .. '<span color="lightblue">$1%</span>' .. ' | '
memtext_format = "MEM: $1%"
memtext = wibox.widget.textbox("memtext") 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: ' .. '<span color="lightblue">$5%</span>' .. ' |'
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 -- Create a wibox for each screen and add it
mywibox = {} mywibox = {}
@ -227,7 +240,8 @@ for s = 1, screen.count() do
if s == 1 then right_layout:add(wibox.widget.systray()) end if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(cputext) right_layout:add(cputext)
right_layout:add(memtext) right_layout:add(memtext)
right_layout:add(mytextclock) right_layout:add(swaptext)
right_layout:add(datetext)
right_layout:add(battext) right_layout:add(battext)
right_layout:add(mylayoutbox[s]) right_layout:add(mylayoutbox[s])
@ -300,6 +314,7 @@ globalkeys = awful.util.table.join(
-- My key -- My key
awful.key({ }, "XF86Calculator", function () awful.util.spawn(terminal) end), awful.key({ }, "XF86Calculator", function () awful.util.spawn(terminal) end),
awful.key({ }, "XF86MyComputer", function () awful.util.spawn(fileman) 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, }, "F1", function () awful.util.spawn(net) end),
awful.key({ modkey, }, "F2", function () awful.util.spawn(messager) end), awful.key({ modkey, }, "F2", function () awful.util.spawn(messager) end),
awful.key({ modkey, }, "F3", function () awful.util.spawn(mailcli) end), awful.key({ modkey, }, "F3", function () awful.util.spawn(mailcli) end),
@ -405,6 +420,8 @@ awful.rules.rules = {
properties = { tag = tags[1][3] } }, properties = { tag = tags[1][3] } },
{ rule = { class = "Qutim" }, { rule = { class = "Qutim" },
properties = { tag = tags[1][6] } }, properties = { tag = tags[1][6] } },
{ rule = { class = "psi" },
properties = { tag = tags[1][6] } },
{ rule = { class = "Amarok" }, { rule = { class = "Amarok" },
properties = { tag = tags[1][5] } }, properties = { tag = tags[1][5] } },
{ rule = { class = "Gvim" }, { rule = { class = "Gvim" },

View File

@ -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 = {} 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" -- {{{ Colors
theme.bg_focus = "#535d6c" theme.fg_normal = "#DCDCCC"
theme.bg_urgent = "#ff0000" theme.fg_focus = "#F0DFAF"
theme.bg_minimize = "#444444" theme.fg_urgent = "#CC9393"
theme.bg_normal = "#3F3F3F"
theme.bg_focus = "#1E2320"
theme.bg_urgent = "#3F3F3F"
theme.bg_systray = theme.bg_normal theme.bg_systray = theme.bg_normal
-- }}}
theme.fg_normal = "#aaaaaa" -- {{{ Borders
theme.fg_focus = "#ffffff" theme.border_width = 2
theme.fg_urgent = "#ffffff" theme.border_normal = "#3F3F3F"
theme.fg_minimize = "#ffffff" theme.border_focus = "#6F6F6F"
theme.border_marked = "#CC9393"
-- }}}
theme.border_width = 1 -- {{{ Titlebars
theme.border_normal = "#000000" theme.titlebar_bg_focus = "#3F3F3F"
theme.border_focus = "#535d6c" theme.titlebar_bg_normal = "#3F3F3F"
theme.border_marked = "#91231c" -- }}}
-- There are other variable sets -- There are other variable sets
-- overriding the default one when -- overriding the default one when
-- defined, the sets are: -- defined, the sets are:
-- [taglist|tasklist]_[bg|fg]_[focus|urgent] -- [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] -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- Example: -- Example:
--theme.taglist_bg_focus = "#ff0000" --theme.taglist_bg_focus = "#CC9393"
-- }}}
-- 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
-- {{{ Widgets
-- You can add as many variables as -- You can add as many variables as
-- you wish and access them by using -- you wish and access them by using
-- beautiful.variable in your rc.lua -- 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 -- {{{ Mouse finder
theme.titlebar_close_button_normal = "/usr/share/awesome/themes/default/titlebar/close_normal.png" theme.mouse_finder_color = "#CC9393"
theme.titlebar_close_button_focus = "/usr/share/awesome/themes/default/titlebar/close_focus.png" -- mouse_finder_[timeout|animate_timeout|radius|factor]
-- }}}
theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_normal_inactive.png" -- {{{ Menu
theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/ontop_focus_inactive.png" -- Variables set for theming the menu:
theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/default/titlebar/ontop_normal_active.png" -- menu_[bg|fg]_[normal|focus]
theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/default/titlebar/ontop_focus_active.png" -- 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" -- {{{ Icons
theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/sticky_focus_inactive.png" -- {{{ Taglist
theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/default/titlebar/sticky_normal_active.png" theme.taglist_squares_sel = "/usr/share/awesome/themes/zenburn/taglist/squarefz.png"
theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/default/titlebar/sticky_focus_active.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" -- {{{ Misc
theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/floating_focus_inactive.png" theme.awesome_icon = "/usr/share/awesome/themes/zenburn/awesome-icon.png"
theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/default/titlebar/floating_normal_active.png" theme.menu_submenu_icon = "/usr/share/awesome/themes/default/submenu.png"
theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/default/titlebar/floating_focus_active.png" -- }}}
theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_normal_inactive.png" -- {{{ Layout
theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/default/titlebar/maximized_focus_inactive.png" theme.layout_tile = "/usr/share/awesome/themes/zenburn/layouts/tile.png"
theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/default/titlebar/maximized_normal_active.png" theme.layout_tileleft = "/usr/share/awesome/themes/zenburn/layouts/tileleft.png"
theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/default/titlebar/maximized_focus_active.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.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_active.png"
theme.layout_fairh = "/usr/share/awesome/themes/default/layouts/fairhw.png" theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_active.png"
theme.layout_fairv = "/usr/share/awesome/themes/default/layouts/fairvw.png" theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_focus_inactive.png"
theme.layout_floating = "/usr/share/awesome/themes/default/layouts/floatingw.png" theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/zenburn/titlebar/ontop_normal_inactive.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.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 theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_focus_active.png"
-- from /usr/share/icons and /usr/share/icons/hicolor will be used. theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/zenburn/titlebar/floating_normal_active.png"
theme.icon_theme = NITRIX 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 return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

2
vimrc
View File

@ -32,6 +32,8 @@ set showmatch
" Показывать номер строки " Показывать номер строки
set number set number
" Красная полоска на 80 символе
set colorcolumn=80
" Включить табы в начале строки " Включить табы в начале строки
set list set list

32
zshrc
View File

@ -54,13 +54,32 @@ autoload zcalc
if [[ $EUID == 0 ]] if [[ $EUID == 0 ]]
then then
# [root@host dir]# # [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 else
# [user@host dir]$ # [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 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 # right prompt with time
RPROMPT=$'%{\e[1;37m%}%T, %D%{\e[0m%}' #RPROMPT=$'%{\e[1;37m%}%T, %D%{\e[0m%}'
## alias ## 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 chromi2p='chromium --proxy-server="http=http://127.0.0.1:4444;https=https://127.0.0.1:4445" --incognito'
alias df='df -h' alias df='df -h'
alias du='du -c -h' alias du='du -c -h'
alias kdm='kdm && exit'
alias su='su -' alias su='su -'
alias ls='ls --color=auto' alias ls='ls --color=auto'
@ -140,6 +158,8 @@ then
alias fat32mnt='mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000' alias fat32mnt='mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000'
# MTS 3G modem # MTS 3G modem
alias mts_3g='eject /dev/sr1 && sleep 5 && wvdial mts3g & disown' alias mts_3g='eject /dev/sr1 && sleep 5 && wvdial mts3g & disown'
alias mp3mount='mtpfs -o allow_other'
alias kdm='kdm && exit'
else else
alias fat32mnt='sudo mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000' alias fat32mnt='sudo mount -t vfat -o codepage=866,iocharset=utf8,quiet,umask=000'
alias umount='sudo umount' alias umount='sudo umount'
@ -148,7 +168,9 @@ else
alias netcfg='sudo netcfg' alias netcfg='sudo netcfg'
# MTS 3G modem # MTS 3G modem
alias mts_3g='sudo eject /dev/sr1 && sleep 5 && sudo wvdial mts3g & disown' 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 fi
# global alias # global alias