dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 50438928af00af95a908967b46e0902fd420c6aa
parent d3f431f8c0397b3766dce37439c5f7d599d012d6
Author: Linus Behrens <mail@linus-behrens.de>
Date:   Wed,  2 Jul 2025 09:14:18 +0200

linux device, wmenu, etc.

Diffstat:
M.config/nvim/init.lua | 13+++++++++++++
A.scripts/directories.csv | 6++++++
A.scripts/wBrightness | 19+++++++++++++++++++
A.scripts/wDir | 21+++++++++++++++++++++
A.scripts/wSys | 9+++++++++
A.scripts/wVolume | 18++++++++++++++++++
A.scripts/wWallpaper | 7+++++++
A.scripts/wWebsites | 21+++++++++++++++++++++
A.scripts/wWifi | 35+++++++++++++++++++++++++++++++++++
A.scripts/websites.csv | 13+++++++++++++
A.scripts/wifi.csv | 3+++
M.vimrc | 6++++++
12 files changed, 171 insertions(+), 0 deletions(-)

diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua @@ -1,3 +1,16 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + lazypath, + }) +end +--vim.opt.rtp:prepend(lazypath) + require("linus") + diff --git a/.scripts/directories.csv b/.scripts/directories.csv @@ -0,0 +1,6 @@ +/home/linus/.config/bash/,bashrc +/home/linus/obsidian,obsidian +$HOME/Documents/vw,Volkswagen +$HOME/Documents/studium,Studium +$HOME/Documents,documents +$HOME/scripts,scripts diff --git a/.scripts/wBrightness b/.scripts/wBrightness @@ -0,0 +1,19 @@ +#!/bin/bash + +( + echo "$(brightnessctl g) (current brightness)" + for b in 500 400 300 200 100 49 29 9 off; do + echo "$b" + done +) | wmenu -i -l 9 | awk '{print $1}' | while read bri; do + if [ "$bri" = "off" ]; then + brightnessctl s 0 + else + brightnessctl s "$bri" + fi +done + + + + + diff --git a/.scripts/wDir b/.scripts/wDir @@ -0,0 +1,21 @@ +#!/bin/bash + +awk -F, '{ + if ($2 != "") { + print $2 + } else { + print $1 + } +}' /home/linus/scripts/directories.csv | wmenu -i -l 5 -p $(pwd)| while read selection; do + if [ -z "$selection" ]; then + exit 0 + fi + awk -F, -v sel="$selection" ' + $2 == sel { print $1; found=1 } + $2 == "" && $1 == sel { print $1; found=1 } + END { if (!found) exit 1 } + ' /home/linus/scripts/directories.csv | while read dir; do + cd "$dir" >/dev/null 2>&1 & + done +done + diff --git a/.scripts/wSys b/.scripts/wSys @@ -0,0 +1,9 @@ +#!/bin/bash + +case "$(printf "kill\nzzz\nreboot\nshutdown" | wmenu -i -l 4)" in + kill) ps -u $USER -o pid,comm,%cpu,%mem | wmenu -i -l 10 -p Kill: | awk '{print $1}' | xargs -r kill ;; + zzz) slock systemctl suspend -i ;; + reboot) systemctl reboot -i ;; + shutdown) shutdown now ;; + *) exit 1 ;; +esac diff --git a/.scripts/wVolume b/.scripts/wVolume @@ -0,0 +1,18 @@ +#!/bin/bash + +( + #echo "$(pamixer --get-volume) (current volume)" + for v in 100 80 60 40 20 mute; do + echo "$v" + done + ) | wmenu -i -l 6 -p $(pamixer --get-volume) | awk '{print $1}' | while read vol; do + if [ "$vol" = "mute" ]; then + pamixer --mute + else + pamixer --set-volume "$vol" + fi +done + + + + diff --git a/.scripts/wWallpaper b/.scripts/wWallpaper @@ -0,0 +1,7 @@ +#!/bin/bash + + +# $(ls -1 $HOME/dotfiles/wallpaper | wmenu -i) +ls -1 -R $HOME/dotfiles/wallpaper | wmenu -i -l 10 + + diff --git a/.scripts/wWebsites b/.scripts/wWebsites @@ -0,0 +1,21 @@ +#!/bin/bash + +awk -F, '{ + if ($2 != "") { + print $2 + } else { + print $1 + } +}' $HOME/scripts/websites.csv | wmenu -i -l 10 | while read selection; do + if [ -z "$selection" ]; then + exit 0 + fi + awk -F, -v sel="$selection" ' + $2 == sel { print $1; found=1 } + $2 == "" && $1 == sel { print $1; found=1 } + END { if (!found) exit 1 } + ' $HOME/scripts/websites.csv | while read url; do + xdg-open "$url" >/dev/null 2>&1 & + done +done + diff --git a/.scripts/wWifi b/.scripts/wWifi @@ -0,0 +1,35 @@ +#!/bin/bash + +awk -F, '{ + if ($1 ~ /^nmcli/) { + # custom command + description + print $2 + } else { + # regular SSID + print $1 + } +}' $HOME/scripts/wifi.csv | wmenu -i | while read selection; do + if [ -z "$selection" ]; then + exit 0 + fi + + # search for the selection + awk -F, -v sel="$selection" ' + { + if ($1 ~ /^nmcli/ && $2 == sel) { + # custom command + description + cmd = $1 + found = 1 + } else if ($1 == sel) { + cmd = sprintf("nmcli device wifi connect \"%s\" password \"%s\"", $1, $2) + found = 1 + } + } + END { + if (found) { + print cmd + } + }' $HOME/scripts/wifi.csv | while read cmd; do + eval "$cmd" + done +done diff --git a/.scripts/websites.csv b/.scripts/websites.csv @@ -0,0 +1,13 @@ +https://youtube.com,youtube home +https://linus-behrens.de,linus behrens home +https://chatgpt.com,ChatGPT +https://sr.ht/,SourceHut +https://github.com,GitHub +https://codeberg.org,CodeBerg + +https://github.com/BreadOnPenguins/scripts,dmenu scripts +https://www.youtube.com/watch?v=4JWeU78A95c,dmenu example +https://www.terminal.shop/api,terminal shop api +https://github.com/qutebrowser/qutebrowser/releases,qutebrowser + +https://www.bee-link.com/en-de/products/beelink-me-mini-n150?variant=47599172976882,nas bee link diff --git a/.scripts/wifi.csv b/.scripts/wifi.csv @@ -0,0 +1,3 @@ +Starlink-Wohn,starLink#1419 +iPhone Linus,lulatsch +nmcli connection add type wifi con-name "SchuleGYM" ssid "SchuleGYM" autoconnect yes wifi-sec.key-mgmt wpa-eap 802-1x.eap peap 802-1x.identity "linus.behre" 802-1x.password "DTH76: )WLAN" 802-1x.phase2-autheap mschapv2,SchuleGYM diff --git a/.vimrc b/.vimrc @@ -18,11 +18,17 @@ set shiftwidth=4 " Leader let mapleader=" " + nnoremap <leader>s :w<CR> + "write + nnoremap <leader>q :q<CR> + "quit + nnoremap <leader>g :wq<CR> + "write and quit autocmd vimenter * colorscheme vague "color theme