Compare commits

...

2 Commits

Author SHA1 Message Date
d6994f9535 update 2023-05-08 23:05:14 +02:00
de01388d0d renew config 2023-05-08 23:05:04 +02:00
3 changed files with 98 additions and 51 deletions

View 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
-- }}}

View File

@ -2,54 +2,48 @@
-- found (e.g. lgi). If LuaRocks is not installed, do nothing. -- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader") pcall(require, "luarocks.loader")
-- Standard awesome library
-- {{{ Standard awesome library
local gears = require("gears") local gears = require("gears")
local awful = require("awful") local awful = require("awful")
require("awful.autofocus") require("awful.autofocus")
-- Widget and layout library -- }}}
-- {{{ Widget and layout library
local wibox = require("wibox") local wibox = require("wibox")
-- Theme handling library -- }}}
-- {{{ Theme handling library
local beautiful = require("beautiful") local beautiful = require("beautiful")
-- Notification library -- }}}
-- {{{ Notification library
local naughty = require("naughty") local naughty = require("naughty")
local menubar = require("menubar") local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup") 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: -- when client with a matching name is opened:
require("awful.hotkeys_popup.keys") require("awful.hotkeys_popup.keys")
-- }}}
-- {{{ Error handling -- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to require("main.error-handling")
-- 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 -- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers. -- Themes define colours, icons, font and wallpapers.
-- beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua")
beautiful.init(gears.filesystem.get_xdg_config_home() .. "awesome/themes/zatichi/theme.lua")
-- This is used later as the default terminal and editor to run. -- This is used later as the default terminal and editor to run.
terminal = "termite" terminal = "xterm"
editor = os.getenv("EDITOR") or "nano" editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor editor_cmd = terminal .. " -e " .. editor
@ -230,8 +224,8 @@ root.buttons(gears.table.join(
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = gears.table.join( globalkeys = gears.table.join(
awful.key({ modkey, }, "h", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description ="Montrer l'aide", group="awesome"}), {description="show help", group="awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev, awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}), {description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext, awful.key({ modkey, }, "Right", awful.tag.viewnext,
@ -251,8 +245,8 @@ globalkeys = gears.table.join(
end, end,
{description = "focus previous by index", group = "client"} {description = "focus previous by index", group = "client"}
), ),
awful.key({ modkey, }, "a", function () mymainmenu:show() end, awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "Montrer menu principal", group = "awesome"}), {description = "show main menu", group = "awesome"}),
-- Layout manipulation -- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
@ -276,11 +270,11 @@ globalkeys = gears.table.join(
-- Standard program -- Standard program
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
{description = "Ouvrir un terminal", group = "launcher"}), {description = "open a terminal", group = "launcher"}),
awful.key({ modkey, }, "r", awesome.restart, awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "Recharger awesome", group = "awesome"}), {description = "reload awesome", group = "awesome"}),
awful.key({ modkey, }, "q", awesome.quit, awful.key({ modkey, "Shift" }, "q", awesome.quit,
{description = "Quitter awesome", group = "awesome"}), {description = "quit awesome", group = "awesome"}),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}), {description = "increase master width factor", group = "layout"}),
@ -312,8 +306,8 @@ globalkeys = gears.table.join(
{description = "restore minimized", group = "client"}), {description = "restore minimized", group = "client"}),
-- Prompt -- Prompt
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
-- {description = "run prompt", group = "launcher"}), {description = "run prompt", group = "launcher"}),
awful.key({ modkey }, "x", awful.key({ modkey }, "x",
function () function ()

View File

@ -18,22 +18,38 @@ lvim.format_on_save.enabled = false
lvim.colorscheme = "onedark_dark" lvim.colorscheme = "onedark_dark"
lvim.background = "dark" lvim.background = "dark"
lvim.transparent_window = true 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 -- to disable icons and use a minimalist setup, uncomment the following
-- lvim.use_icons = false -- 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.leader = ";"
lvim.keys.insert_mode[";;"] = "<Esc>" 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-s>"] = "<CMD>w<CR>"
lvim.keys.normal_mode["<C-u>"] = ":undo<CR>" lvim.keys.normal_mode["<C-r>"] = "<CMD>redo<CR>"
lvim.keys.normal_mode["<C-[>"] = "<<" lvim.keys.normal_mode["<C-u>"] = "<CMD>undo<CR>"
lvim.keys.normal_mode["<C-]>"] = ">>" 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[";"] lvim.builtin.which_key.mappings["d"] = lvim.builtin.which_key.mappings[";"]
@ -331,13 +347,22 @@ lvim.plugins = {
}) })
end, 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 -- suda
{ {
'lambdalisue/suda.vim', 'lambdalisue/suda.vim',
-- setup = function() config = function()
-- -- vim.g.prompt = 'Mot de passe: ', vim.g.prompt = 'Mot de passe: '
-- vim.g.suda_smart_edit = 1, vim.g.suda_smart_edit = 1
-- end, end,
}, },
-- telescope-project -- telescope-project
{ {