From 948b03fad9196c8e0df55b47b0bb082e1ad7b068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be> Date: Sun, 7 Jan 2024 14:55:48 +0100 Subject: [PATCH 1/4] Noevim fzf telescope --- hypr/hyprland.conf | 2 +- hypr/hyprsome/src/main.rs | 2 +- nvim/lua/plugins.lua | 2 +- nvim/lua/settings.lua | 2 +- nvim/lua/telescope_config.lua | 19 ++++++++++++++++++- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 26c9d78..7220076 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -138,7 +138,7 @@ bind = $mainMod, SPACE, togglesplit, # dwindle bind = CONTROL_L ALT_L, L, exec, swaylock bind = $mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"}' | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy bind = $mainMod, Y, exec, /home/user/.config/rofi/rofi-ykman.sh -bind = Super_L Control_L, Q, exec, systemctl suspend + bind = $mainMod, Escape, exec, rofi -show power-menu -modi power-menu:$scripts/rofi-power-menu bind = ,XF86PowerOff, exec, rofi -show power-menu -modi power-menu:$scripts/rofi-power-menu diff --git a/hypr/hyprsome/src/main.rs b/hypr/hyprsome/src/main.rs index 8db2946..c8f8854 100644 --- a/hypr/hyprsome/src/main.rs +++ b/hypr/hyprsome/src/main.rs @@ -11,7 +11,7 @@ use hyprland_ipc::{client, monitor, option, workspace}; #[command(name = "hyprsome")] #[command(author = "sopa0")] #[command(version = "0.1.11")] -#[command(about = "Makes hyprland workspaces behave like awesome", long_about = None)] +#[command(about = "Makes hyprland workspaces behave like awesome")] struct Cli { #[command(subcommand)] command: Commands, diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index d9949c3..6c1eeac 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -54,7 +54,7 @@ require('lazy').setup({ {'numToStr/Comment.nvim', config = function () require('Comment').setup() end}, {'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons', opt = true }}, {'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, - {'nvim-telescope/telescope.nvim', dependencies = {'nvim-lua/plenary.nvim'}}, + {'nvim-telescope/telescope.nvim', dependencies = {'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-fzy-native.nvim'}}, {'nvim-tree/nvim-tree.lua', dependencies = {'nvim-tree/nvim-web-devicons'}, tag = 'nightly'}, {'nvim-treesitter/nvim-treesitter', build = ":TSUpdate"}, {'williamboman/mason-lspconfig.nvim', dependencies = {'williamboman/mason.nvim', 'neovim/nvim-lspconfig'}}, diff --git a/nvim/lua/settings.lua b/nvim/lua/settings.lua index a623c70..5bcda26 100644 --- a/nvim/lua/settings.lua +++ b/nvim/lua/settings.lua @@ -34,7 +34,7 @@ vim.g.mapleader = "," vim.g.python_highlight_all = 1 vim.wo.signcolumn = "number" vim.wo.relativenumber = true -vim.g.rooter_patterns = {".git", "Makefile", "CMakeLists.txt", "build/"} +vim.g.rooter_patterns = {".git", "Makefile", "CMakeLists.txt", "build/", "meson.build"} vim.g.rooter_silent_chdir = 1 -- Vimtex diff --git a/nvim/lua/telescope_config.lua b/nvim/lua/telescope_config.lua index f48fb34..3a12006 100644 --- a/nvim/lua/telescope_config.lua +++ b/nvim/lua/telescope_config.lua @@ -27,6 +27,15 @@ M.buffers = function() require"telescope.builtin".buffers(opts) end +M.fuzzyFindFiles = function() + require"telescope.builtin".grep_string({ + path_display = { 'smart' }, + only_sort_text = true, + word_match = "-w", + search = '', + }) +end + local actions = require("telescope.actions") require("telescope").setup{ defaults = { @@ -47,6 +56,8 @@ require("telescope").setup{ ["<C-k>"] = actions.move_selection_previous, }, }, + file_sorter = require'telescope.sorters'.get_fzy_sorter, + generic_sorter = require'telescope.sorters'.get_fzy_sorter, }, extensions = { undo = { @@ -64,16 +75,22 @@ require("telescope").setup{ }, } + }, + fzy_native = { + override_generic_sorter = false, + override_file_sorter = true, } } telescope.load_extension("undo") telescope.load_extension('fzf') +telescope.load_extension('fzy_native') 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').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 }) +-- 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 }) +vim.keymap.set("n", "<C-f>", function() require('telescope_config').fuzzyFindFiles() end, { silent = true, noremap = true }) return M From fd144648a9247744a82e10adbe6f3acadc78cb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be> Date: Sun, 7 Jan 2024 14:56:12 +0100 Subject: [PATCH 2/4] Add date to waybar --- waybar/config | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/waybar/config b/waybar/config index 3faa6a3..d0dce99 100644 --- a/waybar/config +++ b/waybar/config @@ -2,14 +2,15 @@ "layer": "top", // Waybar at top layer "height": 30, // Waybar height (to be removed for auto height) "spacing": 4, // Gaps between modules (4px) - "output": "eDP-1", + "output": "DP-1", "modules-left": ["wlr/taskbar"], "modules-center": ["hyprland/workspaces"], - "modules-right": ["tray", "wireplumber", "cpu#cpu2", "cpu", "memory", "custom/updates", "temperature", "battery", "clock"], + "modules-right": ["tray", "wireplumber", "cpu#cpu2", "cpu", "memory", "custom/updates", "temperature", "battery", "clock#clock2", "clock"], "wlr/taskbar": { "on-click": "activate", "on-click-right": "close", - "format": "{icon} {title:.15}" + "format": "{icon} {title:.30}", + "all-outputs": true }, "wireplumber": { "format": "{icon} {volume}%", @@ -34,7 +35,12 @@ "timezone": "Europe/Brussels", "format": "{:%H:%M:%S}", "interval": 1, - "format-alt": "{:%Y-%m-%d %H:%M:%S}" + + }, + "clock#clock2": { + "timezone": "Europe/Brussels", + "format": "{:%Y-%m-%d}", + "interval": 3600, }, "cpu": { From a358987fa27b5ff1e0da4a6fa36577e6f018e526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be> Date: Sun, 7 Jan 2024 14:57:38 +0100 Subject: [PATCH 3/4] Migrate Alacritty config --- alacritty/alacritty.toml | 110 +++++++++++++++++++++++++++++++++++++++ alacritty/alacritty.yml | 67 ------------------------ 2 files changed, 110 insertions(+), 67 deletions(-) create mode 100644 alacritty/alacritty.toml delete mode 100644 alacritty/alacritty.yml diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml new file mode 100644 index 0000000..4285323 --- /dev/null +++ b/alacritty/alacritty.toml @@ -0,0 +1,110 @@ +[colors.bright] +black = "#555555" +blue = "#00afff" +cyan = "#50cdfe" +green = "#b0e05e" +magenta = "#af87ff" +red = "#f5669c" +white = "#ffffff" +yellow = "#fef26c" + +[colors.normal] +black = "#121212" +blue = "#0f7fcf" +cyan = "#42a7cf" +green = "#97e123" +magenta = "#8700ff" +red = "#fa2573" +white = "#bbbbbb" +yellow = "#dfd460" + +[colors.primary] +background = "#000010" +foreground = "#F8F8F2" + +[font] +size = 14 + +[font.bold] +family = "Source Code Pro" +style = "Bold" + +[font.bold_italic] +family = "Source Code Pro" +style = "Bold Italic" + +[font.italic] +family = "Source Code Pro" +style = "Italic" + +[font.normal] +family = "Source Code Pro" +style = "Regular" + +[[keyboard.bindings]] +action = "ToggleFullscreen" +key = "F11" + +[[keyboard.bindings]] +action = "ToggleViMode" +key = "Escape" +mode = "Vi" + +[[keyboard.bindings]] +action = "ScrollHalfPageUp" +key = "E" +mode = "Vi" +mods = "Control" + +[[keyboard.bindings]] +chars = "\u001B[72;6u" +key = "H" +mods = "Control|Shift" + +[[keyboard.bindings]] +chars = "\u001B[74;6u" +key = "J" +mods = "Control|Shift" + +[[keyboard.bindings]] +chars = "\u001B[75;6u" +key = "K" +mods = "Control|Shift" + +[[keyboard.bindings]] +chars = "\u001B[76;6u" +key = "L" +mods = "Control|Shift" + +[[keyboard.bindings]] +chars = "\u001B[105;5u" +key = "I" +mods = "Control" + +[[keyboard.bindings]] +chars = "\u001B[46;5u" +key = "Period" +mods = "Control" + +[[keyboard.bindings]] +chars = "\u001B[44;5u" +key = "Comma" +mods = "Control" + +[[keyboard.bindings]] +chars = "\u001B[59;5u" +key = "Semicolon" +mods = "Control" + +[[keyboard.bindings]] +chars = "\u001B[13;2u" +key = "Return" +mods = "Shift" + +[scrolling] +history = 10000 + +[window] +dynamic_padding = true +dynamic_title = true +opacity = 0.5 diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml deleted file mode 100644 index 17423c9..0000000 --- a/alacritty/alacritty.yml +++ /dev/null @@ -1,67 +0,0 @@ -font: - normal: - family: Source Code Pro - style: Regular - - bold: - family: Source Code Pro - style: Bold - - italic: - family: Source Code Pro - style: Italic - - bold_italic: - family: Source Code Pro - style: Bold Italic - - size: 14 - -# Colors (Molokai Dark) -colors: - # Default colors - primary: - background: '#000010' - foreground: '#F8F8F2' - - normal: - black: '#121212' - red: '#fa2573' - green: '#97e123' - yellow: '#dfd460' - blue: '#0f7fcf' - magenta: '#8700ff' - cyan: '#42a7cf' - white: '#bbbbbb' - - bright: - black: '#555555' - red: '#f5669c' - green: '#b0e05e' - yellow: '#fef26c' - blue: '#00afff' - magenta: '#af87ff' - cyan: '#50cdfe' - white: '#ffffff' - -key_bindings: - - { key: F11, action: ToggleFullscreen } - - { key: Escape, mode: Vi, action: ToggleViMode} - - { key: E, mods: Control, mode: Vi, action: ScrollHalfPageUp} - - { key: H, mods: Control|Shift, chars: "\x1b[72;6u" } - - { key: J, mods: Control|Shift, chars: "\x1b[74;6u" } - - { key: K, mods: Control|Shift, chars: "\x1b[75;6u" } - - { key: L, mods: Control|Shift, chars: "\x1b[76;6u" } - - { key: I, mods: Control, chars: "\x1b[105;5u" } - - { key: Period, mods: Control, chars: "\x1b[46;5u" } - - { key: Comma, mods: Control, chars: "\x1b[44;5u" } - - { key: Semicolon, mods: Control, chars: "\x1b[59;5u" } - - { key: Return, mods: Shift, chars: "\x1b[13;2u" } - -scrolling: - history: 10000 - -window: - dynamic_padding: true - opacity: 0.5 - dynamic_title: true From 8eb2532e1e91bff93b2e011199e792e9e03b5d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= <email@thomasave.be> Date: Sun, 7 Jan 2024 14:58:38 +0100 Subject: [PATCH 4/4] Update nvim lazy --- nvim/lazy-lock.json | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 0053ca0..2f4c87e 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -3,37 +3,38 @@ "bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-snippy": { "branch": "master", "commit": "6e39210aa3a74e2bf6462f492eaf0d436cd2b7d3" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" }, "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "lush.nvim": { "branch": "main", "commit": "f76741886b356586f9dfe8e312fbd1ab0fd1084f" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "neogit": { "branch": "master", "commit": "6d445e4272635ba7eff1346693148aa41b2b99de" }, - "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, + "lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" }, + "lush.nvim": { "branch": "main", "commit": "e8a58f36c256af65cda36878f6f2024a612154c3" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0989bdf4fdf7b5aa4c74131d7ffccc3f399ac788" }, + "mason.nvim": { "branch": "main", "commit": "e110bc3be1a7309617cecd77bfe4bf86ba1b8134" }, + "neogit": { "branch": "master", "commit": "760d6d74c328ce2a38b02677bf5161999b992da2" }, + "nvim-autopairs": { "branch": "master", "commit": "9fd41181693dd4106b3e414a822bb6569924de81" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "796394fd19fb878e8dbc4fd1e9c9c186ed07a5f4" }, "nvim-snippy": { "branch": "master", "commit": "7c8f18e90cad4f56c4e22a49101668735639f286" }, "nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" }, - "nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" }, - "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, - "oil.nvim": { "branch": "master", "commit": "a173b5776c66a31ce08552677c1eae7ab015835f" }, + "nvim-treesitter": { "branch": "master", "commit": "8cd2b230174efbf7b5d9f49fe2f90bda6b5eb16e" }, + "nvim-web-devicons": { "branch": "master", "commit": "db0c864375c198cacc171ff373e76bfce2a85045" }, + "oil.nvim": { "branch": "master", "commit": "a128e6f75c6a71b7b9ac7ea663949a5209771cd5" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, "telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" }, - "telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" }, - "tree-sitter-hypr": { "branch": "master", "commit": "da3c1d780c8e04446722ece04beadb6a44eb442d" }, + "telescope.nvim": { "branch": "master", "commit": "87e92ea31b2b61d45ad044cf7b2d9b66dad2a618" }, + "tree-sitter-hypr": { "branch": "master", "commit": "9bd008f08ffbfb94146ce9d4f31002de66f0e627" }, "trim.nvim": { "branch": "master", "commit": "629b96a303a3a0bb5fd050e6cd9d627ca7831cc7" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "vim-bracketed-paste": { "branch": "master", "commit": "45411da73cc159e4fc2138d930553d247bbfbcdc" }, "vim-hypr-nav": { "branch": "main", "commit": "6ab4865a7eb5aad35305298815a4563c9d48556a" }, "vim-rooter": { "branch": "master", "commit": "1353fa47ee3a81083c284e28ff4f7d92655d7c9e" }, - "vim-snippets": { "branch": "master", "commit": "ec4ff7e9c9b274e93295924e59c82b4f51e2ae42" }, - "vimtex": { "branch": "master", "commit": "8dad59abe76c7a9ad3485d3015b8101b2e737892" }, + "vim-snippets": { "branch": "master", "commit": "ba72b08e04e184ecd0a2a1b8012a81ddb040dbc3" }, + "vimtex": { "branch": "master", "commit": "f9b19d09ee6f0ba70dad0b5c2e710dd700681000" }, "vimwiki": { "branch": "dev", "commit": "0bb1b4945bb205a076a35b66174e5d66be8eaafe" } } \ No newline at end of file