Set timer for Xmodmap, change ctrl-o shortcut

This commit is contained in:
Thomas Avé 2023-09-03 14:12:00 +02:00
parent a40501f314
commit 1343b81684
4 changed files with 23 additions and 10 deletions

View File

@ -24,11 +24,8 @@ local run_on_start_up = {
"numlockx on",
"nm-applet",
"xcape -e \"Super_L=Super_L|XF86Launch5\" -t 5000",
"xmodmap /home/user/.Xmodmap",
os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/setup_display.sh",
gears.filesystem.get_configuration_dir() .. "/scripts/setup_display.sh",
"feh --no-fehbg --bg-fill " .. gears.filesystem.get_configuration_dir() .. "/images/wallpaper.png",
-- "/opt/power/powersave.sh",
-- os.getenv("XDG_CONFIG_HOME") .. "/awesome/scripts/setup_display.sh"
}
-- Define layouts
@ -43,8 +40,6 @@ awful.layout.layouts = {
grid,
}
-- Run all the apps listed in run_on_start_up
for _, app in ipairs(run_on_start_up) do
local findme = app
@ -56,6 +51,16 @@ for _, app in ipairs(run_on_start_up) do
awful.spawn.with_shell(string.format("echo 'pgrep -u $USER -x %s > /dev/null || (%s)' | bash -", findme, app), false)
end
-- Start timers
gears.timer {
timeout = 60,
call_now = true,
autostart = true,
callback = function()
awful.spawn.easy_async({"xmodmap", "/home/user/.Xmodmap"}) -- If not repeated it sometimes just stops working
end
}
-- Import Keybinds
local keys = require("keys")
root.keys(keys.globalkeys)

View File

@ -16,7 +16,8 @@ Checks: "*,
-modernize-use-nodiscard
-cppcoreguidelines-narrowing-conversions
-cppcoreguidelines-avoid-magic-numbers
--Wsign-compare
-Wsign-compare
-hicpp-uppercase-literal-suffix
-readability-uppercase-literal-suffix"
WarningsAsErrors: ''
HeaderFilterRegex: ''

View File

@ -11,6 +11,7 @@ local function should_load(path)
[3] = "build",
[4] = "third-party",
[5] = "sfml",
[6] = "TinyXML"
}
local match = {
[1] = ".hpp",

View File

@ -6,7 +6,7 @@ if not hastelescope then
return M
end
M.project_files = function()
M.git_files = function()
local opts = require('telescope.themes').get_ivy({})
opts["show_untracked"] = true
opts["layout_config"] = {height=0.2}
@ -15,6 +15,12 @@ M.project_files = function()
end
end
M.project_files = function()
local opts = require('telescope.themes').get_ivy({})
opts["layout_config"] = {height=0.2}
require"telescope.builtin".find_files(opts)
end
M.buffers = function()
local opts = require('telescope.themes').get_ivy({})
opts["layout_config"] = {height=0.2}
@ -66,8 +72,8 @@ telescope.load_extension('fzf')
vim.keymap.set("n", "<leader>u", function() require("telescope").extensions.undo.undo() end, {noremap = true, silent = true})
vim.keymap.set("n", "<C-p>", function() require('telescope_config').project_files() end, {noremap = true, silent = true})
vim.keymap.set("n", "<C-O>", function() require('telescope_config').buffers() end, { silent = true, noremap = true })
vim.keymap.set("n", "<C-p>", function() require('telescope_config').git_files() end, {noremap = true, silent = true})
vim.keymap.set("n", "<C-O>", function() require('telescope_config').project_files() end, { silent = true, noremap = true })
vim.keymap.set("n", "<C-f>", function() require('telescope.builtin').live_grep{ cwd = vim.fn.systemlist("git rev-parse --show-toplevel 2> /dev/null || pwd")[1] } end, { silent = true, noremap = true })
return M