Backup
This commit is contained in:
parent
811660e30a
commit
01e4fe7095
|
@ -68,6 +68,7 @@ in
|
|||
sound.enable = true;
|
||||
|
||||
system.stateVersion = "19.03";
|
||||
home-manager.users.adrielus.home.stateVersion = "19.03";
|
||||
|
||||
# TODO: put nixpkgs stuff inside their own file
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if status is-interactive
|
||||
and not set -q TMUX
|
||||
exec tmux attach -t Welcome || tmux
|
||||
exec tmux attach -t Welcome || tmux || echo "Something went wrong trying to start tmux"
|
||||
end
|
||||
|
||||
set fish_cursor_default block # Set the normal and visual mode cursors to a block
|
||||
|
|
|
@ -83,14 +83,10 @@ local abbreviations = {
|
|||
{ "dhx", "h'(x)" }, -- Basic commands
|
||||
{ "mangle", "\\measuredangle" },
|
||||
{ "aangle", "\\angle" },
|
||||
{ "creq", "\\\\&=" },
|
||||
{ "aeq", "&=" },
|
||||
{ "leq", "\\leq" },
|
||||
{ "geq", "\\geq" },
|
||||
|
||||
{ "sdiff", "\\setminus" },
|
||||
{ "sst", "\\subset" },
|
||||
{ "sseq", "\\subseteq" },
|
||||
{ "neq", "\\neq" },
|
||||
{ "nin", "\\not\\in" },
|
||||
{ "iin", "\\in" },
|
||||
{ "tto", "\\to" },
|
||||
|
@ -135,7 +131,15 @@ local abolishAbbreviations = {
|
|||
{ "dete{,s}", "determinant{}" },
|
||||
{ "bcla", "by contradiction let's assume" },
|
||||
{ "ort{n,g}", "orto{normal,gonal}" },
|
||||
{ "l{in,de}", "linearly {independent,dependent}" }
|
||||
{ "l{in,de}", "linearly {independent,dependent}" },
|
||||
{ "wlg", "without loss of generality" },
|
||||
|
||||
-- My own operator syntax:
|
||||
-- - Any operator can be prefixed with "a" to
|
||||
-- align in aligned mode
|
||||
-- - Any operator can be prefixed with cr to
|
||||
-- start a new line and align in aligned mode
|
||||
{ "{cr,a,}{eq,neq,leq,geq,lt,gt}", "{\\\\\\&,&,}{=,\\neq,\\leq,\\geq,<,>}" }
|
||||
}
|
||||
|
||||
A.manyLocalAbbr(abbreviations)
|
||||
|
|
4
dotfiles/neovim/lua/.luarc.json
Normal file
4
dotfiles/neovim/lua/.luarc.json
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.workspace.checkThirdParty": false
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
local M = {}
|
||||
|
||||
local function swap(key)
|
||||
vim.keymap.set("n", key, "g" .. key, { buffer = true })
|
||||
vim.keymap.set("n", "g" .. key, key, { buffer = true })
|
||||
vim.keymap.set("nv", key, "g" .. key, { buffer = true })
|
||||
vim.keymap.set("nv", "g" .. key, key, { buffer = true })
|
||||
end
|
||||
|
||||
-- Same as swap, but the key is aprt of an arpeggio chord
|
||||
local function swapArpeggio(key)
|
||||
vim.keymap.set("n", "<Plug>(arpeggio-default:" .. key .. ")", "g" .. key, { buffer = true })
|
||||
vim.keymap.set("n", "g" .. key, key, { buffer = true })
|
||||
vim.keymap.set("nv", "<Plug>(arpeggio-default:" .. key .. ")", "g" .. key, { buffer = true })
|
||||
vim.keymap.set("nv", "g" .. key, key, { buffer = true })
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
|
|
|
@ -34,25 +34,27 @@ function M.delimitedTextobject(from, to, name, perhapsOpts)
|
|||
end
|
||||
|
||||
function M.setup()
|
||||
-- I rarely use macro stuff
|
||||
M.move("q", "yq", { desc = "Record macro" })
|
||||
M.move("Q", "yQ")
|
||||
|
||||
-- Free these up for easymotion-style plugins
|
||||
-- vim.keymap.set("n", "s", "<Nop>")
|
||||
-- vim.keymap.set("n", "S", "<Nop>")
|
||||
|
||||
M.move("<C-^>", "<Leader>a", { desc = "Go to previous file" })
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "qn", function()
|
||||
vim.keymap.set({ "n", "v" }, "<leader>q", function()
|
||||
local buf = vim.api.nvim_win_get_buf(0)
|
||||
|
||||
-- Only save if file is writable
|
||||
if vim.bo[buf].modifiable and not vim.bo[buf].readonly then
|
||||
vim.cmd [[write]]
|
||||
end
|
||||
if vim.bo[buf].modifiable and not vim.bo[buf].readonly then vim.cmd [[write]] end
|
||||
|
||||
vim.cmd "q"
|
||||
end, { desc = "Quit current buffer" })
|
||||
|
||||
vim.keymap.set("n", "Q", ":wqa<cr>", { desc = "Save all files and quit" })
|
||||
vim.keymap.set("n", "<leader>rw", ":%s/<C-r><C-w>/", {
|
||||
desc = "Replace word in file"
|
||||
})
|
||||
vim.keymap.set("n", "<leader>rw", ":%s/<C-r><C-w>/", { desc = "Replace word in file" })
|
||||
|
||||
M.delimitedTextobject("q", '"', "quotes")
|
||||
M.delimitedTextobject("a", "'", "'")
|
||||
|
@ -70,18 +72,10 @@ function M.setup()
|
|||
if status then
|
||||
wk.register({
|
||||
["<leader>"] = {
|
||||
f = {
|
||||
name = "Files"
|
||||
},
|
||||
g = {
|
||||
name = "Go to"
|
||||
},
|
||||
r = {
|
||||
name = "Rename / Replace / Reload"
|
||||
},
|
||||
["<leader>"] = {
|
||||
name = "Easymotion"
|
||||
},
|
||||
f = { name = "Files" },
|
||||
g = { name = "Go to" },
|
||||
r = { name = "Rename / Replace / Reload" },
|
||||
l = { name = "Local" },
|
||||
v = "which_key_ignore"
|
||||
}
|
||||
})
|
||||
|
|
|
@ -38,9 +38,10 @@ function M.setup()
|
|||
"saadparwaiz1/cmp_luasnip", -- snippet support for cmp
|
||||
"wakatime/vim-wakatime", -- track time usage
|
||||
"vmchale/dhall-vim", -- dhall syntax highlighting
|
||||
-- "folke/which-key.nvim", -- shows what other keys I can press to finish a command
|
||||
"folke/which-key.nvim", -- shows what other keys I can press to finish a command
|
||||
{ "psliwka/vim-smoothie", opt = true }, -- smooth scrolling
|
||||
"easymotion/vim-easymotion", -- removes the need for spamming w or e
|
||||
-- "easymotion/vim-easymotion", -- removes the need for spamming w or e
|
||||
"ggandor/leap.nvim", -- removes the need for spamming w or e
|
||||
"tpope/vim-surround", -- work with brackets, quotes, tags, etc
|
||||
"MunifTanjim/nui.nvim", -- ui stuff required by idris2
|
||||
"ShinKage/idris2-nvim", -- idris2 support
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
local opts = function(desc)
|
||||
return { desc = desc, silent = true }
|
||||
end
|
||||
|
||||
local modes = { "n", "v", "o" }
|
||||
|
||||
vim.keymap.set(modes, "qf", "<Plug>(easymotion-bd-f)", opts("Hop to char"))
|
||||
vim.keymap.set(modes, "qj", "<Plug>(easymotion-overwin-f2)", opts("Hop to char pair"))
|
||||
vim.keymap.set(modes, "qw", "<Plug>(easymotion-bd-w)", opts("Hop to word"))
|
||||
vim.keymap.set(modes, "qL", "<Plug>(easymotion-bd-L)", opts("Hop to line (?)"))
|
||||
|
||||
local status, wk = pcall(require, "which-key")
|
||||
|
||||
if status then wk.register({ q = { name = "Easymotion" } }, { mode = "o" }) end
|
||||
end
|
||||
|
||||
return M
|
|
@ -6,7 +6,6 @@ function M.setup()
|
|||
require('fidget').setup()
|
||||
require('dressing').setup()
|
||||
|
||||
require("my.plugins.easymotion").setup()
|
||||
require("my.plugins.autopairs").setup()
|
||||
require("my.plugins.telescope").setup()
|
||||
require("my.plugins.surround").setup()
|
||||
|
@ -49,6 +48,7 @@ function M.setup()
|
|||
require("my.plugins.paperplanes").setup()
|
||||
end
|
||||
|
||||
require("my.plugins.leap").setup()
|
||||
require("my.plugins.hydra").setup()
|
||||
require("my.plugins.clipboard-image").setup()
|
||||
require("my.plugins.mind").setup()
|
||||
|
|
10
dotfiles/neovim/lua/my/plugins/leap.lua
Normal file
10
dotfiles/neovim/lua/my/plugins/leap.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
require("leap").add_default_mappings()
|
||||
end
|
||||
|
||||
-- (something)
|
||||
-- something
|
||||
|
||||
return M
|
|
@ -1,9 +1,18 @@
|
|||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
vim.g.neovide_floating_blur_amount_x = 2.0
|
||||
vim.g.neovide_floating_blur_amount_y = 2.0
|
||||
-- vim.g.neovide_transparency = 0.8
|
||||
-- vim.g.neovide_floating_blur_amount_x = 3.0
|
||||
-- vim.g.neovide_floating_blur_amount_y = 3.0
|
||||
-- vim.g.neovide_transparency = 1.0
|
||||
-- vim.g.pumblend = 30
|
||||
|
||||
-- vim.api.nvim_create_autocmd("WinEnter", {
|
||||
-- group = vim.api.nvim_create_augroup("Setup transparency", {}),
|
||||
-- pattern = "*",
|
||||
-- callback = function()
|
||||
-- vim.wo.winblend = 30
|
||||
-- end
|
||||
-- })
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -19,17 +19,13 @@ local keybinds = {
|
|||
{ "<Leader>fp", find_files_by_extension("purs"), "Find purescript files" },
|
||||
{ "<Leader>d", "diagnostics", "Diagnostics" },
|
||||
{ "<C-F>", "live_grep", "Search in project" },
|
||||
{ "<Leader>t", "builtin", "Show builtin pickers" },
|
||||
{ "<Leader>t", "builtin", "Show builtin pickers" }
|
||||
}
|
||||
|
||||
local chords = {
|
||||
{ "jp", "file_browser" }
|
||||
}
|
||||
local chords = { { "jp", "file_browser" } }
|
||||
|
||||
local function mkAction(action)
|
||||
if not string.find(action, "theme=") then
|
||||
action = with_theme(action, defaultTheme)
|
||||
end
|
||||
if not string.find(action, "theme=") then action = with_theme(action, defaultTheme) end
|
||||
|
||||
return ":Telescope " .. action .. "<cr>"
|
||||
end
|
||||
|
@ -39,9 +35,7 @@ local function setupKeybinds()
|
|||
vim.keymap.set("n", mapping[1], mkAction(mapping[2]), { desc = mapping[3] })
|
||||
end
|
||||
|
||||
for _, mapping in pairs(chords) do
|
||||
arpeggio.chord("n", mapping[1], mkAction(mapping[2]))
|
||||
end
|
||||
for _, mapping in pairs(chords) do arpeggio.chord("n", mapping[1], mkAction(mapping[2])) end
|
||||
end
|
||||
|
||||
function M.setup()
|
||||
|
@ -50,11 +44,7 @@ function M.setup()
|
|||
local settings = {
|
||||
defaults = { mappings = { i = { ["<C-h>"] = "which_key" } } },
|
||||
pickers = { find_files = { hidden = true } },
|
||||
extensions = {
|
||||
file_browser = {
|
||||
path = "%:p:h"
|
||||
}
|
||||
}
|
||||
extensions = { file_browser = { path = "%:p:h" } }
|
||||
}
|
||||
|
||||
require("telescope").setup(settings)
|
||||
|
|
|
@ -4,7 +4,8 @@ local M = {}
|
|||
|
||||
function M.setup()
|
||||
wk.setup({
|
||||
triggers = { "<leader>", "d", "y", "q", "z", "g", "c" },
|
||||
-- triggers = { "<leader>", "d", "y", "q", "z", "g", "c" },
|
||||
triggers = {},
|
||||
show_help = false,
|
||||
show_keys = false
|
||||
})
|
||||
|
|
36
flake.lock
36
flake.lock
|
@ -75,7 +75,7 @@
|
|||
"stylix",
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659649195,
|
||||
|
@ -284,19 +284,20 @@
|
|||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1667907331,
|
||||
"narHash": "sha256-bHkAwkYlBjkupPUFcQjimNS8gxWSWjOTevEuwdnp5m0=",
|
||||
"lastModified": 1670253003,
|
||||
"narHash": "sha256-/tJIy4+FbsQyslq1ipyicZ2psOEd8dvl4OJ9lfisjd0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6639e3a837fc5deb6f99554072789724997bc8e5",
|
||||
"rev": "0e8125916b420e41bf0d23a0aa33fadd0328beb3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-22.05",
|
||||
"ref": "release-22.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -583,16 +584,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669861251,
|
||||
"narHash": "sha256-QyBI5QNT/nQRkCsZHnN3ImKCaxrtMArVqNioA7diwU4=",
|
||||
"lastModified": 1670263920,
|
||||
"narHash": "sha256-oR1rtMcWCvpGa81vvaHpONLFfZJpq1ijnHypujGA/lw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "af4d0d532f413ad2fbb3a13f47c98c9fca1948e1",
|
||||
"rev": "29423d0cfac3baa05f804c399f1b043068b531f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "release-22.05",
|
||||
"ref": "release-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -779,6 +780,21 @@
|
|||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1642700792,
|
||||
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
description = "NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-22.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-22.11";
|
||||
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.05";
|
||||
url = "github:nix-community/home-manager/release-22.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 8;
|
||||
nix.settings.max-jobs = lib.mkDefault 8;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
./git
|
||||
./shells
|
||||
# ./wakatime
|
||||
./xmonad
|
||||
./rofi
|
||||
# ./xmodmap
|
||||
|
||||
|
@ -17,7 +16,7 @@
|
|||
./locale.nix
|
||||
# ./memes.nix
|
||||
./alacritty.nix
|
||||
./postgres.nix
|
||||
# ./postgres.nix
|
||||
./neovim.nix
|
||||
./tmux.nix
|
||||
./kmonad.nix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ pkgs, ... }: {
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# time.timeZone = "Europe/Bucharest";
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
@ -8,6 +8,10 @@
|
|||
# ibus.engines = with pkgs.ibus-engines; [ /* any engine you want, for example */ anthy ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.source-code-pro
|
||||
];
|
||||
|
||||
console = {
|
||||
keyMap = "us";
|
||||
font = "SourceCodePro";
|
||||
|
|
|
@ -32,9 +32,6 @@ let
|
|||
in
|
||||
{
|
||||
home-manager.users.adrielus.programs = {
|
||||
# Add tmux-navigator plugin to neovim
|
||||
# neovim.extraPackages = [ pkgs.vimPlugins.vim-tmux-navigator ];
|
||||
|
||||
tmux = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
# xsession.windowManager.xmonad = {
|
||||
# enable = true;
|
||||
# enableContribAndExtras = true;
|
||||
# config = ./Main.hs;
|
||||
# };
|
||||
|
||||
home.packages = with pkgs; [ xwallpaper ];
|
||||
|
||||
# Tell KDE to use xmonad
|
||||
# home.file.".config/plasma-workspace/env/set_window_manager.sh".text =
|
||||
# "export KDEWM=/home/adrielus/.nix-profile/bin/xmonad";
|
||||
|
||||
services.picom = {
|
||||
enable = false;
|
||||
blur = true;
|
||||
shadow = false;
|
||||
extraOptions = ''
|
||||
blur:
|
||||
{
|
||||
method = "gaussian";
|
||||
size = 10;
|
||||
deviation = 5.0;
|
||||
};
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -85,8 +85,6 @@ in
|
|||
};
|
||||
|
||||
opacity = transparency;
|
||||
|
||||
gtk_theme_variant = v "light" "dark";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# https://www.codyhiar.com/blog/how-to-set-desktop-wallpaper-on-nixos/
|
||||
{ pkgs, config, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = with pkgs; [ xwallpaper ];
|
||||
xdg.configFile."wallpaper".source = pkgs.myThemes.current.wallpaper;
|
||||
xsession = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue