diff --git a/folder-tag.svg b/folder-tag.svg new file mode 100644 index 0000000..5b33820 --- /dev/null +++ b/folder-tag.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/go-next.png b/go-next.png deleted file mode 100644 index e8c2f65..0000000 Binary files a/go-next.png and /dev/null differ diff --git a/go-next.svg b/go-next.svg new file mode 100644 index 0000000..cfe6f2f --- /dev/null +++ b/go-next.svg @@ -0,0 +1,151 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/go-previous.png b/go-previous.png deleted file mode 100644 index d21b1fa..0000000 Binary files a/go-previous.png and /dev/null differ diff --git a/go-previous.svg b/go-previous.svg new file mode 100644 index 0000000..e55cb62 --- /dev/null +++ b/go-previous.svg @@ -0,0 +1,151 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/init.lua b/init.lua index 37c301a..d04a3cc 100644 --- a/init.lua +++ b/init.lua @@ -40,20 +40,41 @@ function switcherpopup.new(s) local clientIcon = awful.widget.clienticon(v) clientIcon:set_forced_width(switcherpopup.iconSize) clientIcon:set_forced_height(switcherpopup.iconSize) - clientIcon:buttons(gears.table.join( + clientName = wibox.container.constraint(wibox.widget{ + widget = wibox.widget.textbox, + valign = center, + halign = center, + text = v.name + },nil,switcherpopup.iconSize,switcherpopup.iconSize * 0.5) + clientWidget = wibox.widget{ + layout = wibox.layout.fixed.vertical + } + clientWidget:add(clientIcon,clientName) + clientWidget:buttons(gears.table.join( awful.button({ }, 1, function (c) v:raise() popup.visible = false end))) if v == client.focus then - tasklistWidget:add(wibox.widget{clientIcon,bg=beautiful.get().tasklist_bg_focus or beautiful.get().bg_focus,widget=wibox.container.background}) + tasklistWidget:add(wibox.widget{wibox.container.constraint(clientWidget,nil,switcherpopup.iconSize,switcherpopup.iconSize * 1.5),bg=beautiful.get().tasklist_bg_focus or beautiful.get().bg_focus,widget=wibox.container.background}) else - tasklistWidget:add(clientIcon) + tasklistWidget:add(wibox.container.constraint(clientWidget,nil,switcherpopup.iconSize,switcherpopup.iconSize * 1.5)) end end end screen.connect_signal("arrange",updateSwitcherpopup) - local close_button = wibox.container.place(awful.widget.button({image = switcherpopup.iconPath .. "/window-close.png"}), "center", "center") + local function pictureButton(icon) + local rc = wibox.container.place(wibox.container.constraint(wibox.widget({ + widget=wibox.widget.imagebox, + forced_width = switcherpopup.buttonSize, + forced_height = switcherpopup.buttonSize, + image = switcherpopup.iconPath .. "/" .. icon + }),nil,switcherpopup.buttonSize,switcherpopup.buttonSize), "center", "top") + rc.content_fill_vertical = true + rc.content_fill_horizontal = true + return rc + end + local close_button = pictureButton("window-close.svg") close_button:buttons(gears.table.join( close_button:buttons(), awful.button({}, 1, nil, function() @@ -63,7 +84,7 @@ function switcherpopup.new(s) end end) )) - local create_tag_button = wibox.container.place(awful.widget.button({image = switcherpopup.iconPath .. "/tag-new.png"}), "center", "center") + local create_tag_button = pictureButton("tag-create.svg") create_tag_button:buttons(gears.table.join( create_tag_button:buttons(), awful.button({}, 1, nil, function() @@ -74,7 +95,7 @@ function switcherpopup.new(s) popup.visible = false end) )) - local destroy_tag_button = wibox.container.place(awful.widget.button({image = switcherpopup.iconPath .. "remove.png"}), "center", "center") + local destroy_tag_button = pictureButton("tag-destroy.svg") destroy_tag_button:buttons(gears.table.join( destroy_tag_button:buttons(), awful.button({}, 1, nil, function() @@ -84,7 +105,7 @@ function switcherpopup.new(s) end end) )) - local prev_tag_button = wibox.container.place(awful.widget.button({image = switcherpopup.iconPath .. "/go-previous.png"}), "center", "center") + local prev_tag_button = pictureButton("go-previous.svg") longpress.add(prev_tag_button, function() awful.tag.viewprev(s) popup.visible = false @@ -99,16 +120,7 @@ function switcherpopup.new(s) error("move failed?") end) - --[[ - prev_tag_button:buttons(gears.table.join( - prev_tag_button:buttons(), - awful.button({}, 1, nil, function() - awful.tag.viewprev(s) - popup.visible = false - end) - )) - ]] - local next_tag_button = wibox.container.place(awful.widget.button({image = switcherpopup.iconPath .. "/go-next.png"}), "center", "center") + local next_tag_button = pictureButton("go-next.svg") longpress.add(next_tag_button, function() awful.tag.viewnext(s) popup.visible = false @@ -122,16 +134,7 @@ function switcherpopup.new(s) end error("move failed?") end) - --[[ - next_tag_button:buttons(gears.table.join( - next_tag_button:buttons(), - awful.button({}, 1, nil, function() - awful.tag.viewnext(s) - popup.visible = false - end) - )) - ]] - local tagbuttons = wibox.widget({layout = wibox.layout.fixed.horizontal, spacing = (switcherpopup.iconSize + switcherpopup.spacing) - switcherpopup.buttonSize, prev_tag_button, create_tag_button, destroy_tag_button, next_tag_button, close_button}) + local tagbuttons = wibox.widget({layout = wibox.layout.ratio.horizontal, spacing=0, prev_tag_button,create_tag_button,destroy_tag_button,next_tag_button,close_button}) systray:set_screen(s) systray:set_horizontal(true) popup = awful.popup { @@ -140,7 +143,7 @@ function switcherpopup.new(s) border_width = 2, ontop = true, placement = awful.placement.centered, - visible = false, + visible = true, } function popup.show(self) updateSwitcherpopup() diff --git a/remove.png b/remove.png deleted file mode 100644 index d551e78..0000000 Binary files a/remove.png and /dev/null differ diff --git a/tag-create.svg b/tag-create.svg new file mode 100644 index 0000000..77bd954 --- /dev/null +++ b/tag-create.svg @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/tag-destroy-inkscape.svg b/tag-destroy-inkscape.svg new file mode 100644 index 0000000..978c213 --- /dev/null +++ b/tag-destroy-inkscape.svg @@ -0,0 +1,251 @@ + +image/svg+xml diff --git a/tag-destroy.svg b/tag-destroy.svg new file mode 100644 index 0000000..26a244c --- /dev/null +++ b/tag-destroy.svg @@ -0,0 +1,230 @@ + +image/svg+xml diff --git a/tag-new.png b/tag-new.png deleted file mode 100644 index ddb0d16..0000000 Binary files a/tag-new.png and /dev/null differ diff --git a/window-close.png b/window-close.png deleted file mode 100644 index 1357d54..0000000 Binary files a/window-close.png and /dev/null differ diff --git a/window-close.svg b/window-close.svg new file mode 100644 index 0000000..cd870cf --- /dev/null +++ b/window-close.svg @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + +