Add files via upload
This commit is contained in:
parent
6102a76b9e
commit
a43c380157
1 changed files with 65 additions and 81 deletions
|
@ -1,11 +1,18 @@
|
||||||
-- Standard awesome library
|
-- ____ ____ _ __
|
||||||
|
-- | _ \| _ \| |/ /
|
||||||
|
-- | | | | |_) | ' / Clay Gomera (Drake)
|
||||||
|
-- | |_| | _ <| . \ This is my awesome config for my dekstop computer
|
||||||
|
-- |____/|_| \_\_|\_\
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
-- BEGINNING OF LIBRARIES --
|
||||||
|
-- Standard awesome library
|
||||||
local gears = require("gears") --Utilities such as color parsing and objects
|
local gears = require("gears") --Utilities such as color parsing and objects
|
||||||
local awful = require("awful") --Everything related to window managment
|
local awful = require("awful") --Everything related to window managment
|
||||||
require("awful.autofocus")
|
require("awful.autofocus")
|
||||||
-- Custom libraries
|
-- Custom libraries
|
||||||
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
|
|
||||||
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
|
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
|
||||||
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
|
|
||||||
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
|
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
|
||||||
-- Widget and layout library
|
-- Widget and layout library
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
|
@ -16,12 +23,17 @@ local naughty = require("naughty")
|
||||||
naughty.config.defaults['icon_size'] = 100
|
naughty.config.defaults['icon_size'] = 100
|
||||||
-- Lain library
|
-- Lain library
|
||||||
local lain = require("lain")
|
local lain = require("lain")
|
||||||
|
-- END OF LIBRARIES --
|
||||||
|
|
||||||
|
-- BEGINNING OF VIM HOTKEYS --
|
||||||
-- Enable hotkeys help widget for VIM and other apps
|
-- Enable hotkeys help widget for VIM and other apps
|
||||||
-- when client with a matching name is opened:
|
-- when client with a matching name is opened:
|
||||||
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
local hotkeys_popup = require("awful.hotkeys_popup").widget
|
||||||
require("awful.hotkeys_popup.keys")
|
require("awful.hotkeys_popup.keys")
|
||||||
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
|
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
|
||||||
|
-- END OF VIM HOTKEYS --
|
||||||
|
|
||||||
|
-- BEGINNNG OF ERROR HANDLING --
|
||||||
if awesome.startup_errors then
|
if awesome.startup_errors then
|
||||||
naughty.notify({ preset = naughty.config.presets.critical,
|
naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
title = "Oops, there were errors during startup!",
|
title = "Oops, there were errors during startup!",
|
||||||
|
@ -44,7 +56,9 @@ local function run_once(cmd_arr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
run_once({ "unclutter -root" }) -- entries must be comma-separated
|
run_once({ "unclutter -root" }) -- entries must be comma-separated
|
||||||
|
-- END OF ERROR HANDLING --
|
||||||
|
|
||||||
|
-- BEGINNIG OF THEMES --
|
||||||
local themes = {
|
local themes = {
|
||||||
"gruvbox-dark" -- 1
|
"gruvbox-dark" -- 1
|
||||||
}
|
}
|
||||||
|
@ -52,7 +66,9 @@ local chosen_theme = themes[1]
|
||||||
local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)
|
local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)
|
||||||
beautiful.init(theme_path)
|
beautiful.init(theme_path)
|
||||||
beautiful.init(string.format(gears.filesystem.get_configuration_dir() .. "/themes/%s/theme.lua", chosen_theme))
|
beautiful.init(string.format(gears.filesystem.get_configuration_dir() .. "/themes/%s/theme.lua", chosen_theme))
|
||||||
|
-- END OF THEMES --
|
||||||
|
|
||||||
|
-- BEGINNING OF LAYOUTS
|
||||||
awful.layout.suit.tile.left.mirror = true
|
awful.layout.suit.tile.left.mirror = true
|
||||||
awful.layout.layouts = {
|
awful.layout.layouts = {
|
||||||
awful.layout.suit.tile,
|
awful.layout.suit.tile,
|
||||||
|
@ -88,34 +104,28 @@ lain.layout.cascade.tile.offset_y = 32
|
||||||
lain.layout.cascade.tile.extra_padding = 5
|
lain.layout.cascade.tile.extra_padding = 5
|
||||||
lain.layout.cascade.tile.nmaster = 5
|
lain.layout.cascade.tile.nmaster = 5
|
||||||
lain.layout.cascade.tile.ncol = 2
|
lain.layout.cascade.tile.ncol = 2
|
||||||
|
-- END OF LAYOUTS --
|
||||||
|
|
||||||
|
-- BEGINNING OF VARIABLES --
|
||||||
awful.util.terminal = terminal
|
awful.util.terminal = terminal
|
||||||
|
local code = os.getenv("EDITOR") or "neovide"
|
||||||
local emacs = "emacsclient -c -a 'emacs'"
|
local terminal = "alacritty"
|
||||||
local spacevim = os.getenv("EDITOR") or "neovide"
|
local file = "alacritty -e ./.config/vifm/scripts/vifmrun"
|
||||||
local terminal = "alacritty"
|
local web = "librewolf"
|
||||||
local filemanager = "alacritty -e ./.config/vifm/scripts/vifmrun"
|
local music = "alacritty -e cmus"
|
||||||
local filemanagergui = "pcmanfm"
|
local chat = "alacritty -e gomuks"
|
||||||
local audiomixer = "alacritty -e pulsemixer"
|
local game = "retroarch"
|
||||||
local audiomixer2 = "alacritty -e alsamixer"
|
|
||||||
local browser = "librewolf"
|
|
||||||
local browser2 = "qutebrowser"
|
|
||||||
local musicplayer = "alacritty -e musikcube"
|
|
||||||
local musicplayergui = "lollypop"
|
|
||||||
local emailclient = "thunderbird"
|
|
||||||
local chat1 = "element-desktop"
|
|
||||||
local chat2 = "whatsapp-for-linux"
|
|
||||||
local notes = "joplin-desktop"
|
|
||||||
local passwords = "bitwarden-desktop"
|
|
||||||
local screenlocker = "betterlockscreen -l"
|
|
||||||
|
|
||||||
-- Key bindings variables
|
-- Key bindings variables
|
||||||
local modkey = "Mod4"
|
local modkey = "Mod4"
|
||||||
local altkey = "Mod1"
|
local altkey = "Mod1"
|
||||||
local modkey1 = "Control"
|
local modkey1 = "Control"
|
||||||
|
-- END OF VARIABLES --
|
||||||
|
|
||||||
awful.util.tagnames = { " CODE ", " WEB ", " MUSIC ", " CHAT ", " FILE ", " NOTES ", " WORK1 ", " WORK2 ", " GAME " }
|
-- BEGINNING OF TAG NAMES --
|
||||||
|
awful.util.tagnames = { " CODE ", " WEB ", " MUSIC ", " CHAT ", " FILE ", " WORK ", " GAME " }
|
||||||
|
-- END OF TAG NAMES --
|
||||||
|
|
||||||
|
-- BEGINNIG OF WIBOX STUFF --
|
||||||
awful.util.taglist_buttons = my_table.join(
|
awful.util.taglist_buttons = my_table.join(
|
||||||
awful.button({ }, 1, function(t) t:view_only() end),
|
awful.button({ }, 1, function(t) t:view_only() end),
|
||||||
awful.button({ modkey }, 1, function(t)
|
awful.button({ modkey }, 1, function(t)
|
||||||
|
@ -165,7 +175,9 @@ screen.connect_signal("property::geometry", function(s)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end)
|
awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end)
|
||||||
|
-- END OF WIBOX STUFF --
|
||||||
|
|
||||||
|
-- BEGINNIG OF BINDINGS --
|
||||||
-- Mouse bindings
|
-- Mouse bindings
|
||||||
root.buttons(gears.table.join(
|
root.buttons(gears.table.join(
|
||||||
awful.button({ }, 4, awful.tag.viewnext),
|
awful.button({ }, 4, awful.tag.viewnext),
|
||||||
|
@ -249,19 +261,9 @@ globalkeys = my_table.join(
|
||||||
awful.key({ modkey }, "Return", function() awful.spawn(terminal) end,
|
awful.key({ modkey }, "Return", function() awful.spawn(terminal) end,
|
||||||
{description = "launch a terminal", group = "apps"}),
|
{description = "launch a terminal", group = "apps"}),
|
||||||
|
|
||||||
-- Rofi
|
-- Dmenu
|
||||||
awful.key({ modkey }, "d", function () awful.spawn(string.format("rofi -show drun", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end,
|
awful.key({ modkey }, "d", function () awful.spawn(string.format("dmenu_run", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end,
|
||||||
{description = "show rofi drun menu", group = "hotkeys"}),
|
{description = "show dmenu", group = "hotkeys"}),
|
||||||
awful.key({ modkey }, "r", function () awful.spawn(string.format("rofi -show run", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end,
|
|
||||||
{description = "show rofi run menu", group = "hotkeys"}),
|
|
||||||
awful.key({ modkey }, "Tab", function () awful.spawn(string.format("rofi -show window", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end,
|
|
||||||
{description = "show rofi window menu", group = "hotkeys"}),
|
|
||||||
awful.key({ modkey }, "w", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-wifi-menu.sh") end,
|
|
||||||
{description = "show rofi wifi menu", group = "hotkeys"}),
|
|
||||||
awful.key({ modkey, altkey }, "Delete", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-power-menu.sh") end,
|
|
||||||
{description = "show rofi power menu", group = "hotkeys"}),
|
|
||||||
awful.key({ modkey, altkey }, "Print", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-scrot-menu.sh") end,
|
|
||||||
{description = "show rofi scrot menu", group = "hotkeys"}),
|
|
||||||
|
|
||||||
-- Keyboard Layouts
|
-- Keyboard Layouts
|
||||||
awful.key({ modkey, "Shift" }, "e", function () awful.util.spawn("setxkbmap -layout es") end,
|
awful.key({ modkey, "Shift" }, "e", function () awful.util.spawn("setxkbmap -layout es") end,
|
||||||
|
@ -271,64 +273,38 @@ globalkeys = my_table.join(
|
||||||
|
|
||||||
-- Apps
|
-- Apps
|
||||||
-- code
|
-- code
|
||||||
awful.key({ modkey }, "F1", function () awful.spawn(emacs) end,
|
awful.key({ modkey }, "F1", function () awful.spawn(code) end,
|
||||||
{description = "launch emacs", group = "apps"}),
|
{description = "launch text editor", group = "apps"}),
|
||||||
awful.key({ modkey, "Shift" }, "F1", function () awful.spawn(spacevim) end,
|
|
||||||
{description = "launch spacevim", group = "apps"}),
|
|
||||||
-- web
|
-- web
|
||||||
awful.key({ modkey }, "F2", function () awful.spawn(browser) end,
|
awful.key({ modkey }, "F2", function () awful.spawn(web) end,
|
||||||
{description = "launch firefox", group = "apps"}),
|
{description = "launch web browser", group = "apps"}),
|
||||||
awful.key({ modkey, "Shift" }, "F2", function () awful.spawn(browser2) end,
|
|
||||||
{description = "launch qutebrowser", group = "apps"}),
|
|
||||||
-- music
|
-- music
|
||||||
awful.key({ modkey }, "F3", function () awful.spawn(musicplayer) end,
|
awful.key({ modkey }, "F3", function () awful.spawn(music) end,
|
||||||
{description = "launch musikcube", group = "apps"}),
|
{description = "launch music player", group = "apps"}),
|
||||||
awful.key({ modkey, "Shift" }, "F3", function () awful.spawn(musicplayergui) end,
|
|
||||||
{description = "launch lollypop", group = "apps"}),
|
|
||||||
-- chat
|
-- chat
|
||||||
awful.key({ modkey }, "F4", function () awful.spawn(chat1) end,
|
awful.key({ modkey }, "F4", function () awful.spawn(chat) end,
|
||||||
{description = "launch element", group = "apps"}),
|
{description = "launch chat app", group = "apps"}),
|
||||||
awful.key({ modkey, "Shift" }, "F4", function () awful.spawn(chat2) end,
|
|
||||||
{description = "launch whatsapp", group = "apps"}),
|
|
||||||
-- file
|
-- file
|
||||||
awful.key({ modkey }, "F5", function () awful.spawn(filemanager) end,
|
awful.key({ modkey }, "F5", function () awful.spawn(file) end,
|
||||||
{description = "launch vifm", group = "apps"}),
|
{description = "launch file manager", group = "apps"}),
|
||||||
awful.key({ modkey, "Shift" }, "F5", function () awful.spawn(filemanagergui) end,
|
|
||||||
{description = "launch pcmanfm", group = "apps"}),
|
|
||||||
-- notes
|
|
||||||
awful.key({ modkey }, "F6", function () awful.spawn(notes) end,
|
|
||||||
{description = "launch joplin", group = "apps"}),
|
|
||||||
-- tag agnostic
|
|
||||||
awful.key({ modkey, "Shift" }, "m", function () awful.spawn(audiomixer) end,
|
|
||||||
{description = "launch pulsemixer", group = "apps"}),
|
|
||||||
awful.key({ modkey, altkey }, "m", function () awful.spawn(audiomixer2) end,
|
|
||||||
{description = "launch alsamixer", group = "apps"}),
|
|
||||||
awful.key({ modkey, altkey }, "p", function () awful.spawn(passwords) end,
|
|
||||||
{description = "launch bitwarden", group = "apps"}),
|
|
||||||
-- game
|
-- game
|
||||||
awful.key({ modkey }, "F9", function () awful.util.spawn("retroarch") end,
|
awful.key({ modkey }, "F7", function () awful.util.spawn(game) end,
|
||||||
{description = "launch retroarch", group = "apps"}),
|
{description = "launch retroarch", group = "apps"}),
|
||||||
|
|
||||||
-- Volume Control
|
-- Volume Control
|
||||||
awful.key({}, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end,
|
awful.key({ modkey, modkey1 }, "=" , function() volume_widget:inc(5) end,
|
||||||
{description = "increase volume", group = "volume"}),
|
{description = "increase volume", group = "volume"}),
|
||||||
awful.key({}, "XF86AudioLowerVolume", function() volume_widget:dec(5) end,
|
awful.key({ modkey, modkey1 }, "-", function() volume_widget:dec(5) end,
|
||||||
{description = "decrease volume", group = "volume"}),
|
{description = "decrease volume", group = "volume"}),
|
||||||
awful.key({}, "XF86AudioMute", function() volume_widget:toggle() end,
|
awful.key({ modkey, modkey1 }, "0", function() volume_widget:toggle() end,
|
||||||
{description = "mute volume", group = "volume"}),
|
{description = "mute volume", group = "volume"}),
|
||||||
|
|
||||||
-- Screenshot
|
-- Screenshot
|
||||||
awful.key({}, "Print", function() awful.util.spawn("scrot") end,
|
awful.key({ modkey }, "Print", function() awful.util.spawn("scrot") end,
|
||||||
{description = "take a complete screenshot", group = "screenshot"}),
|
{description = "take a complete screenshot", group = "screenshot"}),
|
||||||
awful.key({"Control"}, "Print", function() awful.util.spawn("scrot -s") end,
|
awful.key({ modkey, modkey1 }, "Print", function() awful.util.spawn("scrot -s") end,
|
||||||
{description = "take an area screenshot", group = "screenshot"}),
|
{description = "take an area screenshot", group = "screenshot"}),
|
||||||
|
|
||||||
-- Brightness
|
|
||||||
awful.key({}, "XF86MonBrightnessUp", function () brightness_widget:inc(5) end,
|
|
||||||
{description = "increase brightness", group = "brightness"}),
|
|
||||||
awful.key({}, "XF86MonBrightnessDown", function () brightness_widget:dec(5) end,
|
|
||||||
{description = "decrease brightness", group = "brightness"}),
|
|
||||||
|
|
||||||
-- Screen configuration
|
-- Screen configuration
|
||||||
awful.key({ modkey }, "p", function() awful.util.spawn("arandr") end,
|
awful.key({ modkey }, "p", function() awful.util.spawn("arandr") end,
|
||||||
{description = "launch screen configuration tool", group = ("screen")}),
|
{description = "launch screen configuration tool", group = ("screen")}),
|
||||||
|
@ -491,7 +467,9 @@ clientbuttons = gears.table.join(
|
||||||
|
|
||||||
-- Set keys
|
-- Set keys
|
||||||
root.keys(globalkeys)
|
root.keys(globalkeys)
|
||||||
|
-- END OF BINDINGS --
|
||||||
|
|
||||||
|
-- BEGINNING OF RULES --
|
||||||
-- Rules to apply to new clients (through the "manage" signal).
|
-- Rules to apply to new clients (through the "manage" signal).
|
||||||
awful.rules.rules = {
|
awful.rules.rules = {
|
||||||
-- All clients will match this rule.
|
-- All clients will match this rule.
|
||||||
|
@ -537,7 +515,9 @@ awful.rules.rules = {
|
||||||
}
|
}
|
||||||
}, properties = { floating = true }},
|
}, properties = { floating = true }},
|
||||||
}
|
}
|
||||||
|
-- END OF RULES --
|
||||||
|
|
||||||
|
-- BEGINNING OF SIGNALS --
|
||||||
-- Signal function to execute when a new client appears.
|
-- Signal function to execute when a new client appears.
|
||||||
client.connect_signal("manage", function (c)
|
client.connect_signal("manage", function (c)
|
||||||
-- Set the windows at the slave,
|
-- Set the windows at the slave,
|
||||||
|
@ -550,15 +530,19 @@ client.connect_signal("manage", function (c)
|
||||||
awful.placement.no_offscreen(c)
|
awful.placement.no_offscreen(c)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
-- END OF SIGNALS --
|
||||||
|
|
||||||
|
-- BEGINNING OF MOUSE FOCUS SETTINGS --
|
||||||
-- Enable sloppy focus, so that focus follows mouse.
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
client.connect_signal("mouse::enter", function(c)
|
client.connect_signal("mouse::enter", function(c)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||||
end)
|
end)
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus 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)
|
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
||||||
|
-- END OF MOUSE FOCUS SETTINGS --
|
||||||
|
|
||||||
awful.util.spawn_with_shell("nitrogen --restore")
|
-- BEGINNING OF AUTOSTART --
|
||||||
|
awful.util.spawn_with_shell("sh /home/drk/.config/scripts/feh.sh")
|
||||||
awful.util.spawn_with_shell("lxpolkit")
|
awful.util.spawn_with_shell("lxpolkit")
|
||||||
awful.util.spawn_with_shell("picom --experimental-backend --config ~/.config/picom.conf")
|
awful.util.spawn_with_shell("sh /home/drk/.config/scripts/screen.sh")
|
||||||
awful.util.spawn_with_shell("/usr/bin/emacs --daemon &")
|
-- END OF AUTOSTART --
|
||||||
|
|
Loading…
Reference in a new issue