Fix gitignore
This commit is contained in:
		
							parent
							
								
									856bba4de3
								
							
						
					
					
						commit
						04b2f868b1
					
				| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
gui-scripts*
 | 
					tui-scripts*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							| 
						 | 
					@ -1,9 +0,0 @@
 | 
				
			||||||
Package: tui-scripts
 | 
					 | 
				
			||||||
Version: 1.10-1
 | 
					 | 
				
			||||||
Section: base
 | 
					 | 
				
			||||||
Priority: optional
 | 
					 | 
				
			||||||
Architecture: amd64
 | 
					 | 
				
			||||||
Depends: fzf, dialog (>= 1.3), xdotool, x11-xkb-utils
 | 
					 | 
				
			||||||
Maintainer: Konstantin Shutkin <digitalstudium001@gmail.com>
 | 
					 | 
				
			||||||
Description: GUI scripts
 | 
					 | 
				
			||||||
 GUI scripts for popular cli tools, based on dialog and fzf
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,18 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
trap 'clear' SIGINT
 | 
					 | 
				
			||||||
cat > /tmp/.dialogrc << EOL
 | 
					 | 
				
			||||||
# Item color
 | 
					 | 
				
			||||||
tag_color = (BLACK,WHITE,ON)
 | 
					 | 
				
			||||||
EOL
 | 
					 | 
				
			||||||
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose the action for apt" 10 40 0 "Install" 1 "Install from .deb file" 2 "Update" 3 "Upgrade" 4 "Remove" 5 "Autoremove" 6)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [[ $action == "Install" || $action == "Remove" ]]; then 
 | 
					 | 
				
			||||||
  package=$(apt-cache search '' | sort | cut --delimiter ' ' --fields 1 | fzf --multi --cycle --reverse --preview 'apt-cache show {1}')
 | 
					 | 
				
			||||||
  sudo apt ${action,,} $package -y
 | 
					 | 
				
			||||||
elif [[ $action == "Install from .deb file" ]]; then 
 | 
					 | 
				
			||||||
  find . -name "*.deb" | fzf | xargs -I _ sudo apt install -y _
 | 
					 | 
				
			||||||
elif [[ $action == "Update" || $action == "Upgrade" || $action == "Autoremove"  ]]; then 
 | 
					 | 
				
			||||||
  sudo apt ${action,,} -y
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,35 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
trap 'clear' SIGINT
 | 
					 | 
				
			||||||
cat > /tmp/.dialogrc << EOL
 | 
					 | 
				
			||||||
# Item color
 | 
					 | 
				
			||||||
tag_color = (BLACK,WHITE,ON)
 | 
					 | 
				
			||||||
EOL
 | 
					 | 
				
			||||||
set +ex
 | 
					 | 
				
			||||||
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose the action for git" 10 40 0 'Add all && Commit && Push' 1 "Add all && Commit" 2 "Reset soft" 3 "Reset hard" 4 "Status" 5 "Clone submodules" 6)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#echo $action
 | 
					 | 
				
			||||||
#exit
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [[ $action == "Add all && Commit && Push" ]]; then 
 | 
					 | 
				
			||||||
  commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
 | 
					 | 
				
			||||||
  git add .
 | 
					 | 
				
			||||||
  git commit -"m $commit_message"
 | 
					 | 
				
			||||||
  git push
 | 
					 | 
				
			||||||
elif [[ $action == "Add all && Commit" ]]; then 
 | 
					 | 
				
			||||||
  commit_message=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --title "$action" --inputbox "Enter the commit message:" 8 40)
 | 
					 | 
				
			||||||
  git add . 
 | 
					 | 
				
			||||||
  git commit -"m $commit_message"
 | 
					 | 
				
			||||||
elif [[ $action == "Reset soft" ]]; then
 | 
					 | 
				
			||||||
  if DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --yesno "Do you wanna soft reset git?" 10 40; then
 | 
					 | 
				
			||||||
    git reset
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
elif [[ $action == "Reset hard" ]]; then 
 | 
					 | 
				
			||||||
  if DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --yesno "Do you wanna hard reset git?" 10 40; then
 | 
					 | 
				
			||||||
    git reset --hard
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
elif [[ $action == "Status" ]]; then 
 | 
					 | 
				
			||||||
  git status
 | 
					 | 
				
			||||||
elif [[ $action == "Clone submodules" ]]; then 
 | 
					 | 
				
			||||||
  git submodule update --init --recursive
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,31 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
trap 'clear' SIGINT
 | 
					 | 
				
			||||||
cat > /tmp/.dialogrc << EOL
 | 
					 | 
				
			||||||
# Item color
 | 
					 | 
				
			||||||
tag_color = (BLACK,WHITE,ON)
 | 
					 | 
				
			||||||
EOL
 | 
					 | 
				
			||||||
namespace=$(kubectl get ns --no-headers | awk '{ print $1 }' | fzf --multi --cycle --reverse --preview 'kubectl get pods -o wide -n {1}')
 | 
					 | 
				
			||||||
resource=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose resource in $namespace" 10 40 0 "Pods" 1 "Services" 2 "Ingress" 3 "Secrets" 4)
 | 
					 | 
				
			||||||
set +ex
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ "$resource" = "Pods" ]; then 
 | 
					 | 
				
			||||||
  pod=$(kubectl -n $namespace get pods --no-headers | awk '{ print $1 }' | fzf --multi --cycle --reverse --preview "kubectl get pod -n $namespace {1} -o yaml")
 | 
					 | 
				
			||||||
  if [ ! -z "$pod" ]; then 
 | 
					 | 
				
			||||||
    action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose action for $pod in $namespace" 10 40 0 "Logs" 1 "Describe pod" 2 "Exec -it" 3 "Delete pod" 4)
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
  if [ ! -z "$action" ]; then
 | 
					 | 
				
			||||||
    xdotool type --delay 0 "kubectl -n $namespace ${action,,} $pod" && xdotool key --delay 0 Return 
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
elif [ "$resource" = "Services" ]; then 
 | 
					 | 
				
			||||||
  svc=$(kubectl -n $namespace get svc --no-headers | awk '{ print $1 }' | fzf --multi --cycle --reverse --preview "kubectl get svc -n $namespace {1} -o yaml")
 | 
					 | 
				
			||||||
  if [ ! -z "$svc" ]; then 
 | 
					 | 
				
			||||||
    action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose action for $pod in $namespace" 10 40 0 "Get endpoints" 1 "Edit service" 2)
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
  if [ ! -z "$action" ]; then
 | 
					 | 
				
			||||||
    xdotool type --delay 0 "kubectl -n $namespace ${action,,} $svc" && xdotool key --delay 0 Return 
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
fi	
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,4 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
trap 'clear' SIGINT
 | 
					 | 
				
			||||||
setxkbmap
 | 
					 | 
				
			||||||
cat ~/.aliases.txt | fzf | cut -d : -f 2- | sed s/\ // | (stty -F /dev/tty -echo; xargs -0 -I _ xdotool type --delay 0 _; stty -F /dev/tty echo) && xdotool key Return
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,15 +0,0 @@
 | 
				
			||||||
#!/bin/bash
 | 
					 | 
				
			||||||
set -e
 | 
					 | 
				
			||||||
trap 'clear' SIGINT
 | 
					 | 
				
			||||||
cat > /tmp/.dialogrc << EOL
 | 
					 | 
				
			||||||
# Item color
 | 
					 | 
				
			||||||
tag_color = (BLACK,WHITE,ON)
 | 
					 | 
				
			||||||
EOL
 | 
					 | 
				
			||||||
service=$(systemctl list-units --type service --all --plain --quiet | awk '{ print $1 }' | fzf --multi --cycle --reverse --preview 'SYSTEMD_COLORS=1 systemctl status --no-pager {1}')
 | 
					 | 
				
			||||||
set +ex
 | 
					 | 
				
			||||||
action=$(DIALOGRC=/tmp/.dialogrc dialog --stdout --erase-on-exit --menu "Choose the action for $service" 10 40 0 "Start" 1 "Stop" 2 "Disable" 3 "Enable" 4)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ ! -z $action ]; then 
 | 
					 | 
				
			||||||
  sudo systemctl ${action,,} $service
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue