Skip to content

Commit

Permalink
Rename repo to reflect appearance and improve theme compatibility
Browse files Browse the repository at this point in the history
It is now possible to use other themes with the `rc.lua` file from this
repository because the widget icons are no longer fixed and are fetched from the
theme instead.
  • Loading branch information
zliebersbach committed May 19, 2016
1 parent 6f71fa4 commit 20fc0aa
Show file tree
Hide file tree
Showing 55 changed files with 112 additions and 107 deletions.
13 changes: 7 additions & 6 deletions rc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ local beautiful = require("beautiful")
local naughty = require("naughty")
local menubar = require("menubar")

-- Volume widget
require("volume")
-- Temperature widget
require("temp")

-- {{{ Startup program
-- pgrep function.
function process_exists (processname)
Expand Down Expand Up @@ -68,7 +63,13 @@ end

-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
beautiful.init("/usr/share/awesome/themes/custom/theme.lua")
beautiful.init("/usr/share/awesome/themes/material-dark/theme.lua")

-- Require widgets after theme is initialized so they can use it.
-- Volume widget
require("volume")
-- Temperature widget
require("temp")

-- This is used later as the default terminal and editor to run.
terminal = "x-terminal-emulator"
Expand Down
3 changes: 2 additions & 1 deletion temp.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local wibox = require("wibox")
local awful = require("awful")
local beautiful = require("beautiful")

mytemp = wibox.layout.margin()
mytemp:set_left(4)
Expand All @@ -9,7 +10,7 @@ mytemplayout = wibox.layout.fixed.horizontal()
mytemp:set_widget(mytemplayout)

mytempicon = wibox.widget.imagebox()
mytempicon:set_image("/usr/share/awesome/themes/custom/icons/cpu.png")
mytempicon:set_image(beautiful.cpu_icon)
mytemplayout:add(mytempicon)

mytemptext = wibox.widget.textbox()
Expand Down
95 changes: 0 additions & 95 deletions themes/custom/theme.lua

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
100 changes: 100 additions & 0 deletions themes/material-dark/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
theme = {}

theme.font = "Liberation Serif 8"

theme.bg_normal = "#303030"
theme.bg_focus = "#424242"
theme.bg_urgent = theme.bg_focus
theme.bg_minimize = theme.bg_focus
theme.bg_systray = "#212121"

theme.fg_normal = "#B0B0B0"
theme.fg_focus = "#FFFFFF"
theme.fg_urgent = theme.fg_focus
theme.fg_minimize = theme.fg_normal

theme.border_width = 2
theme.border_normal = theme.bg_normal
theme.border_focus = theme.bg_focus
theme.border_marked = theme.bg_focus

-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[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/material-dark/taglist/squarefw.png"
theme.taglist_squares_unsel = "/usr/share/awesome/themes/material-dark/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/material-dark/icons/submenu.png"
theme.menu_height = 16
theme.menu_width = 128

-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"

-- Define the image to load
theme.titlebar_close_button_normal = "/usr/share/awesome/themes/material-dark/titlebar/close_normal.png"
theme.titlebar_close_button_focus = "/usr/share/awesome/themes/material-dark/titlebar/close_focus.png"

theme.titlebar_ontop_button_normal_inactive = "/usr/share/awesome/themes/material-dark/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = "/usr/share/awesome/themes/material-dark/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = "/usr/share/awesome/themes/material-dark/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = "/usr/share/awesome/themes/material-dark/titlebar/ontop_focus_active.png"

theme.titlebar_sticky_button_normal_inactive = "/usr/share/awesome/themes/material-dark/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = "/usr/share/awesome/themes/material-dark/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = "/usr/share/awesome/themes/material-dark/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = "/usr/share/awesome/themes/material-dark/titlebar/sticky_focus_active.png"

theme.titlebar_floating_button_normal_inactive = "/usr/share/awesome/themes/material-dark/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = "/usr/share/awesome/themes/material-dark/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = "/usr/share/awesome/themes/material-dark/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = "/usr/share/awesome/themes/material-dark/titlebar/floating_focus_active.png"

theme.titlebar_maximized_button_normal_inactive = "/usr/share/awesome/themes/material-dark/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = "/usr/share/awesome/themes/material-dark/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = "/usr/share/awesome/themes/material-dark/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = "/usr/share/awesome/themes/material-dark/titlebar/maximized_focus_active.png"

theme.wallpaper = "/usr/share/awesome/themes/material-dark/wallpaper.png"

-- You can use your own layout icons like this:
theme.layout_fairh = "/usr/share/awesome/themes/material-dark/layouts/fairhw.png"
theme.layout_fairv = "/usr/share/awesome/themes/material-dark/layouts/fairvw.png"
theme.layout_floating = "/usr/share/awesome/themes/material-dark/layouts/floatingw.png"
theme.layout_magnifier = "/usr/share/awesome/themes/material-dark/layouts/magnifierw.png"
theme.layout_max = "/usr/share/awesome/themes/material-dark/layouts/maxw.png"
theme.layout_fullscreen = "/usr/share/awesome/themes/material-dark/layouts/fullscreenw.png"
theme.layout_tilebottom = "/usr/share/awesome/themes/material-dark/layouts/tilebottomw.png"
theme.layout_tileleft = "/usr/share/awesome/themes/material-dark/layouts/tileleftw.png"
theme.layout_tile = "/usr/share/awesome/themes/material-dark/layouts/tilew.png"
theme.layout_tiletop = "/usr/share/awesome/themes/material-dark/layouts/tiletopw.png"
theme.layout_spiral = "/usr/share/awesome/themes/material-dark/layouts/spiralw.png"
theme.layout_dwindle = "/usr/share/awesome/themes/material-dark/layouts/dwindlew.png"

theme.menu_icon = "/usr/share/awesome/themes/material-dark/icons/menu.png"
theme.awesome_icon = "/usr/share/awesome/icons/awesome16.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 = "Adwaita"

-- Widget icons.
theme.cpu_icon = "/usr/share/awesome/themes/material-dark/icons/cpu.png"
theme.volume_icon = "/usr/share/awesome/themes/material-dark/icons/volume.png"
theme.volumemute_icon = "/usr/share/awesome/themes/material-dark/icons/volumemute.png"

return theme
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 3 additions & 5 deletions volume.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
local wibox = require("wibox")
local awful = require("awful")

local volumeicon = "/usr/share/awesome/themes/custom/icons/volume.png"
local volumemuteicon = "/usr/share/awesome/themes/custom/icons/volumemute.png"
local beautiful = require("beautiful")

myvolume = wibox.layout.margin()
myvolume:set_left(4)
Expand All @@ -28,10 +26,10 @@ function update_volume (widget, icon)

if string.find(status, "on", 1, true) then
-- For the volume number percentage
icon:set_image(volumeicon)
icon:set_image(beautiful.volume_icon)
else
-- For displaying the mute status.
icon:set_image(volumemuteicon)
icon:set_image(beautiful.volumemute_icon)
end
widget:set_markup(volume)
end
Expand Down

0 comments on commit 20fc0aa

Please sign in to comment.