My nixos configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: too much…

+247 -178
+11
flake.nix
··· 54 54 du -h $isoFull 55 55 rm -f $isoPath 56 56 ''; 57 + 58 + apps.awesome-preview.program = let 59 + rc_lua = pkgs.runCommandNoCC "awesomerc.lua" {} '' 60 + substitute ${./packages/installer/awesomerc.lua} $out \ 61 + --subst-var-by FILE_PATH_WALLPAPER ${./packages/installer/nix-glow-black.png} \ 62 + --subst-var-by NIX_FLAKE_SVG ${./packages/installer/nix-flake.svg} 63 + ''; 64 + in 65 + pkgs.writeShellScriptBin "awesome-preview" '' 66 + ${pkgs.xorg.xorgserver}/bin/Xephyr :5 & sleep 1 ; DISPLAY=:5 ${self'.packages.awesome}/bin/awesome --config ${rc_lua} 67 + ''; 57 68 }; 58 69 59 70 flake = {
+2 -1
packages/installer/awesome.nix
··· 5 5 }: let 6 6 rc_lua = pkgs.runCommandNoCC "awesomerc.lua" {} '' 7 7 substitute ${./awesomerc.lua} $out \ 8 - --subst-var-by FILE_PATH_WALLPAPER ${./nix-glow-black.png} 8 + --subst-var-by FILE_PATH_WALLPAPER ${./nix-glow-black.png} \ 9 + --subst-var-by NIX_FLAKE_SVG ${./nix-flake.svg} 9 10 ''; 10 11 awesome = pkgs.awesome.overrideAttrs (oa: { 11 12 version = npins.awesome.revision;
+228 -176
packages/installer/awesomerc.lua
··· 19 19 local hotkeys_popup = require("awful.hotkeys_popup") 20 20 -- Enable hotkeys help widget for VIM and other apps 21 21 -- when client with a matching name is opened: 22 + 22 23 require("awful.hotkeys_popup.keys") 23 24 24 25 -- {{{ Error handling ··· 27 28 naughty.connect_signal("request::display_error", function(message, startup) 28 29 naughty.notification { 29 30 urgency = "critical", 30 - title = "Oops, an error happened"..(startup and " during startup!" or "!"), 31 + title = "Oops, an error happened" .. (startup and " during startup!" or "!"), 31 32 message = message 32 33 } 33 34 end) ··· 38 39 beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") 39 40 40 41 -- This is used later as the default terminal and editor to run. 41 - terminal = "xterm" 42 - editor = os.getenv("EDITOR") or "nano" 43 - editor_cmd = terminal .. " -e " .. editor 42 + local terminal = "xterm" 43 + local editor = os.getenv("EDITOR") or "nano" 44 + local editor_cmd = terminal .. " -e " .. editor 44 45 45 46 -- Default modkey. 46 47 -- Usually, Mod4 is the key with a logo between Control and Alt. 47 48 -- If you do not like this or do not have such a key, 48 49 -- I suggest you to remap Mod4 to another key using xmodmap or other tools. 49 50 -- However, you can use another modifier like Mod1, but it may interact with others. 50 - modkey = "Mod4" 51 + local modkey = "Mod4" 51 52 -- }}} 52 53 53 54 -- {{{ Menu 54 55 -- Create a launcher widget and a main menu 55 - myawesomemenu = { 56 - { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, 57 - { "manual", terminal .. " -e man awesome" }, 58 - { "edit config", editor_cmd .. " " .. awesome.conffile }, 59 - { "restart", awesome.restart }, 60 - { "quit", function() awesome.quit() end }, 56 + local myawesomemenu = { 57 + { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, 58 + { "manual", terminal .. " -e man awesome" }, 59 + { "edit config", editor_cmd .. " " .. awesome.conffile }, 60 + { "restart", awesome.restart }, 61 + { "quit", function() awesome.quit() end }, 61 62 } 62 63 63 - mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, 64 - { "open terminal", terminal } 65 - } 66 - }) 64 + local mymainmenu = awful.menu({ 65 + items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, 66 + { "open terminal", terminal } 67 + } 68 + }) 67 69 68 - mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, 69 - menu = mymainmenu }) 70 + local mylauncher = awful.widget.launcher({ 71 + image = "@NIX_FLAKE_SVG@", 72 + menu = mymainmenu 73 + }) 70 74 71 75 -- Menubar configuration 72 76 menubar.utils.terminal = terminal -- Set the terminal for applications that require it ··· 116 120 -- {{{ Wibar 117 121 118 122 -- Keyboard map indicator and switcher 119 - mykeyboardlayout = awful.widget.keyboardlayout() 123 + local mykeyboardlayout = awful.widget.keyboardlayout() 120 124 121 125 -- Create a textclock widget 122 - mytextclock = wibox.widget.textclock() 126 + local mytextclock = wibox.widget.textclock() 123 127 124 128 screen.connect_signal("request::desktop_decoration", function(s) 125 129 -- Each screen has its own tag table. 126 - awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) 130 + local svgFillColor = "#d3d3d3" 131 + local svgBase = [[<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">]] 132 + local svgEnd = [[</svg>]] 133 + 134 + local terminalSvg = svgBase .. 135 + [[<path fill="]] .. 136 + svgFillColor .. 137 + [[" d="M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm0 14H4V8h16v10zm-2-1h-6v-2h6v2zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4l-4 4z"/>]] .. 138 + svgEnd 139 + 140 + local globeSvg = svgBase .. 141 + [[<path fill="]] .. 142 + svgFillColor .. 143 + [[" d="M16.36 14c.08-.66.14-1.32.14-2c0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2m-5.15 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56M14.34 14H9.66c-.1-.66-.16-1.32-.16-2c0-.68.06-1.35.16-2h4.68c.09.65.16 1.32.16 2c0 .68-.07 1.34-.16 2M12 19.96c-.83-1.2-1.5-2.53-1.91-3.96h3.82c-.41 1.43-1.08 2.76-1.91 3.96M8 8H5.08A7.923 7.923 0 0 1 9.4 4.44C8.8 5.55 8.35 6.75 8 8m-2.92 8H8c.35 1.25.8 2.45 1.4 3.56A8.008 8.008 0 0 1 5.08 16m-.82-2C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2c0 .68.06 1.34.14 2M12 4.03c.83 1.2 1.5 2.54 1.91 3.97h-3.82c.41-1.43 1.08-2.77 1.91-3.97M18.92 8h-2.95a15.65 15.65 0 0 0-1.38-3.56c1.84.63 3.37 1.9 4.33 3.56M12 2C6.47 2 2 6.5 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z"/>]] .. 144 + svgEnd 145 + 146 + local partedSvg = [[<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">]] .. 147 + [[<path fill="]] .. 148 + svgFillColor .. 149 + [[" d="M13 30a11 11 0 0 1 0-22a1 1 0 0 1 1 1v9h9a1 1 0 0 1 1 1a11 11 0 0 1-11 11Zm-1-19.94A9 9 0 1 0 21.94 20H14a2 2 0 0 1-2-2Z"/><path fill="]] .. 150 + svgFillColor .. 151 + [[" d="M28 14h-9a2 2 0 0 1-2-2V3a1 1 0 0 1 1-1a11 11 0 0 1 11 11a1 1 0 0 1-1 1Zm-9-2h7.94A9 9 0 0 0 19 4.06Z"/>]] .. 152 + svgEnd 153 + 154 + local first = awful.tag.add("1", { 155 + screen = s, 156 + icon_only = true, 157 + icon = terminalSvg, 158 + layout = awful.layout.layouts[1], 159 + }) 160 + 161 + awful.tag.add("2", { 162 + screen = s, 163 + icon_only = true, 164 + icon = globeSvg, 165 + layout = awful.layout.layouts[1], 166 + }) 167 + 168 + awful.tag.add("3", { 169 + screen = s, 170 + icon_only = true, 171 + icon = partedSvg, 172 + layout = awful.layout.layouts[1], 173 + }) 174 + 175 + awful.tag({ "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) 176 + 177 + 178 + first:view_only() 127 179 128 180 -- Create a promptbox for each screen 129 181 s.mypromptbox = awful.widget.prompt() ··· 133 185 s.mylayoutbox = awful.widget.layoutbox { 134 186 screen = s, 135 187 buttons = { 136 - awful.button({ }, 1, function () awful.layout.inc( 1) end), 137 - awful.button({ }, 3, function () awful.layout.inc(-1) end), 138 - awful.button({ }, 4, function () awful.layout.inc(-1) end), 139 - awful.button({ }, 5, function () awful.layout.inc( 1) end), 188 + awful.button({}, 1, function() awful.layout.inc(1) end), 189 + awful.button({}, 3, function() awful.layout.inc(-1) end), 190 + awful.button({}, 4, function() awful.layout.inc(-1) end), 191 + awful.button({}, 5, function() awful.layout.inc(1) end), 140 192 } 141 193 } 142 194 ··· 145 197 screen = s, 146 198 filter = awful.widget.taglist.filter.all, 147 199 buttons = { 148 - awful.button({ }, 1, function(t) t:view_only() end), 200 + awful.button({}, 1, function(t) t:view_only() end), 149 201 awful.button({ modkey }, 1, function(t) 150 - if client.focus then 151 - client.focus:move_to_tag(t) 152 - end 153 - end), 154 - awful.button({ }, 3, awful.tag.viewtoggle), 202 + if client.focus then 203 + client.focus:move_to_tag(t) 204 + end 205 + end), 206 + awful.button({}, 3, awful.tag.viewtoggle), 155 207 awful.button({ modkey }, 3, function(t) 156 - if client.focus then 157 - client.focus:toggle_tag(t) 158 - end 159 - end), 160 - awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end), 161 - awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end), 208 + if client.focus then 209 + client.focus:toggle_tag(t) 210 + end 211 + end), 212 + awful.button({}, 4, function(t) awful.tag.viewprev(t.screen) end), 213 + awful.button({}, 5, function(t) awful.tag.viewnext(t.screen) end), 162 214 } 163 215 } 164 216 ··· 167 219 screen = s, 168 220 filter = awful.widget.tasklist.filter.currenttags, 169 221 buttons = { 170 - awful.button({ }, 1, function (c) 222 + awful.button({}, 1, function(c) 171 223 c:activate { context = "tasklist", action = "toggle_minimization" } 172 224 end), 173 - awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), 174 - awful.button({ }, 4, function() awful.client.focus.byidx(-1) end), 175 - awful.button({ }, 5, function() awful.client.focus.byidx( 1) end), 225 + awful.button({}, 3, function() awful.menu.client_list { theme = { width = 250 } } end), 226 + awful.button({}, 4, function() awful.client.focus.byidx(-1) end), 227 + awful.button({}, 5, function() awful.client.focus.byidx(1) end), 176 228 } 177 229 } 178 230 ··· 189 241 s.mypromptbox, 190 242 }, 191 243 s.mytasklist, -- Middle widget 192 - { -- Right widgets 244 + { -- Right widgets 193 245 layout = wibox.layout.fixed.horizontal, 194 246 mykeyboardlayout, 195 247 wibox.widget.systray(), ··· 204 256 205 257 -- {{{ Mouse bindings 206 258 awful.mouse.append_global_mousebindings({ 207 - awful.button({ }, 3, function () mymainmenu:toggle() end), 208 - awful.button({ }, 4, awful.tag.viewprev), 209 - awful.button({ }, 5, awful.tag.viewnext), 259 + awful.button({}, 3, function() mymainmenu:toggle() end), 260 + awful.button({}, 4, awful.tag.viewprev), 261 + awful.button({}, 5, awful.tag.viewnext), 210 262 }) 211 263 -- }}} 212 264 ··· 214 266 215 267 -- General Awesome keys 216 268 awful.keyboard.append_global_keybindings({ 217 - awful.key({ modkey, }, "s", hotkeys_popup.show_help, 218 - {description="show help", group="awesome"}), 219 - awful.key({ modkey, }, "w", function () mymainmenu:show() end, 220 - {description = "show main menu", group = "awesome"}), 269 + awful.key({ modkey, }, "s", hotkeys_popup.show_help, 270 + { description = "show help", group = "awesome" }), 271 + awful.key({ modkey, }, "w", function() mymainmenu:show() end, 272 + { description = "show main menu", group = "awesome" }), 221 273 awful.key({ modkey, "Control" }, "r", awesome.restart, 222 - {description = "reload awesome", group = "awesome"}), 223 - awful.key({ modkey, "Shift" }, "q", awesome.quit, 224 - {description = "quit awesome", group = "awesome"}), 274 + { description = "reload awesome", group = "awesome" }), 275 + awful.key({ modkey, "Shift" }, "q", awesome.quit, 276 + { description = "quit awesome", group = "awesome" }), 225 277 awful.key({ modkey }, "x", 226 - function () 227 - awful.prompt.run { 228 - prompt = "Run Lua code: ", 229 - textbox = awful.screen.focused().mypromptbox.widget, 230 - exe_callback = awful.util.eval, 231 - history_path = awful.util.get_cache_dir() .. "/history_eval" 232 - } 233 - end, 234 - {description = "lua execute prompt", group = "awesome"}), 235 - awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, 236 - {description = "open a terminal", group = "launcher"}), 237 - awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, 238 - {description = "run prompt", group = "launcher"}), 278 + function() 279 + awful.prompt.run { 280 + prompt = "Run Lua code: ", 281 + textbox = awful.screen.focused().mypromptbox.widget, 282 + exe_callback = awful.util.eval, 283 + history_path = awful.util.get_cache_dir() .. "/history_eval" 284 + } 285 + end, 286 + { description = "lua execute prompt", group = "awesome" }), 287 + awful.key({ modkey, }, "Return", function() awful.spawn(terminal) end, 288 + { description = "open a terminal", group = "launcher" }), 289 + awful.key({ modkey }, "r", function() awful.screen.focused().mypromptbox:run() end, 290 + { description = "run prompt", group = "launcher" }), 239 291 awful.key({ modkey }, "p", function() menubar.show() end, 240 - {description = "show the menubar", group = "launcher"}), 292 + { description = "show the menubar", group = "launcher" }), 241 293 }) 242 294 243 295 -- Tags related keybindings 244 296 awful.keyboard.append_global_keybindings({ 245 - awful.key({ modkey, }, "Left", awful.tag.viewprev, 246 - {description = "view previous", group = "tag"}), 247 - awful.key({ modkey, }, "Right", awful.tag.viewnext, 248 - {description = "view next", group = "tag"}), 249 - awful.key({ modkey, }, "Escape", awful.tag.history.restore, 250 - {description = "go back", group = "tag"}), 297 + awful.key({ modkey, }, "Left", awful.tag.viewprev, 298 + { description = "view previous", group = "tag" }), 299 + awful.key({ modkey, }, "Right", awful.tag.viewnext, 300 + { description = "view next", group = "tag" }), 301 + awful.key({ modkey, }, "Escape", awful.tag.history.restore, 302 + { description = "go back", group = "tag" }), 251 303 }) 252 304 253 305 -- Focus related keybindings 254 306 awful.keyboard.append_global_keybindings({ 255 - awful.key({ modkey, }, "j", 256 - function () 257 - awful.client.focus.byidx( 1) 307 + awful.key({ modkey, }, "j", 308 + function() 309 + awful.client.focus.byidx(1) 258 310 end, 259 - {description = "focus next by index", group = "client"} 311 + { description = "focus next by index", group = "client" } 260 312 ), 261 - awful.key({ modkey, }, "k", 262 - function () 313 + awful.key({ modkey, }, "k", 314 + function() 263 315 awful.client.focus.byidx(-1) 264 316 end, 265 - {description = "focus previous by index", group = "client"} 317 + { description = "focus previous by index", group = "client" } 266 318 ), 267 - awful.key({ modkey, }, "Tab", 268 - function () 319 + awful.key({ modkey, }, "Tab", 320 + function() 269 321 awful.client.focus.history.previous() 270 322 if client.focus then 271 323 client.focus:raise() 272 324 end 273 325 end, 274 - {description = "go back", group = "client"}), 275 - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, 276 - {description = "focus the next screen", group = "screen"}), 277 - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, 278 - {description = "focus the previous screen", group = "screen"}), 326 + { description = "go back", group = "client" }), 327 + awful.key({ modkey, "Control" }, "j", function() awful.screen.focus_relative(1) end, 328 + { description = "focus the next screen", group = "screen" }), 329 + awful.key({ modkey, "Control" }, "k", function() awful.screen.focus_relative(-1) end, 330 + { description = "focus the previous screen", group = "screen" }), 279 331 awful.key({ modkey, "Control" }, "n", 280 - function () 281 - local c = awful.client.restore() 282 - -- Focus restored client 283 - if c then 284 - c:activate { raise = true, context = "key.unminimize" } 285 - end 286 - end, 287 - {description = "restore minimized", group = "client"}), 332 + function() 333 + local c = awful.client.restore() 334 + -- Focus restored client 335 + if c then 336 + c:activate { raise = true, context = "key.unminimize" } 337 + end 338 + end, 339 + { description = "restore minimized", group = "client" }), 288 340 }) 289 341 290 342 -- Layout related keybindings 291 343 awful.keyboard.append_global_keybindings({ 292 - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, 293 - {description = "swap with next client by index", group = "client"}), 294 - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, 295 - {description = "swap with previous client by index", group = "client"}), 296 - awful.key({ modkey, }, "u", awful.client.urgent.jumpto, 297 - {description = "jump to urgent client", group = "client"}), 298 - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, 299 - {description = "increase master width factor", group = "layout"}), 300 - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, 301 - {description = "decrease master width factor", group = "layout"}), 302 - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, 303 - {description = "increase the number of master clients", group = "layout"}), 304 - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, 305 - {description = "decrease the number of master clients", group = "layout"}), 306 - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, 307 - {description = "increase the number of columns", group = "layout"}), 308 - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, 309 - {description = "decrease the number of columns", group = "layout"}), 310 - awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, 311 - {description = "select next", group = "layout"}), 312 - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, 313 - {description = "select previous", group = "layout"}), 344 + awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end, 345 + { description = "swap with next client by index", group = "client" }), 346 + awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end, 347 + { description = "swap with previous client by index", group = "client" }), 348 + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, 349 + { description = "jump to urgent client", group = "client" }), 350 + awful.key({ modkey, }, "l", function() awful.tag.incmwfact(0.05) end, 351 + { description = "increase master width factor", group = "layout" }), 352 + awful.key({ modkey, }, "h", function() awful.tag.incmwfact(-0.05) end, 353 + { description = "decrease master width factor", group = "layout" }), 354 + awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end, 355 + { description = "increase the number of master clients", group = "layout" }), 356 + awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end, 357 + { description = "decrease the number of master clients", group = "layout" }), 358 + awful.key({ modkey, "Control" }, "h", function() awful.tag.incncol(1, nil, true) end, 359 + { description = "increase the number of columns", group = "layout" }), 360 + awful.key({ modkey, "Control" }, "l", function() awful.tag.incncol(-1, nil, true) end, 361 + { description = "decrease the number of columns", group = "layout" }), 362 + awful.key({ modkey, }, "space", function() awful.layout.inc(1) end, 363 + { description = "select next", group = "layout" }), 364 + awful.key({ modkey, "Shift" }, "space", function() awful.layout.inc(-1) end, 365 + { description = "select previous", group = "layout" }), 314 366 }) 315 367 316 368 ··· 320 372 keygroup = "numrow", 321 373 description = "only view tag", 322 374 group = "tag", 323 - on_press = function (index) 375 + on_press = function(index) 324 376 local screen = awful.screen.focused() 325 377 local tag = screen.tags[index] 326 378 if tag then ··· 333 385 keygroup = "numrow", 334 386 description = "toggle tag", 335 387 group = "tag", 336 - on_press = function (index) 388 + on_press = function(index) 337 389 local screen = awful.screen.focused() 338 390 local tag = screen.tags[index] 339 391 if tag then ··· 342 394 end, 343 395 }, 344 396 awful.key { 345 - modifiers = { modkey, "Shift" }, 397 + modifiers = { modkey, "Shift" }, 346 398 keygroup = "numrow", 347 399 description = "move focused client to tag", 348 400 group = "tag", 349 - on_press = function (index) 401 + on_press = function(index) 350 402 if client.focus then 351 403 local tag = client.focus.screen.tags[index] 352 404 if tag then ··· 360 412 keygroup = "numrow", 361 413 description = "toggle focused client on tag", 362 414 group = "tag", 363 - on_press = function (index) 415 + on_press = function(index) 364 416 if client.focus then 365 417 local tag = client.focus.screen.tags[index] 366 418 if tag then ··· 374 426 keygroup = "numpad", 375 427 description = "select layout directly", 376 428 group = "layout", 377 - on_press = function (index) 429 + on_press = function(index) 378 430 local t = awful.screen.focused().selected_tag 379 431 if t then 380 432 t.layout = t.layouts[index] or t.layout ··· 385 437 386 438 client.connect_signal("request::default_mousebindings", function() 387 439 awful.mouse.append_client_mousebindings({ 388 - awful.button({ }, 1, function (c) 440 + awful.button({}, 1, function(c) 389 441 c:activate { context = "mouse_click" } 390 442 end), 391 - awful.button({ modkey }, 1, function (c) 392 - c:activate { context = "mouse_click", action = "mouse_move" } 443 + awful.button({ modkey }, 1, function(c) 444 + c:activate { context = "mouse_click", action = "mouse_move" } 393 445 end), 394 - awful.button({ modkey }, 3, function (c) 395 - c:activate { context = "mouse_click", action = "mouse_resize"} 446 + awful.button({ modkey }, 3, function(c) 447 + c:activate { context = "mouse_click", action = "mouse_resize" } 396 448 end), 397 449 }) 398 450 end) 399 451 400 452 client.connect_signal("request::default_keybindings", function() 401 453 awful.keyboard.append_client_keybindings({ 402 - awful.key({ modkey, }, "f", 403 - function (c) 454 + awful.key({ modkey, }, "f", 455 + function(c) 404 456 c.fullscreen = not c.fullscreen 405 457 c:raise() 406 458 end, 407 - {description = "toggle fullscreen", group = "client"}), 408 - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, 409 - {description = "close", group = "client"}), 410 - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , 411 - {description = "toggle floating", group = "client"}), 412 - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, 413 - {description = "move to master", group = "client"}), 414 - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, 415 - {description = "move to screen", group = "client"}), 416 - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, 417 - {description = "toggle keep on top", group = "client"}), 418 - awful.key({ modkey, }, "n", 419 - function (c) 459 + { description = "toggle fullscreen", group = "client" }), 460 + awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end, 461 + { description = "close", group = "client" }), 462 + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, 463 + { description = "toggle floating", group = "client" }), 464 + awful.key({ modkey, "Control" }, "Return", function(c) c:swap(awful.client.getmaster()) end, 465 + { description = "move to master", group = "client" }), 466 + awful.key({ modkey, }, "o", function(c) c:move_to_screen() end, 467 + { description = "move to screen", group = "client" }), 468 + awful.key({ modkey, }, "t", function(c) c.ontop = not c.ontop end, 469 + { description = "toggle keep on top", group = "client" }), 470 + awful.key({ modkey, }, "n", 471 + function(c) 420 472 -- The client currently has the input focus, so it cannot be 421 473 -- minimized, since minimized clients can't have the focus. 422 474 c.minimized = true 423 - end , 424 - {description = "minimize", group = "client"}), 425 - awful.key({ modkey, }, "m", 426 - function (c) 475 + end, 476 + { description = "minimize", group = "client" }), 477 + awful.key({ modkey, }, "m", 478 + function(c) 427 479 c.maximized = not c.maximized 428 480 c:raise() 429 - end , 430 - {description = "(un)maximize", group = "client"}), 481 + end, 482 + { description = "(un)maximize", group = "client" }), 431 483 awful.key({ modkey, "Control" }, "m", 432 - function (c) 484 + function(c) 433 485 c.maximized_vertical = not c.maximized_vertical 434 486 c:raise() 435 - end , 436 - {description = "(un)maximize vertically", group = "client"}), 437 - awful.key({ modkey, "Shift" }, "m", 438 - function (c) 487 + end, 488 + { description = "(un)maximize vertically", group = "client" }), 489 + awful.key({ modkey, "Shift" }, "m", 490 + function(c) 439 491 c.maximized_horizontal = not c.maximized_horizontal 440 492 c:raise() 441 - end , 442 - {description = "(un)maximize horizontally", group = "client"}), 493 + end, 494 + { description = "(un)maximize horizontally", group = "client" }), 443 495 }) 444 496 end) 445 497 ··· 451 503 -- All clients will match this rule. 452 504 ruled.client.append_rule { 453 505 id = "global", 454 - rule = { }, 506 + rule = {}, 455 507 properties = { 456 508 focus = awful.client.focus.filter, 457 509 raise = true, 458 510 screen = awful.screen.preferred, 459 - placement = awful.placement.no_overlap+awful.placement.no_offscreen 511 + placement = awful.placement.no_overlap + awful.placement.no_offscreen 460 512 } 461 513 } 462 514 463 515 -- Floating clients. 464 516 ruled.client.append_rule { 465 - id = "floating", 466 - rule_any = { 517 + id = "floating", 518 + rule_any = { 467 519 instance = { "copyq", "pinentry" }, 468 520 class = { 469 521 "Arandr", "Blueman-manager", "Gpick", "Kruler", "Sxiv", ··· 471 523 }, 472 524 -- Note that the name property shown in xprop might be set slightly after creation of the client 473 525 -- and the name shown there might not match defined rules here. 474 - name = { 475 - "Event Tester", -- xev. 526 + name = { 527 + "Event Tester", -- xev. 476 528 }, 477 - role = { 478 - "AlarmWindow", -- Thunderbird's calendar. 479 - "ConfigManager", -- Thunderbird's about:config. 480 - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. 529 + role = { 530 + "AlarmWindow", -- Thunderbird's calendar. 531 + "ConfigManager", -- Thunderbird's about:config. 532 + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. 481 533 } 482 534 }, 483 535 properties = { floating = true } ··· 487 539 ruled.client.append_rule { 488 540 id = "titlebars", 489 541 rule_any = { type = { "normal", "dialog" } }, 490 - properties = { titlebars_enabled = true } 542 + properties = { titlebars_enabled = true } 491 543 } 492 544 493 545 -- Set Firefox to always map on the tag named "2" on screen 1. ··· 503 555 client.connect_signal("request::titlebars", function(c) 504 556 -- buttons for the titlebar 505 557 local buttons = { 506 - awful.button({ }, 1, function() 507 - c:activate { context = "titlebar", action = "mouse_move" } 558 + awful.button({}, 1, function() 559 + c:activate { context = "titlebar", action = "mouse_move" } 508 560 end), 509 - awful.button({ }, 3, function() 510 - c:activate { context = "titlebar", action = "mouse_resize"} 561 + awful.button({}, 3, function() 562 + c:activate { context = "titlebar", action = "mouse_resize" } 511 563 end), 512 564 } 513 565 ··· 517 569 buttons = buttons, 518 570 layout = wibox.layout.fixed.horizontal 519 571 }, 520 - { -- Middle 572 + { -- Middle 521 573 { -- Title 522 574 halign = "center", 523 575 widget = awful.titlebar.widget.titlewidget(c) ··· 526 578 layout = wibox.layout.flex.horizontal 527 579 }, 528 580 { -- Right 529 - awful.titlebar.widget.floatingbutton (c), 581 + awful.titlebar.widget.floatingbutton(c), 530 582 awful.titlebar.widget.maximizedbutton(c), 531 - awful.titlebar.widget.stickybutton (c), 532 - awful.titlebar.widget.ontopbutton (c), 533 - awful.titlebar.widget.closebutton (c), 583 + awful.titlebar.widget.stickybutton(c), 584 + awful.titlebar.widget.ontopbutton(c), 585 + awful.titlebar.widget.closebutton(c), 534 586 layout = wibox.layout.fixed.horizontal() 535 587 }, 536 588 layout = wibox.layout.align.horizontal ··· 543 595 ruled.notification.connect_signal('request::rules', function() 544 596 -- All notifications will match this rule. 545 597 ruled.notification.append_rule { 546 - rule = { }, 598 + rule = {}, 547 599 properties = { 548 600 screen = awful.screen.preferred, 549 601 implicit_timeout = 5, ··· 560 612 -- Enable sloppy focus, so that focus follows mouse. 561 613 client.connect_signal("mouse::enter", function(c) 562 614 c:activate { context = "mouse_enter", raise = false } 563 - end) 615 + end)
+5
packages/installer/nix-flake.svg
··· 1 + <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 + <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"> 3 + <path fill="#7ebae4" fill-rule="evenodd" d="M13 11.115L6.183 23.76L4.59 20.87l1.839-3.387l-3.651-.01L2 16.029l.8-1.477l5.2.018l1.868-3.447Zm.527 10.108h13.64l-1.541 2.922l-3.658-.011l1.817 3.389l-.779 1.449h-1.593l-2.584-4.825l-3.722-.008Zm7.94-5.541l-6.82-12.645l3.134-.032L19.6 6.4l1.834-3.379h1.557l.795 1.479l-2.612 4.807l1.854 3.455Z"/> 4 + <path fill="#5277c3" fill-rule="evenodd" d="m10.542 16.324l6.821 12.645l-3.134.031l-1.821-3.4l-1.834 3.38H9.016l-.8-1.476l2.615-4.804l-1.855-3.457Zm7.922-5.573H4.823l1.542-2.922l3.658.011l-1.816-3.389L8.986 3h1.592l2.584 4.825l3.722.008ZM19 20.888l6.817-12.644l1.593 2.89l-1.839 3.386l3.651.01l.778 1.449l-.8 1.477l-5.2-.018l-1.868 3.447Z"/> 5 + </svg>
+1 -1
parts/auxiliary.nix
··· 29 29 30 30 devShells.default = pkgs.mkShell { 31 31 packages = builtins.attrValues { 32 - inherit (pkgs) npins sops age ssh-to-age nil alejandra; 32 + inherit (pkgs) npins sops age ssh-to-age nil alejandra lua-language-server; 33 33 }; 34 34 }; 35 35 };