Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Standard awesome library
- local gears = require("gears")
- local awful = require("awful")
- awful.rules = require("awful.rules")
- require("awful.autofocus")
- -- Widget and layout library
- local wibox = require("wibox")
- -------------------------------------------------------------------------------
- vicious = require("vicious")
- -- obvious = require("obvious")
- -------------------------------------------------------------------------------
- -- Theme handling library
- local beautiful = require("beautiful")
- -- Notification library
- local naughty = require("naughty")
- -------------------------------------------------------------------------------
- naughty.config.defaults.position = "top_right"
- naughty.config.defaults.fg = '#000000'
- naughty.config.defaults.bg = '#00ffff'
- -------------------------------------------------------------------------------
- local menubar = require("menubar")
- -- Load Debian menu entries
- require("debian.menu")
- -- {{{ Error handling
- -- Check if awesome encountered an error during startup and fell back to
- -- another config (This code will only ever execute for the fallback config)
- if awesome.startup_errors then
- naughty.notify({ preset = naughty.config.presets.critical,
- title = "Oops, there were errors during startup!",
- text = awesome.startup_errors })
- end
- -- Handle runtime errors after startup
- do
- local in_error = false
- awesome.connect_signal("debug::error", function (err)
- -- Make sure we don't go into an endless error loop
- if in_error then return end
- in_error = true
- naughty.notify({ preset = naughty.config.presets.critical,
- title = "Oops, an error happened!",
- text = err })
- in_error = false
- end)
- end
- -- }}}
- -- {{{ Variable definitions
- -- Themes define colours, icons, font and wallpapers.
- -------------------------------------------------------------------------------
- -- beautiful.init("/usr/share/awesome/themes/default/theme.lua")
- home = os.getenv("HOME")
- user = os.getenv("USER")
- beautiful.init(home .. "/.config/awesome/themes/piyavking/theme.lua")
- -------------------------------------------------------------------------------
- -- This is used later as the default terminal and editor to run.
- terminal = "x-terminal-emulator"
- editor = os.getenv("EDITOR") or "editor"
- editor_cmd = terminal .. " -e " .. editor
- -- Default modkey.
- -- Usually, Mod4 is the key with a logo between Control and Alt.
- -- If you do not like this or do not have such a key,
- -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
- -- However, you can use another modifier like Mod1, but it may interact with others.
- modkey = "Mod4"
- -- Table of layouts to cover with awful.layout.inc, order matters.
- local layouts =
- {
- awful.layout.suit.floating,
- awful.layout.suit.tile,
- awful.layout.suit.tile.left,
- awful.layout.suit.tile.bottom,
- awful.layout.suit.tile.top,
- awful.layout.suit.fair,
- awful.layout.suit.fair.horizontal,
- awful.layout.suit.spiral,
- awful.layout.suit.spiral.dwindle,
- awful.layout.suit.max,
- awful.layout.suit.max.fullscreen,
- awful.layout.suit.magnifier
- }
- -- }}}
- -- {{{ Wallpaper
- -- if beautiful.wallpaper then
- -- for s = 1, screen.count() do
- -- gears.wallpaper.maximized(beautiful.wallpaper, s, true)
- -- end
- -- end
- -- }}}
- -- {{{ Tags
- -- Define a tag table which hold all screen tags.
- -- tags = {}
- -- for s = 1, screen.count() do
- -- Each screen has its own tag table.
- -- tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
- -- end
- -------------------------------------------------------------------------------
- tags = {
- names = {" ⠐ ", " ⠡ ", " ⠪ ", " ⠵ ", " ⠻ ", " ⠿ ",},
- }
- for s = 1, screen.count() do
- tags[s] = awful.tag(tags.names, s, {layouts[4], layouts[1], layouts[2], layouts[4], layouts[4], layouts[4]})
- end
- -------------------------------------------------------------------------------
- -- }}}
- -- {{{ Menu
- -- Create a laucher widget and a main menu
- myawesomemenu = {
- { "manual", terminal .. " -e man awesome" },
- { "edit config", editor_cmd .. " " .. awesome.conffile },
- { "restart", awesome.restart },
- { "quit", awesome.quit }
- }
- mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
- { "Debian", debian.menu.Debian_menu.Debian },
- { "open terminal", terminal }
- }, theme = { width = 200, height = 20 }
- })
- mylauncher = wibox.layout.margin(awful.widget.launcher({ image = beautiful.awesome_icon,
- menu = mymainmenu }), 0, 5, 0, 0 )
- -------------------------------------------------------------------------------
- FL_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/FL.png', command = "FL.sh" })
- FL_launcher = wibox.layout.constraint(FL_launcher, "exact", 50, nil)
- FL_launcher = wibox.layout.margin(FL_launcher, 10, 10, 10, 10 )
- GR_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/gr5.png', command = "guitar_rig.sh" })
- GR_launcher = wibox.layout.constraint(GR_launcher, "exact", 50, nil)
- GR_launcher = wibox.layout.margin(GR_launcher, 10, 10, 10, 10 )
- qjackctl_launcher = awful.widget.launcher({ image = '/usr/share/pixmaps/qjackctl.xpm', command = "qjackctl" })
- qjackctl_launcher = wibox.layout.constraint(qjackctl_launcher, "exact", 50, nil)
- qjackctl_launcher = wibox.layout.margin(qjackctl_launcher, 10, 10, 10, 10 )
- jmixer_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/jack_mixer.png', command = "jack_mixer" })
- jmixer_launcher = wibox.layout.constraint(jmixer_launcher, "exact", 50, nil)
- jmixer_launcher = wibox.layout.margin(jmixer_launcher, 10, 10, 10, 10 )
- pavucontrol_launcher = awful.widget.launcher({ image = '/usr/share/icons/gnome/48x48/apps/multimedia-volume-control.png', command = "pavucontrol" })
- pavucontrol_launcher = wibox.layout.constraint(pavucontrol_launcher, "exact", 50, nil)
- pavucontrol_launcher = wibox.layout.margin(pavucontrol_launcher, 10, 10, 10, 10 )
- audacity_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/audacity.png', command = "env PULSE_LATENCY_MSEC=30 audacity" })
- audacity_launcher = wibox.layout.constraint(audacity_launcher, "exact", 50, nil)
- audacity_launcher = wibox.layout.margin(audacity_launcher, 10, 10, 10, 10 )
- --avidemux_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/avidemux.png', command = "env PULSE_LATENCY_MSEC=30 avidemux" })
- --avidemux_launcher = wibox.layout.constraint(avidemux_launcher, "exact", 50, nil)
- --avidemux_launcher = wibox.layout.margin(avidemux_launcher, 10, 10, 10, 10 )
- gimp_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/gimp.png', command = "gimp" })
- gimp_launcher = wibox.layout.constraint(gimp_launcher, "exact", 50, nil)
- gimp_launcher = wibox.layout.margin(gimp_launcher, 10, 10, 10, 10 )
- handbrake_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/scalable/apps/hb-icon.svg', command = "handbrake-gtk" })
- handbrake_launcher = wibox.layout.constraint(handbrake_launcher, "exact", 50, nil)
- handbrake_launcher = wibox.layout.margin(handbrake_launcher, 10, 10, 10, 10 )
- blood_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/blood.png', command = "dosbox " .. home .. "/.dosbox/blood/blood.exe -fullscreen -exit" })
- blood_launcher = wibox.layout.constraint(blood_launcher, "exact", 50, nil)
- blood_launcher = wibox.layout.margin(blood_launcher, 10, 10, 10, 10 )
- cryptic_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/caleb.png', command = "dosbox " .. home .. "/.dosbox/blood/CRYPTIC.exe -fullscreen -exit" })
- cryptic_launcher = wibox.layout.constraint(cryptic_launcher, "exact", 50, nil)
- cryptic_launcher = wibox.layout.margin(cryptic_launcher, 10, 10, 10, 10 )
- RR_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/RR.png', command = "dosbox " .. home .. "/.dosbox/RedNeck/rr/RR.EXE -fullscreen -exit" })
- RR_launcher = wibox.layout.constraint(RR_launcher, "exact", 50, nil)
- RR_launcher = wibox.layout.margin(RR_launcher, 10, 10, 10, 10 )
- RA_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/RRRA.png', command = "dosbox " .. home .. "/.dosbox/RedNeck/rrra/RA.EXE -fullscreen -exit" })
- RA_launcher = wibox.layout.constraint(RA_launcher, "exact", 50, nil)
- RA_launcher = wibox.layout.margin(RA_launcher, 10, 10, 10, 10 )
- Route66_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/ROUTE66.png', command = "dosbox " .. home .. "/.dosbox/RedNeck/rrsgr66/ROUTE66.EXE -fullscreen -exit" })
- Route66_launcher = wibox.layout.constraint(Route66_launcher, "exact", 50, nil)
- Route66_launcher = wibox.layout.margin(Route66_launcher, 10, 10, 10, 10 )
- hexen1_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/Hexen-1-icon.png', command = "dosbox " .. home .. "/.dosbox/Hexendk/HEXEN.EXE -fullscreen -exit" })
- hexen1_launcher = wibox.layout.constraint(hexen1_launcher, "exact", 50, nil)
- hexen1_launcher = wibox.layout.margin(hexen1_launcher, 10, 10, 10, 10 )
- hexen2_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/Hexen-1-icon.png', command = "dosbox " .. home .. "/.dosbox/Hexendk/HEXENDK.EXE -fullscreen -exit" })
- hexen2_launcher = wibox.layout.constraint(hexen2_launcher, "exact", 50, nil)
- hexen2_launcher = wibox.layout.margin(hexen2_launcher, 10, 10, 10, 10 )
- pacman_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/Pacman.ico', command = "fceux " .. home .. "/.fceux/roms/Pac-Man.nes" })
- pacman_launcher = wibox.layout.constraint(pacman_launcher, "exact", 50, nil)
- pacman_launcher = wibox.layout.margin(pacman_launcher, 10, 10, 10, 10 )
- pacmania_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/Pac-Mania.ico', command = "fceux " .. home .. "/.fceux/roms/Pac-Mania.nes" })
- pacmania_launcher = wibox.layout.constraint(pacmania_launcher, "exact", 50, nil)
- pacmania_launcher = wibox.layout.margin(pacmania_launcher, 10, 10, 10, 10 )
- abadox_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/Pac-Mania.ico', command = "fceux " .. home .. "/.fceux/roms/Abadox.nes" })
- abadox_launcher = wibox.layout.constraint(abadox_launcher, "exact", 50, nil)
- abadox_launcher = wibox.layout.margin(abadox_launcher, 10, 10, 10, 10 )
- manhunt_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/manhunt.png', command = "manhunt.sh" })
- manhunt_launcher = wibox.layout.constraint(manhunt_launcher, "exact", 50, nil)
- manhunt_launcher = wibox.layout.margin(manhunt_launcher, 10, 10, 10, 10 )
- seamonkey_launcher = awful.widget.launcher({ image = '/opt/seamonkey/chrome/icons/default/seamonkey.png', command = 'env LD_PRELOAD=/home/piyavking/fullscreenhack-master/libfshack-npapi.so seamonkey' })
- seamonkey_launcher = wibox.layout.constraint(seamonkey_launcher, "exact", 50, nil)
- seamonkey_launcher = wibox.layout.margin(seamonkey_launcher, 10, 10, 10, 10 )
- gvim_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/gvim.png', command = 'gvim' })
- gvim_launcher = wibox.layout.constraint(gvim_launcher, "exact", 50, nil)
- gvim_launcher = wibox.layout.margin(gvim_launcher, 10, 10, 10, 10 )
- composer_launcher = awful.widget.launcher({ image = '/opt/seamonkey/chrome/icons/default/editorWindow48.png', command = 'seamonkey -editor' })
- composer_launcher = wibox.layout.constraint(composer_launcher, "exact", 50, nil)
- composer_launcher = wibox.layout.margin(composer_launcher, 10, 10, 10, 10 )
- lowriter_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/libreoffice-writer.png', command = 'lowriter' })
- lowriter_launcher = wibox.layout.constraint(lowriter_launcher, "exact", 50, nil)
- lowriter_launcher = wibox.layout.margin(lowriter_launcher, 10, 10, 10, 10 )
- chromium_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/chromium-browser.png', command = 'chromium-browser' })
- chromium_launcher = wibox.layout.constraint(chromium_launcher, "exact", 50, nil)
- chromium_launcher = wibox.layout.margin(chromium_launcher, 10, 10, 10, 10 )
- seamonkey_mail_launcher = awful.widget.launcher({ image = '/opt/seamonkey/chrome/icons/default/messengerWindow48.png', command = 'env LD_PRELOAD=/home/piyavking/fullscreenhack-master/libfshack-npapi.so seamonkey -mail' })
- seamonkey_mail_launcher = wibox.layout.constraint(seamonkey_mail_launcher, "exact", 50, nil)
- seamonkey_mail_launcher = wibox.layout.margin(seamonkey_mail_launcher, 10, 10, 10, 10 )
- pidgin_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/pidgin.png', command = 'pidgin' })
- pidgin_launcher = wibox.layout.constraint(pidgin_launcher, "exact", 50, nil)
- pidgin_launcher = wibox.layout.margin(pidgin_launcher, 10, 10, 10, 10 )
- skype_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/skype.png', command = 'skype' })
- skype_launcher = wibox.layout.constraint(skype_launcher, "exact", 50, nil)
- skype_launcher = wibox.layout.margin(skype_launcher, 10, 10, 10, 10 )
- smplayer_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/64x64/apps/smplayer.png', command = 'smplayer' })
- smplayer_launcher = wibox.layout.constraint(smplayer_launcher, "exact", 50, nil)
- smplayer_launcher = wibox.layout.margin(smplayer_launcher, 10, 10, 10, 10 )
- smtube_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/64x64/apps/smtube.png', command = 'smtube' })
- smtube_launcher = wibox.layout.constraint(smtube_launcher, "exact", 50, nil)
- smtube_launcher = wibox.layout.margin(smtube_launcher, 10, 10, 10, 10 )
- projectm_launcher = awful.widget.launcher({ image = '/usr/share/pixmaps/prjm16-transparent.svg', command = 'projectM-pulseaudio' })
- projectm_launcher = wibox.layout.constraint(projectm_launcher, "exact", 50, nil)
- projectm_launcher = wibox.layout.margin(projectm_launcher, 10, 10, 10, 10 )
- mplaylist_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/mplayer.png', command = 'mplayer.sh -foldr' })
- mplaylist_launcher = wibox.layout.constraint(mplaylist_launcher, "exact", 50, nil)
- mplaylist_launcher = wibox.layout.margin(mplaylist_launcher, 10, 10, 10, 10 )
- mplaylist_s_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/mplayer_s.png', command = 'mplayer.sh -s' })
- mplaylist_s_launcher = wibox.layout.constraint(mplaylist_s_launcher, "exact", 50, nil)
- mplaylist_s_launcher = wibox.layout.margin(mplaylist_s_launcher, 10, 10, 10, 10 )
- urxvt_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/urxvt.png', command = 'urxvt.sh' })
- urxvt_launcher = wibox.layout.constraint(urxvt_launcher, "exact", 50, nil)
- urxvt_launcher = wibox.layout.margin(urxvt_launcher, 10, 10, 10, 10 )
- tc_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/TC.png', command = 'tc.sh' })
- tc_launcher = wibox.layout.constraint(tc_launcher, "exact", 50, nil)
- tc_launcher = wibox.layout.margin(tc_launcher, 10, 10, 10, 10 )
- nc_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/NC.png', command = 'dosbox ' .. home .. '/.dosbox/dosbox.bat -exit' })
- nc_launcher = wibox.layout.constraint(nc_launcher, "exact", 50, nil)
- nc_launcher = wibox.layout.margin(nc_launcher, 10, 10, 10, 10 )
- gparted_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/48x48/apps/gparted.png', command = 'sudo gparted' })
- gparted_launcher = wibox.layout.constraint(gparted_launcher, "exact", 50, nil)
- gparted_launcher = wibox.layout.margin(gparted_launcher, 10, 10, 10, 10 )
- synaptic_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/synaptic.png', command = 'sudo synaptic' })
- synaptic_launcher = wibox.layout.constraint(synaptic_launcher, "exact", 50, nil)
- synaptic_launcher = wibox.layout.margin(synaptic_launcher, 10, 10, 10, 10 )
- updater_launcher = awful.widget.launcher({ image = home .. '/.local/share/icons/system-software-update.png', command = 'sudo update-manager' })
- updater_launcher = wibox.layout.constraint(updater_launcher, "exact", 50, nil)
- updater_launcher = wibox.layout.margin(updater_launcher, 10, 10, 10, 10 )
- wicd_launcher = awful.widget.launcher({ image = '/usr/share/icons/hicolor/64x64/apps/wicd-gtk.png', command = 'wicd-gtk' })
- wicd_launcher = wibox.layout.constraint(wicd_launcher, "exact", 50, nil)
- wicd_launcher = wibox.layout.margin(wicd_launcher, 10, 10, 10, 10 )
- sysmon_launcher = awful.widget.launcher({ image = '/usr/share/icons/gnome/48x48/apps/utilities-system-monitor.png', command = 'gnome-system-monitor' })
- sysmon_launcher = wibox.layout.constraint(sysmon_launcher, "exact", 50, nil)
- sysmon_launcher = wibox.layout.margin(sysmon_launcher, 10, 10, 10, 10 )
- kbdcfg = {}
- kbdcfg.cmd = "setxkbmap"
- kbdcfg.layout = { { "us", "US" }, { "ru", "РУ" } }
- kbdcfg.current = 1 -- us is our default layout
- kbdcfg.widget = wibox.widget.textbox()
- kbdcfg.widget:set_text("" .. kbdcfg.layout[kbdcfg.current][2] .. "")
- kbdcfg.switch = function ()
- kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
- local t = kbdcfg.layout[kbdcfg.current]
- kbdcfg.widget:set_text("" .. t[2] .. "")
- if kbdcfg.current == 2 then
- os.execute( kbdcfg.cmd .. " " .. "ru" .. ";sleep 0.25;" .. kbdcfg.cmd .. " " .. "ru,us" )
- else
- os.execute( kbdcfg.cmd .. " " .. "us" )
- end
- end
- kbdcfg.widget:set_align("left")
- kbdcfg.widget:buttons (awful.util.table.join (awful.button ({ }, 1, function ()
- kbdcfg.switch()
- end
- )
- )
- )
- myuptimewidget = wibox.widget.textbox()
- myuptimewidget:set_align("left")
- vicious.register(myuptimewidget, vicious.widgets.uptime, "$1d; $2h; $3m", 1)
- downwidget = wibox.widget.textbox()
- downwidget:set_align("left")
- vicious.register(downwidget, vicious.widgets.net,
- function (downwidget, args)
- downvalue = args ["{wlp2s0f0 down_b}"]
- return downvalue
- end, 1 )
- downwidget = wibox.layout.constraint(downwidget, "exact", 85, nil)
- downprogressbar = awful.widget.progressbar()
- vicious.register(downprogressbar, vicious.widgets.net,
- function (downprogressbar, args)
- return math.floor ( math.log ( tonumber ( downvalue ) + 1 ) * 6 )
- end, 1 )
- downprogressbar:set_width(230)
- downprogressbar:set_height(2)
- downprogressbar:set_vertical(false)
- downprogressbar:set_color('#00ffff88')
- downprogressbar:set_background_color('#00000088')
- upwidget = wibox.widget.textbox()
- upwidget:set_align("left")
- vicious.register(upwidget, vicious.widgets.net,
- function (upwidget, args)
- upvalue = args ["{wlp2s0f0 up_b}"]
- return upvalue
- end, 1 )
- upwidget = wibox.layout.constraint(upwidget, "exact", 85, nil)
- upprogressbar = awful.widget.progressbar()
- vicious.register(upprogressbar, vicious.widgets.net,
- function (upprogressbar, args)
- return math.floor ( math.log ( tonumber ( upvalue ) + 1 ) * 6 )
- end, 1 )
- upprogressbar:set_width(230)
- upprogressbar:set_height(2)
- upprogressbar:set_vertical(false)
- upprogressbar:set_color('#00ffff88')
- upprogressbar:set_background_color('#00000088')
- partwidget = wibox.widget.textbox()
- partwidget:set_align("left")
- vicious.register(partwidget, vicious.widgets.fs,
- function (partwidget, args)
- root_used = args ["{/ used_gb}"]
- root_size = args ["{/ size_gb}"]
- home_used = args ["{/home used_gb}"]
- home_size = args ["{/home size_gb}"]
- return root_used .. '/' .. root_size .. 'G'
- end, 1 )
- partwidget = wibox.layout.constraint(partwidget, "exact", 85, nil)
- rootprogressbar = awful.widget.progressbar()
- vicious.register(rootprogressbar, vicious.widgets.fs,
- function (rootprogressbar, args)
- return math.floor ( 100 * tonumber ( root_used ) / ( tonumber ( root_size ) ) )
- end, 1 )
- rootprogressbar:set_width(230)
- rootprogressbar:set_height(2)
- rootprogressbar:set_vertical(false)
- rootprogressbar:set_color('#00ffff88')
- rootprogressbar:set_background_color('#00000088')
- homewidget = wibox.widget.textbox()
- homewidget:set_align("left")
- vicious.register(homewidget, vicious.widgets.fs,
- function (homewidget, args)
- return home_used .. '/' .. home_size .. 'G'
- end, 1 )
- homewidget = wibox.layout.constraint(homewidget, "exact", 105, nil)
- homeprogressbar = awful.widget.progressbar()
- vicious.register(homeprogressbar, vicious.widgets.fs,
- function (homeprogressbar, args)
- return math.floor ( 100 * tonumber ( home_used ) / ( tonumber ( home_size ) ) )
- end, 1 )
- homeprogressbar:set_width(230)
- homeprogressbar:set_height(2)
- homeprogressbar:set_vertical(false)
- homeprogressbar:set_color('#00FFFF88')
- homeprogressbar:set_background_color('#00000088')
- pswidget = wibox.widget.textbox()
- pswidget:set_align("right")
- pswidget:set_text(io.popen("ps -Ao comm,pcpu,pmem --sort=-pcpu | head -n 9 | tail -n 8"):read("*a"))
- pswidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('gnome-system-monitor') end)))
- cpuwidget = wibox.widget.textbox()
- cpuwidget:set_align("left")
- vicious.register(cpuwidget, vicious.widgets.cpu,
- function (cpuwidget, args)
- cpupercent = args [1]
- return cpupercent .. "% "
- end, 1)
- cpuprogressbar = awful.widget.progressbar()
- vicious.register(cpuprogressbar, vicious.widgets.cpu,
- function (cpuprogressbar, args)
- return tonumber ( cpupercent )
- end, 1 )
- cpuprogressbar:set_width(230)
- cpuprogressbar:set_height(2)
- cpuprogressbar:set_vertical(false)
- cpuprogressbar:set_color('#00ffff88')
- cpuprogressbar:set_background_color('#00000088')
- cpufreqwidget = wibox.widget.textbox()
- cpufreqwidget:set_align("left")
- vicious.register(cpufreqwidget, vicious.widgets.cpufreq, "$5 ", 1, 'cpu0')
- memwidget = wibox.widget.textbox()
- memwidget:set_align("left")
- vicious.register(memwidget, vicious.widgets.mem,
- function (memwidget, args)
- mempercent = args [1]
- return mempercent .. "% "
- end, 1)
- memprogressbar = awful.widget.progressbar()
- vicious.register(memprogressbar, vicious.widgets.mem,
- function (memprogressbar, args)
- return tonumber ( mempercent )
- end, 1 )
- memprogressbar:set_width(230)
- memprogressbar:set_height(2)
- memprogressbar:set_vertical(false)
- memprogressbar:set_color('#00ffff88')
- memprogressbar:set_background_color('#00000088')
- batwidget = wibox.widget.textbox()
- vicious.register(batwidget, vicious.widgets.bat, "$2% ", 1, 'BAT0')
- thermalwidget = wibox.widget.textbox()
- thermalwidget:set_align("left")
- vicious.register(thermalwidget, vicious.widgets.thermal, "$1°С ", 1, "thermal_zone7")
- slashwidget = wibox.widget.textbox()
- slashwidget:set_align("left")
- slashwidget:set_markup('<span color="#00FFFF">/</span> ')
- spacewidget = wibox.widget.textbox()
- spacewidget:set_align("left")
- spacewidget:set_markup(' ')
- fanwidget = wibox.widget.textbox()
- fanwidget:set_align("left")
- fanwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('fan.sh left')
- end),
- awful.button({ }, 2, function ()
- awful.util.spawn_with_shell('fan.sh auto')
- end),
- awful.button({ }, 3, function ()
- awful.util.spawn_with_shell('fan.sh right')
- end)
- )
- )
- sdbwidget = wibox.widget.textbox()
- sdbwidget:set_align("left")
- GDwidget = wibox.widget.textbox()
- GDwidget:set_align("left")
- andwidget = wibox.widget.textbox()
- andwidget:set_align("left")
- smbwidget = wibox.widget.textbox()
- smbwidget:set_align("left")
- ftpwidget = wibox.widget.textbox()
- ftpwidget:set_align("left")
- wowidget = wibox.widget.textbox()
- wowidget:set_align("left")
- wowidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('wallpaper.sh o') end)))
- wfwidget = wibox.widget.textbox()
- wfwidget:set_align("left")
- wfwidget:set_markup("wf ")
- wfwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('wallpaper.sh f') end)))
- wbwidget = wibox.widget.textbox()
- wbwidget:set_align("left")
- wbwidget:set_markup("wb ")
- wbwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('wallpaper.sh b') end)))
- wvwidget = wibox.widget.textbox()
- wvwidget:set_align("left")
- wvwidget:set_markup("wv ")
- wvwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('wallpaper.sh e') end)))
- wpwidget = wibox.widget.textbox()
- wpwidget:set_align("left")
- wpwidget:set_markup("wp ")
- wpwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('wallpaper.sh p') end)))
- artfilewidget = wibox.widget.textbox()
- artfilewidget:set_align("left")
- artfilewidget:set_markup('artfile ')
- artfilewidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh artfile')
- end)
- )
- )
- bindimagewidget = wibox.widget.textbox()
- bindimagewidget:set_align("left")
- bindimagewidget:set_markup('bindimage ')
- bindimagewidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh bindimage')
- end)
- )
- )
- deviantartwidget = wibox.widget.textbox()
- deviantartwidget:set_align("left")
- deviantartwidget:set_markup('deviantart ')
- deviantartwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh deviantart')
- end)
- )
- )
- collectionwidget = wibox.widget.textbox()
- collectionwidget:set_align("left")
- collectionwidget:set_markup('collection ')
- collectionwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh collection')
- end)
- )
- )
- flickrwidget = wibox.widget.textbox()
- flickrwidget:set_align("left")
- flickrwidget:set_markup('flickr ')
- flickrwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh flickr')
- end)
- )
- )
- favoritieswidget = wibox.widget.textbox()
- favoritieswidget:set_align("left")
- favoritieswidget:set_markup('favorities ')
- favoritieswidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh favorities')
- end)
- )
- )
- paperchanwidget = wibox.widget.textbox()
- paperchanwidget:set_align("left")
- paperchanwidget:set_markup('paperchan ')
- paperchanwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh paperchan')
- end)
- )
- )
- oboihdwidget = wibox.widget.textbox()
- oboihdwidget:set_align("left")
- oboihdwidget:set_markup('oboihd ')
- oboihdwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh oboihd')
- end)
- )
- )
- usiterwidget = wibox.widget.textbox()
- usiterwidget:set_align("left")
- usiterwidget:set_markup('usiter ')
- usiterwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh usiter')
- end)
- )
- )
- wallheavenwidget = wibox.widget.textbox()
- wallheavenwidget:set_align("left")
- wallheavenwidget:set_markup('wallheaven ')
- wallheavenwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh wallheaven')
- end)
- )
- )
- picscreenwidget = wibox.widget.textbox()
- picscreenwidget:set_align("left")
- picscreenwidget:set_markup('picscreen ')
- picscreenwidget:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('wallpaper.sh picscreen')
- end)
- )
- )
- rowidget = wibox.widget.textbox()
- rowidget:set_align("left")
- rowidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('rss.sh o') end)))
- rawidget = wibox.widget.textbox()
- rawidget:set_align("left")
- rawidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('rss.sh ov') end)))
- rfwidget = wibox.widget.textbox()
- rfwidget:set_align("left")
- rfwidget:set_markup("rf ")
- rfwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell('gvim ~/tmp/rss') end)))
- calbox = wibox.widget.textbox()
- calbox:set_align("left")
- calbox:set_markup(io.popen("cal.sh"):read("*a"))
- weatherbox = wibox.widget.textbox()
- weatherbox:set_align("left")
- weatherbox:set_markup(io.popen("weather.sh"):read("*a"))
- weatherbox:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- awful.util.spawn_with_shell('weather.sh e')
- end),
- awful.button({ }, 3, function ()
- weatherbox:set_markup(io.popen("weather.sh"):read("*a"))
- end)
- )
- )
- notebox = wibox.widget.textbox()
- notebox._layout:set_justify(true)
- notebox:set_markup(io.popen("cat /tmp/mem/piyavking/sticker"):read("*a"))
- notebox:buttons (
- awful.util.table.join (
- awful.button({ }, 1, function ()
- if io.open(home .. '/tmp/sticker_flag',"r") == nil then
- awful.util.spawn_with_shell('x-www-browser http://www.inoreader.com/stream/user/1005968053/tag/text')
- else
- awful.util.spawn_with_shell('edit_note.sh')
- end
- end),
- awful.button({ }, 3, function ()
- if io.open(home .. '/tmp/sticker_flag',"r") == nil then
- awful.util.spawn_with_shell('touch ' .. home .. '/tmp/sticker_flag')
- else
- awful.util.spawn_with_shell('rm ' .. home .. '/tmp/sticker_flag')
- end
- awful.util.spawn_with_shell('rss.sh sticker')
- end)
- )
- )
- emptywidget = wibox.widget.textbox()
- emptywidget:set_markup(' ')
- -- mydeskwibox_1
- local mydeskwibox_1_top = wibox.layout.fixed.vertical()
- local mydeskwibox_1_top_1 = wibox.layout.fixed.horizontal()
- mydeskwibox_1_top_1:add(urxvt_launcher)
- mydeskwibox_1_top_1:add(gparted_launcher)
- mydeskwibox_1_top_1:add(wicd_launcher)
- mydeskwibox_1_top:add(mydeskwibox_1_top_1)
- local mydeskwibox_1_top_2 = wibox.layout.fixed.horizontal()
- mydeskwibox_1_top_2:add(nc_launcher)
- mydeskwibox_1_top_2:add(tc_launcher)
- mydeskwibox_1_top:add(mydeskwibox_1_top_2)
- local mydeskwibox_1_top_3 = wibox.layout.fixed.horizontal()
- mydeskwibox_1_top_3:add(synaptic_launcher)
- mydeskwibox_1_top_3:add(updater_launcher)
- mydeskwibox_1_top:add(mydeskwibox_1_top_3)
- local mydeskwibox_1_top_4 = wibox.layout.fixed.horizontal()
- mydeskwibox_1_top_4:add(sysmon_launcher)
- mydeskwibox_1_top:add(mydeskwibox_1_top_4)
- local mydeskwibox_1_layout = wibox.layout.align.vertical()
- mydeskwibox_1_layout:set_top(mydeskwibox_1_top)
- -- mydeskwibox_2
- local mydeskwibox_2_top = wibox.layout.fixed.vertical()
- local mydeskwibox_2_top_1 = wibox.layout.fixed.horizontal()
- mydeskwibox_2_top_1:add(seamonkey_launcher)
- mydeskwibox_2_top_1:add(chromium_launcher)
- mydeskwibox_2_top:add(mydeskwibox_2_top_1)
- local mydeskwibox_2_top_2 = wibox.layout.fixed.horizontal()
- mydeskwibox_2_top_2:add(composer_launcher)
- mydeskwibox_2_top_2:add(gvim_launcher)
- mydeskwibox_2_top_2:add(lowriter_launcher)
- mydeskwibox_2_top:add(mydeskwibox_2_top_2)
- local mydeskwibox_2_layout = wibox.layout.align.vertical()
- mydeskwibox_2_layout:set_top(mydeskwibox_2_top)
- -- mydeskwibox_3
- local mydeskwibox_3_layout = wibox.layout.fixed.horizontal()
- mydeskwibox_3_layout:add(seamonkey_mail_launcher)
- mydeskwibox_3_layout:add(pidgin_launcher)
- mydeskwibox_3_layout:add(skype_launcher)
- -- mydeskwibox_4
- local mydeskwibox_4_top = wibox.layout.fixed.vertical()
- local mydeskwibox_4_top_1 = wibox.layout.fixed.horizontal()
- mydeskwibox_4_top_1:add(blood_launcher)
- mydeskwibox_4_top_1:add(cryptic_launcher)
- mydeskwibox_4_top:add(mydeskwibox_4_top_1)
- local mydeskwibox_4_top_2 = wibox.layout.fixed.horizontal()
- mydeskwibox_4_top_2:add(RR_launcher)
- mydeskwibox_4_top_2:add(RA_launcher)
- mydeskwibox_4_top_2:add(Route66_launcher)
- mydeskwibox_4_top:add(mydeskwibox_4_top_2)
- local mydeskwibox_4_top_3 = wibox.layout.fixed.horizontal()
- mydeskwibox_4_top_3:add(hexen1_launcher)
- mydeskwibox_4_top_3:add(hexen2_launcher)
- mydeskwibox_4_top:add(mydeskwibox_4_top_3)
- local mydeskwibox_4_top_4 = wibox.layout.fixed.horizontal()
- mydeskwibox_4_top_4:add(pacman_launcher)
- mydeskwibox_4_top_4:add(pacmania_launcher)
- mydeskwibox_4_top_4:add(abadox_launcher)
- mydeskwibox_4_top:add(mydeskwibox_4_top_4)
- local mydeskwibox_4_layout = wibox.layout.align.vertical()
- mydeskwibox_4_layout:set_top(mydeskwibox_4_top)
- -- mydeskwibox_5
- local mydeskwibox_5_top_1 = wibox.layout.fixed.horizontal()
- mydeskwibox_5_top_1:add(GR_launcher)
- mydeskwibox_5_top_1:add(FL_launcher)
- local mydeskwibox_5_top_2 = wibox.layout.fixed.horizontal()
- mydeskwibox_5_top_2:add(qjackctl_launcher)
- mydeskwibox_5_top_2:add(jmixer_launcher)
- local mydeskwibox_5_top_3 = wibox.layout.fixed.horizontal()
- mydeskwibox_5_top_3:add(audacity_launcher)
- --mydeskwibox_5_top_3:add(avidemux_launcher)
- mydeskwibox_5_top_3:add(handbrake_launcher)
- mydeskwibox_5_top_3:add(gimp_launcher)
- local mydeskwibox_5_top_4 = wibox.layout.fixed.horizontal()
- mydeskwibox_5_top_4:add(pavucontrol_launcher)
- local mydeskwibox_5_top = wibox.layout.fixed.vertical()
- mydeskwibox_5_top:add(mydeskwibox_5_top_1)
- mydeskwibox_5_top:add(mydeskwibox_5_top_2)
- mydeskwibox_5_top:add(mydeskwibox_5_top_3)
- mydeskwibox_5_top:add(mydeskwibox_5_top_4)
- local mydeskwibox_5_layout = wibox.layout.align.vertical()
- mydeskwibox_5_layout:set_top(mydeskwibox_5_top)
- -- mydeskwibox_6
- local mydeskwibox_6_layout = wibox.layout.fixed.horizontal()
- mydeskwibox_6_layout:add(mplaylist_launcher)
- mydeskwibox_6_layout:add(mplaylist_s_launcher)
- mydeskwibox_6_layout:add(smplayer_launcher)
- mydeskwibox_6_layout:add(smtube_launcher)
- mydeskwibox_6_layout:add(projectm_launcher)
- -- mydeskwibox1
- local mydeskwibox1_layout_top_1_1 = wibox.layout.fixed.vertical()
- mydeskwibox1_layout_top_1_1:add(myuptimewidget)
- mydeskwibox1_layout_top_1_1:add(emptywidget)
- local rpanel = wibox.layout.fixed.horizontal()
- rpanel:add(rowidget)
- rpanel:add(rawidget)
- rpanel:add(rfwidget)
- rpanel:add(wvwidget)
- mydeskwibox1_layout_top_1_1:add(rpanel)
- local wpanel = wibox.layout.fixed.horizontal()
- wpanel:add(wowidget)
- wpanel:add(wpwidget)
- wpanel:add(wfwidget)
- wpanel:add(wbwidget)
- mydeskwibox1_layout_top_1_1:add(wpanel)
- mydeskwibox1_layout_top_1_1:add(deviantartwidget)
- mydeskwibox1_layout_top_1_1:add(flickrwidget)
- mydeskwibox1_layout_top_1_1:add(paperchanwidget)
- mydeskwibox1_layout_top_1_1:add(usiterwidget)
- mydeskwibox1_layout_top_1_1:add(picscreenwidget)
- local mydeskwibox1_layout_top_1_2 = wibox.layout.fixed.vertical()
- mytextclock = awful.widget.textclock("%H:%M:%S", 1)
- mydeskwibox1_layout_top_1_2:add(emptywidget)
- mydeskwibox1_layout_top_1_2:add(emptywidget)
- mydeskwibox1_layout_top_1_2:add(artfilewidget)
- mydeskwibox1_layout_top_1_2:add(bindimagewidget)
- mydeskwibox1_layout_top_1_2:add(collectionwidget)
- mydeskwibox1_layout_top_1_2:add(favoritieswidget)
- mydeskwibox1_layout_top_1_2:add(oboihdwidget)
- mydeskwibox1_layout_top_1_2:add(wallheavenwidget)
- local mydeskwibox1_layout_top_1_3 = wibox.layout.fixed.vertical()
- mydeskwibox1_layout_top_1_3:add(calbox)
- local mydeskwibox1_layout_top_1 = wibox.layout.align.horizontal()
- mydeskwibox1_layout_top_1:set_left(mydeskwibox1_layout_top_1_1)
- mydeskwibox1_layout_top_1:set_middle(mydeskwibox1_layout_top_1_2)
- mydeskwibox1_layout_top_1:set_right(mydeskwibox1_layout_top_1_3)
- local rootbox_1 = wibox.layout.fixed.horizontal()
- rootbox_1:add(partwidget)
- local rootbox_3 = wibox.layout.fixed.horizontal()
- rootbox_3:add(wibox.layout.margin(rootprogressbar, 0, 0, 3, 3 ))
- local rootbox = wibox.layout.align.horizontal()
- rootbox:set_left(rootbox_1)
- rootbox:set_right(rootbox_3)
- local homebox_1 = wibox.layout.fixed.horizontal()
- homebox_1:add(homewidget)
- local homebox_3 = wibox.layout.fixed.horizontal()
- homebox_3:add(wibox.layout.margin(homeprogressbar, 0, 0, 3, 3 ))
- local homebox = wibox.layout.align.horizontal()
- homebox:set_left(homebox_1)
- homebox:set_right(homebox_3)
- local mydeskwibox1_layout_top_3_1 = wibox.layout.fixed.vertical()
- mydeskwibox1_layout_top_3_1:add(sdbwidget)
- mydeskwibox1_layout_top_3_1:add(GDwidget)
- mydeskwibox1_layout_top_3_1:add(andwidget)
- mydeskwibox1_layout_top_3_1:add(smbwidget)
- mydeskwibox1_layout_top_3_1:add(ftpwidget)
- local mydeskwibox1_layout_top_3_3 = wibox.layout.fixed.horizontal()
- mydeskwibox1_layout_top_3_3:add(pswidget)
- local mydeskwibox1_layout_top_3 = wibox.layout.align.horizontal()
- mydeskwibox1_layout_top_3:set_left(mydeskwibox1_layout_top_3_1)
- mydeskwibox1_layout_top_3:set_right(mydeskwibox1_layout_top_3_3)
- local cpubox_1 = wibox.layout.fixed.horizontal()
- cpubox_1:add(cpuwidget)
- cpubox_1:add(cpufreqwidget)
- local cpubox_3 = wibox.layout.fixed.horizontal()
- cpubox_3:add(wibox.layout.margin(cpuprogressbar, 0, 0, 3, 3 ))
- local cpubox = wibox.layout.align.horizontal()
- cpubox:set_left(cpubox_1)
- cpubox:set_right(cpubox_3)
- local membox_1 = wibox.layout.fixed.horizontal()
- membox_1:add(memwidget)
- local membox_3 = wibox.layout.fixed.horizontal()
- membox_3:add(wibox.layout.margin(memprogressbar, 0, 0, 3, 3 ))
- local membox = wibox.layout.align.horizontal()
- membox:set_left(membox_1)
- membox:set_right(membox_3)
- local mydeskwibox1_layout_top = wibox.layout.fixed.vertical()
- local mydeskwibox1_layout_top_2 = wibox.layout.fixed.vertical()
- mydeskwibox1_layout_top_2:add(weatherbox)
- mydeskwibox1_layout_top:add(mydeskwibox1_layout_top_1)
- mydeskwibox1_layout_top:add(mydeskwibox1_layout_top_2)
- mydeskwibox1_layout_top:add(mydeskwibox1_layout_top_3)
- local downbox_1 = wibox.layout.fixed.horizontal()
- downbox_1:add(downwidget)
- local downbox_3 = wibox.layout.fixed.horizontal()
- downbox_3:add(wibox.layout.margin(downprogressbar, 0, 0, 3, 3 ))
- local downbox = wibox.layout.align.horizontal()
- downbox:set_left(downbox_1)
- downbox:set_right(downbox_3)
- local upbox_1 = wibox.layout.fixed.horizontal()
- upbox_1:add(upwidget)
- local upbox_3 = wibox.layout.fixed.horizontal()
- upbox_3:add(wibox.layout.margin(upprogressbar, 0, 0, 3, 3 ))
- local upbox = wibox.layout.align.horizontal()
- upbox:set_left(upbox_1)
- upbox:set_right(upbox_3)
- local mydeskwibox1_layout_bottom = wibox.layout.fixed.vertical()
- mydeskwibox1_layout_bottom:add(rootbox)
- mydeskwibox1_layout_bottom:add(homebox)
- mydeskwibox1_layout_bottom:add(cpubox)
- mydeskwibox1_layout_bottom:add(membox)
- mydeskwibox1_layout_bottom:add(downbox)
- mydeskwibox1_layout_bottom:add(upbox)
- local mydeskwibox1_layout_middle = wibox.layout.fixed.vertical()
- local mydeskwibox1_layout = wibox.layout.align.vertical()
- mydeskwibox1_layout:set_top(mydeskwibox1_layout_top)
- mydeskwibox1_layout:set_middle(mydeskwibox1_layout_middle)
- mydeskwibox1_layout:set_bottom(mydeskwibox1_layout_bottom)
- -- mydeskwibox2
- local mydeskwibox2_layout = wibox.layout.fixed.vertical()
- mydeskwibox2_layout:add(notebox)
- -- timer
- mytimer = timer({ timeout = '1' })
- mytimer:connect_signal("timeout", function()
- sdb_markup = 'sdb '
- sdb_cmd = 'sudo mount /dev/sdb1 /flash'
- GD_markup = 'gdr '
- GD_cmd = 'google-drive-ocamlfuse ' .. home .. '/google-drive'
- and_markup = 'adr '
- and_cmd = 'jmtpfs ' .. home .. '/android'
- smb_markup = 'smb '
- -- smb_cmd = 'sudo mount.cifs -o username=chowder,password="2012",rw,file_mode=0666,dir_mode=0777,uid=piyavking //CHOWDER-PC/D ' .. home .. '/sambashare'
- smb_cmd = 'smbnetfs ' .. home .. '/sambashare'
- ftp_markup = 'ftp '
- ftp_cmd = 'curlftpfs -o user=piyavking@gmail.com:86673709 node0.net2ftp.ru:21 ' .. home .. '/myftp'
- mount = io.popen("mount")
- for line in mount:lines() do
- if string.find(line, 'sdb1') ~= nil then
- sdb_markup = '<span color="#00FFFF">sdb</span> '
- sdb_cmd = 'sudo umount -l /dev/sdb1'
- end
- if string.find(line, 'google') ~= nil then
- GD_markup = '<span color="#00FFFF">gdr</span> '
- GD_cmd = 'sudo umount -l ' .. home .. '/google-drive'
- end
- if string.find(line, 'android') ~= nil then
- and_markup = '<span color="#00FFFF">adr</span> '
- and_cmd = 'sudo umount -l ' .. home .. '/android'
- end
- if string.find(line, 'sambashare') ~= nil then
- smb_markup = '<span color="#00FFFF">smb</span> '
- smb_cmd = 'sudo umount -l ' .. home .. '/sambashare'
- end
- if string.find(line, 'myftp') ~= nil then
- ftp_markup = '<span color="#00FFFF">ftp</span> '
- ftp_cmd = 'sudo umount -l ' .. home .. '/myftp'
- end
- end
- if io.open(home .. '/Pictures/wallpapers/wallpaper_flag',"r") == nil then
- wo_markup = 'wo '
- else
- wo_markup = '<span color="#00FFFF">wo</span> '
- end
- if io.open(home .. '/tmp/rss_flag',"r") == nil then
- ro_markup = 'ro '
- else
- ro_markup = '<span color="#00FFFF">ro</span> '
- end
- if io.open(home .. '/tmp/voice_flag',"r") == nil then
- ra_markup = 'ra '
- else
- ra_markup = '<span color="#00FFFF">ra</span> '
- end
- sdbwidget:set_markup(sdb_markup)
- sdbwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(sdb_cmd) end)))
- GDwidget:set_markup(GD_markup)
- GDwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(GD_cmd) end)))
- andwidget:set_markup(and_markup)
- andwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(and_cmd) end)))
- smbwidget:set_markup(smb_markup)
- smbwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(smb_cmd) end)))
- ftpwidget:set_markup(ftp_markup)
- ftpwidget:buttons( awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(ftp_cmd) end)))
- wowidget:set_markup(wo_markup)
- rowidget:set_markup(ro_markup)
- rawidget:set_markup(ra_markup)
- fanwidget:set_markup(io.popen("fan.sh"):read("*a"))
- if io.open(home .. '/tmp/wallpaper.lock',"r") == nil then
- wallsource = io.popen("cat " .. home .. "/Pictures/wallpapers/wallsource | tr -d '\n'"):read("*a")
- if wallsource == "artfile" then
- artfilewidget:set_markup('<span color="#00FFFF">artfile</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep artfile | awk -F' ' '{print $2}'"):read(1) == "1" then
- artfilewidget:set_markup('artfile ')
- else
- artfilewidget:set_markup('<span color="#AAAAAA">artfile</span> ')
- end
- if wallsource == "bindimage" then
- bindimagewidget:set_markup('<span color="#00FFFF">bindimage</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep bindimage | awk -F' ' '{print $2}'"):read(1) == "1" then
- bindimagewidget:set_markup('bindimage ')
- else
- bindimagewidget:set_markup('<span color="#AAAAAA">bindimage</span> ')
- end
- if wallsource == "deviantart" then
- deviantartwidget:set_markup('<span color="#00FFFF">deviantart</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep deviantart | awk -F' ' '{print $2}'"):read(1) == "1" then
- deviantartwidget:set_markup('deviantart ')
- else
- deviantartwidget:set_markup('<span color="#AAAAAA">deviantart</span> ')
- end
- if wallsource == "collection" then
- collectionwidget:set_markup('<span color="#00FFFF">collection</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep collection | awk -F' ' '{print $2}'"):read(1) == "1" then
- collectionwidget:set_markup('collection ')
- else
- collectionwidget:set_markup('<span color="#AAAAAA">collection</span> ')
- end
- if wallsource == "flickr" then
- flickrwidget:set_markup('<span color="#00FFFF">flickr</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep flickr | awk -F' ' '{print $2}'"):read(1) == "1" then
- flickrwidget:set_markup('flickr ')
- else
- flickrwidget:set_markup('<span color="#AAAAAA">flickr</span> ')
- end
- if wallsource == "favorities" then
- favoritieswidget:set_markup('<span color="#00FFFF">favorities</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep favorities | awk -F' ' '{print $2}'"):read(1) == "1" then
- favoritieswidget:set_markup('favorities ')
- else
- favoritieswidget:set_markup('<span color="#AAAAAA">favorities</span> ')
- end
- if wallsource == "paperchan" then
- paperchanwidget:set_markup('<span color="#00FFFF">paperchan</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep paperchan | awk -F' ' '{print $2}'"):read(1) == "1" then
- paperchanwidget:set_markup('paperchan ')
- else
- paperchanwidget:set_markup('<span color="#AAAAAA">paperchan</span> ')
- end
- if wallsource == "oboihd" then
- oboihdwidget:set_markup('<span color="#00FFFF">oboihd</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep oboihd | awk -F' ' '{print $2}'"):read(1) == "1" then
- oboihdwidget:set_markup('oboihd ')
- else
- oboihdwidget:set_markup('<span color="#AAAAAA">oboihd</span> ')
- end
- if wallsource == "usiter" then
- usiterwidget:set_markup('<span color="#00FFFF">usiter</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep usiter | awk -F' ' '{print $2}'"):read(1) == "1" then
- usiterwidget:set_markup('usiter ')
- else
- usiterwidget:set_markup('<span color="#AAAAAA">usiter</span> ')
- end
- if wallsource == "wallheaven" then
- wallheavenwidget:set_markup('<span color="#00FFFF">wallheaven</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep wallheaven | awk -F' ' '{print $2}'"):read(1) == "1" then
- wallheavenwidget:set_markup('wallheaven ')
- else
- wallheavenwidget:set_markup('<span color="#AAAAAA">wallheaven</span> ')
- end
- if wallsource == "picscreen" then
- picscreenwidget:set_markup('<span color="#00FFFF">picscreen</span> ')
- elseif io.popen("cat " .. home .. "/Pictures/wallpapers/walllist.conf | grep picscreen | awk -F' ' '{print $2}'"):read(1) == "1" then
- picscreenwidget:set_markup('picscreen ')
- else
- picscreenwidget:set_markup('<span color="#AAAAAA">picscreen</span> ')
- end
- else
- artfilewidget:set_markup('<span color="#AAAAAA">artfile</span> ')
- bindimagewidget:set_markup('<span color="#AAAAAA">bindimage</span> ')
- deviantartwidget:set_markup('<span color="#AAAAAA">deviantart</span> ')
- collectionwidget:set_markup('<span color="#AAAAAA">collection</span> ')
- flickrwidget:set_markup('<span color="#AAAAAA">flickr</span> ')
- favoritieswidget:set_markup('<span color="#AAAAAA">favorities</span> ')
- paperchanwidget:set_markup('<span color="#AAAAAA">paperchan</span> ')
- oboihdwidget:set_markup('<span color="#AAAAAA">oboihd</span> ')
- usiterwidget:set_markup('<span color="#AAAAAA">usiter</span> ')
- wallheavenwidget:set_markup('<span color="#AAAAAA">wallheaven</span> ')
- picscreenwidget:set_markup('<span color="#AAAAAA">picscreen</span> ')
- end
- pswidget:set_text(io.popen("ps.sh"):read("*a"))
- end)
- mytimer:start()
- mytimer1 = timer({ timeout = '5' })
- mytimer1:connect_signal("timeout", function()
- notebox:set_markup(io.popen("cat /tmp/mem/piyavking/sticker"):read("*a"))
- -- notebox:emit_signal("widget::updated")
- calbox:set_markup(io.popen("cal.sh"):read("*a"))
- end)
- mytimer1:start()
- mytimer2 = timer({ timeout = '600' })
- mytimer2:connect_signal("timeout", function()
- weatherbox:set_markup(io.popen("weather.sh"):read("*a"))
- end)
- mytimer2:start()
- -------------------------------------------------------------------------------
- -- Menubar configuration
- menubar.utils.terminal = terminal -- Set the terminal for applications that require it
- -- }}}
- -- {{{ Wibox
- -- Create a textclock widget
- -- mytextclock = awful.widget.textclock()
- -- Create a wibox for each screen and add it
- -------------------------------------------------------------------------------
- mydeskwibox = {}
- mydeskwibox1 = {}
- mydeskwibox2 = {}
- mywibox1 = {}
- -------------------------------------------------------------------------------
- mywibox = {}
- mypromptbox = {}
- mylayoutbox = {}
- mytaglist = {}
- mytaglist.buttons = awful.util.table.join(
- awful.button({ }, 1, awful.tag.viewonly),
- awful.button({ modkey }, 1, awful.client.movetotag),
- awful.button({ }, 3, awful.tag.viewtoggle),
- awful.button({ modkey }, 3, awful.client.toggletag),
- awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
- awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
- )
- mytasklist = {}
- mytasklist.buttons = awful.util.table.join(
- awful.button({ }, 1, function (c)
- if c == client.focus then
- c.minimized = true
- else
- -- Without this, the following
- -- :isvisible() makes no sense
- c.minimized = false
- if not c:isvisible() then
- awful.tag.viewonly(c:tags()[1])
- end
- -- This will also un-minimize
- -- the client, if needed
- client.focus = c
- c:raise()
- end
- end),
- -- awful.button({ }, 3, function ()
- awful.button({ }, 3, function (c)
- -- if instance then
- -- instance:hide()
- -- instance = nil
- -- else
- -- instance = awful.menu.clients({
- -- theme = { width = 250 }
- -- })
- -- end
- c:kill()
- end),
- awful.button({ }, 4, function ()
- awful.client.focus.byidx(1)
- if client.focus then client.focus:raise() end
- end),
- awful.button({ }, 5, function ()
- awful.client.focus.byidx(-1)
- if client.focus then client.focus:raise() end
- end))
- for s = 1, screen.count() do
- -- Create mydeskwibox and set layout
- mydeskwibox[s] = wibox ({ bg = "#00000088", width = 1000, height = 470, x = 0, y = 0 })
- mydeskwibox[s].ontop = false
- mydeskwibox[s].visible = true
- -- Create mydeskwibox1 and set layout
- mydeskwibox1[s] = wibox ({ bg = "#00000088", width = 366, height = 470, x = 1000, y = 0 })
- mydeskwibox1[s].ontop = false
- mydeskwibox1[s].visible = true
- mydeskwibox1[s]:set_widget(wibox.layout.margin(mydeskwibox1_layout, 10, 10, 30, 10 ))
- -- Create mydeskwibox2 and set layout
- mydeskwibox2[s] = wibox ({ bg = "#00000088", width = 1366, height = 298, x = 0, y = 470 })
- mydeskwibox2[s].ontop = false
- mydeskwibox2[s].visible = true
- mydeskwibox2[s]:set_widget(wibox.layout.margin(mydeskwibox2_layout, 10, 10, 10, 10 ))
- -- Create mywibox and set layout
- mylayoutbox[s] = awful.widget.layoutbox(s)
- mylayoutbox[s]:buttons(awful.util.table.join(
- awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
- awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
- awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
- awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
- mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons, {width = 0.800})
- mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
- local left_layout = wibox.layout.fixed.horizontal()
- left_layout:add(mylauncher)
- mypromptbox[s] = awful.widget.prompt()
- left_layout:add(mypromptbox[s])
- left_layout:add(mytaglist[s])
- local right_layout = wibox.layout.fixed.horizontal()
- right_layout:add(mylayoutbox[s])
- right_layout:add(spacewidget)
- if s == 1 then
- right_layout:add(wibox.widget.systray())
- end
- right_layout:add(spacewidget)
- right_layout:add(kbdcfg.widget)
- right_layout:add(spacewidget)
- right_layout:add(batwidget)
- right_layout:add(mytextclock)
- right_layout:add(spacewidget)
- local tpanel = wibox.layout.fixed.horizontal()
- tpanel:add(thermalwidget)
- tpanel:add(fanwidget)
- right_layout:add(tpanel)
- local layout = wibox.layout.align.horizontal()
- layout:set_left(left_layout)
- layout:set_middle(mytasklist[s])
- layout:set_right(right_layout)
- mywibox[s] = awful.wibox({ bg = "#000000ff", position = "top", height = 20, screen = s })
- mywibox[s]:set_widget(layout)
- mwbv={true, true, true, true, true, true}
- current=1
- mywibox[s].visible = mwbv[current]
- -- Create mywibox1 and set layout
- tags[s][1]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=1
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_1_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- tags[s][2]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=2
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_2_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- tags[s][3]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=3
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_3_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- tags[s][4]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=4
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_4_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- tags[s][5]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=5
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_5_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- tags[s][6]:connect_signal("property::selected",
- function(tag)
- if not tag.selected then return end
- current=6
- mywibox[s].visible = mwbv[current]
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_6_layout, 10, 10, 30, 10 ))
- awful.util.spawn_with_shell('wallpaper.sh picture')
- end)
- mydeskwibox[s]:set_widget(wibox.layout.margin(mydeskwibox_1_layout, 10, 10, 30, 10 ))
- end
- -- }}}
- -- {{{ Mouse bindings
- root.buttons(awful.util.table.join(
- awful.button({ }, 3, function () mymainmenu:toggle() end),
- awful.button({ }, 4, awful.tag.viewnext),
- awful.button({ }, 5, awful.tag.viewprev)
- ))
- -- }}}
- -- {{{ Key bindings
- globalkeys = awful.util.table.join(
- awful.key({ }, "#107", function () awful.util.spawn_with_shell('scrot.sh') end),
- awful.key({ modkey, "Shift" }, "#41", function () awful.util.spawn_with_shell('wallpaper.sh f') end),
- awful.key({ modkey, "Shift" }, "#33", function () awful.util.spawn_with_shell('wallpaper.sh pq') end),
- awful.key({ modkey, "Control" }, "#33", function () awful.util.spawn_with_shell('wallpaper.sh pcq') end),
- awful.key({ modkey, "Shift" }, "#56", function () awful.util.spawn_with_shell('wallpaper.sh b') end),
- awful.key({ modkey, "Shift" }, "#26", function () awful.util.spawn_with_shell('wallpaper.sh e') end),
- awful.key({ modkey, "Shift" }, "#46", function () awful.util.spawn_with_shell('wallpaper.sh picture') end),
- awful.key({ modkey, }, "Left", awful.tag.viewprev ),
- awful.key({ modkey, }, "Right", awful.tag.viewnext ),
- awful.key({ modkey, }, "Escape", awful.tag.history.restore),
- awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer -D pulse set Master Playback Switch toggle") end),
- awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 5%-") end),
- awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 5%+") end),
- awful.key({ "Mod1" }, "Shift_L", function () kbdcfg.switch() end),
- awful.key({ modkey, }, "#44",
- function ()
- awful.client.focus.byidx( 1)
- if client.focus then client.focus:raise() end
- end),
- awful.key({ modkey, }, "#45",
- function ()
- awful.client.focus.byidx(-1)
- if client.focus then client.focus:raise() end
- end),
- awful.key({ modkey, }, "#25", function () mymainmenu:show() end),
- awful.key({ modkey }, "#56", function ()
- mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
- mwbv[current] = not mwbv[current]
- end),
- -- Layout manipulation
- awful.key({ modkey, "Shift" }, "#44", function () awful.client.swap.byidx( 1) end),
- awful.key({ modkey, "Shift" }, "#45", function () awful.client.swap.byidx( -1) end),
- awful.key({ modkey, "Control" }, "#44", function () awful.screen.focus_relative( 1) end),
- awful.key({ modkey, "Control" }, "#45", function () awful.screen.focus_relative(-1) end),
- awful.key({ modkey, }, "#30", awful.client.urgent.jumpto),
- awful.key({ modkey, }, "Tab",
- function ()
- awful.client.focus.history.previous()
- if client.focus then
- client.focus:raise()
- end
- end),
- -- Standard program
- awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
- awful.key({ modkey, "Control" }, "#27", awesome.restart),
- awful.key({ modkey, "Shift" }, "#24", awesome.quit),
- awful.key({ modkey, }, "#46", function () awful.tag.incmwfact( 0.05) end),
- awful.key({ modkey, }, "#43", function () awful.tag.incmwfact(-0.05) end),
- awful.key({ modkey, "Shift" }, "#43", function () awful.tag.incnmaster( 1) end),
- awful.key({ modkey, "Shift" }, "#46", function () awful.tag.incnmaster(-1) end),
- awful.key({ modkey, "Control" }, "#43", function () awful.tag.incncol( 1) end),
- awful.key({ modkey, "Control" }, "#46", function () awful.tag.incncol(-1) end),
- awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
- awful.key({ modkey, "Control" }, "#57", awful.client.restore),
- -- Prompt
- awful.key({ modkey }, "#27", function () mypromptbox[mouse.screen]:run() end),
- awful.key({ modkey }, "#53",
- function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
- awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval")
- end),
- -- Menubar
- awful.key({ modkey }, "#33", function() menubar.show() end),
- -- Panels
- -- awful.key({ modkey }, "#55", function()
- -- mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
- -- end),
- awful.key({ modkey, "Shift" }, "#55", function()
- awful.util.spawn_with_shell("vclip.sh")
- end)
- )
- clientkeys = awful.util.table.join(
- awful.key({ modkey, }, "#41", function (c) c.fullscreen = not c.fullscreen end),
- awful.key({ modkey, "Shift" }, "#54", function (c) c:kill() end),
- awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
- awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
- awful.key({ modkey, }, "#32", awful.client.movetoscreen ),
- awful.key({ modkey, }, "#28", function (c) c.ontop = not c.ontop end),
- awful.key({ modkey, }, "#57",
- function (c)
- -- The client currently has the input focus, so it cannot be
- -- minimized, since minimized clients can't have the focus.
- c.minimized = true
- end),
- awful.key({ modkey, "Shift" }, "#57",
- function()
- local tag = awful.tag.selected()
- for i=1, #tag:clients() do
- tag:clients()[i].minimized=false
- -- tag:clients()[i]:redraw()
- end
- end),
- awful.key({ modkey, }, "#58",
- function (c)
- c.maximized_horizontal = not c.maximized_horizontal
- c.maximized_vertical = not c.maximized_vertical
- end)
- )
- -- Bind all key numbers to tags.
- -- Be careful: we use keycodes to make it works on any keyboard layout.
- -- This should map on the top row of your keyboard, usually 1 to 9.
- for i = 1, 9 do
- globalkeys = awful.util.table.join(globalkeys,
- -- View tag only.
- awful.key({ modkey }, "#" .. i + 9,
- function ()
- local screen = mouse.screen
- local tag = awful.tag.gettags(screen)[i]
- if tag then
- awful.tag.viewonly(tag)
- end
- end),
- -- Toggle tag.
- awful.key({ modkey, "Control" }, "#" .. i + 9,
- function ()
- local screen = mouse.screen
- local tag = awful.tag.gettags(screen)[i]
- if tag then
- awful.tag.viewtoggle(tag)
- end
- end),
- -- Move client to tag.
- awful.key({ modkey, "Shift" }, "#" .. i + 9,
- function ()
- if client.focus then
- local tag = awful.tag.gettags(client.focus.screen)[i]
- if tag then
- awful.client.movetotag(tag)
- end
- end
- end),
- -- Toggle tag.
- awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
- function ()
- if client.focus then
- local tag = awful.tag.gettags(client.focus.screen)[i]
- if tag then
- awful.client.toggletag(tag)
- end
- end
- end))
- end
- clientbuttons = awful.util.table.join(
- awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
- awful.button({ modkey }, 1, awful.mouse.client.move),
- awful.button({ modkey }, 3, awful.mouse.client.resize))
- -- Set keys
- root.keys(globalkeys)
- -- }}}
- -- beautiful.border_width = 0
- -- {{{ Rules
- -- Rules to apply to new clients (through the "manage" signal).
- awful.rules.rules = {
- -- All clients will match this rule.
- { rule = { },
- properties = { border_width = beautiful.border_width,
- border_color = beautiful.border_normal,
- focus = awful.client.focus.filter,
- raise = true,
- keys = clientkeys,
- size_hints_honor = false,
- buttons = clientbuttons } },
- { rule = { class = "mplayer2" },
- properties = { floating = true },
- { tag = tags[1][6] }
- },
- { rule = { class = "pinentry" },
- properties = { floating = true } },
- { rule = { class = "gimp" },
- properties = { floating = true } },
- -- Set Firefox to always map on tags number 2 of screen 1.
- -- { rule = { class = "Firefox" },
- -- properties = { tag = tags[1][2] } },
- { rule = { class = "URxvt" },
- properties = { tag = tags[1][1],
- -- floating = true,
- fullscreen = true,
- -- skip_taskbar = true,
- -- width = 1366,
- -- height = 728
- -- maximized_vertical = true,
- -- maximized_horizontal = true,
- -- below = true,
- },
- },
- { rule = { class = "Seamonkey", role = "browser" },
- properties = { tag = tags[1][2] },
- },
- { rule = { class = "Seamonkey", role = "3pane" },
- properties = { tag = tags[1][3] } },
- { rule = { class = "Pidgin" },
- properties = { tag = tags[1][3] } },
- { rule = { class = "trayer" },
- properties = { border_width = 0 } },
- }
- -- }}}
- -- {{{ Signals
- -- Signal function to execute when a new client appears.
- client.connect_signal("property::maximized", function(c)
- c.border_width = c.maximized and 0 or beautiful.border_width
- end)
- -- client.connect_signal("focus",
- -- function(c)
- -- if c.maximized_horizontal == true and c.maximized_vertical == true then
- -- c.border_width = "0"
- -- c.border_color = beautiful.border_focus
- -- else
- -- c.border_width = beautiful.border_width
- -- c.border_color = beautiful.border_focus
- -- end
- -- end)
- client.connect_signal("manage", function (c, startup)
- -- Enable sloppy focus
- c:connect_signal("mouse::enter", function(c)
- if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
- and awful.client.focus.filter(c) then
- client.focus = c
- end
- end)
- if not startup then
- -- Set the windows at the slave,
- -- i.e. put it at the end of others instead of setting it master.
- -- awful.client.setslave(c)
- -- Put windows in a smart way, only if they does not set an initial position.
- if not c.size_hints.user_position and not c.size_hints.program_position then
- awful.placement.no_overlap(c)
- awful.placement.no_offscreen(c)
- end
- elseif not c.size_hints.user_position and not c.size_hints.program_position then
- -- Prevent clients from being unreachable after screen count change
- awful.placement.no_offscreen(c)
- end
- local titlebars_enabled = false
- if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
- -- buttons for the titlebar
- local buttons = awful.util.table.join(
- awful.button({ }, 1, function()
- client.focus = c
- c:raise()
- awful.mouse.client.move(c)
- end),
- awful.button({ }, 3, function()
- client.focus = c
- c:raise()
- awful.mouse.client.resize(c)
- end)
- )
- -- Widgets that are aligned to the left
- local left_layout = wibox.layout.fixed.horizontal()
- left_layout:add(awful.titlebar.widget.iconwidget(c))
- left_layout:buttons(buttons)
- -- Widgets that are aligned to the right
- local right_layout = wibox.layout.fixed.horizontal()
- right_layout:add(awful.titlebar.widget.floatingbutton(c))
- right_layout:add(awful.titlebar.widget.maximizedbutton(c))
- right_layout:add(awful.titlebar.widget.stickybutton(c))
- right_layout:add(awful.titlebar.widget.ontopbutton(c))
- right_layout:add(awful.titlebar.widget.closebutton(c))
- -- The title goes in the middle
- local middle_layout = wibox.layout.flex.horizontal()
- local title = awful.titlebar.widget.titlewidget(c)
- title:set_align("center")
- middle_layout:add(title)
- middle_layout:buttons(buttons)
- -- Now bring it all together
- local layout = wibox.layout.align.horizontal()
- layout:set_left(left_layout)
- layout:set_right(right_layout)
- layout:set_middle(middle_layout)
- awful.titlebar(c):set_widget(layout)
- end
- end)
- client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
- client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
- -- }}}
- awful.util.spawn_with_shell('setxkbmap -layout "us,ru(winkeys)" -model "pc105" -option "grp:alt_shift_toggle,grp_led:scroll,compose:ralt"')
- awful.util.spawn_with_shell('xsetroot -solid "#000000"')
- awful.util.spawn_with_shell("xset -dpms")
- awful.util.spawn_with_shell("xset s off")
- awful.util.spawn_with_shell("xscreensaver -nosplash")
- awful.util.spawn_with_shell("xbacklight -set 50")
- awful.util.spawn_with_shell("~/.fehbg")
- awful.util.spawn_with_shell("xrdb -merge ~/.Xresources")
- awful.util.spawn_with_shell("sleep 1;run_once compton")
- awful.util.spawn_with_shell("run_once caffeine-indicator")
- -- awful.util.spawn_with_shell("killall clipit;clipit -n")
- awful.util.spawn_with_shell("run_once clipit")
- -- awful.util.spawn_with_shell("run_once xxkb")
- awful.util.spawn_with_shell("run_once volti")
- awful.util.spawn_with_shell("synclient TapButton1=1")
- awful.util.spawn_with_shell("synclient VertScrollDelta=-111")
- awful.util.spawn_with_shell("synclient HorizScrollDelta=-111")
- awful.util.spawn_with_shell("synclient RightButtonAreaTop=4500")
- awful.util.spawn_with_shell("synclient MaxDoubleTapTime=175")
- awful.util.spawn_with_shell("synclient MaxTapTime=110")
- awful.util.spawn_with_shell("synclient MaxTapMove=300")
- awful.util.spawn_with_shell("synclient TapButton2=2")
- awful.util.spawn_with_shell("synclient TapButton3=3")
- awful.util.spawn_with_shell("synclient SingleTapTimeout=150")
- awful.util.spawn_with_shell("synclient MaxTapMove=75")
- awful.util.spawn_with_shell("TapAndDragGesture=0")
- awful.util.spawn_with_shell("synclient ClickTime=100")
- awful.util.spawn_with_shell("synclient EmulateMidButtonTime=100")
- awful.util.spawn_with_shell("synclient FingerHigh=100")
- awful.util.spawn_with_shell("synclient FingerLow=20")
- awful.util.spawn_with_shell("synclient MinSpeed=0.3")
- awful.util.spawn_with_shell("synclient MaxSpeed=1.5")
- awful.util.spawn_with_shell("synclient AccelFactor=0.5")
- awful.util.spawn_with_shell("PressureMotionMinZ=15")
- awful.util.spawn_with_shell('xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8')
- awful.util.spawn_with_shell("xinput --set-button-map 'SynPS/2 Synaptics TouchPad' 1 2 3 5 4")
- awful.util.spawn_with_shell('/opt/extras.ubuntu.com/touchpad-indicator/bin/touchpad-indicator')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement