From 4c81c0ca4a649cc81421540662c6a76a98394796 Mon Sep 17 00:00:00 2001 From: Never Gude Date: Sat, 11 Jul 2026 01:35:28 +0200 Subject: [PATCH] new configs --- .config/fish/config.fish | 10 +++---- .config/fish/functions/menu.fish | 6 +++- .config/niri/config.kdl | 5 ++-- .config/nvim/ftplugin/tex.lua | 3 ++ .config/nvim/init.lua | 3 -- .config/waybar/config.jsonc | 39 ++++++++++++++++++++++-- .local/scripts/mpdmenu.fish | 43 +++++++++++++++++++++++++++ .local/scripts/mpdvolumenotify.fish | 9 ++++++ .local/scripts/reset-buttom-layout.sh | 2 ++ .local/share/fonts/.uuid | 1 + 10 files changed, 107 insertions(+), 14 deletions(-) create mode 100755 .local/scripts/mpdmenu.fish create mode 100755 .local/scripts/mpdvolumenotify.fish create mode 100755 .local/scripts/reset-buttom-layout.sh create mode 100644 .local/share/fonts/.uuid diff --git a/.config/fish/config.fish b/.config/fish/config.fish index bb6e44f..cece836 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -70,11 +70,11 @@ if status is-interactive set fish_pager_color_selected_prefix black --bold --underline set fish_pager_color_secondary_completion - if test $XDG_CURRENT_DESKTOP = "niri" - dconf write /org/gnome/desktop/wm/preferences/button-layout "'appmenu'" - else - dconf reset /org/gnome/desktop/wm/preferences/button-layout - end + # if test $XDG_CURRENT_DESKTOP = "niri" + # dconf write /org/gnome/desktop/wm/preferences/button-layout "'appmenu'" + # else + # dconf reset /org/gnome/desktop/wm/preferences/button-layout + # end end diff --git a/.config/fish/functions/menu.fish b/.config/fish/functions/menu.fish index ac9af13..3b3195c 100644 --- a/.config/fish/functions/menu.fish +++ b/.config/fish/functions/menu.fish @@ -1,5 +1,5 @@ function menu --description 'Opens a menu of a list of Strings and writes the result to stdout' - argparse h/help p/prompt=? index -- $argv + argparse h/help p/prompt=? mesg=? placeholder=? index -- $argv or return if set -ql _flag_help @@ -17,6 +17,10 @@ function menu --description 'Opens a menu of a list of Strings and writes the re set -a fuzzel_args "--placeholder=$_flag_placeholder" end + if set -ql _flag_mesg + set -a fuzzel_args "--mesg=$_flag_mesg" + end + if set -ql _flag_index set -a fuzzel_args "--index" end diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 0f287f6..7f2fc2b 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -106,7 +106,7 @@ output "eDP-1" { position x=320 y=1441 } -output "HDMI-A-1" { +output "ViewSonic Corporation VX2758A-2K XLK245220057" { position x=0 y=0 } @@ -297,7 +297,6 @@ hotkey-overlay { // This option will also fix border/focus ring drawing behind some semitransparent windows. // After enabling or disabling this, you need to restart the apps for this to take effect. prefer-no-csd - // You can change the path where screenshots are saved. // A ~ at the front will be expanded to the home directory. // The path is formatted with strftime(3) to give you the screenshot date and time. @@ -389,7 +388,7 @@ binds { // // Most actions that you can bind here can also be invoked programmatically with // `niri msg action do-something`. - + // Mod-Shift-/, which is usually the same as Mod-?, // shows a list of important hotkeys. Mod+Shift+0 { show-hotkey-overlay; } diff --git a/.config/nvim/ftplugin/tex.lua b/.config/nvim/ftplugin/tex.lua index 11f2b3f..5cebd8e 100644 --- a/.config/nvim/ftplugin/tex.lua +++ b/.config/nvim/ftplugin/tex.lua @@ -1,5 +1,8 @@ vim.treesitter.start() +vim.opt.spelllang = "de" +vim.opt.spell = true + -- vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()' -- vim.wo[0][0].foldmethod = 'expr' diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index d55ed95..9ad2d78 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -5,8 +5,6 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " vim.o.guifont = "Adwaita Mono:h12" -vim.g.neovide_cursor_animation_length = 0.04 --- vim.g.neovide_cursor_trail_size = 0.1 -- Disable mouse input vim.o.mouse = "" @@ -138,7 +136,6 @@ vim.api.nvim_create_autocmd('FileType', { end, }) - vim.pack.add({ "https://github.com/mason-org/mason.nvim" }) require("mason").setup() diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 2c61426..cd1f7d6 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -2,7 +2,7 @@ "layer": "top", "modules-left": ["niri/workspaces"], "modules-center": ["clock"], - "modules-right": ["bluetooth", "network", "wireplumber#source", "wireplumber#sink","idle_inhibitor", "battery"], + "modules-right": ["bluetooth", "network", "wireplumber#source", "wireplumber#sink", "mpd", "idle_inhibitor", "battery"], "idle_inhibitor": { "format": "{icon}", @@ -49,7 +49,9 @@ "tooltip-format": "{node_name} ({volume}%)", "on-click-right": "wpsinkmenu.fish", "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", - "scroll-step": 5 + "scroll-step": 5, + "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- --limit 1.5 && volumenotify.fish", + "on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit 1.5 && volumenotify.fish" }, "wireplumber#source": { @@ -62,6 +64,39 @@ "scroll-step": 5 }, + "mpd": { + "format": "{stateIcon}", + "format-stopped": "󰓛", + "format-disconnected": "󱘖", + "tooltip-format": "{artist} - {album} - {title}\n{elapsedTime:%M:%S}/{totalTime:%M:%S}\n{consumeIcon} {randomIcon} {repeatIcon} {singleIcon}", + "state-icons": { + "playing": "󰐊", + "paused": "󰏤" + }, + "consume-icons": { + "on": "󰉚", + "off": "󰗳" + }, + "random-icons": { + "on": "󰒟", + "off": "󰒞" + }, + "repeat-icons": { + "on": "󰑖", + "off": "󰑗" + }, + "single-icons": { + "on": "󰎄", + "off": "󰌳" + }, + "on-click": "mpc toggle", + "on-click-middle": "mpc stop", + "on-click-right": "mpdmenu.fish", + "on-scroll-down": "mpc volume -5 && mpdvolumenotify.fish", + "on-scroll-up": "mpc volume +5 && mpdvolumenotify.fish" + + }, + "battery": { "interval": 60, "states": { diff --git a/.local/scripts/mpdmenu.fish b/.local/scripts/mpdmenu.fish new file mode 100755 index 0000000..b8f99c4 --- /dev/null +++ b/.local/scripts/mpdmenu.fish @@ -0,0 +1,43 @@ +#!/usr/bin/env fish + +set message + +if test (mpc status %consume%) = "on" + set -a message "󰉚" +else + set -a message "󰗳" +end + +if test (mpc status %random%) = "on" + set -a message "󰒟" +else + set -a message "󰒞" +end + +if test (mpc status %repeat%) = "on" + set -a message "󰑖" +else + set -a message "󰑗" +end + +if test (mpc status %single%) = "on" + set -a message "󰎄" +else + set -a message "󰌳" +end + +set options "󰐎 Play/Pause" "󰓛 Stop" "󰒭 Next" "󰒮 Previous" "󰉚 Consume" "󰒟 Random" "󰑖 Repeat" "󰎄 Single" + +set input (menu --mesg="$(mpc current --format "%artist% - %album% - %title%") +$(string join -- ' ' $message)" $options) + +switch $input + case $options[1] + mpc consume + case $options[2] + mpc random + case $options[3] + mpc repeat + case $options[4] + mpc single +end diff --git a/.local/scripts/mpdvolumenotify.fish b/.local/scripts/mpdvolumenotify.fish new file mode 100755 index 0000000..e42ab49 --- /dev/null +++ b/.local/scripts/mpdvolumenotify.fish @@ -0,0 +1,9 @@ +#!/usr/bin/env fish + +set volume (mpc status "%volume%" | string trim --chars " %") + +if test $volume = "-1" + set volume "0" +end + +notify-send -c 'status' -h int:value:$volume "MPD Volume" "$volume%" diff --git a/.local/scripts/reset-buttom-layout.sh b/.local/scripts/reset-buttom-layout.sh new file mode 100755 index 0000000..215b504 --- /dev/null +++ b/.local/scripts/reset-buttom-layout.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env sh +dconf reset /org/gnome/desktop/wm/preferences/button-layout diff --git a/.local/share/fonts/.uuid b/.local/share/fonts/.uuid new file mode 100644 index 0000000..08d998d --- /dev/null +++ b/.local/share/fonts/.uuid @@ -0,0 +1 @@ +b5ea300d-161f-46d0-84be-1a410ed8f894 \ No newline at end of file