diff options
| author | eric.marin <maarin.eric@gmail.com> | 2025-03-24 08:42:44 +0100 |
|---|---|---|
| committer | eric.marin <maarin.eric@gmail.com> | 2025-09-07 21:19:28 +0200 |
| commit | 5798601f2527b6535fbafba7e22de4dd53954718 (patch) | |
| tree | f045e8af54d09e7c19186c29d20ee0a28f2743d3 | |
| parent | 04d957a4d276c6c18570d6d658b17bed36f3190b (diff) | |
| download | dotfiles-5798601f2527b6535fbafba7e22de4dd53954718.tar.gz dotfiles-5798601f2527b6535fbafba7e22de4dd53954718.zip | |
update
Diffstat (limited to '')
| -rw-r--r-- | .gitignore | 34 | ||||
| -rw-r--r-- | fish/config.fish | 10 | ||||
| -rw-r--r-- | hypr/hypridle.conf | 4 | ||||
| -rw-r--r-- | hypr/hyprlock.conf | 48 | ||||
| -rw-r--r-- | nvim/lazy-lock.json | 36 | ||||
| -rw-r--r-- | nvim/lua/config/options.lua | 4 | ||||
| -rw-r--r-- | nvim/lua/plugins/lspsaga.lua | 3 | ||||
| -rw-r--r-- | nvim/lua/plugins/mini-starter.lua | 7 | ||||
| -rw-r--r-- | nvim/lua/plugins/nvim-lspconfig.lua | 150 | ||||
| -rw-r--r-- | nvim/lua/plugins/nvim-parinfer.lua | 5 | ||||
| -rw-r--r-- | nvim/lua/plugins/telescope.lua | 41 | ||||
| -rw-r--r-- | rofi/applauncher.rasi | 48 | ||||
| -rw-r--r-- | rofi/powermenu.rasi | 46 | ||||
| -rw-r--r-- | rofi/wallpapermenu.rasi | 41 | ||||
| -rwxr-xr-x | scripts/powermenu | 36 | ||||
| -rwxr-xr-x | scripts/set_background | 3 | ||||
| -rwxr-xr-x | scripts/wallpapermenu | 6 | ||||
| -rw-r--r-- | wallust/templates/niri | 51 | ||||
| -rw-r--r-- | wallust/templates/rofi-applauncher | 48 | ||||
| -rw-r--r-- | wallust/templates/rofi-powermenu | 46 | ||||
| -rw-r--r-- | wallust/templates/rofi-wallpapermenu | 41 | ||||
| -rw-r--r-- | wallust/templates/waybar | 15 | ||||
| -rw-r--r-- | wallust/wallust.toml | 9 | ||||
| -rw-r--r-- | waybar/config | 17 |
24 files changed, 566 insertions, 183 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bdcd91a --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +Electron +Pinta +VirtualBox +bluetuith +btop +dconf +discord +draw.io +fish/fish_variables +foot/foot.ini +fuzzel/fuzzel.ini +ghc +git +go/telemetry/local +godot +google-chrome +heroic +lazygit +mako +niri +obsidian +paru +pulse +spicetify +spotify +tlpui +torbrowser +waybar/style.css +wireshark +QtProject.conf +mimeapps.list +user-dirs.dirs +user-dirs.locale +hypr/hyprlock.conf diff --git a/fish/config.fish b/fish/config.fish index 616d877..50941d1 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -1,7 +1,11 @@ #!/bin/fish function fish_prompt - printf '%s%s%s $ ' \ (set_color $fish_color_cwd) (prompt_pwd --full-length-dirs 5) (set_color normal) + printf (if fish_is_root_user + echo '%s%s%s # ' + else + echo '%s%s%s $ ' + end) \ (set_color $fish_color_cwd) (prompt_pwd --full-length-dirs 5) (set_color normal) end function start_niri @@ -19,9 +23,13 @@ end fish_add_path -p ~/.cargo/bin ~/.ghcup/bin set -U fish_greeting set EDITOR "neovim" +export DISPLAY=:0 if status is-login start_niri kill $fish_pid end + +# Created by `pipx` on 2025-05-03 19:57:49 +set PATH $PATH /home/eric.marin/.local/bin diff --git a/hypr/hypridle.conf b/hypr/hypridle.conf index 3479819..7f9a435 100644 --- a/hypr/hypridle.conf +++ b/hypr/hypridle.conf @@ -1,5 +1,7 @@ general { lock_cmd = pidof hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session && niri msg action power-off-monitors + inhibit_sleep = 1 } listener { @@ -10,5 +12,5 @@ listener { listener { timeout = 360 - on-timeout = loginctl lock-session && niri msg action power-off-monitors + on-timeout = systemctl suspend } diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf deleted file mode 100644 index 776d9e1..0000000 --- a/hypr/hyprlock.conf +++ /dev/null @@ -1,48 +0,0 @@ -general { - hide_cursor = true - ignore_empty_input = true - immediate_render = true - disable_loading_bar = true -} - -background { - monitor = eDP-1 - path = /home/eric.marin/Pictures/Backgrounds/dorohedoro.webp - blur_passes = 2 - blur_size = 1 -} -input-field { - monitor = eDP-1 - size = 500, 100 - outline_thickness = 2 - dots_size = 0.3 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.35 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = false - outer_color = rgb(132,83,84) - inner_color = rgb(33,33,24) - font_color = rgb(241,239,218) - fade_on_empty = true - - placeholder_text = <i></i> - fail_text = <i>Wrong Password...</i> - fail_color = rgb(169,87,88) - - position = 0, -300 - halign = center - valign = center -} -label { - monitor = eDP-1 - text = cmd[update:1000] date +"%H:%M:%S" - color = rgb(241,239,218) - font_size = 100 - font_family = Hack Nerd Font - - position = 0, 300 - halign = center - valign = center - - shadow_passes = 1 - shadow_color = rgb(33,33,24) -} - diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..1d36ca4 --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,36 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, + "lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, + "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, + "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, + "mini.starter": { "branch": "main", "commit": "03a124f307ebfb9fd05a0e6503d30605c32a9e1a" }, + "nabla.nvim": { "branch": "master", "commit": "9b69b709063ccf40ac36fabb4fff7d90b3736475" }, + "neopywal": { "branch": "master", "commit": "09188d79b45694141ec779d05cbcc75f994639d1" }, + "neorg": { "branch": "main", "commit": "e206c9642f4a115cd836e76c98ef785623d335bc" }, + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, + "nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" }, + "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, + "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, + "nvim-lspconfig": { "branch": "master", "commit": "036885e8e5456d3907626b634693234f628afef6" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" }, + "oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" }, + "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, + "vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" }, + "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index bf92bb5..deeeb2e 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua @@ -1,9 +1,9 @@ local opt = vim.opt -- Indent -opt.softtabstop = 2 +opt.tabstop = 2 opt.shiftwidth = 2 -opt.expandtab = true +opt.expandtab = false opt.smartindent = true opt.wrap = false diff --git a/nvim/lua/plugins/lspsaga.lua b/nvim/lua/plugins/lspsaga.lua index d6faadc..b87260a 100644 --- a/nvim/lua/plugins/lspsaga.lua +++ b/nvim/lua/plugins/lspsaga.lua @@ -1,4 +1,7 @@ local config = function() + vim.diagnostic.config({ + severity_sort = true, + }) require("lspsaga").setup({ ui = { code_action = "", diff --git a/nvim/lua/plugins/mini-starter.lua b/nvim/lua/plugins/mini-starter.lua index 1532c73..8b216a1 100644 --- a/nvim/lua/plugins/mini-starter.lua +++ b/nvim/lua/plugins/mini-starter.lua @@ -177,6 +177,13 @@ Quotes = { The question of whether computers can think is like the question of whether submarines can swim. ~ Edsger Dijkstra ]], + [[ + Of course, I'd also suggest that whoever was the genius who thought it was a good idea to read + things ONE F*CKING BYTE AT A TIME with system calls for each byte should be retroactively aborted. + Who the f*ck does idiotic things like that? How did they not die as babies, considering that they + were likely too stupid to find a tit to suck on? + ~ Linus Torvalds + ]] } diff --git a/nvim/lua/plugins/nvim-lspconfig.lua b/nvim/lua/plugins/nvim-lspconfig.lua index 22435e6..639734e 100644 --- a/nvim/lua/plugins/nvim-lspconfig.lua +++ b/nvim/lua/plugins/nvim-lspconfig.lua @@ -1,5 +1,5 @@ local config = function() - local lspconfig = require("lspconfig") + local lsp = vim.lsp local capabilities = require("cmp_nvim_lsp").default_capabilities() -- setting custom signs @@ -9,85 +9,107 @@ local config = function() vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) end - local on_attach = function(client, bufnr) - local keymap = vim.keymap - local lsp = vim.lsp - local opts = { noremap = true, silent = true, buffer = bufnr, desc = "" } + vim.api.nvim_create_autocmd('LspAttach', { + callback = function(ev) + local client = lsp.get_client_by_id(ev.data.client_id) + local keymap = vim.keymap + local opts = { noremap = true, silent = true, buffer = ev.buf, desc = "" } - -- setting custom keymaps - opts.desc = "Finder" - keymap.set("n", "<Space>lf", ":Lspsaga finder<Enter>", opts) -- go to definition - opts.desc = "Peek Definition (Lspsaga)" - keymap.set("n", "<Space>lp", ":Lspsaga peek_definition<Enter>", opts) -- peak definition - opts.desc = "Goto Definition (Lspsaga)" - keymap.set("n", "<Space>lg", ":Lspsaga goto_definition<Enter>", opts) -- go to definition - opts.desc = "Code Action (Lspsaga)" - keymap.set("n", "<Space>la", ":Lspsaga code_action<Enter>", opts) -- see available code actions - opts.desc = "Rename (Lspsaga)" - keymap.set("n", "<Space>lr", ":Lspsaga rename<Enter>", opts) -- smart rename - opts.desc = "Hover Documentation (Lspsaga)" - keymap.set("n", "<Space>lk", lsp.buf.hover, opts) -- show documentation for what is under cursor - opts.desc = "Outline (Lspsaga)" - keymap.set("n", "<Space>lo", ":Lspsaga outline<Enter>", opts) -- show outline - opts.desc = "Diagnostic (Lspsaga)" - keymap.set("n", "<Space>ld", ":Lspsaga show_workspace_diagnostics<Enter>", opts) -- show diagnostics + -- setting custom keymaps + opts.desc = "Finder" + keymap.set("n", "<Space>lf", ":Lspsaga finder<Enter>", opts) -- go to definition + opts.desc = "Peek Definition (Lspsaga)" + keymap.set("n", "<Space>lp", ":Lspsaga peek_definition<Enter>", opts) -- peak definition + opts.desc = "Goto Definition (Lspsaga)" + keymap.set("n", "<Space>lg", ":Lspsaga goto_definition<Enter>", opts) -- go to definition + opts.desc = "Code Action (Lspsaga)" + keymap.set("n", "<Space>la", ":Lspsaga code_action<Enter>", opts) -- see available code actions + opts.desc = "Rename (Lspsaga)" + keymap.set("n", "<Space>lr", ":Lspsaga rename<Enter>", opts) -- smart rename + opts.desc = "Hover Documentation (Lspsaga)" + keymap.set("n", "<Space>lk", lsp.buf.hover, opts) -- show documentation for what is under cursor + opts.desc = "Outline (Lspsaga)" + keymap.set("n", "<Space>lo", ":Lspsaga outline<Enter>", opts) -- show outline + opts.desc = "Diagnostic (Lspsaga)" + keymap.set("n", "<Space>ld", ":Lspsaga show_workspace_diagnostics<Enter>", opts) -- show diagnostics - keymap.del("n", "K", { buffer = bufnr }) - - -- enable auto formatting on save - if client.supports_method("textDocument/formatting") then - vim.api.nvim_create_autocmd("BufWritePre", { - buffer = bufnr, - callback = function() - vim.lsp.buf.format({ async = true }) - end, - }) + -- enable auto formatting on save + if client ~= nil and client:supports_method("textDocument/formatting") then + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = ev.buf, + callback = function() + lsp.buf.format({ async = true }) + end, + }) + end end - end + }) - -- efm server configuration - -- lspconfig.efm.setup({ - -- init_options = { - -- documentFormatting = true, - -- documentRangeFormatting = true, - -- hover = true, - -- documentSymbol = true, - -- codeAction = true, - -- completion = true, - -- }, - -- }) - -- clangd server configuration - lspconfig.clangd.setup({ - on_attach = on_attach, + vim.api.nvim_create_autocmd('LspDetach', { + callback = function(ev) + local client = lsp.get_client_by_id(ev.data.client_id) + local keymap = vim.keymap + keymap.del("n", "<Space>lf") + keymap.del("n", "<Space>lp") + keymap.del("n", "<Space>lg") + keymap.del("n", "<Space>la") + keymap.del("n", "<Space>lr") + keymap.del("n", "<Space>lk") + keymap.del("n", "<Space>lo") + keymap.del("n", "<Space>ld") + if client ~= nil and client:supports_method('textDocument/formatting') then + vim.api.nvim_clear_autocmds({ + event = 'BufWritePre', + buffer = ev.buf, + }) + end + end, + }) + + -- C/C++ + lsp.enable("clangd") + lsp.config("clangd", { + capabilities = capabilities, + }) + -- Rust + lsp.enable("rust_analyzer") + lsp.config("rust_analyzer", { capabilities = capabilities, }) - -- rust analyzer server configuration - lspconfig.rust_analyzer.setup({ - on_attach = on_attach, + -- Haskell + lsp.enable("hls") + lsp.config("hls", { capabilities = capabilities, + settings = { + ['haskell'] = { + cabalFormattingProvider = "cabal-fmt", + formattingProvider = "ormolu" + }, + }, }) - -- haskell-language-server configuration - lspconfig.hls.setup({ - on_attach = on_attach, + -- Lua + lsp.enable("lua_ls") + lsp.config("lua_ls", { capabilities = capabilities, }) - -- lua-language-server configuration - lspconfig.lua_ls.setup({ - on_attach = on_attach, + -- JavaScript/Typescript + lsp.enable("ts_ls") + lsp.config("ts_ls", { capabilities = capabilities, }) - lspconfig.ts_ls.setup({ - on_attach = on_attach, + -- CSS + lsp.enable("cssls") + lsp.config("cssls", { capabilities = capabilities, }) - -- cssls-language-server configuration - lspconfig.cssls.setup({ - on_attach = on_attach, + -- Meson + lsp.enable("mesonlsp") + lsp.config("mesonlsp", { capabilities = capabilities, }) - -- mesonlsp configuration - lspconfig.mesonlsp.setup({ - on_attach = on_attach, + -- Zig + lsp.enable("zls") + lsp.config("zls", { capabilities = capabilities, }) end diff --git a/nvim/lua/plugins/nvim-parinfer.lua b/nvim/lua/plugins/nvim-parinfer.lua new file mode 100644 index 0000000..8775f83 --- /dev/null +++ b/nvim/lua/plugins/nvim-parinfer.lua @@ -0,0 +1,5 @@ +return { + "gpanders/nvim-parinfer", + lazy = true, + ft = "lisp" +} diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index bc29d8c..0f6d853 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -10,36 +10,27 @@ local init = function() opts.desc = "All commands (Telescope)" keymap.set("n", "<Space>ta", ":Telescope<Enter>", opts) -- All commands opts.desc = "Find words (Telescope)" - keymap.set("n", "<Space>tg", ":Telescope live_grep<Enter>", opts) -- Find words + keymap.set("n", "<Space>tw", ":Telescope live_grep<Enter>", opts) -- Find words opts.desc = "Buffers (Telescope)" keymap.set("n", "<Space>tb", ":Telescope buffers<Enter>", opts) -- Buffers end -local opts = { - defaults = { - mappings = { - i = { - ["<C-j>"] = "move_selection_next", - ["<C-k>"] = "move_selection_previous", +local config = function() + require("telescope").setup({ + defaults = require("telescope.themes").get_ivy(), + pickers = { + find_files = { + hidden = true, }, + builtin = { + previewer = false, + }, + help_tags = { + previewer = false, + } }, - }, - picker = { - find_files = { - theme = "dropdown", - previewer = false, - hidden = true, - }, - live_grep = { - theme = "dropdown", - previewer = false, - }, - find_buffers = { - theme = "dropdown", - previewer = false, - }, - }, -} + }) +end return { "nvim-telescope/telescope.nvim", @@ -47,5 +38,5 @@ return { lazy = true, cmd = "Telescope", init = init, - opts = opts, + config = config, } diff --git a/rofi/applauncher.rasi b/rofi/applauncher.rasi new file mode 100644 index 0000000..e75f06d --- /dev/null +++ b/rofi/applauncher.rasi @@ -0,0 +1,48 @@ +@theme "/dev/null" + +configuration { + drun-display-format: "{name}"; + show-icons: true; + icon-theme: "Papirus"; + terminal: "foot -o pad=0x0"; + matching: "fuzzy"; +} + +* { + background-color: #130A0C; + color: #D7D1C0; +} + +window { + location: north west; + anchor: center; + width: 589; + y-offset: -22; + x-offset: 260; + padding: 3 0 3 5; +} + +mainbox { + orientation: horizontal; +} + +inputbar { + children: [ prompt, entry ]; + spacing: 5; +} +prompt { + font: "Hack Nerd Font Mono 10"; +} +entry { + font: "Hack Nerd Font 10"; + placeholder: "..."; + width: 50; +} + +listview { + spacing: 10; + layout: horizontal; +} +element-text { + font: "Hack Nerd Font 10"; +} diff --git a/rofi/powermenu.rasi b/rofi/powermenu.rasi new file mode 100644 index 0000000..403f235 --- /dev/null +++ b/rofi/powermenu.rasi @@ -0,0 +1,46 @@ +@theme "/dev/null" + +configuration { + show-icons: false; +} + +* { + background-color: #130A0C; +} + +window { + children: [ horibox ]; + border: 1; + border-color: #72595E; + padding: 5; + width: 416px; +} + +horibox { + orientation: horizontal; + children: [ listview ]; +} + +listview { + layout: horizontal; + spacing: 5; + lines: 6; +} + +element { + text-color: #D7D1C0; + background-color: #33272A; + padding: 15; +} + +element-text { + font: "Symbols Nerd Font Mono 25"; + text-color: inherit; + background-color: inherit; + vertical-align: 0.5; +} + +element selected{ + text-color: inherit; + background-color: #95736A; +} diff --git a/rofi/wallpapermenu.rasi b/rofi/wallpapermenu.rasi new file mode 100644 index 0000000..c8f1c69 --- /dev/null +++ b/rofi/wallpapermenu.rasi @@ -0,0 +1,41 @@ +@theme "/dev/null" + +* { + background-color: #130A0C; +} + +window { + children: [ horibox ]; + border: 1; + border-color: #72595E; + padding: 5; + width: 797; +} + +horibox { + orientation: horizontal; + children: [ listview ]; +} + +listview { + layout: horizontal; + spacing: 5; + children: [element-icon]; +} + +element { + border-color: #33272A; + border: 1; + children: [element-icon]; +} + +element-icon { + expand: true; + size: 33%; + squared: false; +} + +element selected{ + text-color: inherit; + border-color: #95736A; +} diff --git a/scripts/powermenu b/scripts/powermenu index 5dd5d19..ef68e29 100755 --- a/scripts/powermenu +++ b/scripts/powermenu @@ -1,20 +1,26 @@ #!/usr/bin/fish -set poweroff " Poweroff" -set reboot " Reboot" -set lock " Lock" -set exit " Exit" +set poweroff "" +set reboot "" +set lock "" +set exit "" +set sleep "" +set hibernate "" -set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit" | fuzzel --dmenu --lines 4 --width 15 --prompt "" --placeholder "") +set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit\n$sleep\n$hibernate" | rofi -dmenu -theme ~/.config/rofi/powermenu.rasi) switch $chosen - case $poweroff - shutdown now - case $reboot - reboot - case $lock - loginctl lock-session - case $exit - niri msg action quit - case '*' - exit 1 +case $poweroff + shutdown now +case $reboot + reboot +case $lock + loginctl lock-session +case $exit + niri msg action quit +case $sleep + systemctl suspend +case $hibernate + systemctl hibernate +case '*' + exit 1 end diff --git a/scripts/set_background b/scripts/set_background index e8846fb..1ba3665 100755 --- a/scripts/set_background +++ b/scripts/set_background @@ -5,8 +5,9 @@ if test (count $argv) -lt 1; or not test -f $argv[1] exit 1 end -set -x SWWW_TRANSITION "random" +set -x SWWW_TRANSITION "any" set -x SWWW_TRANSITION_FPS 60 +set -x SWWW_TRANSITION_DURATION 2 set -U img $argv[1] niri msg action do-screen-transition diff --git a/scripts/wallpapermenu b/scripts/wallpapermenu index 9a3de1d..7f436ac 100755 --- a/scripts/wallpapermenu +++ b/scripts/wallpapermenu @@ -4,8 +4,8 @@ set dir "/home/eric.marin/Pictures/Backgrounds/" set chosen ( for file in (find $dir -type f) if test -z $img; or test $file != $img - echo "$file" + echo -en "$file\0icon\x1fthumbnail://$file\n" end - end | cut -d '/' -f6 | fuzzel --dmenu) + end | rofi -dmenu -show-icons -theme ~/.config/rofi/wallpapermenu.rasi) -~/.config/scripts/set_background (echo $dir$chosen) +~/.config/scripts/set_background (echo $chosen) diff --git a/wallust/templates/niri b/wallust/templates/niri index 76d045a..efbc8f3 100644 --- a/wallust/templates/niri +++ b/wallust/templates/niri @@ -1,19 +1,28 @@ +prefer-no-csd +screenshot-path "~/Pictures/Screenshots/%Y%m%d-%H%M%S.png" + environment { QT_QPA_PLATFORM "wayland" DISPLAY ":0" } + hotkey-overlay { skip-at-startup } + cursor { // xcursor-theme "breeze_cursors" // xcursor-size 48 // hide-when-typing - hide-after-inactive-ms 5000 + // hide-after-inactive-ms 5000 +} + +gestures { + hot-corners { + off + } } -prefer-no-csd -screenshot-path null input { keyboard { @@ -61,6 +70,7 @@ layout { gaps 5 center-focused-column "on-overflow" // empty-workspace-above-first + background-color "transparent" preset-column-widths { proportion 0.33333 @@ -94,10 +104,21 @@ layout { } } +overview { + workspace-shadow { + off + } +} + animations { // off } +layer-rule { + match namespace="^swww-daemon$" + place-within-backdrop true +} + window-rule { match app-id=r#"^org\.wezfurlong\.wezterm$"# default-column-width {} @@ -116,17 +137,17 @@ window-rule { } switch-events { - lid-close { spawn "niri" "msg" "action" "power-off-monitors"; } lid-open { spawn "niri" "msg" "action" "power-on-monitors"; } } binds { Mod+Backslash { show-hotkey-overlay; } - Mod+Return hotkey-overlay-title="Spawn Terminal" { spawn "foot"; } - Mod+Space hotkey-overlay-title="Spawn Applauncher" { spawn "fuzzel"; } - Mod+Escape hotkey-overlay-title="Spawn Powermenu" { spawn "~/.config/scripts/powermenu"; } - Mod+W repeat=false hotkey-overlay-title="Random Wallpaper" { spawn "~/.config/scripts/set_random" "/home/eric.marin/Pictures/Backgrounds/"; } + Mod+Return hotkey-overlay-title="Spawn Terminal" { spawn "foot"; } + Mod+Space hotkey-overlay-title="Spawn Applauncher" { spawn "rofi" "-show" "drun" "-theme" "~/.config/rofi/applauncher.rasi"; } + Mod+Escape hotkey-overlay-title="Spawn Powermenu" { spawn "~/.config/scripts/powermenu"; } + Mod+W hotkey-overlay-title="Spawn Wallpapermenu" { spawn "~/.config/scripts/wallpapermenu"; } + // Mod+W repeat=false hotkey-overlay-title="Random Wallpaper" { spawn "~/.config/scripts/set_random" "/home/eric.marin/Pictures/Backgrounds/"; } XF86AudioRaiseVolume allow-when-locked=true { spawn "pamixer" "-i" "5"; } XF86AudioLowerVolume allow-when-locked=true { spawn "pamixer" "-d" "5"; } @@ -200,20 +221,22 @@ binds { Mod+Shift+F { fullscreen-window; } Mod+C { center-column; } - Mod+Minus { set-column-width "-10%"; } - Mod+Plus { set-column-width "+10%"; } + Mod+Minus { set-column-width "-1%"; } + Mod+Plus { set-column-width "+1%"; } - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Plus { set-window-height "+10%"; } + Mod+Shift+Minus { set-window-height "-1%"; } + Mod+Shift+Plus { set-window-height "+1%"; } Print { screenshot; } Ctrl+Print { screenshot-screen; } Alt+Print { screenshot-window; } - Mod+V { toggle-window-floating; } - Mod+Shift+V { switch-focus-between-floating-and-tiling; } + Mod+Ctrl+V { toggle-window-floating; } + Mod+V { switch-focus-between-floating-and-tiling; } Mod+T { toggle-column-tabbed-display; } + Mod+Z { toggle-overview; } + Mod+Shift+E { quit; } } diff --git a/wallust/templates/rofi-applauncher b/wallust/templates/rofi-applauncher new file mode 100644 index 0000000..9c51cca --- /dev/null +++ b/wallust/templates/rofi-applauncher @@ -0,0 +1,48 @@ +@theme "/dev/null" + +configuration { + drun-display-format: "{name}"; + show-icons: true; + icon-theme: "Papirus"; + terminal: "foot -o pad=0x0"; + matching: "fuzzy"; +} + +* { + background-color: {{background}}; + color: {{foreground}}; +} + +window { + location: north west; + anchor: center; + width: 589; + y-offset: -22; + x-offset: 260; + padding: 3 0 3 5; +} + +mainbox { + orientation: horizontal; +} + +inputbar { + children: [ prompt, entry ]; + spacing: 5; +} +prompt { + font: "Hack Nerd Font Mono 10"; +} +entry { + font: "Hack Nerd Font 10"; + placeholder: "..."; + width: 50; +} + +listview { + spacing: 10; + layout: horizontal; +} +element-text { + font: "Hack Nerd Font 10"; +} diff --git a/wallust/templates/rofi-powermenu b/wallust/templates/rofi-powermenu new file mode 100644 index 0000000..9a06eb8 --- /dev/null +++ b/wallust/templates/rofi-powermenu @@ -0,0 +1,46 @@ +@theme "/dev/null" + +configuration { + show-icons: false; +} + +* { + background-color: {{background}}; +} + +window { + children: [ horibox ]; + border: 1; + border-color: {{color1}}; + padding: 5; + width: 416px; +} + +horibox { + orientation: horizontal; + children: [ listview ]; +} + +listview { + layout: horizontal; + spacing: 5; + lines: 6; +} + +element { + text-color: {{foreground}}; + background-color: {{color0}}; + padding: 15; +} + +element-text { + font: "Symbols Nerd Font Mono 25"; + text-color: inherit; + background-color: inherit; + vertical-align: 0.5; +} + +element selected{ + text-color: inherit; + background-color: {{color4}}; +} diff --git a/wallust/templates/rofi-wallpapermenu b/wallust/templates/rofi-wallpapermenu new file mode 100644 index 0000000..9c8a495 --- /dev/null +++ b/wallust/templates/rofi-wallpapermenu @@ -0,0 +1,41 @@ +@theme "/dev/null" + +* { + background-color: {{background}}; +} + +window { + children: [ horibox ]; + border: 1; + border-color: {{color1}}; + padding: 5; + width: 797; +} + +horibox { + orientation: horizontal; + children: [ listview ]; +} + +listview { + layout: horizontal; + spacing: 5; + children: [element-icon]; +} + +element { + border-color: {{color0}}; + border: 1; + children: [element-icon]; +} + +element-icon { + expand: true; + size: 33%; + squared: false; +} + +element selected{ + text-color: inherit; + border-color: {{color4}}; +} diff --git a/wallust/templates/waybar b/wallust/templates/waybar index b5ac739..7b3fb02 100644 --- a/wallust/templates/waybar +++ b/wallust/templates/waybar @@ -11,7 +11,7 @@ window#waybar { padding: 1px; } -#clock,#network,#bluetooth,#backlight,#pulseaudio, +#clock,#network,#bluetooth,#backlight,#pulseaudio, #idle_inhibitor, #battery,#disk,#temperature,#memory,#cpu { padding-left: 3px; padding-right: 3px; @@ -19,14 +19,14 @@ window#waybar { border-style: solid; border-width: 1px; } -#network,#bluetooth,#backlight,#pulseaudio { +#network,#bluetooth,#backlight,#pulseaudio, #idle_inhibitor { border-left-width: 0px; } #disk,#temperature,#memory,#cpu { border-right-width: 0px; } -#clock { +#clock, #idle_inhibitor { background: {{color6}}; } #network { @@ -69,7 +69,7 @@ tooltip label { color: {{foreground}}; } -#bluetooth.off, #pulseaudio.muted, #network.disconnected, #battery.warning { +#bluetooth.off, #pulseaudio.muted, #network.disconnected, #battery.warning, #idle_inhibitor.deactivated { background: {{color0}}; } #bluetooth.off { @@ -84,3 +84,10 @@ tooltip label { #battery.warning { color: {{color6}}; } +#battery.charging { + background: {{color6}}; + color: {{foreground}}; +} +#idle_inhibitor.deactivated { + color: {{color6}} +} diff --git a/wallust/wallust.toml b/wallust/wallust.toml index 310e479..bed57ff 100644 --- a/wallust/wallust.toml +++ b/wallust/wallust.toml @@ -25,3 +25,12 @@ mako.target = "~/.config/mako/config" waybar.template = "waybar" waybar.target = "~/.config/waybar/style.css" + +rofi-applauncher.template = "rofi-applauncher" +rofi-applauncher.target = "~/.config/rofi/applauncher.rasi" + +rofi-powermenu.template = "rofi-powermenu" +rofi-powermenu.target = "~/.config/rofi/powermenu.rasi" + +rofi-wallpapermenu.template = "rofi-wallpapermenu" +rofi-wallpapermenu.target = "~/.config/rofi/wallpapermenu.rasi" diff --git a/waybar/config b/waybar/config index 7e2c713..4ab1dba 100644 --- a/waybar/config +++ b/waybar/config @@ -4,7 +4,7 @@ "margin": 0, "reload_style_on_change": true, "fixed-center": false, - "modules-left": ["clock", "network", "bluetooth", "backlight", "pulseaudio"], + "modules-left": ["clock", "network", "bluetooth", "backlight", "pulseaudio", "idle_inhibitor"], "modules-center": ["tray"], "modules-right": ["cpu", "memory", "temperature", "disk", "battery"], "tray": { @@ -33,6 +33,15 @@ }, "on-click": "foot pulsemixer" }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "<span font-family='Symbols Nerd Font Mono'></span>", + "deactivated": "<span font-family='Symbols Nerd Font Mono'></span>" + }, + "tooltip-format-activated": "Inhibiting", + "tooltip-format-deactivated": "" + }, "backlight": { "device": "intel_backlight", "format": "<span font-family='Symbols Nerd Font Mono'>{icon}</span> {percent}%", @@ -59,8 +68,6 @@ "hwmon-path-abs": "/sys/devices/platform/coretemp.0/hwmon", "input-filename": "temp1_input", "format": "<span font-family='Symbols Nerd Font Mono'>{icon}</span> {temperatureC}°", - "format-critical": "<span font-family='Symbols Nerd Font Mono'>{icon}</span> {temperatureC}°", - "critical-threshold": 70, "format-icons": ["", "", "", "", ""], "tooltip": false }, @@ -79,12 +86,12 @@ "warning": 25, }, "format": "<span font-family='Symbols Nerd Font Mono'>{icon}</span> {capacity}%", - "format-charging": "<span font-family='Symbols Nerd Font Mono'></span> {capacity}%", + "format-charging": "<span font-family='Symbols Nerd Font Mono'></span>{capacity}%", "format-icons": ["","","","","","","","","","",""], }, "clock": { "format": "<span font-family='Symbols Nerd Font Mono'></span> {:%H:%M}", - "tooltip-format": "{:%A, %B %d, %Y (%R)}" + "tooltip-format": "{:%A, %d %B %Y}" } } |
