diff options
Diffstat (limited to 'awesome')
128 files changed, 885 insertions, 645 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index c8d4cb6..ec80afe 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -1,15 +1,3 @@ ---[[ - - Awesome WM configuration template - https://github.com/awesomeWM - - Freedesktop : https://github.com/lcpz/awesome-freedesktop - - Copycats themes : https://github.com/lcpz/awesome-copycats - - lain : https://github.com/lcpz/lain - ---]] -- {{{ Required libraries local awesome, client, mouse, screen, tag = awesome, client, mouse, screen, tag @@ -119,12 +107,12 @@ local modkey1 = "Control" -- personal variables --change these variables if you want local browser1 = "brave" -local browser2 = "firefox" +local browser2 = "FireDragon" local browser3 = "chromium -no-default-browser-check" local editor = os.getenv("EDITOR") or "nano" -local editorgui = "atom" -local filemanager = "pcmanfm" -local mailclient = "evolution" +local editorgui = "neovide" +local filemanager = "dolphin" +local mailclient = "mailspring" local mediaplayer = "spotify" local terminal = "kitty" local virtualmachine = "virtualbox" @@ -241,8 +229,6 @@ local myawesomemenu = { awful.util.mymainmenu = freedesktop.menu.build({ before = { { "Awesome", myawesomemenu }, - --{ "Atom", "atom" }, - -- other triads can be put here }, after = { { "Terminal", terminal }, @@ -253,13 +239,6 @@ awful.util.mymainmenu = freedesktop.menu.build({ -- other triads can be put here } }) --- hide menu when mouse leaves it ---awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() awful.util.mymainmenu:hide() end) - ---menubar.utils.terminal = terminal -- Set the Menubar terminal for applications that require it --- }}} - - -- {{{ Screen -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) @@ -286,6 +265,7 @@ screen.connect_signal("arrange", function (s) end end end) + -- Create a wibox for each screen and add it awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) s.systray = wibox.widget.systray() @@ -307,66 +287,29 @@ awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) -- {{{ Key bindings globalkeys = my_table.join( - - -- {{{ Personal keybindings - awful.key({ modkey }, "b", function () awful.util.spawn( browser1 ) end, - {description = browser1, group = "function keys"}), - -- dmenu + -- super + ... function keys awful.key({ modkey }, "r", function () awful.spawn(string.format("dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn NotoMonoRegular:bold:pixelsize=14", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, {description = "show dmenu", group = "hotkeys"}), - - -- Function keys - awful.key({ }, "F12", function () awful.util.spawn( "xfce4-terminal --drop-down" ) end, - {description = "dropdown terminal" , group = "function keys"}), - - - -- super + ... function keys + awful.key({ modkey }, "b", function () awful.util.spawn( browser1 ) end, + {description = browser1, group = "function keys"}), + awful.key({ modkey }, "f", function() awful.util.spawn( filemanager ) end, + {description = filemanager, group = "alt+ctrl"}), awful.key({ altkey }, "c", function () awful.spawn( "/home/peng/.scripts/pscontests.sh" ) end, {description = "contest init" , group = "hotkeys"}), awful.key({ altkey }, "w", function () awful.spawn( "/home/peng/.scripts/wally.sh" ) end, {description = "set random wallpaper" , group = "hotkeys"}), awful.key({ altkey }, "d", function () awful.spawn( "/home/peng/.scripts/dmenuscripts.sh" ) end, {description = "books" , group = "hotkeys"}), - awful.key({ modkey }, "F1", function () awful.util.spawn( browser1 ) end, - {description = browser1, group = "function keys"}), - awful.key({ modkey }, "F2", function () awful.util.spawn( editorgui ) end, - {description = editorgui , group = "function keys" }), - awful.key({ modkey }, "F3", function () awful.util.spawn( "inkscape" ) end, - {description = "inkscape" ,group = "function keys" }), - awful.key({ modkey }, "F4", function () awful.util.spawn( "gimp" ) end, - {description = "gimp" , group = "function keys" }), - awful.key({ modkey }, "F5", function () awful.util.spawn( "meld" ) end, - {description = "meld" , group = "function keys" }), - awful.key({ modkey }, "F6", function () awful.util.spawn( "vlc --video-on-top" ) end, - {description = "vlc" , group = "function keys" }), - awful.key({ modkey }, "F7", function () awful.util.spawn( "virtualbox" ) end, - {description = virtualmachine , group = "function keys" }), - awful.key({ modkey }, "F8", function () awful.util.spawn( filemanager ) end, - {description = filemanager , group = "function keys" }), - awful.key({ modkey }, "F9", function () awful.util.spawn( mailclient ) end, - {description = mailclient , group = "function keys" }), - awful.key({ modkey }, "F10", function () awful.util.spawn( mediaplayer ) end, - {description = mediaplayer , group = "function keys" }), - awful.key({ modkey }, "F11", function () awful.util.spawn( "rofi -theme-str 'window {width: 100%;height: 100%;}' -show drun" ) end, - {description = "rofi fullscreen" , group = "function keys" }), awful.key({ modkey }, "o", function () awful.util.spawn( "rofi -show drun" ) end, {description = "rofi" , group = "function keys" }), -- super + ... - awful.key({ modkey }, "t", function () awful.util.spawn( "conky-toggle" ) end, - {description = "conky-toggle", group = "super"}), - awful.key({ modkey }, "e", function () awful.util.spawn( editorgui ) end, - {description = "run gui editor", group = "super"}), awful.key({ modkey }, "v", function () awful.util.spawn( "pavucontrol" ) end, {description = "pulseaudio control", group = "super"}), - --awful.key({ modkey }, "u", function () awful.screen.focused().mypromptbox:run() end, - --{description = "run prompt", group = "super"}), - awful.key({ modkey }, "x", function () awful.util.spawn( "arcolinux-logout" ) end, - {description = "exit", group = "hotkeys"}), awful.key({ modkey }, "Escape", function () awful.util.spawn( "xkill" ) end, {description = "Kill proces", group = "hotkeys"}), @@ -374,27 +317,9 @@ globalkeys = my_table.join( awful.key({ modkey, "Shift" }, "Return", function() awful.util.spawn( filemanager ) end), - -- ctrl + shift + ... - awful.key({ modkey1, "Shift" }, "Escape", function() awful.util.spawn("xfce4-taskmanager") end), - - -- ctrl+alt + ... - awful.key({ modkey1, altkey }, "b", function() awful.util.spawn( filemanager ) end, - {description = filemanager, group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "c", function() awful.util.spawn("catfish") end, - {description = "catfish", group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "f", function() awful.util.spawn( browser2 ) end, - {description = browser2, group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "g", function() awful.util.spawn( browser3 ) end, - {description = browser3, group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "s", function() awful.util.spawn( mediaplayer ) end, - {description = mediaplayer, group = "alt+ctrl"}), awful.key({ modkey1, altkey }, "t", function() awful.util.spawn( terminal ) end, {description = terminal, group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "u", function() awful.util.spawn( "pavucontrol" ) end, - {description = "pulseaudio control", group = "alt+ctrl"}), - awful.key({ modkey1, altkey }, "Return", function() awful.util.spawn(terminal) end, - {description = terminal, group = "alt+ctrl"}), -- alt + ... awful.key({ altkey, "Shift" }, "t", function () awful.spawn.with_shell( "variety -t && wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&" ) end, @@ -418,7 +343,6 @@ globalkeys = my_table.join( -- Hotkeys Awesome - awful.key({ modkey, }, "s", hotkeys_popup.show_help, {description = "show help", group="awesome"}), @@ -466,13 +390,6 @@ globalkeys = my_table.join( awful.key({ altkey }, "1", function () awful.spawn( "/home/peng/.scripts/klayoutus.sh" ) end, {description = "change keyboardlayout to english" , group = "hotkeys" }), - - -- Non-empty tag browsing - --awful.key({ modkey }, "Left", function () lain.util.tag_view_nonempty(-1) end, - --{description = "view previous nonempty", group = "tag"}), - -- awful.key({ modkey }, "Right", function () lain.util.tag_view_nonempty(1) end, - -- {description = "view next nonempty", group = "tag"}), - -- Default client focus awful.key({ altkey, }, "j", function () @@ -595,10 +512,6 @@ globalkeys = my_table.join( {description = "add new tag", group = "tag"}), awful.key({ modkey, "Control" }, "r", function () lain.util.rename_tag() end, {description = "rename tag", group = "tag"}), - -- awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end, - -- {description = "move tag to the left", group = "tag"}), - -- awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end, - -- {description = "move tag to the right", group = "tag"}), awful.key({ modkey, "Shift" }, "y", function () lain.util.delete_tag() end, {description = "delete tag", group = "tag"}), @@ -607,12 +520,10 @@ globalkeys = my_table.join( {description = terminal, group = "super"}), awful.key({ modkey, "Shift" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}), - -- awful.key({ modkey, "Shift" }, "x", awesome.quit, - -- {description = "quit awesome", group = "awesome"}), - awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end, + awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.03) end, {description = "increase master width factor", group = "layout"}), - awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end, + awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.03) end, {description = "decrease master width factor", group = "layout"}), awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, {description = "increase the number of master clients", group = "layout"}), @@ -638,14 +549,6 @@ globalkeys = my_table.join( end, {description = "restore minimized", group = "client"}), - -- Widgets popups - --awful.key({ altkey, }, "c", function () lain.widget.calendar.show(7) end, - --{description = "show calendar", group = "widgets"}), - --awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end, - --{description = "show filesystem", group = "widgets"}), - --awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end, - --{description = "show weather", group = "widgets"}), - -- Brightness awful.key({ }, "XF86MonBrightnessUp", function () os.execute("xbacklight -inc 10") end, {description = "+10%", group = "hotkeys"}), @@ -687,68 +590,6 @@ globalkeys = my_table.join( awful.key({}, "XF86AudioPrev", function() awful.util.spawn("playerctl previous", false) end), awful.key({}, "XF86AudioStop", function() awful.util.spawn("playerctl stop", false) end), ---Media keys supported by mpd. - --awful.key({}, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end), - --awful.key({}, "XF86AudioNext", function () awful.util.spawn("mpc next") end), - --awful.key({}, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end), - --awful.key({}, "XF86AudioStop", function () awful.util.spawn("mpc stop") end), - - -- MPD control - awful.key({ modkey1, "Shift" }, "Up", - function () - os.execute("mpc toggle") - beautiful.mpd.update() - end, - {description = "mpc toggle", group = "widgets"}), - awful.key({ modkey1, "Shift" }, "Down", - function () - os.execute("mpc stop") - beautiful.mpd.update() - end, - {description = "mpc stop", group = "widgets"}), - awful.key({ modkey1, "Shift" }, "Left", - function () - os.execute("mpc prev") - beautiful.mpd.update() - end, - {description = "mpc prev", group = "widgets"}), - awful.key({ modkey1, "Shift" }, "Right", - function () - os.execute("mpc next") - beautiful.mpd.update() - end, - {description = "mpc next", group = "widgets"}), - awful.key({ modkey1, "Shift" }, "s", - - - - function () - local common = { text = "MPD widget ", position = "top_middle", timeout = 2 } - if beautiful.mpd.timer.started then - beautiful.mpd.timer:stop() - common.text = common.text .. lain.util.markup.bold("OFF") - else - beautiful.mpd.timer:start() - common.text = common.text .. lain.util.markup.bold("ON") - end - naughty.notify(common) - end, - {description = "mpc on/off", group = "widgets"}), |
