2019-07-23 15:20:27 +02:00
|
|
|
-- Default configuration file
|
2019-08-13 23:03:08 +02:00
|
|
|
-- This file will be overridden on update.
|
|
|
|
-- Copy to `~/.config/awesome/config.lua` to avoid losing your changes.
|
2019-07-23 15:20:27 +02:00
|
|
|
local awful = require("awful")
|
2019-08-11 23:05:12 +02:00
|
|
|
local naughty = require("naughty")
|
2019-07-23 15:20:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
local config = {}
|
|
|
|
|
2019-07-24 11:32:27 +02:00
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
--
|
|
|
|
-- Awesome WM
|
|
|
|
--
|
|
|
|
config.awesome = {
|
|
|
|
-- Enable window autofocus on mouse hover
|
|
|
|
autofocus = true,
|
|
|
|
|
|
|
|
-- Enable hotkeys help widget for VIM and other apps
|
|
|
|
-- when client with a matching name is opened:
|
|
|
|
hotkeys_popup = true,
|
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Application launcher
|
|
|
|
application_launcher_check = "rofi -version",
|
2019-11-17 07:18:26 +01:00
|
|
|
application_launcher = "rofi -show drun -modi drun -show-icons -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
|
|
|
|
application_launcher_cmd = "rofi -show run -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi",
|
2019-08-13 23:03:08 +02:00
|
|
|
|
2019-08-17 14:57:19 +02:00
|
|
|
-- Screen locker
|
|
|
|
lock_command = "i3lock --blur=5 -f -k --timecolor=ffffffff --datecolor=ffffffff --indicator --ringcolor=aaaaaaaa",
|
|
|
|
-- lock_command = "xscreensaver-command -lock",
|
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
-- Terminal
|
|
|
|
terminal = "terminator",
|
|
|
|
|
2019-08-13 22:05:01 +02:00
|
|
|
-- Window tiling
|
|
|
|
tiling = {
|
|
|
|
-- Available window layouts - order matters
|
|
|
|
layouts = {
|
|
|
|
awful.layout.suit.floating,
|
|
|
|
awful.layout.suit.tile,
|
|
|
|
awful.layout.suit.tile.left,
|
|
|
|
awful.layout.suit.tile.bottom,
|
|
|
|
awful.layout.suit.tile.top,
|
|
|
|
-- awful.layout.suit.fair,
|
|
|
|
-- awful.layout.suit.fair.horizontal,
|
|
|
|
-- awful.layout.suit.spiral,
|
|
|
|
-- awful.layout.suit.spiral.dwindle,
|
|
|
|
-- awful.layout.suit.max,
|
|
|
|
-- awful.layout.suit.max.fullscreen,
|
|
|
|
-- awful.layout.suit.magnifier,
|
|
|
|
-- awful.layout.suit.corner.nw,
|
|
|
|
-- awful.layout.suit.corner.ne,
|
|
|
|
-- awful.layout.suit.corner.sw,
|
|
|
|
-- awful.layout.suit.corner.se,
|
|
|
|
},
|
|
|
|
},
|
2019-08-13 21:57:54 +02:00
|
|
|
}
|
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Default text editor
|
|
|
|
config.awesome.editor = os.getenv("EDITOR") or "nano"
|
|
|
|
-- config.awesome.editor = "vi"
|
|
|
|
-- config.awesome.editor = "code"
|
|
|
|
|
|
|
|
-- Default text editor command
|
|
|
|
config.awesome.editor_cmd = config.awesome.terminal .. " -e " .. config.awesome.editor
|
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
|
|
|
|
--
|
|
|
|
-- Keys / Hotkeys / Shortcuts
|
|
|
|
--
|
|
|
|
-- To disable a shortcut, simply remove it (tip: comment it out with a leading "--")
|
|
|
|
--
|
|
|
|
config.keys = {
|
|
|
|
-- Main modifier key for meta hotkeys like moving windows or locking the session
|
|
|
|
-- Usually, Mod4 is the key with a logo between Control and Alt.
|
|
|
|
modkey = "Mod4",
|
2019-08-13 23:03:08 +02:00
|
|
|
}
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Hotkeys globally available (through the entire OS, regardless of what's focused)
|
|
|
|
config.keys.global_keys = {
|
|
|
|
-- Application launcher
|
2019-08-13 23:58:50 +02:00
|
|
|
launcher = { { config.keys.modkey }, "space", },
|
2019-11-17 07:18:26 +01:00
|
|
|
launcher_cmd = { { "Ctrl", config.keys.modkey }, "space", },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-17 14:57:19 +02:00
|
|
|
-- Screen locker
|
|
|
|
lock_screen = { { config.keys.modkey }, "l" },
|
|
|
|
|
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
--
|
|
|
|
-- Media and volume controls
|
|
|
|
-- See media_control.lua
|
|
|
|
--
|
|
|
|
media_control = {
|
|
|
|
-- Raise volume
|
2019-08-13 23:58:50 +02:00
|
|
|
raiseVolume = { {}, "XF86AudioRaiseVolume" },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Lower volume
|
2019-08-13 23:58:50 +02:00
|
|
|
lowerVolume = { {}, "XF86AudioLowerVolume" },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Toggle mute
|
2019-08-13 23:58:50 +02:00
|
|
|
toggleMute = { {}, "XF86AudioMute" },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Toggle Play / Pause
|
2019-08-13 23:58:50 +02:00
|
|
|
playPause = { {}, "XF86AudioPlay" },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Next track
|
2019-08-13 23:58:50 +02:00
|
|
|
nextTrack = { {}, "XF86AudioNext" },
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2019-08-13 23:03:08 +02:00
|
|
|
-- Previous track
|
2019-08-13 23:58:50 +02:00
|
|
|
previousTrack = { {}, "XF86AudioPrev" },
|
2020-07-22 17:07:53 +02:00
|
|
|
|
|
|
|
-- Brightness up
|
|
|
|
brightnessUp = { {}, "XF86MonBrightnessUp" },
|
|
|
|
|
|
|
|
-- Brightness down
|
|
|
|
brightnessDown = { {}, "XF86MonBrightnessDown" },
|
2019-08-13 21:57:54 +02:00
|
|
|
},
|
2019-08-13 23:58:50 +02:00
|
|
|
|
|
|
|
-- Keyboard layout
|
|
|
|
keyboard_layout = {
|
|
|
|
-- Switch between layouts
|
|
|
|
switch = { { "Mod1" }, "Shift_L" },
|
|
|
|
|
|
|
|
-- Switch between layouts (alternative)
|
|
|
|
switch_alt = { { "Shift" }, "Alt_L" },
|
|
|
|
}
|
2019-08-13 21:57:54 +02:00
|
|
|
}
|
|
|
|
|
2020-02-15 18:45:55 +01:00
|
|
|
-- Custom global hotkeys
|
|
|
|
config.keys.custom_keys = {
|
|
|
|
-- Example:
|
|
|
|
-- {
|
|
|
|
-- hotkey = {
|
|
|
|
-- { config.keys.modkey, },
|
|
|
|
-- "t"
|
|
|
|
-- },
|
|
|
|
-- action = function()
|
|
|
|
-- awful.spawn('terminator')
|
|
|
|
-- end,
|
|
|
|
-- identity = { description = "open terminator", group = "utilities" }
|
|
|
|
-- }
|
|
|
|
};
|
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
|
2020-03-28 19:48:04 +01:00
|
|
|
--
|
|
|
|
-- Audio
|
|
|
|
--
|
|
|
|
config.audio = {
|
|
|
|
card = '-D pulse',
|
|
|
|
device = 'Master',
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
--
|
|
|
|
-- Widgets
|
|
|
|
--
|
|
|
|
config.widgets = {
|
2019-08-13 23:58:50 +02:00
|
|
|
-- Keyboard layout widget
|
|
|
|
keyboard_layout = {
|
|
|
|
enabled = true,
|
|
|
|
layouts = { "fr", "us" },
|
|
|
|
layout_switch_command = "setxkbmap",
|
|
|
|
},
|
|
|
|
|
2019-08-13 21:57:54 +02:00
|
|
|
-- Enable/disable the system resources monitoring widget
|
2019-08-13 23:58:50 +02:00
|
|
|
system_resources = {
|
2019-10-07 12:13:11 +02:00
|
|
|
bars = {
|
|
|
|
enabled = true,
|
|
|
|
screens = { 1, 2 },
|
|
|
|
refresh_interval = 1.5, -- In seconds
|
|
|
|
},
|
|
|
|
battery = {
|
|
|
|
enabled = true,
|
|
|
|
screens = { 1, 2 },
|
|
|
|
refresh_interval = 30, -- In seconds
|
|
|
|
precision = 0, -- How many decimals
|
|
|
|
},
|
2019-08-13 23:58:50 +02:00
|
|
|
},
|
2019-08-13 21:57:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Auto start custom applications
|
|
|
|
--
|
|
|
|
config.autostart = {
|
|
|
|
-- Network manager widget
|
|
|
|
{
|
|
|
|
"nm-applet --help", -- Verification command that will be checked before spawning the next command
|
|
|
|
"nm-applet", -- The app
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Screenshot utility
|
|
|
|
"flameshot",
|
|
|
|
}
|
|
|
|
|
2019-07-23 15:20:27 +02:00
|
|
|
|
|
|
|
-- Theme
|
|
|
|
-- Change to gears.filesystem.get_themes_dir() .. "default/theme.lua" to use default awesome theme
|
2019-08-13 23:03:08 +02:00
|
|
|
config.theme = awful.util.getdir("config") .. "/theme.lua"
|
2019-07-23 15:20:27 +02:00
|
|
|
|
2019-08-11 23:04:23 +02:00
|
|
|
-- Screenshot utility
|
2019-07-25 17:21:34 +02:00
|
|
|
config.screenshot_utility_command = "flameshot gui"
|
2019-07-23 15:38:02 +02:00
|
|
|
|
2019-08-11 23:04:23 +02:00
|
|
|
-- Run menu
|
2019-08-13 23:03:08 +02:00
|
|
|
config.windowSwitcher = "rofi -show window -config " .. awful.util.getdir("config") .. "/assets/rofi/themes/paper-float.rasi"
|
2019-07-23 15:38:02 +02:00
|
|
|
|
2019-07-24 11:33:49 +02:00
|
|
|
-- Media control
|
|
|
|
config.volume_osd_timeout = 2
|
|
|
|
|
2019-07-23 15:20:27 +02:00
|
|
|
|
2019-08-11 23:05:12 +02:00
|
|
|
-- Awesome tweaks
|
|
|
|
naughty.config.defaults.timeout = 15
|
|
|
|
|
|
|
|
|
2019-07-25 17:21:34 +02:00
|
|
|
return config
|