From 5fbdeaadbdb5a773411050845c0e6eb890780d8a Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Thu, 14 Jan 2021 02:16:56 +0100 Subject: [PATCH] remove mb-scrot --- bin/mb-scrot | 107 -------------------------------------------------- bin/mb-setvar | 3 +- 2 files changed, 2 insertions(+), 108 deletions(-) delete mode 100755 bin/mb-scrot diff --git a/bin/mb-scrot b/bin/mb-scrot deleted file mode 100755 index 220d6cd..0000000 --- a/bin/mb-scrot +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh -# /usr/bin/mb-scrot -# based on simple screenshot-script using scrot for manjaro-i3 by oberon@manjaro.org - - - -_conf=$HOME/.config/mb-scrot.conf - -if ! [ -f $_conf ]; then - echo "scrot_dir=$(xdg-user-dir PICTURES)" > $_conf -fi - -source $_conf - -if ! [ -d $scrot_dir ]; then - mkdir -p $scrot_dir -fi - -case $LANG in - pl*) - SCROT_5="Zrzut ekranu zostanie wykonany za 5 sekund" - SCROT_10="Zrzut ekranu zostanie wykonany za 10 sekund" - SAVED="Zrzut ekranu został zapisany w " - SELECT_AREA="Zaznacz obszar lub kliknij okno" - HLP="dostępne opcje: --d | --desk pełny ekran --w | --window aktywne okno --s | --select zaznaczenie --h | --help pokaż pomoc -Domyślną opcją jest 'pełny ekran'. -Katalog zapisu może być ustawiony w ${_conf}. -Domyślnym katalogiem jest $scrot_dir - " - MISSING="== ! mb-scrot: brak lub błędny argument ! ==" - ;; - *) - SCROT_5="screenshot will be taken in 5 second" - SCROT_10="screenshot will be taken in 10 second" - SAVED="screenshot has been saved in " - SELECT_AREA="select an area or click window for the screenshot'" - HLP="available options: --d | --desk full screen --w | --window active window --s | --select selection --h | --help display this information -Default option is 'full screen'. -The file destination can be set in ${_conf}. -Default is $scrot_dir - " - MISSING="== ! mb-scrot: missing or wrong argument ! ==" - ;; -esac - - -case "$1" in - --desk|-d|$NULL) - cd $scrot_dir - scrot && - sleep 1 && - notify-send -i photo "$SAVED $scrot_dir" - ;; - --window|-w) - cd $scrot_dir - scrot -u && - sleep 1 && - notify-send -i photo "$SAVED $scrot_dir" - ;; - --select|-s) - cd $scrot_dir - notify-send -i photo "$SELECT_AREA" && - scrot -fs && - sleep 1 && notify-send -i photo "$SAVED $scrot_dir" - ;; - -5) - cd $scrot_dir - notify-send -i photo -t 2000 "$SCROT_5" - scrot -d 5&& - sleep 1 && - notify-send -i photo "$SAVED $scrot_dir" - ;; - -10) - cd $scrot_dir - notify-send -i photo -t 6000 "$SCROT_10" - scrot -d 10&& - sleep 1 && - notify-send -i photo "$SAVED $scrot_dir" - ;; - --multi|-m) - cd $scrot_dir - scrot -m && - sleep 1 && - notify-send -i photo "$SAVED $scrot_dir" - ;; - - --help|-h) - echo "$HLP" - ;; - *) - echo " -$MISSING -$HLP -" - - exit 2 -esac - -exit 0 diff --git a/bin/mb-setvar b/bin/mb-setvar index 01a54f3..ec84922 100755 --- a/bin/mb-setvar +++ b/bin/mb-setvar @@ -24,7 +24,8 @@ sed -i /^"$search="/d $FILE fi if grep -Rq $search $FILE then #found - sed -i s/^"$search=".*$/"$1"/ $FILE + #sed -i s/^"$search=".*$/"$1"/ $FILE + sed -i s/^"$search".*$/"$1"/ $FILE else #not found echo $1 >> $FILE fi