Adding fennel to awesome config with basic rules
This commit is contained in:
		
							parent
							
								
									42882489bf
								
							
						
					
					
						commit
						ebf15f2270
					
				
					 9 changed files with 609 additions and 304 deletions
				
			
		| 
						 | 
				
			
			@ -1,2 +1,2 @@
 | 
			
		|||
#+TITLE: Readme
 | 
			
		||||
#+PROPERTY: header-args :tangle rc.lua
 | 
			
		||||
#+DESCRIPTION: My Awesome config
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								awesome/init.fnl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								awesome/init.fnl
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
(local awful (require "awful"))
 | 
			
		||||
(local ruled (require "ruled"))
 | 
			
		||||
(local rules (require "rules"))
 | 
			
		||||
(local beautiful (require "beautiful"))
 | 
			
		||||
(local gears (require "gears"))
 | 
			
		||||
 | 
			
		||||
;; (gears.wallpaper.set (beautiful.wallpaper))
 | 
			
		||||
 | 
			
		||||
(set awful.rules.rules rules)
 | 
			
		||||
							
								
								
									
										256
									
								
								awesome/keys.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										256
									
								
								awesome/keys.lua
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,256 @@
 | 
			
		|||
local awful = require('awful')
 | 
			
		||||
local gears = require('gears')
 | 
			
		||||
 | 
			
		||||
require('awful.autofocus')
 | 
			
		||||
 | 
			
		||||
local modkey = "Mod4"
 | 
			
		||||
local altkey = "Mod1"
 | 
			
		||||
 | 
			
		||||
local dpi = require('beautiful').xresources.apply_dpi
 | 
			
		||||
 | 
			
		||||
local clientKeys =
 | 
			
		||||
	awful.util.table.join(
 | 
			
		||||
 | 
			
		||||
	-- toggle fullscreen
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'f',
 | 
			
		||||
		function(c)
 | 
			
		||||
			-- Toggle fullscreen
 | 
			
		||||
			c.fullscreen = not c.fullscreen
 | 
			
		||||
			c:raise()
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'toggle fullscreen', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	-- close client
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'c',
 | 
			
		||||
		function(c)
 | 
			
		||||
			c:kill()
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'close', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	-- 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, "Shift"  },
 | 
			
		||||
		"d",
 | 
			
		||||
		function ()
 | 
			
		||||
			awful.client.swap.byidx(1)
 | 
			
		||||
		end,
 | 
			
		||||
		{description = "swap with next client by index", group = "client"}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{ modkey, "Shift" },
 | 
			
		||||
		"a",
 | 
			
		||||
		function ()
 | 
			
		||||
			awful.client.swap.byidx(-1)
 | 
			
		||||
		end,
 | 
			
		||||
		{description = "swap with next client by index", group = "client"}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	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()
 | 
			
		||||
			if client.focus then
 | 
			
		||||
				client.focus:raise()
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'go back', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
    awful.key(
 | 
			
		||||
        {modkey},
 | 
			
		||||
        'n',
 | 
			
		||||
        function(c)
 | 
			
		||||
            c.minimized = true
 | 
			
		||||
        end,
 | 
			
		||||
        {description = "minimize client", group = 'client'}
 | 
			
		||||
    ),
 | 
			
		||||
	-- move floating client to center
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{ modkey, "Shift" }, 
 | 
			
		||||
		"c", 
 | 
			
		||||
		function(c)
 | 
			
		||||
			local focused = awful.screen.focused()
 | 
			
		||||
 | 
			
		||||
			awful.placement.centered(c, {
 | 
			
		||||
				honor_workarea = true
 | 
			
		||||
			})
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'align a client to the center of the focused screen.', group = "client"}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	-- toggle client floating mode
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'c',
 | 
			
		||||
		function(c)
 | 
			
		||||
			c.fullscreen = false
 | 
			
		||||
			c.maximized = false
 | 
			
		||||
			c.floating = not c.floating
 | 
			
		||||
			c:raise()
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'toggle floating', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	-- move client position
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'Up',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(0, dpi(-10), 0, 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'move floating client up by 10 px', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'Down',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(0, dpi(10), 0, 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'move floating client down by 10 px', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'Left',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(dpi(-10), 0, 0, 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'move floating client to the left by 10 px', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey},
 | 
			
		||||
		'Right',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(dpi(10), 0, 0, 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'move floating client to the right by 10 px', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	-- Increasing floating client size
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Shift'},
 | 
			
		||||
		'Up',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(0, dpi(-10), 0, dpi(10))
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'increase floating client size vertically by 10 px up', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Shift'},
 | 
			
		||||
		'Down',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(0, 0, 0, dpi(10))
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'increase floating client size vertically by 10 px down', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Shift'},
 | 
			
		||||
		'Left',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(dpi(-10), 0, dpi(10), 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'increase floating client size horizontally by 10 px left', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Shift'},
 | 
			
		||||
		'Right',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				c:relative_move(0, 0, dpi(10), 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'increase floating client size horizontally by 10 px right', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
 | 
			
		||||
	-- Decreasing floating client size
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Control'},
 | 
			
		||||
		'Up',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating and c.height > 10 then
 | 
			
		||||
				c:relative_move(0, 0, 0, dpi(-10))
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'decrease floating client size vertically by 10 px up', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Control'},
 | 
			
		||||
		'Down',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				local c_height = c.height
 | 
			
		||||
				c:relative_move(0, 0, 0, dpi(-10))
 | 
			
		||||
				if c.height ~= c_height and c.height > 10 then
 | 
			
		||||
					c:relative_move(0, dpi(10), 0, 0)
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'decrease floating client size vertically by 10 px down', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Control'},
 | 
			
		||||
		'Left',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating and c.width > 10 then
 | 
			
		||||
				c:relative_move(0, 0, dpi(-10), 0)
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'decrease floating client size horizontally by 10 px left', group = 'client'}
 | 
			
		||||
	),
 | 
			
		||||
	awful.key(
 | 
			
		||||
		{modkey, 'Control'},
 | 
			
		||||
		'Right',
 | 
			
		||||
		function(c)
 | 
			
		||||
			if c.floating then
 | 
			
		||||
				local c_width = c.width
 | 
			
		||||
				c:relative_move(0, 0, dpi(-10), 0)
 | 
			
		||||
				if c.width ~= c_width and c.width > 10 then
 | 
			
		||||
					c:relative_move(dpi(10), 0 , 0, 0)
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
		end,
 | 
			
		||||
		{description = 'decrease floating client size horizontally by 10 px right', group = 'client'}
 | 
			
		||||
	)
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
return clientKeys
 | 
			
		||||
| 
						 | 
				
			
			@ -15,9 +15,9 @@ naughty.config.defaults.ontop = true
 | 
			
		|||
naughty.config.defaults.icon_size = dpi(32)
 | 
			
		||||
naughty.config.defaults.timeout = 5
 | 
			
		||||
naughty.config.defaults.title = 'System Notification'
 | 
			
		||||
naughty.config.defaults.margin = dpi(20)
 | 
			
		||||
naughty.config.defaults.margin = dpi(100)
 | 
			
		||||
naughty.config.defaults.border_width = 0
 | 
			
		||||
naughty.config.defaults.position = 'bottom_middle'
 | 
			
		||||
naughty.config.defaults.position = 'top_right'
 | 
			
		||||
naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, dpi(6)) end
 | 
			
		||||
 | 
			
		||||
-- Apply theme variables
 | 
			
		||||
| 
						 | 
				
			
			@ -25,13 +25,13 @@ naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr,
 | 
			
		|||
naughty.config.padding = 8
 | 
			
		||||
naughty.config.spacing = 8
 | 
			
		||||
naughty.config.icon_dirs = {
 | 
			
		||||
	"/usr/share/icons/Tela",
 | 
			
		||||
	"/usr/share/icons/Tela-blue-dark",
 | 
			
		||||
	"/usr/share/icons/Papirus/",
 | 
			
		||||
	"/usr/share/icons/la-capitaine-icon-theme/",
 | 
			
		||||
	"/usr/share/icons/gnome/",
 | 
			
		||||
	"/usr/share/icons/hicolor/",
 | 
			
		||||
	"/usr/share/pixmaps/"
 | 
			
		||||
    "/usr/share/icons/Tela",
 | 
			
		||||
    "/usr/share/icons/Tela-blue-dark",
 | 
			
		||||
    "/usr/share/icons/Papirus/",
 | 
			
		||||
    "/usr/share/icons/la-capitaine-icon-theme/",
 | 
			
		||||
    "/usr/share/icons/gnome/",
 | 
			
		||||
    "/usr/share/icons/hicolor/",
 | 
			
		||||
    "/usr/share/pixmaps/"
 | 
			
		||||
}
 | 
			
		||||
naughty.config.icon_formats = { "svg", "png", "jpg", "gif" }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -39,229 +39,231 @@ naughty.config.icon_formats = { "svg", "png", "jpg", "gif" }
 | 
			
		|||
-- Presets / rules
 | 
			
		||||
 | 
			
		||||
ruled.notification.connect_signal('request::rules', function()
 | 
			
		||||
	
 | 
			
		||||
	-- Critical notifs
 | 
			
		||||
	ruled.notification.append_rule {
 | 
			
		||||
		rule       = { urgency = 'critical' },
 | 
			
		||||
		properties = { 
 | 
			
		||||
			font        		= 'VictorMono Nerd Font 10',
 | 
			
		||||
			bg 					= '#ff0000', 
 | 
			
		||||
			fg 					= '#ffffff',
 | 
			
		||||
			margin 				= dpi(16),
 | 
			
		||||
			position 			= 'bottom_middle',
 | 
			
		||||
			implicit_timeout	= 15
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	-- Normal notifs
 | 
			
		||||
	ruled.notification.append_rule {
 | 
			
		||||
		rule       = { urgency = 'normal' },
 | 
			
		||||
		properties = {
 | 
			
		||||
			font        		= 'VictorMono Nerd Font 10',
 | 
			
		||||
			bg      			= beautiful.transparent, 
 | 
			
		||||
			fg 					= beautiful.fg_normal,
 | 
			
		||||
			margin 				= dpi(16),
 | 
			
		||||
			position 			= 'bottom_middle',
 | 
			
		||||
			implicit_timeout 	= 8
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    -- Critical notifs
 | 
			
		||||
    ruled.notification.append_rule {
 | 
			
		||||
        rule       = { urgency = 'critical' },
 | 
			
		||||
        properties = {
 | 
			
		||||
            font                = 'VictorMono Nerd Font 10',
 | 
			
		||||
            bg                      = '#ff0000',
 | 
			
		||||
            fg                      = '#ffffff',
 | 
			
		||||
            margin                  = dpi(16),
 | 
			
		||||
            position            = 'top_right',
 | 
			
		||||
            implicit_timeout    = 15
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	-- Low notifs
 | 
			
		||||
	ruled.notification.append_rule {
 | 
			
		||||
		rule       = { urgency = 'low' },
 | 
			
		||||
		properties = { 
 | 
			
		||||
			font        		= 'VictorMono Nerd Font 10',
 | 
			
		||||
			bg     				= beautiful.transparent,
 | 
			
		||||
			fg 					= beautiful.fg_normal,
 | 
			
		||||
			margin 				= dpi(16),
 | 
			
		||||
			position 			= 'bottom_middle',
 | 
			
		||||
			implicit_timeout	= 5
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
    -- Normal notifs
 | 
			
		||||
    ruled.notification.append_rule {
 | 
			
		||||
        rule       = { urgency = 'normal' },
 | 
			
		||||
        properties = {
 | 
			
		||||
            font                = 'VictorMono Nerd Font 10',
 | 
			
		||||
            bg                  = beautiful.transparent,
 | 
			
		||||
            fg                      = beautiful.fg_normal,
 | 
			
		||||
            margin                  = dpi(16),
 | 
			
		||||
            position            = 'top_right',
 | 
			
		||||
            implicit_timeout    = 8
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    -- Low notifs
 | 
			
		||||
    ruled.notification.append_rule {
 | 
			
		||||
        rule       = { urgency = 'low' },
 | 
			
		||||
        properties = {
 | 
			
		||||
            font                = 'VictorMono Nerd Font 10',
 | 
			
		||||
            bg                      = beautiful.transparent,
 | 
			
		||||
            fg                      = beautiful.fg_normal,
 | 
			
		||||
            margin                  = dpi(16),
 | 
			
		||||
            position            = 'top_right',
 | 
			
		||||
            implicit_timeout    = 5
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
-- Error handling
 | 
			
		||||
naughty.connect_signal(
 | 
			
		||||
	"request::display_error",
 | 
			
		||||
	function(message, startup)
 | 
			
		||||
	    naughty.notification {
 | 
			
		||||
	        urgency = "critical",
 | 
			
		||||
	        title   = "Oops, an error happened"..(startup and " during startup!" or "!"),
 | 
			
		||||
	        message = message,
 | 
			
		||||
	        app_name = 'System Notification',
 | 
			
		||||
	        icon = beautiful.awesome_icon
 | 
			
		||||
	    }
 | 
			
		||||
	end
 | 
			
		||||
    "request::display_error",
 | 
			
		||||
    function(message, startup)
 | 
			
		||||
        naughty.notification {
 | 
			
		||||
            urgency = "critical",
 | 
			
		||||
            title   = "Oops, an error happened"..(startup and " during startup!" or "!"),
 | 
			
		||||
            message = message,
 | 
			
		||||
            app_name = 'System Notification',
 | 
			
		||||
            icon = beautiful.awesome_icon
 | 
			
		||||
        }
 | 
			
		||||
    end
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
-- XDG icon lookup
 | 
			
		||||
naughty.connect_signal(
 | 
			
		||||
	"request::icon",
 | 
			
		||||
	function(n, context, hints)
 | 
			
		||||
	    if context ~= "app_icon" then return end
 | 
			
		||||
    "request::icon",
 | 
			
		||||
    function(n, context, hints)
 | 
			
		||||
        if context ~= "app_icon" then return end
 | 
			
		||||
 | 
			
		||||
	    local path = menubar.utils.lookup_icon(hints.app_icon) or
 | 
			
		||||
	        menubar.utils.lookup_icon(hints.app_icon:lower())
 | 
			
		||||
        local path = menubar.utils.lookup_icon(hints.app_icon) or
 | 
			
		||||
            menubar.utils.lookup_icon(hints.app_icon:lower())
 | 
			
		||||
 | 
			
		||||
	    if path then
 | 
			
		||||
	        n.icon = path
 | 
			
		||||
	    end
 | 
			
		||||
	end
 | 
			
		||||
        if path then
 | 
			
		||||
            n.icon = path
 | 
			
		||||
        end
 | 
			
		||||
    end
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
-- Naughty template
 | 
			
		||||
naughty.connect_signal("request::display", function(n)
 | 
			
		||||
 | 
			
		||||
	-- naughty.actions template
 | 
			
		||||
	local actions_template = wibox.widget {
 | 
			
		||||
		notification = n,
 | 
			
		||||
		base_layout = wibox.widget {
 | 
			
		||||
			spacing        = dpi(4),
 | 
			
		||||
			layout         = wibox.layout.flex.horizontal
 | 
			
		||||
		},
 | 
			
		||||
		widget_template = {
 | 
			
		||||
			{
 | 
			
		||||
				{
 | 
			
		||||
					{
 | 
			
		||||
						{
 | 
			
		||||
							id     = 'text_role',
 | 
			
		||||
							font   = 'VictorMono Nerd Font 10',
 | 
			
		||||
							widget = wibox.widget.textbox
 | 
			
		||||
						},
 | 
			
		||||
						widget = wibox.container.place
 | 
			
		||||
					},
 | 
			
		||||
					widget = clickable_container
 | 
			
		||||
				},
 | 
			
		||||
				bg                 = beautiful.groups_bg,
 | 
			
		||||
				shape              = gears.shape.rounded_rect,
 | 
			
		||||
				forced_height      = dpi(35),
 | 
			
		||||
				widget             = wibox.container.background
 | 
			
		||||
			},
 | 
			
		||||
			margins = dpi(8),
 | 
			
		||||
			widget  = wibox.container.margin
 | 
			
		||||
		},
 | 
			
		||||
		style = { underline_normal = false, underline_selected = true },
 | 
			
		||||
		widget = naughty.list.actions
 | 
			
		||||
	}
 | 
			
		||||
    -- naughty.actions template
 | 
			
		||||
    local actions_template = wibox.widget {
 | 
			
		||||
        notification = n,
 | 
			
		||||
        base_layout = wibox.widget {
 | 
			
		||||
            spacing        = dpi(4),
 | 
			
		||||
            layout         = wibox.layout.flex.horizontal
 | 
			
		||||
        },
 | 
			
		||||
        widget_template = {
 | 
			
		||||
            {
 | 
			
		||||
                {
 | 
			
		||||
                    {
 | 
			
		||||
                        {
 | 
			
		||||
                            id     = 'text_role',
 | 
			
		||||
                            font   = 'VictorMono Nerd Font 10',
 | 
			
		||||
                            widget = wibox.widget.textbox
 | 
			
		||||
                        },
 | 
			
		||||
                        widget = wibox.container.place
 | 
			
		||||
                    },
 | 
			
		||||
                    widget = clickable_container
 | 
			
		||||
                },
 | 
			
		||||
                bg                 = beautiful.groups_bg,
 | 
			
		||||
                shape              = gears.shape.rounded_rect,
 | 
			
		||||
                forced_height      = dpi(35),
 | 
			
		||||
                widget             = wibox.container.background
 | 
			
		||||
            },
 | 
			
		||||
            margins = dpi(8),
 | 
			
		||||
            widget  = wibox.container.margin
 | 
			
		||||
        },
 | 
			
		||||
        style = { underline_normal = false, underline_selected = true },
 | 
			
		||||
        widget = naughty.list.actions
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	-- Custom notification layout
 | 
			
		||||
	naughty.layout.box {
 | 
			
		||||
		notification = n,
 | 
			
		||||
		type = "notification",
 | 
			
		||||
		screen = awful.screen.preferred(),
 | 
			
		||||
		shape = gears.shape.rectangle,
 | 
			
		||||
		widget_template = {
 | 
			
		||||
			{
 | 
			
		||||
				{
 | 
			
		||||
					{
 | 
			
		||||
						{
 | 
			
		||||
							{
 | 
			
		||||
								{
 | 
			
		||||
									{
 | 
			
		||||
										{
 | 
			
		||||
											{
 | 
			
		||||
												{
 | 
			
		||||
													{
 | 
			
		||||
														markup = n.app_name or 'System Notification',
 | 
			
		||||
														font = 'VictorMono Nerd Font 10',
 | 
			
		||||
														align = 'center',
 | 
			
		||||
														valign = 'center',
 | 
			
		||||
														widget = wibox.widget.textbox
 | 
			
		||||
    -- Custom notification layout
 | 
			
		||||
    naughty.layout.box {
 | 
			
		||||
        notification = n,
 | 
			
		||||
        type = "notification",
 | 
			
		||||
        screen = awful.screen.preferred(),
 | 
			
		||||
        shape = gears.shape.rectangle,
 | 
			
		||||
        widget_template = {
 | 
			
		||||
            {
 | 
			
		||||
                {
 | 
			
		||||
                    {
 | 
			
		||||
                        {
 | 
			
		||||
                            {
 | 
			
		||||
                                {
 | 
			
		||||
                                    {
 | 
			
		||||
                                        {
 | 
			
		||||
                                            {
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        markup = n.app_name or 'System Notification',
 | 
			
		||||
                                                        font = 'VictorMono Nerd Font 10',
 | 
			
		||||
                                                        align = 'center',
 | 
			
		||||
                                                        valign = 'center',
 | 
			
		||||
                                                        widget = wibox.widget.textbox
 | 
			
		||||
 | 
			
		||||
													},
 | 
			
		||||
													margins = beautiful.notification_margin,
 | 
			
		||||
													widget  = wibox.container.margin,
 | 
			
		||||
												},
 | 
			
		||||
												bg = '#000000'.. '44',
 | 
			
		||||
												widget  = wibox.container.background,
 | 
			
		||||
											},
 | 
			
		||||
											{
 | 
			
		||||
												{
 | 
			
		||||
													{
 | 
			
		||||
														resize_strategy = 'center',
 | 
			
		||||
														widget = naughty.widget.icon,
 | 
			
		||||
													},
 | 
			
		||||
													margins = beautiful.notification_margin,
 | 
			
		||||
													widget  = wibox.container.margin,
 | 
			
		||||
												},
 | 
			
		||||
												{
 | 
			
		||||
													{
 | 
			
		||||
														layout = wibox.layout.align.vertical,
 | 
			
		||||
														expand = 'none',
 | 
			
		||||
														nil,
 | 
			
		||||
														{
 | 
			
		||||
															{
 | 
			
		||||
																align = 'left',
 | 
			
		||||
																widget = naughty.widget.title
 | 
			
		||||
															},
 | 
			
		||||
															{
 | 
			
		||||
																align = "left",
 | 
			
		||||
																widget = naughty.widget.message,
 | 
			
		||||
															},
 | 
			
		||||
															layout = wibox.layout.fixed.vertical
 | 
			
		||||
														},
 | 
			
		||||
														nil
 | 
			
		||||
													},
 | 
			
		||||
													margins = beautiful.notification_margin,
 | 
			
		||||
													widget  = wibox.container.margin,
 | 
			
		||||
												},
 | 
			
		||||
												layout = wibox.layout.fixed.horizontal,
 | 
			
		||||
											},
 | 
			
		||||
											fill_space = true,
 | 
			
		||||
											spacing = beautiful.notification_margin,
 | 
			
		||||
											layout  = wibox.layout.fixed.vertical,
 | 
			
		||||
										},
 | 
			
		||||
										-- Margin between the fake background
 | 
			
		||||
										-- Set to 0 to preserve the 'titlebar' effect
 | 
			
		||||
										margins = dpi(0),
 | 
			
		||||
										widget  = wibox.container.margin,
 | 
			
		||||
									},
 | 
			
		||||
									bg = beautiful.bg_normal,
 | 
			
		||||
									widget  = wibox.container.background,
 | 
			
		||||
								},
 | 
			
		||||
								-- Notification action list
 | 
			
		||||
								-- naughty.list.actions,
 | 
			
		||||
								actions_template,
 | 
			
		||||
								spacing = dpi(4),
 | 
			
		||||
								layout  = wibox.layout.fixed.vertical,
 | 
			
		||||
							},
 | 
			
		||||
							bg     = beautiful.bg_normal,
 | 
			
		||||
							id     = "background_role",
 | 
			
		||||
                                                    },
 | 
			
		||||
                                                    margins = beautiful.notification_margin,
 | 
			
		||||
                                                    widget  = wibox.container.margin,
 | 
			
		||||
                                                },
 | 
			
		||||
                                                bg = '#000000'.. '44',
 | 
			
		||||
                                                widget  = wibox.container.background,
 | 
			
		||||
                                            },
 | 
			
		||||
                                            {
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        resize_strategy = 'center',
 | 
			
		||||
                                                        widget = naughty.widget.icon,
 | 
			
		||||
                                                    },
 | 
			
		||||
                                                    margins = beautiful.notification_margin,
 | 
			
		||||
                                                    widget  = wibox.container.margin,
 | 
			
		||||
                                                },
 | 
			
		||||
                                                {
 | 
			
		||||
                                                    {
 | 
			
		||||
                                                        layout = wibox.layout.align.vertical,
 | 
			
		||||
                                                        expand = 'none',
 | 
			
		||||
                                                        nil,
 | 
			
		||||
                                                        {
 | 
			
		||||
                                                            {
 | 
			
		||||
                                                                align = 'left',
 | 
			
		||||
                                                                widget = naughty.widget.title
 | 
			
		||||
                                                            },
 | 
			
		||||
                                                            {
 | 
			
		||||
                                                                align = "left",
 | 
			
		||||
                                                                widget = naughty.widget.message,
 | 
			
		||||
                                                            },
 | 
			
		||||
                                                            layout = wibox.layout.fixed.vertical
 | 
			
		||||
                                                        },
 | 
			
		||||
                                                        nil
 | 
			
		||||
                                                    },
 | 
			
		||||
                                                    margins = beautiful.notification_margin,
 | 
			
		||||
                                                    widget  = wibox.container.margin,
 | 
			
		||||
                                                },
 | 
			
		||||
                                                layout = wibox.layout.fixed.horizontal,
 | 
			
		||||
                                            },
 | 
			
		||||
                                            fill_space = true,
 | 
			
		||||
                                            spacing = beautiful.notification_margin,
 | 
			
		||||
                                            layout  = wibox.layout.fixed.vertical,
 | 
			
		||||
                                        },
 | 
			
		||||
                                        -- Margin between the fake background
 | 
			
		||||
                                        -- Set to 0 to preserve the 'titlebar' effect
 | 
			
		||||
                                        margins = dpi(0),
 | 
			
		||||
                                        widget  = wibox.container.margin,
 | 
			
		||||
                                    },
 | 
			
		||||
                                    bg = beautiful.bg_normal,
 | 
			
		||||
                                    widget  = wibox.container.background,
 | 
			
		||||
                                },
 | 
			
		||||
                                -- Notification action list
 | 
			
		||||
                                -- naughty.list.actions,
 | 
			
		||||
                                actions_template,
 | 
			
		||||
                                spacing = dpi(4),
 | 
			
		||||
                                layout  = wibox.layout.fixed.vertical,
 | 
			
		||||
                            },
 | 
			
		||||
                            bg     = beautiful.bg_normal,
 | 
			
		||||
                            id     = "background_role",
 | 
			
		||||
                            shape = gears.shape.rounded_rect,
 | 
			
		||||
							widget = naughty.container.background,
 | 
			
		||||
						},
 | 
			
		||||
						strategy = "min",
 | 
			
		||||
						width    = dpi(160),
 | 
			
		||||
						widget   = wibox.container.constraint,
 | 
			
		||||
					},
 | 
			
		||||
					strategy = "max",
 | 
			
		||||
					width    = beautiful.notification_max_width or dpi(500),
 | 
			
		||||
					widget   = wibox.container.constraint,
 | 
			
		||||
				},
 | 
			
		||||
				-- Anti-aliasing container
 | 
			
		||||
				-- Real BG
 | 
			
		||||
				bg = beautiful.bg_normal,
 | 
			
		||||
				-- This will be the anti-aliased shape of the notification
 | 
			
		||||
				shape = gears.shape.rounded_rect,
 | 
			
		||||
				widget = wibox.container.background
 | 
			
		||||
			},
 | 
			
		||||
			-- Margin of the fake BG to have a space between notification and the screen edge
 | 
			
		||||
			-- margins = dpi(15),--beautiful.notification_margin,
 | 
			
		||||
                            widget = naughty.container.background,
 | 
			
		||||
                        },
 | 
			
		||||
                        strategy = "min",
 | 
			
		||||
                        width    = dpi(160),
 | 
			
		||||
                        widget   = wibox.container.constraint,
 | 
			
		||||
                    },
 | 
			
		||||
                    strategy = "max",
 | 
			
		||||
                    width    = beautiful.notification_max_width or dpi(500),
 | 
			
		||||
                    widget   = wibox.container.constraint,
 | 
			
		||||
                },
 | 
			
		||||
                -- Anti-aliasing container
 | 
			
		||||
                -- Real BG
 | 
			
		||||
                bg = beautiful.bg_normal,
 | 
			
		||||
                -- This will be the anti-aliased shape of the notification
 | 
			
		||||
                shape = gears.shape.rounded_rect,
 | 
			
		||||
                widget = wibox.container.background
 | 
			
		||||
            },
 | 
			
		||||
            -- Margin of the fake BG to have a space between notification and the screen edge
 | 
			
		||||
            -- margins = dpi(15),--beautiful.notification_margin,
 | 
			
		||||
            right = dpi(10),
 | 
			
		||||
            left = dpi(10),
 | 
			
		||||
            bottom = dpi(10),
 | 
			
		||||
            top = dpi(5),
 | 
			
		||||
			widget  = wibox.container.margin
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	}
 | 
			
		||||
            top = dpi(15),
 | 
			
		||||
            widget  = wibox.container.margin
 | 
			
		||||
        },
 | 
			
		||||
        right = dpi(100),
 | 
			
		||||
        top = dpi(150),
 | 
			
		||||
        widget  = wibox.container.margin
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	-- Destroy popups if dont_disturb mode is on
 | 
			
		||||
	-- Or if the right_panel is visible
 | 
			
		||||
	local focused = awful.screen.focused()
 | 
			
		||||
	if _G.dont_disturb or (focused.right_panel and focused.right_panel.visible) then
 | 
			
		||||
		naughty.destroy_all_notifications(nil, 1)
 | 
			
		||||
	end
 | 
			
		||||
    -- Destroy popups if dont_disturb mode is on
 | 
			
		||||
    -- Or if the right_panel is visible
 | 
			
		||||
    local focused = awful.screen.focused()
 | 
			
		||||
    if _G.dont_disturb or (focused.right_panel and focused.right_panel.visible) then
 | 
			
		||||
        naughty.destroy_all_notifications(nil, 1)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
end)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										181
									
								
								awesome/rc.lua
									
										
									
									
									
								
							
							
						
						
									
										181
									
								
								awesome/rc.lua
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,4 +1,8 @@
 | 
			
		|||
pcall(require, "luarocks.loader")
 | 
			
		||||
local fennel = require("./fennel")
 | 
			
		||||
fennel.path = fennel.path .. ";.config/awesome/?.fnl"
 | 
			
		||||
table.insert(package.loaders or package.searchers, fennel.make_searcher({correlate=true}))
 | 
			
		||||
require("init") -- loads init.fnl
 | 
			
		||||
 | 
			
		||||
-- Standard awesome library
 | 
			
		||||
local gears = require("gears")
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +25,7 @@ local nice = require("nice")
 | 
			
		|||
require("awful.hotkeys_popup.keys")
 | 
			
		||||
 | 
			
		||||
require('module.notifications')
 | 
			
		||||
require('module.decorate-client')
 | 
			
		||||
-- require('module.decorate-client')
 | 
			
		||||
require('module.backdrop')
 | 
			
		||||
require('module.volume-osd')
 | 
			
		||||
require('module.brightness-osd')
 | 
			
		||||
| 
						 | 
				
			
			@ -387,7 +391,7 @@ awful.screen.connect_for_each_screen(function(s)
 | 
			
		|||
        { -- Right widgets
 | 
			
		||||
            layout = wibox.layout.align.horizontal,
 | 
			
		||||
            s.myemptywidget,
 | 
			
		||||
            s.myemptywidget,
 | 
			
		||||
            wibox.container.margin (s.mypromptbox,dpi(25),dpi(25),0,0), -- Middle widget
 | 
			
		||||
            s.myrightwidgets,
 | 
			
		||||
        },
 | 
			
		||||
        visible = true,
 | 
			
		||||
| 
						 | 
				
			
			@ -482,7 +486,9 @@ awful.keyboard.append_global_keybindings({
 | 
			
		|||
    -- dolphin
 | 
			
		||||
    awful.key({ modkey,           }, "d", function () awful.spawn("dolphin") end,
 | 
			
		||||
              {description = "open dolphin file manager", group = "apps"}),
 | 
			
		||||
 | 
			
		||||
    -- mpv
 | 
			
		||||
    awful.key({ modkey,  altkey   }, "m", function () awful.spawn("mpv --player-operation-mode=pseudo-gui") end,
 | 
			
		||||
              {description = "open mpv", group = "apps"}),
 | 
			
		||||
    -- layout
 | 
			
		||||
    awful.key({ modkey,           }, "l",     function () awful.tag.incmwfact( 0.05)          end,
 | 
			
		||||
              {description = "increase master width factor", group = "layout"}),
 | 
			
		||||
| 
						 | 
				
			
			@ -670,19 +676,25 @@ for i = 1, 9 do
 | 
			
		|||
    )
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
clientbuttons = gears.table.join(
 | 
			
		||||
    awful.button({ }, 1, function (c)
 | 
			
		||||
        c:emit_signal("request::activate", "mouse_click", {raise = true})
 | 
			
		||||
    end),
 | 
			
		||||
    awful.button({ modkey }, 1, function (c)
 | 
			
		||||
        c:emit_signal("request::activate", "mouse_click", {raise = true})
 | 
			
		||||
        awful.mouse.client.move(c)
 | 
			
		||||
    end),
 | 
			
		||||
    awful.button({ modkey }, 3, function (c)
 | 
			
		||||
        c:emit_signal("request::activate", "mouse_click", {raise = true})
 | 
			
		||||
        awful.mouse.client.resize(c)
 | 
			
		||||
    end)
 | 
			
		||||
)
 | 
			
		||||
awful.mouse.append_global_mousebindings({
 | 
			
		||||
    awful.button({ }, 3, function () mymainmenu:toggle() end),
 | 
			
		||||
    awful.button({ }, 4, awful.tag.viewprev),
 | 
			
		||||
    awful.button({ }, 5, awful.tag.viewnext),
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
client.connect_signal("request::default_mousebindings", function()
 | 
			
		||||
    awful.mouse.append_client_mousebindings({
 | 
			
		||||
        awful.button({ }, 1, function (c)
 | 
			
		||||
            c:activate { context = "mouse_click" }
 | 
			
		||||
        end),
 | 
			
		||||
        awful.button({ modkey }, 1, function (c)
 | 
			
		||||
            c:activate { context = "mouse_click", action = "mouse_move"  }
 | 
			
		||||
        end),
 | 
			
		||||
        awful.button({ modkey }, 3, function (c)
 | 
			
		||||
            c:activate { context = "mouse_click", action = "mouse_resize"}
 | 
			
		||||
        end),
 | 
			
		||||
    })
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
-- Set keys
 | 
			
		||||
root.keys(globalkeys)
 | 
			
		||||
| 
						 | 
				
			
			@ -690,84 +702,71 @@ root.keys(globalkeys)
 | 
			
		|||
 | 
			
		||||
-- {{{ Rules
 | 
			
		||||
-- Rules to apply to new clients (through the "manage" signal).
 | 
			
		||||
ruled.client.connect_signal('request::manage', function()
 | 
			
		||||
       ruled.client.append_rule {
 | 
			
		||||
           -- All clients will match this rule.
 | 
			
		||||
           rule = {},
 | 
			
		||||
           properties = {
 | 
			
		||||
               border_width = beautiful.border_width,
 | 
			
		||||
               border_color = beautiful.border_normal,
 | 
			
		||||
               focus = awful.client.focus.filter,
 | 
			
		||||
               raise = true,
 | 
			
		||||
               keys = clientkeys,
 | 
			
		||||
               buttons = clientbuttons,
 | 
			
		||||
               screen = awful.screen.preferred,
 | 
			
		||||
               placement = awful.placement.no_overlap+awful.placement.no_offscreen
 | 
			
		||||
           },
 | 
			
		||||
       }
 | 
			
		||||
ruled.client.connect_signal("request::rules", function()
 | 
			
		||||
    -- All clients will match this rule.
 | 
			
		||||
    ruled.client.append_rule {
 | 
			
		||||
        id = "global",
 | 
			
		||||
        rule = {},
 | 
			
		||||
        properties = {
 | 
			
		||||
            border_width = beautiful.border_width,
 | 
			
		||||
            border_color = beautiful.border_normal,
 | 
			
		||||
            focus = awful.client.focus.filter,
 | 
			
		||||
            raise = true,
 | 
			
		||||
            buttons = clientbuttons,
 | 
			
		||||
            screen = awful.screen.preferred,
 | 
			
		||||
            placement = awful.placement.no_overlap+awful.placement.no_offscreen
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
       ruled.client.append_rule {
 | 
			
		||||
           -- make mpv float
 | 
			
		||||
           rule_any = {
 | 
			
		||||
               class = {
 | 
			
		||||
                   "mpv",
 | 
			
		||||
                   "gl",
 | 
			
		||||
                   "vlc"
 | 
			
		||||
               }
 | 
			
		||||
           },
 | 
			
		||||
           properties = {
 | 
			
		||||
               placement = awful.placement.centered,
 | 
			
		||||
               floating = true,
 | 
			
		||||
               ontop = true,
 | 
			
		||||
               raise = true
 | 
			
		||||
           },
 | 
			
		||||
    -- make mpv specific
 | 
			
		||||
    ruled.client.append_rule {
 | 
			
		||||
        id = "mpv",
 | 
			
		||||
        rule_any = {
 | 
			
		||||
            class = {
 | 
			
		||||
                "mpv"
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        properties = {
 | 
			
		||||
                placement = awful.placement.centered,
 | 
			
		||||
                floating = true,
 | 
			
		||||
                ontop = true,
 | 
			
		||||
                raise = true
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
       }
 | 
			
		||||
    -- Floating clients.
 | 
			
		||||
    ruled.client.append_rule {
 | 
			
		||||
        id = "floating",
 | 
			
		||||
        rule_any = {
 | 
			
		||||
            class = {
 | 
			
		||||
                "Arandr",
 | 
			
		||||
                "Blender",
 | 
			
		||||
                "dolphin",
 | 
			
		||||
            },
 | 
			
		||||
            name = {
 | 
			
		||||
                "Event Tester",  -- xev.
 | 
			
		||||
                "remove images?" -- darktable delete window.
 | 
			
		||||
            },
 | 
			
		||||
            role = {
 | 
			
		||||
                "AlarmWindow",  -- Thunderbird's calendar.
 | 
			
		||||
                "ConfigManager",  -- Thunderbird's about:config.
 | 
			
		||||
                "pop-up",       -- e.g. Google Chrome's (detached) Developer Tools.
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        properties = { floating = true },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
-- ruled.client.append_rule {
 | 
			
		||||
--     -- Floating clients.
 | 
			
		||||
--      rule_any = {
 | 
			
		||||
--         class = {
 | 
			
		||||
--           "Arandr",
 | 
			
		||||
--           "Blender",
 | 
			
		||||
--           "dolphin",
 | 
			
		||||
--         },
 | 
			
		||||
--         name = {
 | 
			
		||||
--           "Event Tester",  -- xev.
 | 
			
		||||
--           "remove images?" -- darktable delete window.
 | 
			
		||||
--         },
 | 
			
		||||
--         role = {
 | 
			
		||||
--           "AlarmWindow",  -- Thunderbird's calendar.
 | 
			
		||||
--           "ConfigManager",  -- Thunderbird's about:config.
 | 
			
		||||
--           "pop-up",       -- e.g. Google Chrome's (detached) Developer Tools.
 | 
			
		||||
--         }
 | 
			
		||||
--      },
 | 
			
		||||
--      properties = { floating = true },
 | 
			
		||||
-- }
 | 
			
		||||
 | 
			
		||||
-- ruled.client.append_rule {
 | 
			
		||||
--     -- Add titlebars to normal clients and dialogs
 | 
			
		||||
--     rule_any = { type = { "normal", "dialog" } },
 | 
			
		||||
--     properties = { titlebars_enabled = false},
 | 
			
		||||
-- }
 | 
			
		||||
 | 
			
		||||
-- ruled.client.append_rule {
 | 
			
		||||
--     -- Set Firefox to never have titlebars
 | 
			
		||||
--     rule = { class = "Firefox" },
 | 
			
		||||
--     properties = { requests_no_titlebar = true, titlebars_enabled = false },
 | 
			
		||||
-- }
 | 
			
		||||
 | 
			
		||||
-- ruled.client.append_rule {
 | 
			
		||||
--     -- Set Feh center
 | 
			
		||||
--     rule = { class = "feh" },
 | 
			
		||||
--     properties = {
 | 
			
		||||
--         placement = awful.placement.centered,
 | 
			
		||||
--         floating = true
 | 
			
		||||
--     },
 | 
			
		||||
-- }
 | 
			
		||||
    -- Set Feh center
 | 
			
		||||
    ruled.client.append_rule {
 | 
			
		||||
        id = "feh",
 | 
			
		||||
        rule = { class = "feh" },
 | 
			
		||||
        properties = {
 | 
			
		||||
            placement = awful.placement.centered,
 | 
			
		||||
            floating = true
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
end)
 | 
			
		||||
-- }}}
 | 
			
		||||
awful.spawn.with_shell("mpv /home/chris/Videos/transcoded/a love letter.mp4")
 | 
			
		||||
 | 
			
		||||
-- {{{ Signals
 | 
			
		||||
-- Signal function to execute when a new client appears.
 | 
			
		||||
| 
						 | 
				
			
			@ -797,7 +796,7 @@ client.connect_signal("focus", function(c) c.border_color = beautiful.border_foc
 | 
			
		|||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
 | 
			
		||||
-- }}}
 | 
			
		||||
 | 
			
		||||
-- Autostart Applications
 | 
			
		||||
-- {{{ Autostart Applications
 | 
			
		||||
awful.spawn.with_shell("picom --experimental-backend")
 | 
			
		||||
awful.spawn.with_shell("libinput-gestures-setup start")
 | 
			
		||||
awful.spawn.with_shell("flameshot")
 | 
			
		||||
| 
						 | 
				
			
			@ -807,3 +806,5 @@ awful.spawn.with_shell("/usr/lib/polkit-kde-authentication-agent-1")
 | 
			
		|||
awful.spawn.with_shell("emacs -daemon")
 | 
			
		||||
awful.spawn.with_shell("nextcloud --background")
 | 
			
		||||
awful.spawn.with_shell("caffeine")
 | 
			
		||||
 | 
			
		||||
-- }}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ local beautiful = require("beautiful")
 | 
			
		|||
local menubar = require("menubar")
 | 
			
		||||
local hotkeys_popup = require("awful.hotkeys_popup")
 | 
			
		||||
local ruled = require("ruled")
 | 
			
		||||
local nice = require("nice")
 | 
			
		||||
local nice = require("nice")()
 | 
			
		||||
-- Enable hotkeys help widget for VIM and other apps
 | 
			
		||||
-- when client with a matching name is opened:
 | 
			
		||||
require("awful.hotkeys_popup.keys")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										36
									
								
								awesome/rules.fnl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								awesome/rules.fnl
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
(global awful (require "awful"))
 | 
			
		||||
(global beautiful (require "beautiful"))
 | 
			
		||||
(global keybindings (require "keys"))
 | 
			
		||||
 | 
			
		||||
(local
 | 
			
		||||
 rules
 | 
			
		||||
 [
 | 
			
		||||
  ;; All clients match this rule
 | 
			
		||||
  {
 | 
			
		||||
   :rule {  }
 | 
			
		||||
   :propertites {
 | 
			
		||||
                 :border-width beautiful.border_width
 | 
			
		||||
                 :border_color beautiful.border_normal
 | 
			
		||||
                 :focus awful.client.focus.filter
 | 
			
		||||
                 :raise true
 | 
			
		||||
                 :buttons keybindings.clientbuttons
 | 
			
		||||
                 :screen awful.screen.preferred
 | 
			
		||||
                 :placement (+ awful.placement.no_overlap awful.placement.no_offscreen)
 | 
			
		||||
                 }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
  ;; floating
 | 
			
		||||
  {
 | 
			
		||||
   :rule_any {
 | 
			
		||||
              :class [
 | 
			
		||||
                      "mpv"
 | 
			
		||||
                      "dolphin"
 | 
			
		||||
                      ]
 | 
			
		||||
              :role [
 | 
			
		||||
                     "pop-up"
 | 
			
		||||
                     ]}
 | 
			
		||||
   :properties {:floating true}
 | 
			
		||||
   }
 | 
			
		||||
  ])
 | 
			
		||||
 | 
			
		||||
rules
 | 
			
		||||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ theme.wibar_width = dpi(1850)
 | 
			
		|||
-- theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
 | 
			
		||||
-- theme.titlebar_maximized_button_focus_active  = themes_path.."default/titlebar/maximized_focus_active.png"
 | 
			
		||||
 | 
			
		||||
theme.wallpaper = wallpaperdir.."RoyalKing.png"
 | 
			
		||||
theme.wallpaper = wallpaperdir .. "RoyalKing.png"
 | 
			
		||||
 | 
			
		||||
-- You can use your own layout icons like this:
 | 
			
		||||
theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,10 +33,10 @@ shadow = true;
 | 
			
		|||
 | 
			
		||||
# The blur radius for shadows, in pixels. (defaults to 12)
 | 
			
		||||
# shadow-radius = 12
 | 
			
		||||
shadow-radius = 12;
 | 
			
		||||
shadow-radius = 8;
 | 
			
		||||
 | 
			
		||||
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
 | 
			
		||||
shadow-opacity = .85
 | 
			
		||||
shadow-opacity = .75
 | 
			
		||||
 | 
			
		||||
# The left offset for shadows, in pixels. (defaults to -15)
 | 
			
		||||
# shadow-offset-x = -15
 | 
			
		||||
| 
						 | 
				
			
			@ -85,6 +85,7 @@ shadow-offset-y = 0;
 | 
			
		|||
shadow-exclude = [
 | 
			
		||||
  "name = 'Notification'",
 | 
			
		||||
  "class_g = 'Conky'",
 | 
			
		||||
  "class_g = 'firefox'",
 | 
			
		||||
  "class_g ?= 'Notify-osd'",
 | 
			
		||||
  "class_g = 'Cairo-clock'",
 | 
			
		||||
  "class_g = 'slop'",
 | 
			
		||||
| 
						 | 
				
			
			@ -97,7 +98,7 @@ shadow-exclude = [
 | 
			
		|||
#    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 = ""
 | 
			
		||||
shadow-exclude-reg = "x90+0+0"
 | 
			
		||||
 | 
			
		||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
 | 
			
		||||
# xinerama-shadow-crop = false
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue