From 290a69eb11dd6a62671609b41c9fe682fe177186 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Tue, 3 Sep 2019 10:28:46 +0200 Subject: switch to awful.wibar and awful.spawn.with_shell --- config/awesome/rc.lua | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/config/awesome/rc.lua b/config/awesome/rc.lua index 494321c..d97fe38 100644 --- a/config/awesome/rc.lua +++ b/config/awesome/rc.lua @@ -3,7 +3,6 @@ local gears = require("gears") local awful = require("awful") awful.rules = require("awful.rules") require("awful.autofocus") -local gears = require("gears") -- Widget and layout library local wibox = require("wibox") -- Theme handling library @@ -197,7 +196,7 @@ awful.screen.connect_for_each_screen(function(s) s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.alltags, tasklist_buttons) -- Create the wibox - s.mywibox = awful.wibox({ position = "bottom", screen = s }) + s.mywibar = awful.wibar({ position = "bottom", screen = s }) -- Widgets that are aligned to the left local left_layout = wibox.layout.fixed.horizontal() @@ -221,7 +220,7 @@ awful.screen.connect_for_each_screen(function(s) layout:set_middle(s.mytasklist) layout:set_right(right_layout) - s.mywibox:set_widget(layout) + s.mywibar:set_widget(layout) end) -- }}} @@ -343,27 +342,27 @@ globalkeys = awful.util.table.join( awful.key({ }, "XF86Launch9", function () awful.spawn("bt-headset", false) end), - awful.key({ modkey }, "x", function () awful.util.spawn_with_shell("urxvt") end), - awful.key({ modkey, "Shift" }, "x", function () awful.util.spawn_with_shell("urxvt -title FURxvt") end), - awful.key({ modkey }, "m", function () awful.util.spawn_with_shell("xterm-mail") end), - awful.key({ modkey, "Shift" }, "m", function () awful.util.spawn_with_shell("xterm-mail-cosy") end), - awful.key({ modkey }, "i", function () awful.util.spawn_with_shell("xterm-irc") end), - awful.key({ modkey }, "b", function () awful.util.spawn_with_shell("urxvt -e bash") end), + awful.key({ modkey }, "x", function () awful.spawn.with_shell("urxvt") end), + awful.key({ modkey, "Shift" }, "x", function () awful.spawn.with_shell("urxvt -title FURxvt") end), + awful.key({ modkey }, "m", function () awful.spawn.with_shell("xterm-mail") end), + awful.key({ modkey, "Shift" }, "m", function () awful.spawn.with_shell("xterm-mail-cosy") end), + awful.key({ modkey }, "i", function () awful.spawn.with_shell("xterm-irc") end), + awful.key({ modkey }, "b", function () awful.spawn.with_shell("urxvt -e bash") end), - -- awful.key({ modkey }, "k", function () awful.util.spawn_with_shell("keepassx") end), - awful.key({ modkey }, "c", function () awful.util.spawn_with_shell("ch") end), - awful.key({ modkey }, "f", function () awful.util.spawn_with_shell("ff") end), - awful.key({ modkey }, "s", function () awful.util.spawn_with_shell("signal") end), + -- awful.key({ modkey }, "k", function () awful.spawn.with_shell("keepassx") end), + awful.key({ modkey }, "c", function () awful.spawn.with_shell("ch") end), + awful.key({ modkey }, "f", function () awful.spawn.with_shell("ff") end), + awful.key({ modkey }, "s", function () awful.spawn.with_shell("signal") end), - -- awful.key({ "Control", "Mod1"}, "End", function () awful.util.spawn_with_shell("xscreensaver-command -lock; sleep 1; systemctl suspend") end), - --awful.key({ "Control", "Mod1"}, "l", function () awful.util.spawn_with_shell("xscreensaver-command -lock") end), + -- awful.key({ "Control", "Mod1"}, "End", function () awful.spawn.with_shell("xscreensaver-command -lock; sleep 1; systemctl suspend") end), + --awful.key({ "Control", "Mod1"}, "l", function () awful.spawn.with_shell("xscreensaver-command -lock") end), -- awful.key({ "Control", "Mod1"}, "l", function () awful.spawn("xdg-screensaver lock") end), --KDE--awful.key({ "Control", "Mod1"}, "l", function () awful.spawn("loginctl lock-session") end), - --KDE--awful.key({ "Control", "Mod1"}, "End", function () awful.util.spawn_with_shell("systemctl suspend -i; xdg-screensaver reset; loginctl unlock-session; xdg-screensaver reset") end), - -- awful.key({ "Control", "Mod1"}, "End", function () awful.util.spawn_with_shell("xscreensaver-command -lock; sleep 1; systemctl suspend") end), - -- awful.key({ "Control", "Mod1"}, "End", function () awful.util.spawn_with_shell("loginctl lock-session && systemctl suspend -i") end), - -- awful.key({ "Shift", "Control", "Mod1"}, "End", function () awful.util.spawn_with_shell("loginctl lock-session && systemctl suspend -i") end), + --KDE--awful.key({ "Control", "Mod1"}, "End", function () awful.spawn.with_shell("systemctl suspend -i; xdg-screensaver reset; loginctl unlock-session; xdg-screensaver reset") end), + -- awful.key({ "Control", "Mod1"}, "End", function () awful.spawn.with_shell("xscreensaver-command -lock; sleep 1; systemctl suspend") end), + -- awful.key({ "Control", "Mod1"}, "End", function () awful.spawn.with_shell("loginctl lock-session && systemctl suspend -i") end), + -- awful.key({ "Shift", "Control", "Mod1"}, "End", function () awful.spawn.with_shell("loginctl lock-session && systemctl suspend -i") end), -- awful.key( {"Ctrl"}, "Tab", revelation), @@ -720,13 +719,13 @@ tag.connect_signal( -- }}} terminal = "urxvt" -awful.util.spawn_with_shell("pkill -x -f nm-applet; nm-applet") -awful.util.spawn_with_shell("pkill -x -f blueman-applet; blueman-applet") ---awful.util.spawn_with_shell("pkill -x -f klipper; klipper") +awful.spawn.with_shell("pkill -x -f nm-applet; nm-applet") +awful.spawn.with_shell("pkill -x -f blueman-applet; blueman-applet") +--awful.spawn.with_shell("pkill -x -f klipper; klipper") -- awful.spawn("xscreensaver -no-splash") --KDE--awful.spawn("X-screensaver") --- awful.util.spawn_with_shell("pkill -x -f clipit; clipit") --- awful.util.spawn_with_shell("pkill -x -f dnssec-trigger-panel; dnssec-trigger-panel") -awful.util.spawn_with_shell("pkill -x -f 'alsa-volume-monitor hw:0'; alsa-volume-monitor hw:0") +-- awful.spawn.with_shell("pkill -x -f clipit; clipit") +-- awful.spawn.with_shell("pkill -x -f dnssec-trigger-panel; dnssec-trigger-panel") +awful.spawn.with_shell("pkill -x -f 'alsa-volume-monitor hw:0'; alsa-volume-monitor hw:0") -- vim:set softtabstop=4:ts=4:shiftwidth=4:et=1: -- cgit v1.2.3