Compare commits

..

No commits in common. "d6994f9535063b315f265ca4c8f76ee0c9ce25b2" and "a557801b56beb011262c40dba08c04bfeeb90097" have entirely different histories.

3 changed files with 51 additions and 98 deletions

View File

@ -1,28 +0,0 @@
-- 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,48 +2,54 @@
-- 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
require("main.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 -- {{{ 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 = "xterm" terminal = "termite"
editor = os.getenv("EDITOR") or "nano" editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor editor_cmd = terminal .. " -e " .. editor
@ -224,8 +230,8 @@ root.buttons(gears.table.join(
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = gears.table.join( globalkeys = gears.table.join(
awful.key({ modkey, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "h", hotkeys_popup.show_help,
{description="show help", group="awesome"}), {description ="Montrer l'aide", 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,
@ -245,8 +251,8 @@ globalkeys = gears.table.join(
end, end,
{description = "focus previous by index", group = "client"} {description = "focus previous by index", group = "client"}
), ),
awful.key({ modkey, }, "w", function () mymainmenu:show() end, awful.key({ modkey, }, "a", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}), {description = "Montrer menu principal", 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,
@ -270,11 +276,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 = "open a terminal", group = "launcher"}), {description = "Ouvrir un terminal", group = "launcher"}),
awful.key({ modkey, "Control" }, "r", awesome.restart, awful.key({ modkey, }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}), {description = "Recharger awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", awesome.quit, awful.key({ modkey, }, "q", awesome.quit,
{description = "quit awesome", group = "awesome"}), {description = "Quitter 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"}),
@ -306,8 +312,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,38 +18,22 @@ 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
-- variables -- keymappings [view all the defaults by pressing <leader>Lk]
--
-- 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-s>"] = "<CMD>w<CR>" lvim.keys.normal_mode["<C-r>"] = ":redo<CR>"
lvim.keys.normal_mode["<C-r>"] = "<CMD>redo<CR>" lvim.keys.normal_mode["<C-u>"] = ":undo<CR>"
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-]>"] = ">>"
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[";"]
@ -347,22 +331,13 @@ 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',
config = function() -- setup = 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
{ {