From 20747da93e18c2da012e34f181aeee0ad3b2b4fe Mon Sep 17 00:00:00 2001 From: nils Date: Fri, 27 Dec 2024 23:03:21 +0100 Subject: [PATCH] Closed #7, Closed #5, Closed #4, Closed #3 --- .config/dinit.d/audio.target | 5 + .config/dinit.d/blueman-applet | 3 + .config/dinit.d/env-sv | 3 + .config/dinit.d/foot-server | 2 + .config/dinit.d/graphical.d/audio.target | 1 + .config/dinit.d/graphical.d/blueman-applet | 1 + .config/dinit.d/graphical.d/foot-server | 1 + .config/dinit.d/graphical.d/nm-applet | 1 + .config/dinit.d/graphical.d/swaybg | 1 + .config/dinit.d/graphical.d/swaync | 1 + .config/dinit.d/graphical.d/waybar | 1 + .config/dinit.d/graphical.target | 2 + .config/dinit.d/nm-applet | 3 + .config/dinit.d/pipewire | 2 + .config/dinit.d/pipewire-pulse | 3 + .config/dinit.d/swaybg | 2 + .config/dinit.d/swaync | 2 + .config/dinit.d/waybar | 3 + .config/dinit.d/wireplumber | 3 + .config/nvim/after/plugin/lsp.lua | 31 +++++ .config/nvim/after/plugin/wal.lua | 2 + .config/nvim/init.lua | 13 ++ .config/nvim/lazy-lock.json | 8 ++ .config/nvim/lua/config/lazy.lua | 35 +++++ .config/nvim/lua/plugins/lsp.lua | 12 ++ .config/nvim/lua/plugins/wal.lua | 3 + .config/river/binds | 120 +++++++++++++++++ .config/river/init | 145 ++------------------- .config/waybar/config | 12 +- .config/waybar/style.css | 1 + 30 files changed, 284 insertions(+), 138 deletions(-) create mode 100644 .config/dinit.d/audio.target create mode 100644 .config/dinit.d/blueman-applet create mode 100644 .config/dinit.d/env-sv create mode 100644 .config/dinit.d/foot-server create mode 120000 .config/dinit.d/graphical.d/audio.target create mode 120000 .config/dinit.d/graphical.d/blueman-applet create mode 120000 .config/dinit.d/graphical.d/foot-server create mode 120000 .config/dinit.d/graphical.d/nm-applet create mode 120000 .config/dinit.d/graphical.d/swaybg create mode 120000 .config/dinit.d/graphical.d/swaync create mode 120000 .config/dinit.d/graphical.d/waybar create mode 100644 .config/dinit.d/graphical.target create mode 100644 .config/dinit.d/nm-applet create mode 100644 .config/dinit.d/pipewire create mode 100644 .config/dinit.d/pipewire-pulse create mode 100644 .config/dinit.d/swaybg create mode 100644 .config/dinit.d/swaync create mode 100644 .config/dinit.d/waybar create mode 100644 .config/dinit.d/wireplumber create mode 100644 .config/nvim/after/plugin/lsp.lua create mode 100644 .config/nvim/after/plugin/wal.lua create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/config/lazy.lua create mode 100644 .config/nvim/lua/plugins/lsp.lua create mode 100644 .config/nvim/lua/plugins/wal.lua create mode 100755 .config/river/binds diff --git a/.config/dinit.d/audio.target b/.config/dinit.d/audio.target new file mode 100644 index 0000000..0eb38fe --- /dev/null +++ b/.config/dinit.d/audio.target @@ -0,0 +1,5 @@ +type = internal +depends-on = pipewire +depends-on = pipewire-pulse +depends-on = wireplumber +restart = yes diff --git a/.config/dinit.d/blueman-applet b/.config/dinit.d/blueman-applet new file mode 100644 index 0000000..901d4e9 --- /dev/null +++ b/.config/dinit.d/blueman-applet @@ -0,0 +1,3 @@ +type = process +command = blueman-applet +waits-for = waybar diff --git a/.config/dinit.d/env-sv b/.config/dinit.d/env-sv new file mode 100644 index 0000000..971cb32 --- /dev/null +++ b/.config/dinit.d/env-sv @@ -0,0 +1,3 @@ +type = scripted +command = env +log-type = buffer diff --git a/.config/dinit.d/foot-server b/.config/dinit.d/foot-server new file mode 100644 index 0000000..49b88f7 --- /dev/null +++ b/.config/dinit.d/foot-server @@ -0,0 +1,2 @@ +type = process +command = foot --server diff --git a/.config/dinit.d/graphical.d/audio.target b/.config/dinit.d/graphical.d/audio.target new file mode 120000 index 0000000..3b6afeb --- /dev/null +++ b/.config/dinit.d/graphical.d/audio.target @@ -0,0 +1 @@ +audio.target \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/blueman-applet b/.config/dinit.d/graphical.d/blueman-applet new file mode 120000 index 0000000..7829d5a --- /dev/null +++ b/.config/dinit.d/graphical.d/blueman-applet @@ -0,0 +1 @@ +blueman-applet \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/foot-server b/.config/dinit.d/graphical.d/foot-server new file mode 120000 index 0000000..97bfeff --- /dev/null +++ b/.config/dinit.d/graphical.d/foot-server @@ -0,0 +1 @@ +foot-server \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/nm-applet b/.config/dinit.d/graphical.d/nm-applet new file mode 120000 index 0000000..6ac9940 --- /dev/null +++ b/.config/dinit.d/graphical.d/nm-applet @@ -0,0 +1 @@ +nm-applet \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/swaybg b/.config/dinit.d/graphical.d/swaybg new file mode 120000 index 0000000..7018ee3 --- /dev/null +++ b/.config/dinit.d/graphical.d/swaybg @@ -0,0 +1 @@ +swaybg \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/swaync b/.config/dinit.d/graphical.d/swaync new file mode 120000 index 0000000..6b1e1ee --- /dev/null +++ b/.config/dinit.d/graphical.d/swaync @@ -0,0 +1 @@ +/home/n/.config/dinit.d/swaync \ No newline at end of file diff --git a/.config/dinit.d/graphical.d/waybar b/.config/dinit.d/graphical.d/waybar new file mode 120000 index 0000000..7849761 --- /dev/null +++ b/.config/dinit.d/graphical.d/waybar @@ -0,0 +1 @@ +/home/n/.config/dinit.d/waybar \ No newline at end of file diff --git a/.config/dinit.d/graphical.target b/.config/dinit.d/graphical.target new file mode 100644 index 0000000..e8738d8 --- /dev/null +++ b/.config/dinit.d/graphical.target @@ -0,0 +1,2 @@ +type = internal +waits-for.d = graphical.d diff --git a/.config/dinit.d/nm-applet b/.config/dinit.d/nm-applet new file mode 100644 index 0000000..d145282 --- /dev/null +++ b/.config/dinit.d/nm-applet @@ -0,0 +1,3 @@ +type = process +command = nm-applet +waits-for = waybar diff --git a/.config/dinit.d/pipewire b/.config/dinit.d/pipewire new file mode 100644 index 0000000..4f07a9c --- /dev/null +++ b/.config/dinit.d/pipewire @@ -0,0 +1,2 @@ +type = process +command = pipewire diff --git a/.config/dinit.d/pipewire-pulse b/.config/dinit.d/pipewire-pulse new file mode 100644 index 0000000..e000322 --- /dev/null +++ b/.config/dinit.d/pipewire-pulse @@ -0,0 +1,3 @@ +type = process +command = pipewire-pulse +depends-on = pipewire diff --git a/.config/dinit.d/swaybg b/.config/dinit.d/swaybg new file mode 100644 index 0000000..fcad4eb --- /dev/null +++ b/.config/dinit.d/swaybg @@ -0,0 +1,2 @@ +type = process +command = swaybg -m fill -i /home/n/Pictures/wallpaper.png diff --git a/.config/dinit.d/swaync b/.config/dinit.d/swaync new file mode 100644 index 0000000..56967b0 --- /dev/null +++ b/.config/dinit.d/swaync @@ -0,0 +1,2 @@ +type = process +command = swaync diff --git a/.config/dinit.d/waybar b/.config/dinit.d/waybar new file mode 100644 index 0000000..c399449 --- /dev/null +++ b/.config/dinit.d/waybar @@ -0,0 +1,3 @@ +type = process +command = waybar +waits-for = swaync diff --git a/.config/dinit.d/wireplumber b/.config/dinit.d/wireplumber new file mode 100644 index 0000000..29dcae2 --- /dev/null +++ b/.config/dinit.d/wireplumber @@ -0,0 +1,3 @@ +type = process +command = wireplumber +depends-on = pipewire diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua new file mode 100644 index 0000000..74dd21b --- /dev/null +++ b/.config/nvim/after/plugin/lsp.lua @@ -0,0 +1,31 @@ +local cmp = require'cmp' +require("luasnip").config.setup({}) +local capabilities = require('cmp_nvim_lsp').default_capabilities() + +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require'luasnip'.lsp_expand(args.body) + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = { + { name = 'luasnip' }, + { name = 'nvim_lsp' }, + { name = 'buffer' }, + } +}) + +require('lspconfig').clangd.setup({capabilities=capabilities}) +require('lspconfig').pylsp.setup({capabilities=capabilities}) diff --git a/.config/nvim/after/plugin/wal.lua b/.config/nvim/after/plugin/wal.lua new file mode 100644 index 0000000..766b0bb --- /dev/null +++ b/.config/nvim/after/plugin/wal.lua @@ -0,0 +1,2 @@ +local pywal16 = require('pywal16') +pywal16.setup() diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..591b2b6 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,13 @@ +require("config.lazy") + +-- Vim configuration +vim.cmd([[ +set tabstop=2 +set expandtab +set shiftwidth=0 +set number +set signcolumn=yes +highlight Normal ctermbg=NONE guibg=NONE +]]) + +vim.opt.termguicolors = true diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..89ca8a3 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,8 @@ +{ + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, + "nvim-lspconfig": { "branch": "master", "commit": "ff2b85abaa810f6611233dbe6d31c07510ebf43d" }, + "pywal16.nvim": { "branch": "main", "commit": "446ae689c8e4569b9537cddadb28d6e939658ea5" } +} diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..0b93d4e --- /dev/null +++ b/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,35 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = false }, +}) diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..99db95c --- /dev/null +++ b/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,12 @@ +return { + "neovim/nvim-lspconfig", + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + { + "L3MON4D3/LuaSnip", + -- follow latest release. + version = "v2.3.0", -- Replace by the latest released major (first number of latest release) + -- install jsregexp (optional!). + build = "make install_jsregexp" + } +} diff --git a/.config/nvim/lua/plugins/wal.lua b/.config/nvim/lua/plugins/wal.lua new file mode 100644 index 0000000..6418d8a --- /dev/null +++ b/.config/nvim/lua/plugins/wal.lua @@ -0,0 +1,3 @@ +return { + "uZer/pywal16.nvim" +} diff --git a/.config/river/binds b/.config/river/binds new file mode 100755 index 0000000..48c6827 --- /dev/null +++ b/.config/river/binds @@ -0,0 +1,120 @@ +#!/bin/sh + +# Things to spawn +riverctl map normal Super Return spawn footclient +riverctl map normal Super Space spawn fuzzel +riverctl map normal Super Tab spawn "swaync-client -t -sw" +riverctl map normal Super+Control S spawn 'pkill -9 slurp ; grim -g "$(slurp -d)" - | wl-copy -t image/png' +riverctl map normal Super V spawn pavucontrol + +# Super+Q to close the focused view +riverctl map normal Super Slash close + +# Super+Shift+E to exit river +riverctl map normal Super+Shift E spawn "dinitctl shutdown ; riverctl exit" + +# Focus shortcuts +riverctl map normal Super Up focus-view up +riverctl map normal Super Right focus-view right +riverctl map normal Super Down focus-view down +riverctl map normal Super Left focus-view left + +# Change positions +riverctl map normal Super+Shift Up swap up +riverctl map normal Super+Shift Right swap right +riverctl map normal Super+Shift Down swap down +riverctl map normal Super+Shift Left swap left + +# Super+Period and Super+Comma to focus the next/previous output +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous + +# Super+Shift+{Period,Comma} to send the focused view to the next/previous output +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous + +# Super+Alt+{H,J,K,L} to move views +riverctl map normal Super+Alt H move left 100 +riverctl map normal Super+Alt J move down 100 +riverctl map normal Super+Alt K move up 100 +riverctl map normal Super+Alt L move right 100 + +# Super+Alt+Control+{H,J,K,L} to snap views to screen edges +riverctl map normal Super+Alt+Control H snap left +riverctl map normal Super+Alt+Control J snap down +riverctl map normal Super+Alt+Control K snap up +riverctl map normal Super+Alt+Control L snap right + +# Super+Alt+Shift+{H,J,K,L} to resize views +riverctl map normal Super+Alt+Shift H resize horizontal -100 +riverctl map normal Super+Alt+Shift J resize vertical 100 +riverctl map normal Super+Alt+Shift K resize vertical -100 +riverctl map normal Super+Alt+Shift L resize horizontal 100 + +# Super + Left Mouse Button to move views +riverctl map-pointer normal Super BTN_LEFT move-view + +# Super + Right Mouse Button to resize views +riverctl map-pointer normal Super BTN_RIGHT resize-view + +# Super + Middle Mouse Button to toggle float +riverctl map-pointer normal Super BTN_MIDDLE toggle-float + +for i in $(seq 1 9) +do + tags=$((1 << ($i - 1))) + + # Super+[1-9] to focus tag [0-8] + riverctl map normal Super $i set-focused-tags $tags + + # Super+Shift+[1-9] to tag focused view with tag [0-8] + riverctl map normal Super+Shift $i set-view-tags $tags + + # Super+Control+[1-9] to toggle focus of tag [0-8] + riverctl map normal Super+Control $i toggle-focused-tags $tags + + # Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view + riverctl map normal Super+Shift+Control $i toggle-view-tags $tags +done + +# Super+0 to focus all tags +# Super+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags $all_tags +riverctl map normal Super+Shift 0 set-view-tags $all_tags + +# Super+Space to toggle float +riverctl map normal Super+Shift Space toggle-float + +# Super+F to toggle fullscreen +riverctl map normal Super F toggle-fullscreen + +# Super+F11 to enter passthrough mode +riverctl map normal Super F11 enter-mode passthrough + +# Super+F11 to return to normal mode +riverctl map passthrough Super F11 enter-mode normal + +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier +for mode in normal locked +do + # Eject the optical drive (well if you still have one that is) + riverctl map $mode None XF86Eject spawn 'eject -T' + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + riverctl map $mode None XF86AudioRaiseVolume spawn 'wpctl set-volume @DEFAULT_SINK@ 5%+ ; wpctl set-mute @DEFAULT_SINK@ 0' + riverctl map $mode None XF86AudioLowerVolume spawn 'wpctl set-volume @DEFAULT_SINK@ 5%- ; wpctl set-mute @DEFAULT_SINK@ 0' + riverctl map $mode None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_SINK@ toggle' + riverctl map $mode None XF86AudioMicMute spawn 'wpctl set-mute @DEFAULT_SOURCE@ toggle' + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' + riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' + riverctl map $mode None XF86AudioNext spawn 'playerctl next' + + # Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl) + riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%' + riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-' +done diff --git a/.config/river/init b/.config/river/init index 3fa6687..d693ea5 100755 --- a/.config/river/init +++ b/.config/river/init @@ -3,154 +3,35 @@ # Source colors generated by wal source ~/.cache/wal/colors-river +# Source all the keybinds +source ~/.config/river/binds + # Set border-width riverctl border-width 2 -# Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) -riverctl map normal Super Return spawn footclient -riverctl map normal Super Space spawn fuzzel -riverctl map normal Super Tab spawn "swaync-client -t -sw" -riverctl map normal Super+Control S spawn 'pkill -9 slurp ; grim -g "$(slurp -d)" - | wl-copy -t image/png' - +# Spawn the user services riverctl spawn 'dinit graphical.target -d .config/dinit.d -q -u' -# Super+Q to close the focused view -riverctl map normal Super Slash close - -# Super+Shift+E to exit river -riverctl map normal Super+Shift E exit - -# Focus shortcuts -riverctl map normal Super Up focus-view up -riverctl map normal Super Right focus-view right -riverctl map normal Super Down focus-view down -riverctl map normal Super Left focus-view left - -# Change positions -riverctl map normal Super+Shift Up swap up -riverctl map normal Super+Shift Right swap right -riverctl map normal Super+Shift Down swap down -riverctl map normal Super+Shift Left swap left - -# Super+Period and Super+Comma to focus the next/previous output -riverctl map normal Super Period focus-output next -riverctl map normal Super Comma focus-output previous - -# Super+Shift+{Period,Comma} to send the focused view to the next/previous output -riverctl map normal Super+Shift Period send-to-output next -riverctl map normal Super+Shift Comma send-to-output previous - -# Super+H and Super+L to decrease/increase the main ratio of rivertile(1) -riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" -riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" - -# Super+Shift+H and Super+Shift+L to increment/decrement the main count of rivertile(1) -riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" -riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" - -# Super+Alt+{H,J,K,L} to move views -riverctl map normal Super+Alt H move left 100 -riverctl map normal Super+Alt J move down 100 -riverctl map normal Super+Alt K move up 100 -riverctl map normal Super+Alt L move right 100 - -# Super+Alt+Control+{H,J,K,L} to snap views to screen edges -riverctl map normal Super+Alt+Control H snap left -riverctl map normal Super+Alt+Control J snap down -riverctl map normal Super+Alt+Control K snap up -riverctl map normal Super+Alt+Control L snap right - -# Super+Alt+Shift+{H,J,K,L} to resize views -riverctl map normal Super+Alt+Shift H resize horizontal -100 -riverctl map normal Super+Alt+Shift J resize vertical 100 -riverctl map normal Super+Alt+Shift K resize vertical -100 -riverctl map normal Super+Alt+Shift L resize horizontal 100 - -# Super + Left Mouse Button to move views -riverctl map-pointer normal Super BTN_LEFT move-view - -# Super + Right Mouse Button to resize views -riverctl map-pointer normal Super BTN_RIGHT resize-view - -# Super + Middle Mouse Button to toggle float -riverctl map-pointer normal Super BTN_MIDDLE toggle-float - -for i in $(seq 1 9) -do - tags=$((1 << ($i - 1))) - - # Super+[1-9] to focus tag [0-8] - riverctl map normal Super $i set-focused-tags $tags - - # Super+Shift+[1-9] to tag focused view with tag [0-8] - riverctl map normal Super+Shift $i set-view-tags $tags - - # Super+Control+[1-9] to toggle focus of tag [0-8] - riverctl map normal Super+Control $i toggle-focused-tags $tags - - # Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view - riverctl map normal Super+Shift+Control $i toggle-view-tags $tags -done - -# Super+0 to focus all tags -# Super+Shift+0 to tag focused view with all tags -all_tags=$(((1 << 32) - 1)) -riverctl map normal Super 0 set-focused-tags $all_tags -riverctl map normal Super+Shift 0 set-view-tags $all_tags - -# Super+Space to toggle float -riverctl map normal Super+Shift Space toggle-float - -# Super+F to toggle fullscreen -riverctl map normal Super F toggle-fullscreen +# Use server side decoration everywhere +riverctl rule-add -app-id "*" ssd # Declare a passthrough mode. This mode has only a single mapping to return to # normal mode. This makes it useful for testing a nested wayland compositor riverctl declare-mode passthrough -# Super+F11 to enter passthrough mode -riverctl map normal Super F11 enter-mode passthrough - -# Super+F11 to return to normal mode -riverctl map passthrough Super F11 enter-mode normal - -# Various media key mapping examples for both normal and locked mode which do -# not have a modifier -for mode in normal locked -do - # Eject the optical drive (well if you still have one that is) - riverctl map $mode None XF86Eject spawn 'eject -T' - - # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) - riverctl map $mode None XF86AudioRaiseVolume spawn 'wpctl set-volume @DEFAULT_SINK@ 5%+ ; wpctl set-mute @DEFAULT_SINK@ 0' - riverctl map $mode None XF86AudioLowerVolume spawn 'wpctl set-volume @DEFAULT_SINK@ 5%- ; wpctl set-mute @DEFAULT_SINK@ 0' - riverctl map $mode None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_SINK@ toggle' - riverctl map $mode None XF86AudioMicMute spawn 'wpctl set-mute @DEFAULT_SOURCE@ toggle' - - # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) - riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause' - riverctl map $mode None XF86AudioPrev spawn 'playerctl previous' - riverctl map $mode None XF86AudioNext spawn 'playerctl next' - - # Control screen backlight brightness with brightnessctl (https://github.com/Hummer12007/brightnessctl) - riverctl map $mode None XF86MonBrightnessUp spawn 'brightnessctl set +5%' - riverctl map $mode None XF86MonBrightnessDown spawn 'brightnessctl set 5%-' -done - -# Use server side decoration everywhere -riverctl rule-add -app-id "*" ssd - -# Set keyboard repeat rate -riverctl set-repeat 50 300 - # Set layouter to bsp riverctl default-layout bsp-layout -river-bsp-layout --inner-gap 2 --outer-gap 5 --split-perc 0.5 --og-top 0 & +river-bsp-layout --inner-gap 2 --outer-gap 4 --split-perc 0.5 --og-top 0 & + + +# --- Device input settings -------------- # Keyboard layout riverctl keyboard-layout dehel +# Set keyboard repeat rate +riverctl set-repeat 50 300 + # Natural scroll riverctl input pointer-1160-4639-DELL08B8:00_0488:121F_Touchpad natural-scroll enabled diff --git a/.config/waybar/config b/.config/waybar/config index ae156cd..3a36001 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -11,6 +11,11 @@ "battery", "custom/notification" ], + "layer": "bottom", + "mode": "dock", + "position": "top", + "start_hidden": false, + "fixed-center": true, "battery": { "format": "{icon} {capacity}%", "format-charging": "󱟦 {capacity}%", @@ -39,17 +44,12 @@ "custom/notification": { "escape": "true", "exec": "swaync-client -swb", - "format": "", + "format": "󰣨", "on-click": "swaync-client -t -sw", "on-click-right": "swaync-client -C -sw", "return-type": "json", "tooltip": "false" }, - "layer": "bottom", - "mode": "dock", - "position": "top", - "start_hidden": false, - "fixed-center": true, "tray": { "icon-size": 16, "reverse-direction": "true", diff --git a/.config/waybar/style.css b/.config/waybar/style.css index a25a7a4..fa37e42 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -94,6 +94,7 @@ tooltip { border-radius: 0; padding: 0 4px; background: transparent; + min-width: 16px; } #tags button*:Hover {