Added more of awesome into fennel over lua
This commit is contained in:
		
							parent
							
								
									3d48649971
								
							
						
					
					
						commit
						bdc9927c62
					
				
					 8 changed files with 104 additions and 71 deletions
				
			
		| 
						 | 
				
			
			@ -5,8 +5,24 @@
 | 
			
		|||
(local gears (require "gears"))
 | 
			
		||||
(local keys (require "keys"))
 | 
			
		||||
 | 
			
		||||
;; (gears.wallpaper.set (beautiful.wallpaper))
 | 
			
		||||
 | 
			
		||||
;;; rules
 | 
			
		||||
(set awful.rules.rules rules)
 | 
			
		||||
 | 
			
		||||
(root.keys keys.globalkeys)
 | 
			
		||||
;;; wallpaper
 | 
			
		||||
(fn set-wallpaper [s]
 | 
			
		||||
    (local wallpaper beautiful.wallpaper)
 | 
			
		||||
    (gears.wallpaper.maximized wallpaper s false))
 | 
			
		||||
 | 
			
		||||
(awful.screen.connect_for_each_screen set-wallpaper)
 | 
			
		||||
(screen.connect_signal "property::geometry" set-wallpaper)
 | 
			
		||||
 | 
			
		||||
;;; autostart applications
 | 
			
		||||
(awful.spawn.with_shell "picom --experimental-backend")
 | 
			
		||||
(awful.spawn.with_shell "xset r rate 220 90")
 | 
			
		||||
(awful.spawn.with_shell "/usr/lib/polkit-kde-authentication-agent-1")
 | 
			
		||||
(awful.spawn.with_shell "feh --bg-fill ~/Pictures/wallpapers/RoyalKing.png")
 | 
			
		||||
(awful.spawn.with_shell "flameshot")
 | 
			
		||||
(awful.spawn.with_shell "caffeine")
 | 
			
		||||
(awful.spawn.with_shell "nextcloud --background")
 | 
			
		||||
(awful.spawn.with_shell "emacs -daemon")
 | 
			
		||||
(awful.spawn.with_shell "libinput-gestures-setup start")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,13 +10,12 @@
 | 
			
		|||
                  :alt "Mod1"
 | 
			
		||||
                  })
 | 
			
		||||
 | 
			
		||||
(local globalkeys (gears.table.join
 | 
			
		||||
                   (key [:mod :alt] "m" (awful.spawn "mpv --player-operation-mode=pseudo-gui"))
 | 
			
		||||
                   (key [:mod] "s" hotkeys_popup.show_help)
 | 
			
		||||
                   ))
 | 
			
		||||
(local globalkeys (awful.keyboard.append_global_keybindings [
 | 
			
		||||
                                                             (awful.key [:mod :alt] "m" (awful.spawn "mpv --player-operation-mode=pseudo-gui"))
 | 
			
		||||
                                                             (awful.key [:mod] "s" hotkeys_popup.show_help)
 | 
			
		||||
                                                             ]))
 | 
			
		||||
 | 
			
		||||
(root.keys globalkeys)
 | 
			
		||||
keys
 | 
			
		||||
globalkeys
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,17 +18,15 @@ naughty.config.defaults.title = 'System Notification'
 | 
			
		|||
naughty.config.defaults.margin = dpi(100)
 | 
			
		||||
naughty.config.defaults.border_width = 0
 | 
			
		||||
naughty.config.defaults.position = 'top_right'
 | 
			
		||||
naughty.config.defaults.screen = 1
 | 
			
		||||
naughty.config.defaults.shape = function(cr, w, h) gears.shape.rounded_rect(cr, w, h, dpi(6)) end
 | 
			
		||||
 | 
			
		||||
-- Apply theme variables
 | 
			
		||||
 | 
			
		||||
naughty.config.padding = 8
 | 
			
		||||
naughty.config.spacing = 8
 | 
			
		||||
naughty.config.padding = dpi(20)
 | 
			
		||||
naughty.config.spacing = dpi(20)
 | 
			
		||||
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/"
 | 
			
		||||
| 
						 | 
				
			
			@ -150,7 +148,7 @@ naughty.connect_signal("request::display", function(n)
 | 
			
		|||
        notification = n,
 | 
			
		||||
        type = "notification",
 | 
			
		||||
        screen = awful.screen.preferred(),
 | 
			
		||||
        shape = gears.shape.rectangle,
 | 
			
		||||
        shape = gears.shape.rounded_rectangle,
 | 
			
		||||
        widget_template = {
 | 
			
		||||
            {
 | 
			
		||||
                {
 | 
			
		||||
| 
						 | 
				
			
			@ -168,7 +166,6 @@ naughty.connect_signal("request::display", function(n)
 | 
			
		|||
                                                        align = 'center',
 | 
			
		||||
                                                        valign = 'center',
 | 
			
		||||
                                                        widget = wibox.widget.textbox
 | 
			
		||||
 | 
			
		||||
                                                    },
 | 
			
		||||
                                                    margins = beautiful.notification_margin,
 | 
			
		||||
                                                    widget  = wibox.container.margin,
 | 
			
		||||
| 
						 | 
				
			
			@ -192,11 +189,11 @@ naughty.connect_signal("request::display", function(n)
 | 
			
		|||
                                                        nil,
 | 
			
		||||
                                                        {
 | 
			
		||||
                                                            {
 | 
			
		||||
                                                                align = 'left',
 | 
			
		||||
                                                                align = 'center',
 | 
			
		||||
                                                                widget = naughty.widget.title
 | 
			
		||||
                                                            },
 | 
			
		||||
                                                            {
 | 
			
		||||
                                                                align = "left",
 | 
			
		||||
                                                                align = "center",
 | 
			
		||||
                                                                widget = naughty.widget.message,
 | 
			
		||||
                                                            },
 | 
			
		||||
                                                            layout = wibox.layout.fixed.vertical
 | 
			
		||||
| 
						 | 
				
			
			@ -248,15 +245,14 @@ naughty.connect_signal("request::display", function(n)
 | 
			
		|||
            },
 | 
			
		||||
            -- 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(15),
 | 
			
		||||
            right = dpi(20),
 | 
			
		||||
            left = dpi(0),
 | 
			
		||||
            bottom = dpi(0),
 | 
			
		||||
            top = dpi(20),
 | 
			
		||||
            widget  = wibox.container.margin
 | 
			
		||||
        },
 | 
			
		||||
        right = dpi(100),
 | 
			
		||||
        top = dpi(150),
 | 
			
		||||
        widget  = wibox.container.margin
 | 
			
		||||
        bg = beautiful.transparent,
 | 
			
		||||
        widget = wibox.container.background
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    -- Destroy popups if dont_disturb mode is on
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,31 +37,6 @@ require('module.brightness-osd')
 | 
			
		|||
-- require('module.battery-notifier')
 | 
			
		||||
-- require('module.lockscreen')
 | 
			
		||||
 | 
			
		||||
-- -- {{{ Error handling
 | 
			
		||||
-- -- Check if awesome encountered an error during startup and fell back to
 | 
			
		||||
-- -- another config (This code will only ever execute for the fallback config)
 | 
			
		||||
-- if awesome.startup_errors then
 | 
			
		||||
--     naughty.notify({ preset = naughty.config.presets.critical,
 | 
			
		||||
--                      title = "Oops, there were errors during startup!",
 | 
			
		||||
--                      text = awesome.startup_errors })
 | 
			
		||||
-- end
 | 
			
		||||
 | 
			
		||||
-- -- Handle runtime errors after startup
 | 
			
		||||
-- do
 | 
			
		||||
--     local in_error = false
 | 
			
		||||
--     awesome.connect_signal("debug::error", function (err)
 | 
			
		||||
--         -- Make sure we don't go into an endless error loop
 | 
			
		||||
--         if in_error then return end
 | 
			
		||||
--         in_error = true
 | 
			
		||||
 | 
			
		||||
--         naughty.notify({ preset = naughty.config.presets.critical,
 | 
			
		||||
--                          title = "Oops, an error happened!",
 | 
			
		||||
--                          text = tostring(err) })
 | 
			
		||||
--         in_error = false
 | 
			
		||||
--     end)
 | 
			
		||||
-- end
 | 
			
		||||
-- -- }}}
 | 
			
		||||
 | 
			
		||||
-- {{{ Variable definitions
 | 
			
		||||
-- Themes define colours, icons, font and wallpapers.
 | 
			
		||||
beautiful.init("/home/chris/.config/awesome/theme.lua")
 | 
			
		||||
| 
						 | 
				
			
			@ -560,6 +535,16 @@ awful.keyboard.append_global_keybindings({
 | 
			
		|||
        awful.util.spawn("/home/chris/.dotfiles/rofi/launchers-git/launcher.sh") end,
 | 
			
		||||
              {description = "launch rofi", group = "launcher"}),
 | 
			
		||||
 | 
			
		||||
    -- Window Switcher
 | 
			
		||||
    awful.key({ modkey },   "Tab",     function ()
 | 
			
		||||
        awful.util.spawn("/home/chris/.dotfiles/rofi/launchers-git/windows.sh") end,
 | 
			
		||||
              {description = "launch rofi window switcher", group = "launcher"}),
 | 
			
		||||
 | 
			
		||||
    -- Emoji Selector
 | 
			
		||||
    awful.key({ modkey },   ".",     function ()
 | 
			
		||||
        awful.util.spawn("/home/chris/.dotfiles/rofi/launchers-git/emoji.sh") end,
 | 
			
		||||
              {description = "launch rofi emoji picker", group = "launcher"}),
 | 
			
		||||
 | 
			
		||||
    awful.key({ modkey }, "x",
 | 
			
		||||
              function ()
 | 
			
		||||
                  awful.prompt.run {
 | 
			
		||||
| 
						 | 
				
			
			@ -717,23 +702,20 @@ end)
 | 
			
		|||
--     c:emit_signal("request::activate", "mouse_enter", {raise = false})
 | 
			
		||||
-- end)
 | 
			
		||||
 | 
			
		||||
-- Enable nice titlebars
 | 
			
		||||
nice()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
 | 
			
		||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
 | 
			
		||||
-- }}}
 | 
			
		||||
 | 
			
		||||
-- {{{ Autostart Applications
 | 
			
		||||
awful.spawn.with_shell("picom --experimental-backend")
 | 
			
		||||
awful.spawn.with_shell("libinput-gestures-setup start")
 | 
			
		||||
awful.spawn.with_shell("flameshot")
 | 
			
		||||
awful.spawn.with_shell("xset r rate 220 90")
 | 
			
		||||
-- awful.spawn.with_shell("picom --experimental-backend")
 | 
			
		||||
-- awful.spawn.with_shell("libinput-gestures-setup start")
 | 
			
		||||
-- awful.spawn.with_shell("flameshot")
 | 
			
		||||
-- awful.spawn.with_shell("xset r rate 220 90")
 | 
			
		||||
-- awful.spawn.with_shell("feh --bg-fill ~/Pictures/wallpapers/RoyalKing.png")
 | 
			
		||||
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")
 | 
			
		||||
-- 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")
 | 
			
		||||
 | 
			
		||||
-- }}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
   :propertites {
 | 
			
		||||
                 :border-width beautiful.border_width
 | 
			
		||||
                 :border_color beautiful.border_normal
 | 
			
		||||
                 :focus awful.client.focus.filter
 | 
			
		||||
                 :focus true
 | 
			
		||||
                 :raise true
 | 
			
		||||
                 :screen awful.screen.preferred
 | 
			
		||||
                 :placement (+ awful.placement.no_overlap awful.placement.no_offscreen)
 | 
			
		||||
| 
						 | 
				
			
			@ -23,6 +23,20 @@
 | 
			
		|||
   :rule_any {
 | 
			
		||||
              :class [
 | 
			
		||||
                      "mpv"
 | 
			
		||||
                      ]
 | 
			
		||||
              }
 | 
			
		||||
   :properties {
 | 
			
		||||
                :floating true
 | 
			
		||||
                :raise true
 | 
			
		||||
                :focus true
 | 
			
		||||
                :height 800
 | 
			
		||||
                :screen 2
 | 
			
		||||
                :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
			
		||||
                }
 | 
			
		||||
   }
 | 
			
		||||
  {
 | 
			
		||||
   :rule_any {
 | 
			
		||||
              :class [
 | 
			
		||||
                      "dolphin"
 | 
			
		||||
                      "feh"
 | 
			
		||||
                      "Arandr"
 | 
			
		||||
| 
						 | 
				
			
			@ -36,8 +50,10 @@
 | 
			
		|||
                     "GtkFileChooserDialog"
 | 
			
		||||
                     ]}
 | 
			
		||||
   :properties {
 | 
			
		||||
                :placement awful.placement.centered
 | 
			
		||||
                :floating true
 | 
			
		||||
                :raise true
 | 
			
		||||
                :focus true
 | 
			
		||||
                :placement (+ awful.placement.no_offscreen awful.placement.centered)
 | 
			
		||||
                }
 | 
			
		||||
   }
 | 
			
		||||
  ])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,6 +33,7 @@ theme.red           = "#ff5c57"
 | 
			
		|||
 | 
			
		||||
theme.useless_gap   = dpi(16)
 | 
			
		||||
theme.border_width  = dpi(0)
 | 
			
		||||
theme.transparent   = "#00000000"
 | 
			
		||||
theme.border_normal = "#00000000"
 | 
			
		||||
theme.border_focus  = "#00000000"
 | 
			
		||||
theme.border_marked = "#00000000"
 | 
			
		||||
| 
						 | 
				
			
			@ -71,6 +72,7 @@ theme.tasklist_bg = theme.red
 | 
			
		|||
-- notification_font
 | 
			
		||||
-- notification_[bg|fg]
 | 
			
		||||
-- notification_[width|height|margin]
 | 
			
		||||
theme.notification_margin = 4
 | 
			
		||||
-- notification_[border_color|border_width|shape|opacity]
 | 
			
		||||
 | 
			
		||||
-- Variables set for theming the menu:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										21
									
								
								picom.conf
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								picom.conf
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
#             Corners           #
 | 
			
		||||
#################################
 | 
			
		||||
# requires: https://github.com/sdhand/compton
 | 
			
		||||
corner-radius = 11.0;
 | 
			
		||||
corner-radius = 12.0;
 | 
			
		||||
rounded-corners-exclude = [
 | 
			
		||||
  #"window_type = 'normal'",
 | 
			
		||||
  "class_g = 'awesome'",
 | 
			
		||||
| 
						 | 
				
			
			@ -40,11 +40,11 @@ shadow-opacity = .75
 | 
			
		|||
 | 
			
		||||
# The left offset for shadows, in pixels. (defaults to -15)
 | 
			
		||||
# shadow-offset-x = -15
 | 
			
		||||
shadow-offset-x = 0;
 | 
			
		||||
shadow-offset-x = 3;
 | 
			
		||||
 | 
			
		||||
# The top offset for shadows, in pixels. (defaults to -15)
 | 
			
		||||
# shadow-offset-y = -15
 | 
			
		||||
shadow-offset-y = 0;
 | 
			
		||||
shadow-offset-y = 3;
 | 
			
		||||
 | 
			
		||||
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
 | 
			
		||||
# you should use the *wintypes* option in your config file instead.
 | 
			
		||||
| 
						 | 
				
			
			@ -98,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 = "x90+0+0"
 | 
			
		||||
shadow-exclude-reg = "x0+0+0"
 | 
			
		||||
 | 
			
		||||
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
 | 
			
		||||
# xinerama-shadow-crop = false
 | 
			
		||||
| 
						 | 
				
			
			@ -116,11 +116,11 @@ 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;
 | 
			
		||||
fade-in-step = 0.3;
 | 
			
		||||
 | 
			
		||||
# 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;
 | 
			
		||||
fade-out-step = 0.3;
 | 
			
		||||
 | 
			
		||||
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
 | 
			
		||||
# fade-delta = 10
 | 
			
		||||
| 
						 | 
				
			
			@ -159,7 +159,7 @@ frame-opacity = 0.7;
 | 
			
		|||
inactive-opacity-override = false;
 | 
			
		||||
 | 
			
		||||
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
 | 
			
		||||
active-opacity = 1.0;
 | 
			
		||||
active-opacity = 0.8;
 | 
			
		||||
 | 
			
		||||
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
 | 
			
		||||
# inactive-dim = 0.0
 | 
			
		||||
| 
						 | 
				
			
			@ -196,6 +196,9 @@ opacity-rule = [
 | 
			
		|||
  "70:class_g     = 'TelegramDesktop'",
 | 
			
		||||
  "90:class_g     = 'Joplin'",
 | 
			
		||||
  "100:class_g    = 'firefox'",
 | 
			
		||||
  "100:class_g    = 'dolphin'",
 | 
			
		||||
  "100:class_g    = 'mpv'",
 | 
			
		||||
  "100:class_g    = 'libreoffice'",
 | 
			
		||||
  "100:class_g    = 'Thunderbird'"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -259,7 +262,9 @@ blur-background-exclude = [
 | 
			
		|||
  # when taking selection screenshot with `main`
 | 
			
		||||
  # https://github.com/naelstrof/maim/issues/130
 | 
			
		||||
  "class_g = 'slop'",
 | 
			
		||||
  "_GTK_FRAME_EXTENTS@:c"
 | 
			
		||||
  "_GTK_FRAME_EXTENTS@:c",
 | 
			
		||||
  # "window_type = '_NET_WM_WINDOW_TYPE_NOTIFICATION'"
 | 
			
		||||
  "window_type = 'notification'"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								rofi/launchers-git/windows.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										17
									
								
								rofi/launchers-git/windows.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,17 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
## Author : Aditya Shakya (adi1090x)
 | 
			
		||||
## Mail : adi1090x@gmail.com
 | 
			
		||||
## Github : @adi1090x
 | 
			
		||||
## Reddit : @adi1090x
 | 
			
		||||
 | 
			
		||||
# Available Styles
 | 
			
		||||
# >> Styles Below Only Works With "rofi-git(AUR)", Current Version: 1.5.4-76-gca067234
 | 
			
		||||
#
 | 
			
		||||
# blurry	blurry_full		kde_simplemenu		kde_krunner		launchpad
 | 
			
		||||
# gnome_do	slingshot		appdrawer			appfolder		column
 | 
			
		||||
# row		row_center		screen				row_dock		row_dropdown
 | 
			
		||||
 | 
			
		||||
style="blurry"
 | 
			
		||||
 | 
			
		||||
rofi -no-lazy-grab -show window -modi drun,window,calc,ssh,run,emoji -theme launchers-git/"$style".rasi
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue