Initial Commit
This commit is contained in:
62
configuration/apps.lua
Normal file
62
configuration/apps.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local filesystem = require('gears.filesystem')
|
||||
local beautiful = require('beautiful')
|
||||
|
||||
-- Thanks to jo148 on github for making rofi dpi aware!
|
||||
local with_dpi = require('beautiful').xresources.apply_dpi
|
||||
local get_dpi = require('beautiful').xresources.get_dpi
|
||||
local rofi_command = 'env /usr/bin/rofi -show drun -display-drun -run-command "/bin/bash -c -i \'shopt -s expand_aliases; {cmd}\'"'
|
||||
|
||||
return {
|
||||
-- List of apps to start by default on some actions
|
||||
default = {
|
||||
terminal = 'env alacritty',
|
||||
rofi = rofi_command,
|
||||
lock = 'i3lock -c 000000',
|
||||
quake = 'alacritty',
|
||||
screenshot = 'flameshot full -p ~/Pictures',
|
||||
region_screenshot = 'flameshot gui -p ~/Pictures',
|
||||
delayed_screenshot = 'flameshot gui -p ~/Pictures',
|
||||
|
||||
-- Editing these also edits the default program
|
||||
-- associated with each tag/workspace
|
||||
browser = 'env brave',
|
||||
editor = 'code', -- gui text editor
|
||||
social = 'telegram-desktop',
|
||||
game = rofi_command,
|
||||
files = 'nautilus',
|
||||
music = 'clementine',
|
||||
video = 'vlc',
|
||||
appmng = 'alacritty -e htop',
|
||||
vmapp = 'virtualbox',
|
||||
power_command = 'i3lock-fancy',
|
||||
audiomng = 'pavucontrol',
|
||||
obs = 'obs',
|
||||
},
|
||||
-- List of apps to start once on start-up
|
||||
run_on_start_up = {
|
||||
-- Add applications that need to be killed between reloads
|
||||
-- to avoid multipled instances, inside the autostart script
|
||||
'~/.config/awesome/configuration/autostart', -- Spawn "dirty" apps that can linger between sessions
|
||||
--'compton',
|
||||
'picom --config ' .. filesystem.get_configuration_dir() .. '/configuration/picom.conf',
|
||||
'nitrogen --restore',
|
||||
'nm-applet --indicator', -- wifi
|
||||
'xfce4-power-manager', -- Power manager
|
||||
'pamac-tray',
|
||||
-- 'ibus-daemon --xim --daemonize', -- Ibus daemon for keyboard
|
||||
'scream-start', -- scream audio sink
|
||||
-- 'flameshot', -- screenshots
|
||||
-- 'numlockx on', -- enable numlock
|
||||
'/usr/lib/xfce-polkit/xfce-polkit & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager
|
||||
'blueman-tray', -- bluetooth tray
|
||||
--'copyq',
|
||||
'dropbox',
|
||||
'megasync',
|
||||
'~/.config/awesome/configuration/awspawn', -- Spawn "dirty" apps that can linger between sessions
|
||||
-- '/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &")',
|
||||
'keepassxc',
|
||||
'kdeconnect-indicator',
|
||||
'planner',
|
||||
}
|
||||
}
|
||||
|
53
configuration/autostart
Executable file
53
configuration/autostart
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
## This configuration file is meant for applications that
|
||||
# still run in the background when a reload is triggered
|
||||
# for awesome, this script just kills the running instance
|
||||
# and starts a new one.
|
||||
# Only add applications/scripts without parameters here
|
||||
# (if you want to apply parameters then use a script file!)
|
||||
|
||||
# List of applications to run
|
||||
# the script $HOME/.config/awesomestart
|
||||
# is intended to be a copy of this file
|
||||
# to allow out of tree autostart programs
|
||||
APPS=(
|
||||
# keepassxc
|
||||
# kdeconnect-indicator
|
||||
radeon-profile
|
||||
$HOME/.config/awesomestart
|
||||
)
|
||||
# Some applications start child applications that need to be killed on reload
|
||||
KILL=(
|
||||
synergyc
|
||||
nextcloud
|
||||
)
|
||||
# Some applications need to be started without GUI
|
||||
SILENT=(
|
||||
gnome-clocks
|
||||
)
|
||||
|
||||
#Kill the polkit
|
||||
killall xfce-polkit
|
||||
|
||||
# First kill lingering apps
|
||||
for app in "${APPS[@]}"
|
||||
do
|
||||
kill -9 $(pidof $app)
|
||||
done
|
||||
for app in "${KILL[@]}"
|
||||
do
|
||||
kill -9 $(pidof $app)
|
||||
done
|
||||
|
||||
# Start new instances
|
||||
for app in "${APPS[@]}"
|
||||
do
|
||||
env $app ${@:2} &
|
||||
done
|
||||
|
||||
# Run silent apps
|
||||
Xvfb :99 &
|
||||
for silentapp in "${SILENT[@]}"
|
||||
do
|
||||
DISPLAY=:99 $silentapp &
|
||||
done
|
13
configuration/client/buttons.lua
Normal file
13
configuration/client/buttons.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local awful = require('awful')
|
||||
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
|
||||
return awful.util.table.join(awful.button({}, 1, function(c)
|
||||
_G.client.focus = c
|
||||
c:raise()
|
||||
end), awful.button({modkey}, 1, awful.mouse.client.move), awful.button({modkey, 'Shift'}, 1, awful.mouse.client.resize),
|
||||
awful.button({modkey}, 4, function()
|
||||
awful.layout.inc(1)
|
||||
end), awful.button({modkey}, 5, function()
|
||||
awful.layout.inc(-1)
|
||||
end))
|
1
configuration/client/init.lua
Normal file
1
configuration/client/init.lua
Normal file
@@ -0,0 +1 @@
|
||||
require('configuration.client.rules')
|
27
configuration/client/keys.lua
Normal file
27
configuration/client/keys.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
local awful = require('awful')
|
||||
require('awful.autofocus')
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
local altkey = require('configuration.keys.mod').altKey
|
||||
|
||||
local clientKeys =
|
||||
awful.util.table.join(
|
||||
awful.key(
|
||||
{modkey},
|
||||
'f',
|
||||
function(c)
|
||||
c.fullscreen = not c.fullscreen
|
||||
c:raise()
|
||||
end,
|
||||
{description = 'toggle fullscreen', group = 'client'}
|
||||
),
|
||||
awful.key(
|
||||
{modkey},
|
||||
'q',
|
||||
function(c)
|
||||
c:kill()
|
||||
end,
|
||||
{description = 'close', group = 'client'}
|
||||
)
|
||||
)
|
||||
|
||||
return clientKeys
|
74
configuration/client/rules.lua
Normal file
74
configuration/client/rules.lua
Normal file
@@ -0,0 +1,74 @@
|
||||
local awful = require('awful')
|
||||
local gears = require('gears')
|
||||
local client_keys = require('configuration.client.keys')
|
||||
local client_buttons = require('configuration.client.buttons')
|
||||
|
||||
-- Rules
|
||||
awful.rules.rules = {{
|
||||
rule = {},
|
||||
properties = {
|
||||
focus = awful.client.focus.filter,
|
||||
raise = true,
|
||||
keys = client_keys,
|
||||
buttons = client_buttons,
|
||||
screen = awful.screen.preferred,
|
||||
placement = awful.placement.no_offscreen,
|
||||
floating = false,
|
||||
maximized = false,
|
||||
above = false,
|
||||
below = false,
|
||||
ontop = false,
|
||||
sticky = false,
|
||||
maximized_horizontal = false,
|
||||
maximized_vertical = false
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'dialog'},
|
||||
class = {'Wicd-client.py', 'calendar.google.com'}
|
||||
},
|
||||
properties = {
|
||||
placement = awful.placement.centered,
|
||||
ontop = true,
|
||||
floating = true,
|
||||
drawBackdrop = true,
|
||||
shape = function()
|
||||
return function(cr, w, h)
|
||||
gears.shape.rounded_rect(cr, w, h, 8)
|
||||
end
|
||||
end,
|
||||
skip_decoration = true
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'modal'}
|
||||
},
|
||||
properties = {
|
||||
titlebars_enabled = true,
|
||||
floating = true,
|
||||
above = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'utility'}
|
||||
},
|
||||
properties = {
|
||||
titlebars_enabled = false,
|
||||
floating = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}, {
|
||||
rule_any = {
|
||||
type = {'splash'},
|
||||
name = {'Discord Updater'}
|
||||
},
|
||||
properties = {
|
||||
floating = true,
|
||||
above = true,
|
||||
skip_decoration = true,
|
||||
placement = awful.placement.centered
|
||||
}
|
||||
}}
|
4
configuration/init.lua
Normal file
4
configuration/init.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
keys = require('configuration.keys'),
|
||||
apps = require('configuration.apps')
|
||||
}
|
274
configuration/keys/global.lua
Normal file
274
configuration/keys/global.lua
Normal file
@@ -0,0 +1,274 @@
|
||||
local awful = require('awful')
|
||||
require('awful.autofocus')
|
||||
local beautiful = require('beautiful')
|
||||
local hotkeys_popup = require('awful.hotkeys_popup').widget
|
||||
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
local altkey = require('configuration.keys.mod').altKey
|
||||
local apps = require('configuration.apps')
|
||||
|
||||
function poweroff_command()
|
||||
awful.spawn.with_shell('poweroff')
|
||||
awful.keygrabber.stop(_G.exit_screen_grabber)
|
||||
end
|
||||
|
||||
-- Key bindings
|
||||
local globalKeys = awful.util.table.join( -- Hotkeys
|
||||
awful.key({modkey}, 'F1', hotkeys_popup.show_help,
|
||||
{description = 'show help', group = 'awesome'}), -- Tag browsing
|
||||
awful.key({modkey}, 'w', awful.tag.viewprev,
|
||||
{description = 'view previous', group = 'tag'}),
|
||||
awful.key({modkey}, 's', awful.tag.viewnext,
|
||||
{description = 'view next', group = 'tag'}),
|
||||
awful.key({altkey, 'Control'}, 'Left', awful.tag.viewprev,
|
||||
{description = 'view previous', group = 'tag'}),
|
||||
awful.key({altkey, 'Control'}, 'Right', awful.tag.viewnext,
|
||||
{description = 'view next', group = 'tag'}),
|
||||
awful.key({modkey}, 'Escape', awful.tag.history.restore,
|
||||
{description = 'go back', group = 'tag'}), -- Default client focus
|
||||
awful.key({modkey}, 'r', function() _G.awesome.spawn(apps.default.rofi) end,
|
||||
{description = 'show rofi menu', group = 'awesome'}),
|
||||
awful.key({modkey}, 'd', function()
|
||||
local flag = false
|
||||
for _, c in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
if c.minimized == true then flag = true end
|
||||
c.minimized = true
|
||||
end
|
||||
for _, c in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
if flag == true then c.minimized = false end
|
||||
end
|
||||
end, {description = 'minimize all clients', group = 'awesome'}),
|
||||
awful.key({modkey}, 'u', awful.client.urgent.jumpto,
|
||||
{description = 'jump to urgent client', group = 'client'}),
|
||||
awful.key({modkey}, 'Tab', function()
|
||||
-- awful.client.focus.history.previous()
|
||||
awful.client.focus.byidx(1)
|
||||
if _G.client.focus then _G.client.focus:raise() end
|
||||
end, {description = 'Switch to next window', group = 'client'}),
|
||||
awful.key({modkey, 'Shift'}, 'Tab', function()
|
||||
-- awful.client.focus.history.previous()
|
||||
awful.client.focus.byidx(-1)
|
||||
if _G.client.focus then _G.client.focus:raise() end
|
||||
end, {description = 'Switch to previous window', group = 'client'}),
|
||||
-- Programms
|
||||
awful.key({modkey}, 'l', function() awful.spawn(apps.default.lock) end,
|
||||
{description = 'Lock the screen', group = 'awesome'}),
|
||||
awful.key({modkey, 'Shift'}, 'z', function()
|
||||
awful.util.spawn_with_shell(apps.default.delayed_screenshot)
|
||||
end, {
|
||||
description = 'Mark an area and screenshot it (clipboard)',
|
||||
group = 'screenshots (clipboard)'
|
||||
}),
|
||||
--[[ awful.key({modkey}, 'z', function()
|
||||
awful.util.spawn_with_shell(apps.default.screenshot)
|
||||
end, {
|
||||
description = 'Take a screenshot of your active monitor and copy it to clipboard',
|
||||
group = 'screenshots (clipboard)'
|
||||
}), awful.key({'Control'}, 'Print', function()
|
||||
awful.util.spawn_with_shell(apps.default.region_screenshot)
|
||||
end, {
|
||||
description = 'Mark an area and screenshot it to your clipboard',
|
||||
group = 'screenshots (clipboard)'
|
||||
}),]]
|
||||
awful.key({modkey}, 'c', function() awful.util.spawn(apps.default.editor) end,
|
||||
{description = 'open a text/code editor', group = 'launcher'}),
|
||||
awful.key({modkey}, 'b', function() awful.util.spawn(apps.default.browser) end,
|
||||
{description = 'open a browser', group = 'launcher'}),
|
||||
-- Open private browser/brave
|
||||
--[[awful.key({modkey}, 'b',
|
||||
function() awful.util.spawn_with_shell('firefox') end,
|
||||
{description = 'Open Firefox', group = 'launcher'}),
|
||||
--]]
|
||||
awful.key({modkey, 'Shift'}, 'e', function()
|
||||
awful.util.spawn(apps.default.files)
|
||||
end, {
|
||||
description = 'open a file explorer',
|
||||
group = 'launcher'
|
||||
}),
|
||||
awful.key({modkey, 'Shift'}, 'a', function()
|
||||
awful.util.spawn(apps.default.audiomng)
|
||||
end, {
|
||||
description = 'open a pavucontrol window',
|
||||
group = 'launcher'
|
||||
}),
|
||||
awful.key({modkey, 'Shift'}, 'h', function()
|
||||
awful.util.spawn(apps.default.appmng)
|
||||
end, {
|
||||
description = 'open a process manager',
|
||||
group = 'launcher'
|
||||
}),
|
||||
awful.key({modkey, 'Shift'}, 's', function()
|
||||
awful.util.spawn(apps.default.obs)
|
||||
end, {
|
||||
description = 'open obs',
|
||||
group = 'launcher'
|
||||
}),
|
||||
-- Standard program
|
||||
awful.key({modkey}, 'x',
|
||||
function() awful.util.spawn_with_shell(apps.default.terminal) end,
|
||||
{description = 'open a terminal', group = 'launcher'}),
|
||||
awful.key({modkey, 'Control'}, 'r', _G.awesome.restart,
|
||||
{description = 'reload awesome', group = 'awesome'}),
|
||||
awful.key({modkey, 'Control'}, 'q', _G.awesome.quit,
|
||||
{description = 'quit awesome', group = 'awesome'}),
|
||||
awful.key({modkey}, 'm', function() _G.dashboard_show() end,
|
||||
{description = 'toggle main menu', group = 'awesome'}),
|
||||
awful.key({modkey, 'Shift'}, 'p', function() _G.exit_screen_show() end,
|
||||
{description = 'end session menu', group = 'awesome'}),
|
||||
awful.key({altkey, 'Shift'}, 'Right', function() awful.tag.incmwfact(0.05) end,
|
||||
{description = 'increase master width factor', group = 'layout'}),
|
||||
awful.key({altkey, 'Shift'}, 'Left', function() awful.tag.incmwfact(-0.05) end,
|
||||
{description = 'decrease master width factor', group = 'layout'}),
|
||||
awful.key({altkey, 'Shift'}, 'Down', function() awful.client.incwfact(0.05) end,
|
||||
{description = 'decrease master height factor', group = 'layout'}),
|
||||
awful.key({altkey, 'Shift'}, 'Up', function() awful.client.incwfact(-0.05) end,
|
||||
{description = 'increase master height factor', group = 'layout'}),
|
||||
awful.key({modkey, 'Shift'}, 'Left',
|
||||
function() awful.tag.incnmaster(1, nil, true) end, {
|
||||
description = 'increase the number of master clients',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Shift'}, 'Right',
|
||||
function() awful.tag.incnmaster(-1, nil, true) end, {
|
||||
description = 'decrease the number of master clients',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'Left',
|
||||
function() awful.tag.incncol(1, nil, true) end, {
|
||||
description = 'increase the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'Right',
|
||||
function() awful.tag.incncol(-1, nil, true) end, {
|
||||
description = 'decrease the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey}, 'space', function() awful.layout.inc(1) end,
|
||||
{description = 'select next', group = 'layout'}),
|
||||
awful.key({modkey, 'Shift'}, 'space', function() awful.layout.inc(-1) end,
|
||||
{description = 'select previous', group = 'layout'}),
|
||||
awful.key({modkey, 'Control'}, 'n', function()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
_G.client.focus = c
|
||||
c:raise()
|
||||
end
|
||||
end, {description = 'restore minimized', group = 'client'}),
|
||||
-- Dropdown application
|
||||
awful.key({modkey}, 'z', function() _G.toggle_quake() end,
|
||||
{description = 'dropdown application', group = 'launcher'}),
|
||||
-- Widgets popups
|
||||
--[[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() awful.spawn('xbacklight -inc 10') end,
|
||||
{description = '+10%', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86MonBrightnessDown',
|
||||
function() awful.spawn('xbacklight -dec 10') end,
|
||||
{description = '-10%', group = 'hotkeys'}), -- ALSA volume control
|
||||
awful.key({}, 'XF86AudioRaiseVolume', function()
|
||||
awful.spawn.easy_async('amixer -D pulse set Master 5%+', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {description = 'volume up', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86AudioLowerVolume', function()
|
||||
awful.spawn.easy_async('amixer -D pulse set Master 5%-', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {description = 'volume down', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86AudioMute', function()
|
||||
awful.spawn('amixer -D pulse set Master 1+ toggle')
|
||||
_G.update_volume()
|
||||
end, {description = 'toggle mute', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86AudioNext', function()
|
||||
--
|
||||
end, {description = 'toggle mute', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86PowerDown', function()
|
||||
--
|
||||
end, {description = 'toggle mute', group = 'hotkeys'}),
|
||||
awful.key({}, 'XF86PowerOff', function() _G.exit_screen_show() end,
|
||||
{description = 'toggle mute', group = 'hotkeys'}),
|
||||
-- Screen management
|
||||
awful.key({modkey}, 'o', awful.client.movetoscreen,
|
||||
{description = 'move window to next screen', group = 'client'}),
|
||||
-- Open default program for tag
|
||||
awful.key({modkey}, 't', function()
|
||||
awful.spawn(awful.screen.focused().selected_tag.defaultApp, {
|
||||
tag = _G.mouse.screen.selected_tag,
|
||||
placement = awful.placement.bottom_right
|
||||
})
|
||||
end, {description = 'open default program for tag/workspace', group = 'tag'}),
|
||||
-- Custom hotkeys
|
||||
-- vfio integration
|
||||
awful.key({'Control', altkey}, 'space',
|
||||
function() awful.util.spawn_with_shell('vm-attach attach') end),
|
||||
-- Emoji typing
|
||||
-- setup info at https://gist.github.com/HikariKnight/8562837d28dec3674dba027c7892e6a5
|
||||
awful.key({modkey}, 'e',
|
||||
function() awful.util.spawn_with_shell('emoji-toggle') end, {
|
||||
description = 'Toggle the ibus unimoji engine for writing emojis',
|
||||
group = 'hotkeys'
|
||||
}))
|
||||
|
||||
-- Bind all key numbers to tags.
|
||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||
for i = 1, 9 do
|
||||
-- Hack to only show tags 1 and 9 in the shortcut window (mod+s)
|
||||
local descr_view, descr_toggle, descr_move, descr_toggle_focus
|
||||
if i == 1 or i == 9 then
|
||||
descr_view = {description = 'view tag #', group = 'tag'}
|
||||
descr_toggle = {description = 'toggle tag #', group = 'tag'}
|
||||
descr_move = {
|
||||
description = 'move focused client to tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
descr_toggle_focus = {
|
||||
description = 'toggle focused client on tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
end
|
||||
globalKeys = awful.util.table.join(globalKeys, -- View tag only.
|
||||
awful.key({modkey}, '#' .. i + 9, function()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then tag:view_only() end
|
||||
end, descr_view), -- Toggle tag display.
|
||||
awful.key({modkey, 'Control'}, '#' .. i + 9, function()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then awful.tag.viewtoggle(tag) end
|
||||
end, descr_toggle), -- Move client to tag.
|
||||
awful.key({modkey, 'Shift'}, '#' .. i + 9, function()
|
||||
if _G.client.focus then
|
||||
local tag = _G.client.focus.screen.tags[i]
|
||||
if tag then _G.client.focus:move_to_tag(tag) end
|
||||
end
|
||||
end, descr_move), -- Toggle tag on focused client.
|
||||
awful.key({modkey, 'Control', 'Shift'}, '#' .. i + 9, function()
|
||||
if _G.client.focus then
|
||||
local tag = _G.client.focus.screen.tags[i]
|
||||
if tag then _G.client.focus:toggle_tag(tag) end
|
||||
end
|
||||
end, descr_toggle_focus))
|
||||
|
||||
end
|
||||
|
||||
return globalKeys
|
||||
|
381
configuration/keys/globald.lua
Normal file
381
configuration/keys/globald.lua
Normal file
@@ -0,0 +1,381 @@
|
||||
require('awful.autofocus')
|
||||
local awful = require('awful')
|
||||
local beautiful = require('beautiful')
|
||||
local hotkeys_popup = require('awful.hotkeys_popup').widget
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
local altkey = require('configuration.keys.mod').altKey
|
||||
local apps = require('configuration.apps')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local theme = require('theme')
|
||||
|
||||
-- Key bindings
|
||||
local globalKeys = awful.util.table.join( -- Hotkeys
|
||||
awful.key({modkey}, 'h', hotkeys_popup.show_help, {
|
||||
description = 'show help',
|
||||
group = 'awesome'
|
||||
}), awful.key({modkey}, 'F1', hotkeys_popup.show_help, {
|
||||
description = 'show help',
|
||||
group = 'awesome'
|
||||
}), -- Tag browsing
|
||||
awful.key({modkey}, 'Left', function()
|
||||
awful.tag.viewprev()
|
||||
_G._splash_to_current_tag()
|
||||
end, {
|
||||
description = 'go to previous workspace',
|
||||
group = 'tag'
|
||||
}), awful.key({modkey}, 'Right', function()
|
||||
awful.tag.viewnext()
|
||||
_G._splash_to_current_tag()
|
||||
end, {
|
||||
description = 'go to next workspace',
|
||||
group = 'tag'
|
||||
}), awful.key({modkey}, 'Escape', function()
|
||||
awful.tag.history.restore()
|
||||
_G._splash_to_current_tag()
|
||||
end, {
|
||||
description = 'go back',
|
||||
group = 'tag'
|
||||
}), -- Default client focus
|
||||
awful.key({modkey}, 'd', function()
|
||||
awful.client.focus.byidx(1)
|
||||
end, {
|
||||
description = 'focus next by index',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'a', function()
|
||||
awful.client.focus.byidx(-1)
|
||||
end, {
|
||||
description = 'focus previous by index',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'r', function()
|
||||
_G.awesome.spawn(apps.default.rofi)
|
||||
end, {
|
||||
description = 'show rofi menu',
|
||||
group = 'awesome'
|
||||
}), awful.key({modkey}, 'u', function()
|
||||
awful.client.urgent.jumpto()
|
||||
_G._splash_to_current_tag()
|
||||
end, {
|
||||
description = 'jump to urgent client',
|
||||
group = 'client'
|
||||
}), awful.key({altkey}, 'Tab', function()
|
||||
awful.client.focus.byidx(1)
|
||||
if _G.client.focus then
|
||||
_G.client.focus:raise()
|
||||
end
|
||||
end, {
|
||||
description = 'switch to next window',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'm', function()
|
||||
focus = not _G.client.focus
|
||||
if not focus then
|
||||
_G.client.focus.minimized = true
|
||||
else
|
||||
for _, c in ipairs(mouse.screen.selected_tag:clients()) do
|
||||
c.minimized = false
|
||||
end
|
||||
end
|
||||
end, {
|
||||
description = 'minimize window in focus / unminimize all',
|
||||
group = 'client'
|
||||
}), awful.key({altkey, 'Shift'}, 'Tab', function()
|
||||
awful.client.focus.byidx(-1)
|
||||
if _G.client.focus then
|
||||
_G.client.focus:raise()
|
||||
end
|
||||
end, {
|
||||
description = 'switch to previous window',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'l', function()
|
||||
awful.spawn(apps.default.lock)
|
||||
end, {
|
||||
description = 'lock the screen',
|
||||
group = 'awesome'
|
||||
}), awful.key({'Control', 'Shift'}, 'Print', function()
|
||||
awful.util.spawn_with_shell(apps.default.delayed_screenshot)
|
||||
end, {
|
||||
description = 'mark an area and screenshot it (clipboard)',
|
||||
group = 'screenshots (clipboard)'
|
||||
}), awful.key({altkey}, 'Print', function()
|
||||
awful.util.spawn_with_shell(apps.default.screenshot)
|
||||
end, {
|
||||
description = 'take a screenshot of your active monitor and copy it to clipboard',
|
||||
group = 'screenshots (clipboard)'
|
||||
}), awful.key({'Control'}, 'Print', function()
|
||||
awful.util.spawn_with_shell(apps.default.region_screenshot)
|
||||
end, {
|
||||
description = 'mark an area and screenshot it to your clipboard',
|
||||
group = 'screenshots (clipboard)'
|
||||
}), awful.key({modkey}, 'c', function()
|
||||
awful.util.spawn(apps.default.editor)
|
||||
end, {
|
||||
description = 'open a text/code editor',
|
||||
group = 'launcher'
|
||||
}), awful.key({modkey}, 'b', function()
|
||||
awful.util.spawn(apps.default.browser)
|
||||
end, {
|
||||
description = 'open a browser',
|
||||
group = 'launcher'
|
||||
}), awful.key({modkey}, 'Return', function()
|
||||
awful.util.spawn_with_shell(apps.default.terminal)
|
||||
end, {
|
||||
description = 'open a terminal',
|
||||
group = 'launcher'
|
||||
}), awful.key({modkey, 'Control'}, 'r', _G.awesome.restart, {
|
||||
description = 'reload awesome',
|
||||
group = 'awesome'
|
||||
}), awful.key({modkey, 'Control'}, 'q', _G.awesome.quit, {
|
||||
description = 'quit awesome',
|
||||
group = 'awesome'
|
||||
}), awful.key({modkey, 'Shift'}, 'g', function(t)
|
||||
t = t or awful.screen.focused().selected_tag
|
||||
local current_gap = t.gap
|
||||
local new_gap
|
||||
if current_gap == 0 then
|
||||
new_gap = beautiful.gaps
|
||||
else
|
||||
new_gap = 0
|
||||
end
|
||||
t.gap = new_gap
|
||||
end, {
|
||||
description = 'toggle gaps',
|
||||
group = 'awesome'
|
||||
}), awful.key({modkey}, 'p', function()
|
||||
awful.util.spawn_with_shell(apps.default.power_command)
|
||||
end, {
|
||||
description = 'end session menu',
|
||||
group = 'awesome'
|
||||
}), awful.key({altkey, 'Shift'}, 'Right', function()
|
||||
awful.tag.incmwfact(0.05)
|
||||
end, {
|
||||
description = 'increase master width factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'Left', function()
|
||||
awful.tag.incmwfact(-0.05)
|
||||
end, {
|
||||
description = 'decrease master width factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'Down', function()
|
||||
awful.client.incwfact(0.05)
|
||||
end, {
|
||||
description = 'decrease master height factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'Up', function()
|
||||
awful.client.incwfact(-0.05)
|
||||
end, {
|
||||
description = 'increase master height factor',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Shift'}, 'Left', function()
|
||||
awful.tag.incnmaster(1, nil, true)
|
||||
end, {
|
||||
description = 'increase the number of master clients',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Shift'}, 'Right', function()
|
||||
awful.tag.incnmaster(-1, nil, true)
|
||||
end, {
|
||||
description = 'decrease the number of master clients',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'Left', function()
|
||||
awful.tag.incncol(1, nil, true)
|
||||
end, {
|
||||
description = 'increase the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'Right', function()
|
||||
awful.tag.incncol(-1, nil, true)
|
||||
end, {
|
||||
description = 'decrease the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey}, 'space', function()
|
||||
awful.layout.inc(1)
|
||||
end, {
|
||||
description = 'select next layout',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Shift'}, 'space', function()
|
||||
awful.layout.inc(-1)
|
||||
end, {
|
||||
description = 'select previous layout',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'l', function()
|
||||
awful.tag.incmwfact(0.05)
|
||||
end, {
|
||||
description = 'increase master width factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'h', function()
|
||||
awful.tag.incmwfact(-0.05)
|
||||
end, {
|
||||
description = 'decrease master width factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'j', function()
|
||||
awful.client.incwfact(0.05)
|
||||
end, {
|
||||
description = 'decrease master height factor',
|
||||
group = 'layout'
|
||||
}), awful.key({altkey, 'Shift'}, 'k', function()
|
||||
awful.client.incwfact(-0.05)
|
||||
end, {
|
||||
description = 'increase master height 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'
|
||||
}), awful.key({modkey, 'Shift'}, 'l', function()
|
||||
awful.tag.incnmaster(-1, nil, true)
|
||||
end, {
|
||||
description = 'decrease the number of master clients',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'h', function()
|
||||
awful.tag.incncol(1, nil, true)
|
||||
end, {
|
||||
description = 'increase the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'l', function()
|
||||
awful.tag.incncol(-1, nil, true)
|
||||
end, {
|
||||
description = 'decrease the number of columns',
|
||||
group = 'layout'
|
||||
}), awful.key({modkey, 'Control'}, 'n', function()
|
||||
local c = awful.client.restore()
|
||||
-- Focus restored client
|
||||
if c then
|
||||
_G.client.focus = c
|
||||
c:raise()
|
||||
end
|
||||
end, {
|
||||
description = 'restore minimized',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'k', function()
|
||||
_G.toggle_splash()
|
||||
end, {
|
||||
description = 'toggle splash terminal',
|
||||
group = 'launcher'
|
||||
}), awful.key({modkey}, 'j', function()
|
||||
_G.toggle_splash_height()
|
||||
end, {
|
||||
description = 'toggle splash terminal height',
|
||||
group = 'launcher'
|
||||
}), awful.key({}, 'XF86MonBrightnessUp', function()
|
||||
awful.spawn('xbacklight -inc 10')
|
||||
end, {
|
||||
description = '+10%',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({}, 'XF86MonBrightnessDown', function()
|
||||
awful.spawn('xbacklight -dec 10')
|
||||
end, {
|
||||
description = '-10%',
|
||||
group = 'hotkeys'
|
||||
}), -- ALSA volume control
|
||||
awful.key({altkey}, 'k', function()
|
||||
awful.spawn.easy_async('amixer -D pulse sset Master 5%+', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {
|
||||
description = 'volume up',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({}, 'XF86AudioRaiseVolume', function()
|
||||
awful.spawn.easy_async('amixer -D pulse sset Master 5%+', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {
|
||||
description = 'volume up',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({}, 'XF86AudioLowerVolume', function()
|
||||
awful.spawn.easy_async('amixer -D pulse sset Master 5%-', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {
|
||||
description = 'volume down',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({altkey}, 'j', function()
|
||||
awful.spawn.easy_async('amixer -D pulse sset Master 5%-', function()
|
||||
_G.update_volume()
|
||||
end)
|
||||
end, {
|
||||
description = 'volume down',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({altkey}, 'm', function()
|
||||
awful.spawn('amixer -D pulse set Master 1+ toggle')
|
||||
_G.update_volume()
|
||||
end, {
|
||||
description = 'toggle mute',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({}, 'XF86AudioMute', function()
|
||||
awful.spawn('amixer -D pulse set Master 1+ toggle')
|
||||
_G.update_volume()
|
||||
end, {
|
||||
description = 'toggle mute',
|
||||
group = 'hotkeys'
|
||||
}), awful.key({modkey}, 'o', awful.client.movetoscreen, {
|
||||
description = 'move window to next screen',
|
||||
group = 'client'
|
||||
}), awful.key({modkey}, 'n', function()
|
||||
awful.spawn(awful.screen.focused().selected_tag.defaultApp, {
|
||||
tag = _G.mouse.screen.selected_tag,
|
||||
placement = awful.placement.bottom_right
|
||||
})
|
||||
end, {
|
||||
description = 'open default program for tag/workspace',
|
||||
group = 'tag'
|
||||
}), awful.key({'Control', altkey}, 'space', function()
|
||||
awful.util.spawn_with_shell('vm-attach attach')
|
||||
end))
|
||||
|
||||
-- Bind all key numbers to tags.
|
||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||
for i = 1, 9 do
|
||||
-- Hack to only show tags 1 and 9 in the shortcut window (mod+s)
|
||||
local descr_view, descr_toggle, descr_move, descr_toggle_focus
|
||||
if i == 1 or i == 9 then
|
||||
descr_view = {
|
||||
description = 'view tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
descr_toggle = {
|
||||
description = 'toggle tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
descr_move = {
|
||||
description = 'move focused client to tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
descr_toggle_focus = {
|
||||
description = 'toggle focused client on tag #',
|
||||
group = 'tag'
|
||||
}
|
||||
end
|
||||
globalKeys = awful.util.table.join(globalKeys, -- View tag only.
|
||||
awful.key({modkey}, '#' .. i + 9, function()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
tag:view_only()
|
||||
_G._splash_to_current_tag()
|
||||
end
|
||||
end, descr_view), -- Toggle tag display.
|
||||
awful.key({modkey, 'Control'}, '#' .. i + 9, function()
|
||||
local screen = awful.screen.focused()
|
||||
local tag = screen.tags[i]
|
||||
if tag then
|
||||
awful.tag.viewtoggle(tag)
|
||||
end
|
||||
end, descr_toggle), -- Move client to tag.
|
||||
awful.key({modkey, 'Shift'}, '#' .. i + 9, function()
|
||||
if _G.client.focus then
|
||||
local tag = _G.client.focus.screen.tags[i]
|
||||
if tag then
|
||||
_G.client.focus:move_to_tag(tag)
|
||||
end
|
||||
end
|
||||
end, descr_move), -- Toggle tag on focused client.
|
||||
awful.key({modkey, 'Control', 'Shift'}, '#' .. i + 9, function()
|
||||
if _G.client.focus then
|
||||
local tag = _G.client.focus.screen.tags[i]
|
||||
if tag then
|
||||
_G.client.focus:toggle_tag(tag)
|
||||
end
|
||||
end
|
||||
end, descr_toggle_focus))
|
||||
end
|
||||
|
||||
return globalKeys
|
4
configuration/keys/init.lua
Normal file
4
configuration/keys/init.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
mod = require('configuration.keys.mod'),
|
||||
global = require('configuration.keys.global')
|
||||
}
|
4
configuration/keys/mod.lua
Normal file
4
configuration/keys/mod.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
modKey = 'Mod4',
|
||||
altKey = 'Mod1'
|
||||
}
|
422
configuration/picom.conf
Normal file
422
configuration/picom.conf
Normal file
@@ -0,0 +1,422 @@
|
||||
#################################
|
||||
# Shadows #
|
||||
#################################
|
||||
|
||||
|
||||
# Enabled client-side shadows on windows. Note desktop windows
|
||||
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||
# unless explicitly requested using the wintypes option.
|
||||
#
|
||||
# shadow = false
|
||||
shadow = true;
|
||||
|
||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||
# shadow-radius = 12
|
||||
shadow-radius = 7;
|
||||
|
||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||
# shadow-opacity = .75
|
||||
|
||||
# The left offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-x = -15
|
||||
shadow-offset-x = -7;
|
||||
|
||||
# The top offset for shadows, in pixels. (defaults to -15)
|
||||
# shadow-offset-y = -15
|
||||
shadow-offset-y = -7;
|
||||
|
||||
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
|
||||
# you should use the *wintypes* option in your config file instead.
|
||||
#
|
||||
# no-dock-shadow = false
|
||||
|
||||
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
|
||||
# you should use the *wintypes* option in your config file instead.
|
||||
#
|
||||
# no-dnd-shadow = false
|
||||
|
||||
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-red = 0
|
||||
|
||||
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-green = 0
|
||||
|
||||
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||
# shadow-blue = 0
|
||||
|
||||
# Do not paint shadows on shaped windows. Note shaped windows
|
||||
# here means windows setting its shape through X Shape extension.
|
||||
# Those using ARGB background is beyond our control.
|
||||
# Deprecated, use
|
||||
# shadow-exclude = 'bounding_shaped'
|
||||
# or
|
||||
# shadow-exclude = 'bounding_shaped && !rounded_corners'
|
||||
# instead.
|
||||
#
|
||||
# shadow-ignore-shaped = ''
|
||||
|
||||
# Specify a list of conditions of windows that should have no shadow.
|
||||
#
|
||||
# examples:
|
||||
# shadow-exclude = "n:e:Notification";
|
||||
#
|
||||
# shadow-exclude = []
|
||||
shadow-exclude = [
|
||||
"name = 'Notification'",
|
||||
"class_g = 'Conky'",
|
||||
"class_g ?= 'Notify-osd'",
|
||||
"class_g = 'Cairo-clock'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
# Specify a X geometry that describes the region in which shadow should not
|
||||
# be painted in, such as a dock window region. Use
|
||||
# shadow-exclude-reg = "x10+0+0"
|
||||
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||
#
|
||||
# shadow-exclude-reg = ""
|
||||
|
||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||
# xinerama-shadow-crop = false
|
||||
|
||||
|
||||
#################################
|
||||
# Fading #
|
||||
#################################
|
||||
|
||||
|
||||
# Fade windows in/out when opening/closing and when opacity changes,
|
||||
# unless no-fading-openclose is used.
|
||||
# fading = false
|
||||
fading = true
|
||||
|
||||
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
|
||||
# fade-in-step = 0.028
|
||||
fade-in-step = 0.03;
|
||||
|
||||
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
|
||||
# fade-out-step = 0.03
|
||||
fade-out-step = 0.03;
|
||||
|
||||
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||
# fade-delta = 10
|
||||
fade-delta = 5
|
||||
|
||||
# Specify a list of conditions of windows that should not be faded.
|
||||
# fade-exclude = []
|
||||
|
||||
# Do not fade on window open/close.
|
||||
# no-fading-openclose = false
|
||||
|
||||
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||
# no-fading-destroyed-argb = false
|
||||
|
||||
|
||||
#################################
|
||||
# Transparency / Opacity #
|
||||
#################################
|
||||
|
||||
|
||||
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||
# inactive-opacity = 1
|
||||
inactive-opacity = 1.0;
|
||||
|
||||
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||
# frame-opacity = 1.0
|
||||
frame-opacity = 0.95;
|
||||
|
||||
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
|
||||
# menu-opacity = 1.0
|
||||
|
||||
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
|
||||
# inactive-opacity-override = true
|
||||
inactive-opacity-override = true;
|
||||
|
||||
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||
active-opacity = 1.0
|
||||
|
||||
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||
# inactive-dim = 0.0
|
||||
|
||||
# Specify a list of conditions of windows that should always be considered focused.
|
||||
# focus-exclude = []
|
||||
#focus-exclude = [ "class_g = 'Termite'" ];
|
||||
|
||||
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||
# inactive-dim-fixed = 1.0
|
||||
|
||||
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||
# Note we don't make any guarantee about possible conflicts with other
|
||||
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||
# example:
|
||||
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||
|
||||
|
||||
#################################
|
||||
# Background-Blurring #
|
||||
#################################
|
||||
|
||||
|
||||
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||
# blur-method =
|
||||
# blur-size = 12
|
||||
#
|
||||
# blur-deviation = false
|
||||
|
||||
# Blur background of semi-transparent / ARGB windows.
|
||||
# Bad in performance, with driver-dependent behavior.
|
||||
# The name of the switch may change without prior notifications.
|
||||
#
|
||||
# blur-background = false
|
||||
|
||||
# Blur background of windows when the window frame is not opaque.
|
||||
# Implies:
|
||||
# blur-background
|
||||
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||
#
|
||||
# blur-background-frame = false
|
||||
|
||||
|
||||
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||
# blur-background-fixed = false
|
||||
|
||||
|
||||
# Specify the blur convolution kernel, with the following format:
|
||||
# example:
|
||||
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||
#
|
||||
# blur-kern = ''
|
||||
blur-kern = "3x3box";
|
||||
|
||||
|
||||
# Exclude conditions for background blur.
|
||||
# blur-background-exclude = []
|
||||
blur-background-exclude = [
|
||||
"window_type = 'dock'",
|
||||
"window_type = 'desktop'",
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
];
|
||||
|
||||
#################################
|
||||
# General Settings #
|
||||
#################################
|
||||
|
||||
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||
# daemon = false
|
||||
|
||||
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||
# `xrender` is the default one.
|
||||
#
|
||||
# backend = 'glx'
|
||||
backend = "xrender";
|
||||
|
||||
# Enable/disable VSync.
|
||||
# vsync = false
|
||||
vsync = true
|
||||
|
||||
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||
# dbus = false
|
||||
|
||||
# Try to detect WM windows (a non-override-redirect window with no
|
||||
# child that has 'WM_STATE') and mark them as active.
|
||||
#
|
||||
# mark-wmwin-focused = false
|
||||
mark-wmwin-focused = true;
|
||||
|
||||
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||
# mark-ovredir-focused = false
|
||||
mark-ovredir-focused = true;
|
||||
|
||||
# Try to detect windows with rounded corners and don't consider them
|
||||
# shaped windows. The accuracy is not very high, unfortunately.
|
||||
#
|
||||
# detect-rounded-corners = false
|
||||
detect-rounded-corners = true;
|
||||
|
||||
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
||||
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
||||
#
|
||||
# detect-client-opacity = false
|
||||
detect-client-opacity = true;
|
||||
|
||||
# Specify refresh rate of the screen. If not specified or 0, picom will
|
||||
# try detecting this with X RandR extension.
|
||||
#
|
||||
# refresh-rate = 60
|
||||
refresh-rate = 60
|
||||
|
||||
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
|
||||
# boost performance. This should not be used with
|
||||
# vsync drm/opengl/opengl-oml
|
||||
# as they essentially does sw-opti's job already,
|
||||
# unless you wish to specify a lower refresh rate than the actual value.
|
||||
#
|
||||
# sw-opti =
|
||||
|
||||
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||
# provided that the WM supports it.
|
||||
#
|
||||
# use-ewmh-active-win = false
|
||||
|
||||
# Unredirect all windows if a full-screen opaque window is detected,
|
||||
# to maximize performance for full-screen windows. Known to cause flickering
|
||||
# when redirecting/unredirecting windows.
|
||||
#
|
||||
# unredir-if-possible = false
|
||||
|
||||
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||
# unredir-if-possible-delay = 0
|
||||
|
||||
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||
# unredir-if-possible-exclude = []
|
||||
|
||||
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||
# in the same group focused at the same time.
|
||||
#
|
||||
# detect-transient = false
|
||||
detect-transient = true
|
||||
|
||||
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
|
||||
# detect-transient is enabled, too.
|
||||
#
|
||||
# detect-client-leader = false
|
||||
detect-client-leader = true
|
||||
|
||||
# Resize damaged region by a specific number of pixels.
|
||||
# A positive value enlarges it while a negative one shrinks it.
|
||||
# If the value is positive, those additional pixels will not be actually painted
|
||||
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||
# Primarily used to fix the line corruption issues of blur,
|
||||
# in which case you should use the blur radius value here
|
||||
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||
#
|
||||
# resize-damage = 1
|
||||
|
||||
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||
# Resource-hogging, and is not well tested.
|
||||
#
|
||||
# invert-color-include = []
|
||||
|
||||
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||
# Might cause incorrect opacity when rendering transparent content (but never
|
||||
# practically happened) and may not work with blur-background.
|
||||
# My tests show a 15% performance boost. Recommended.
|
||||
#
|
||||
# glx-no-stencil = false
|
||||
|
||||
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||
# Probably could improve performance on rapid window content changes,
|
||||
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||
# Recommended if it works.
|
||||
#
|
||||
# glx-no-rebind-pixmap = false
|
||||
|
||||
# Disable the use of damage information.
|
||||
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||
# The opposing option is use-damage
|
||||
#
|
||||
# no-use-damage = false
|
||||
use-damage = true
|
||||
|
||||
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||
# with GLX backend for some users.
|
||||
#
|
||||
# xrender-sync-fence = false
|
||||
|
||||
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||
# in the source tree for examples.
|
||||
#
|
||||
# glx-fshader-win = ''
|
||||
|
||||
# Force all windows to be painted with blending. Useful if you
|
||||
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||
#
|
||||
# force-win-blend = false
|
||||
|
||||
# Do not use EWMH to detect fullscreen windows.
|
||||
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||
#
|
||||
# no-ewmh-fullscreen = false
|
||||
|
||||
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||
# so this could comes with a performance hit.
|
||||
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||
#
|
||||
# max-brightness = 1.0
|
||||
|
||||
# Make transparent windows clip other windows like non-transparent windows do,
|
||||
# instead of blending on top of them.
|
||||
#
|
||||
# transparent-clipping = false
|
||||
|
||||
# Set the log level. Possible values are:
|
||||
# "trace", "debug", "info", "warn", "error"
|
||||
# in increasing level of importance. Case doesn't matter.
|
||||
# If using the "TRACE" log level, it's better to log into a file
|
||||
# using *--log-file*, since it can generate a huge stream of logs.
|
||||
#
|
||||
# log-level = "debug"
|
||||
log-level = "warn";
|
||||
|
||||
# Set the log file.
|
||||
# If *--log-file* is never specified, logs will be written to stderr.
|
||||
# Otherwise, logs will to written to the given file, though some of the early
|
||||
# logs might still be written to the stderr.
|
||||
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||
#
|
||||
# log-file = '/path/to/your/log/file'
|
||||
|
||||
# Show all X errors (for debugging)
|
||||
# show-all-xerrors = false
|
||||
|
||||
# Write process ID to a file.
|
||||
# write-pid-path = '/path/to/your/log/file'
|
||||
|
||||
# Window type settings
|
||||
#
|
||||
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||
# "tooltip", "notification", "combo", and "dnd".
|
||||
#
|
||||
# Following per window-type options are available: ::
|
||||
#
|
||||
# fade, shadow:::
|
||||
# Controls window-type-specific shadow and fade settings.
|
||||
#
|
||||
# opacity:::
|
||||
# Controls default opacity of the window type.
|
||||
#
|
||||
# focus:::
|
||||
# Controls whether the window of this type is to be always considered focused.
|
||||
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||
#
|
||||
# full-shadow:::
|
||||
# Controls whether shadow is drawn under the parts of the window that you
|
||||
# normally won't be able to see. Useful when the window has parts of it
|
||||
# transparent, and you want shadows in those areas.
|
||||
#
|
||||
# redir-ignore:::
|
||||
# Controls whether this type of windows should cause screen to become
|
||||
# redirected again after been unredirected. If you have unredir-if-possible
|
||||
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||
# you can set this to `true`.
|
||||
#
|
||||
wintypes:
|
||||
{
|
||||
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||
dock = { shadow = false; }
|
||||
dnd = { shadow = false; }
|
||||
popup_menu = { opacity = 1.0; }
|
||||
dropdown_menu = { opacity = 1.0; }
|
||||
};
|
148
configuration/rofi.rasi
Normal file
148
configuration/rofi.rasi
Normal file
@@ -0,0 +1,148 @@
|
||||
/**
|
||||
* User: deadguy
|
||||
* Copyright: deadguy
|
||||
*/
|
||||
|
||||
configuration {
|
||||
display-drun: "Activate";
|
||||
display-run: "Execute";
|
||||
show-icons: true;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
* {
|
||||
background-color: rgb(0, 0, 0, 0);
|
||||
text-color: rgb(255, 255, 255);
|
||||
selbg: rgb(255, 255, 255, 0.5);
|
||||
urgbg: rgb(255, 255, 255);
|
||||
actbg: rgb(255, 255, 255, 0.05);
|
||||
winbg: rgb(255, 255, 255);
|
||||
|
||||
selected-normal-foreground: @winbg;
|
||||
normal-foreground: @text-color;
|
||||
selected-normal-background: @actbg;
|
||||
normal-background: @background-color;
|
||||
|
||||
selected-urgent-foreground: @background-color;
|
||||
urgent-foreground: @text-color;
|
||||
selected-urgent-background: @urgbg;
|
||||
urgent-background: @background-color;
|
||||
|
||||
selected-active-foreground: @winbg;
|
||||
active-foreground: @text-color;
|
||||
selected-active-background: @actbg;
|
||||
active-background: @selbg;
|
||||
|
||||
line-margin: 2;
|
||||
line-padding: 2;
|
||||
separator-style: "none";
|
||||
hide-scrollbar: "true";
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font: "FiraCode Nerd Font Mono Medium 10";
|
||||
}
|
||||
|
||||
window {
|
||||
location: west;
|
||||
anchor: west;
|
||||
x-offset: 0px;
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
padding: 0%;
|
||||
orientation: horizontal;
|
||||
children: [mainbox];
|
||||
background-color: rgb(20, 20, 20, 0.9);
|
||||
}
|
||||
|
||||
mainbox {
|
||||
spacing: 0em;
|
||||
padding: 0px;
|
||||
width: 100%;
|
||||
children: [ inputbar, listview ];
|
||||
expand: true;
|
||||
}
|
||||
|
||||
button { padding: 5px 2px; }
|
||||
|
||||
button selected {
|
||||
background-color: @active-background;
|
||||
text-color: @background-color;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ entry ];
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
text-color: inherit;
|
||||
expand: false;
|
||||
margin: 0 0.3em 0em 0em;
|
||||
}
|
||||
|
||||
listview {
|
||||
spacing: 0em;
|
||||
dynamic: false;
|
||||
cycle: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 16px;
|
||||
border: 0 0 0 0 solid;
|
||||
}
|
||||
|
||||
entry {
|
||||
expand: true;
|
||||
text-color: @normal-foreground;
|
||||
background-color: rgb(0, 0, 0, 0);
|
||||
vertical-align: 1;
|
||||
padding: 12px;
|
||||
font: "FiraCode Nerd Font Mono Bold 18";
|
||||
}
|
||||
|
||||
element normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
element normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
|
||||
element normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
padding: 16px;
|
||||
border: 0 0 0 0 solid;
|
||||
border-color: @active-background;
|
||||
}
|
||||
|
||||
element selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
|
||||
element selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
|
||||
element alternate.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
|
||||
element alternate.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
|
||||
element alternate.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
46
configuration/tags/init.lua
Normal file
46
configuration/tags/init.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local awful = require('awful')
|
||||
local beautiful = require('beautiful')
|
||||
local gears = require('gears')
|
||||
local apps = require('configuration.apps')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local tags = {
|
||||
{text = 'web', type = 'web', defaultApp = apps.default.browser, screen = 1},
|
||||
{text = 'term', type = 'code', defaultApp = apps.default.terminal, screen = 1},
|
||||
{text = 'social', type = 'social', defaultApp = apps.default.social, screen = 1},
|
||||
{text = 'video', type = 'video', defaultApp = apps.default.video, screen = 1},
|
||||
{text = 'file', type = 'file', defaultApp = apps.default.files, screen = 1},
|
||||
{text = 'music', type = 'music', defaultApp = apps.default.music, screen = 1},
|
||||
{text = 'misc', type = 'misc', defaultApp = apps.default.vmapp, screen = 1}
|
||||
}
|
||||
|
||||
awful.layout.layouts = {
|
||||
|
||||
awful.layout.suit.tile,
|
||||
awful.layout.suit.floating,
|
||||
-- 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.screen.connect_for_each_screen(function(s)
|
||||
for i, tag in pairs(tags) do
|
||||
awful.tag.add(tag.text, {
|
||||
icon = tag.icon,
|
||||
icon_only = false,
|
||||
layout = awful.layout.suit.tile,
|
||||
gap = beautiful.gaps,
|
||||
screen = s,
|
||||
defaultApp = tag.defaultApp,
|
||||
selected = i == 1
|
||||
})
|
||||
end
|
||||
end)
|
35
configuration/utils/rofi-power
Executable file
35
configuration/utils/rofi-power
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# rofi-power
|
||||
# Use rofi to call systemctl for shutdown, reboot, etc
|
||||
|
||||
# 2016 Oliver Kraitschy - http://okraits.de
|
||||
|
||||
OPTIONS="Poweroff\nExit\nReboot\nSuspend\nHibernate"
|
||||
|
||||
config_path=$(dirname "$0")
|
||||
|
||||
LAUNCHER="rofi -dmenu -i"
|
||||
USE_LOCKER="true"
|
||||
LOCKER="i3lock -c 000000"
|
||||
|
||||
option=`echo -e $OPTIONS | $LAUNCHER | awk '{print $1}' | tr -d '\r\n'`
|
||||
case $option in
|
||||
Exit)
|
||||
kill -9 -1
|
||||
;;
|
||||
Reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
Poweroff)
|
||||
systemctl poweroff
|
||||
;;
|
||||
Suspend)
|
||||
$($USE_LOCKER) && "$LOCKER"; systemctl suspend
|
||||
;;
|
||||
Hibernate)
|
||||
$($USE_LOCKER) && "$LOCKER"; systemctl hibernate
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
8
configuration/utils/screenshot
Executable file
8
configuration/utils/screenshot
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
if [ $1 == "--delayed" ]; then
|
||||
spectacle -b -n ${@:2} -o /tmp/screenshot.png ; xclip -selection clipboard -target image/png -i /tmp/screenshot.png ; paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga
|
||||
else
|
||||
spectacle -b -n $@ -o /tmp/screenshot.png ; xclip -selection clipboard -target image/png -i /tmp/screenshot.png ; paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user