Compare commits
2 Commits
a557801b56
...
d6994f9535
Author | SHA1 | Date | |
---|---|---|---|
d6994f9535 | |||
de01388d0d |
28
conf.d/awesome/main/error-handling.lua
Normal file
28
conf.d/awesome/main/error-handling.lua
Normal file
@ -0,0 +1,28 @@
|
||||
-- Notification library
|
||||
local naughty = require("naughty")
|
||||
|
||||
-- {{{ 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
|
||||
-- }}}
|
||||
|
@ -2,54 +2,48 @@
|
||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||
pcall(require, "luarocks.loader")
|
||||
|
||||
-- Standard awesome library
|
||||
|
||||
-- {{{ Standard awesome library
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
require("awful.autofocus")
|
||||
-- Widget and layout library
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ Widget and layout library
|
||||
local wibox = require("wibox")
|
||||
-- Theme handling library
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ Theme handling library
|
||||
local beautiful = require("beautiful")
|
||||
-- Notification library
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ Notification library
|
||||
local naughty = require("naughty")
|
||||
local menubar = require("menubar")
|
||||
local hotkeys_popup = require("awful.hotkeys_popup")
|
||||
-- Enable hotkeys help widget for VIM and other apps
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ Enable hotkeys help widget for VIM and other apps
|
||||
-- when client with a matching name is opened:
|
||||
require("awful.hotkeys_popup.keys")
|
||||
-- }}}
|
||||
|
||||
|
||||
-- {{{ 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
|
||||
require("main.error-handling")
|
||||
-- }}
|
||||
|
||||
-- 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(gears.filesystem.get_themes_dir() .. "default/theme.lua")
|
||||
beautiful.init(gears.filesystem.get_xdg_config_home() .. "awesome/themes/zatichi/theme.lua")
|
||||
beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
|
||||
|
||||
-- This is used later as the default terminal and editor to run.
|
||||
terminal = "termite"
|
||||
terminal = "xterm"
|
||||
editor = os.getenv("EDITOR") or "nano"
|
||||
editor_cmd = terminal .. " -e " .. editor
|
||||
|
||||
@ -230,8 +224,8 @@ root.buttons(gears.table.join(
|
||||
|
||||
-- {{{ Key bindings
|
||||
globalkeys = gears.table.join(
|
||||
awful.key({ modkey, }, "h", hotkeys_popup.show_help,
|
||||
{description ="Montrer l'aide", group="awesome"}),
|
||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||
{description="show help", group="awesome"}),
|
||||
awful.key({ modkey, }, "Left", awful.tag.viewprev,
|
||||
{description = "view previous", group = "tag"}),
|
||||
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||
@ -251,8 +245,8 @@ globalkeys = gears.table.join(
|
||||
end,
|
||||
{description = "focus previous by index", group = "client"}
|
||||
),
|
||||
awful.key({ modkey, }, "a", function () mymainmenu:show() end,
|
||||
{description = "Montrer menu principal", group = "awesome"}),
|
||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||
{description = "show main menu", group = "awesome"}),
|
||||
|
||||
-- Layout manipulation
|
||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||
@ -276,11 +270,11 @@ globalkeys = gears.table.join(
|
||||
|
||||
-- Standard program
|
||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||
{description = "Ouvrir un terminal", group = "launcher"}),
|
||||
awful.key({ modkey, }, "r", awesome.restart,
|
||||
{description = "Recharger awesome", group = "awesome"}),
|
||||
awful.key({ modkey, }, "q", awesome.quit,
|
||||
{description = "Quitter awesome", group = "awesome"}),
|
||||
{description = "open a terminal", group = "launcher"}),
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||
{description = "reload awesome", group = "awesome"}),
|
||||
awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||
{description = "quit awesome", group = "awesome"}),
|
||||
|
||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
|
||||
{description = "increase master width factor", group = "layout"}),
|
||||
@ -312,8 +306,8 @@ globalkeys = gears.table.join(
|
||||
{description = "restore minimized", group = "client"}),
|
||||
|
||||
-- Prompt
|
||||
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||
-- {description = "run prompt", group = "launcher"}),
|
||||
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||
{description = "run prompt", group = "launcher"}),
|
||||
|
||||
awful.key({ modkey }, "x",
|
||||
function ()
|
||||
|
@ -18,22 +18,38 @@ lvim.format_on_save.enabled = false
|
||||
lvim.colorscheme = "onedark_dark"
|
||||
lvim.background = "dark"
|
||||
lvim.transparent_window = true
|
||||
-- to enable neo-tree file browsing, comment the following
|
||||
lvim.builtin.nvimtree.active = false
|
||||
-- to disable icons and use a minimalist setup, uncomment the following
|
||||
-- lvim.use_icons = false
|
||||
|
||||
|
||||
|
||||
-- keymappings [view all the defaults by pressing <leader>Lk]
|
||||
-- variables
|
||||
--
|
||||
|
||||
|
||||
|
||||
-- functions
|
||||
--
|
||||
|
||||
|
||||
|
||||
-- keymappings [view all the defaults by pressing <leader>Lvk]
|
||||
--
|
||||
|
||||
lvim.leader = ";"
|
||||
|
||||
lvim.keys.insert_mode[";;"] = "<Esc>"
|
||||
lvim.keys.normal_mode["<C-s>"] = ":w<CR>"
|
||||
lvim.keys.normal_mode["<C-r>"] = ":redo<CR>"
|
||||
lvim.keys.normal_mode["<C-u>"] = ":undo<CR>"
|
||||
lvim.keys.normal_mode["<C-[>"] = "<<"
|
||||
lvim.keys.normal_mode["<C-]>"] = ">>"
|
||||
|
||||
lvim.keys.normal_mode["<C-s>"] = "<CMD>w<CR>"
|
||||
lvim.keys.normal_mode["<C-r>"] = "<CMD>redo<CR>"
|
||||
lvim.keys.normal_mode["<C-u>"] = "<CMD>undo<CR>"
|
||||
lvim.keys.normal_mode["<C-[>"] = ":<<CR>"
|
||||
lvim.keys.normal_mode["<C-]>"] = ":><CR>"
|
||||
|
||||
-- remap neo-tree shortcut to rnvimr
|
||||
lvim.lsp.buffer_mappings.normal_mode[';e'] = { "<CMD>RnvimrToggle<CR>", "File explorer" }
|
||||
|
||||
lvim.builtin.which_key.mappings["d"] = lvim.builtin.which_key.mappings[";"]
|
||||
|
||||
@ -331,13 +347,22 @@ lvim.plugins = {
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"kevinhwang91/rnvimr",
|
||||
cmd = "RnvimrToggle",
|
||||
config = function()
|
||||
vim.g.rnvimr_draw_border = 1
|
||||
vim.g.rnvimr_pick_enable = 1
|
||||
vim.g.rnvimr_bw_enable = 1
|
||||
end,
|
||||
},
|
||||
-- suda
|
||||
{
|
||||
'lambdalisue/suda.vim',
|
||||
-- setup = function()
|
||||
-- -- vim.g.prompt = 'Mot de passe: ',
|
||||
-- vim.g.suda_smart_edit = 1,
|
||||
-- end,
|
||||
config = function()
|
||||
vim.g.prompt = 'Mot de passe: '
|
||||
vim.g.suda_smart_edit = 1
|
||||
end,
|
||||
},
|
||||
-- telescope-project
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user