santiago / vv.sh - vim or sudo vim

0 beğeniler
0 çatallar
1 dosyalar
Son aktivite 1747056282
Bash command to edit file with nvim with my user or sudo if necessary to write the file. Use config for my user with root (will download modules again)
1 #!/bin/bash
2
3 vv() {
4 if [ $# -eq 0 ]; then
5 echo "Usage: vv <file>"
6 echo "Will edit with current user or sudo if needed but using nvim config of this user"
7 return 1
8 fi
9
10 vpath=$(which $EDITOR)

santiago / windowfix.sh

0 beğeniler
0 çatallar
1 dosyalar
Son aktivite 1747055827
Resize and remove window decoration on PopOS and Linux desktops (from stack overflow)
1 #!/usr/bin/env zsh
2
3
4 wait_find_window_id() {
5 while true; do
6 window_id=$(wmctrl -l | grep "$1" | awk '{print $1}')
7 if [ -n "$window_id" ]; then
8 echo "$window_id"
9 return
10 fi
Daha yeni Daha eski