From 258a8b775fac1dbc96d5e033f4dd04719d5c43f5 Mon Sep 17 00:00:00 2001 From: srv Date: Tue, 6 May 2025 01:46:24 -0500 Subject: modified some files for know where start --- README.md | 8 +++++--- automatisier-lieblingstexte.sh | 25 ------------------------- run.sh | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 automatisier-lieblingstexte.sh create mode 100644 run.sh diff --git a/README.md b/README.md index 3445e07..0c91ecb 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Requeriments -xsel, xclip, herbe, xdotool, dash, l3afpad, yad + sudo apt install xsel xclip herbe xdotool dash l3afpad yad -cd && sed -n '/^#!\/bin\/dash/,/```/p' automatisiere-lieblingstexte/README.md | sed '/^```/d' | sed '/^$/d' > /tmp/automatisiere-lieblingstexte.tmp.sh && dash /tmp/automatisiere-lieblingstexte.tmp.sh +Nota echo -n 1 debe comenzar en 1 el archivo $HOME/.contador.automatisiere-lieblingstexte.log -Nota echo -n 1 debe comentar en uno para el contador.tt.log +## How to run + + bash "$HOME/automatisiere-lieblingstexte/run.sh" start ``` 1 Empieza reproducir: diff --git a/automatisier-lieblingstexte.sh b/automatisier-lieblingstexte.sh deleted file mode 100644 index 15261b5..0000000 --- a/automatisier-lieblingstexte.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/dash - -archivo=$(cat "$HOME/automatisiere-lieblingstexte/README.md" | grep 'mytext=' | awk -F"=" '{print $2}' | tr -d "'") - -if echo -n $1 | grep -q start; then - if [ -f "$archivo" ]; then - OLD=$(echo -n $(mktemp -u | cut -d. -f2)) - mv "$archivo" "${archivo}.${OLD}.txt" - fi - - # Abre una ventana de xterm que ejecuta "dash run" - if wmctrl -l | grep -qv 'Yad Icon panel'; then - sleep 1 && ( xdotool windowmove "$(xdotool search --name 'bash yad' | head -n 1)" 1247 536 && xdotool windowsize "$(xdotool search --name 'bash yad' | head -n 1)" 28 160 ) & - xterm -hold -e "bash $HOME/automatisiere-lieblingstexte/yad-panel.sh" & - fi -fi - -if echo -n $1 | grep -q 'Z9SWsMuc89'; then - if [ -f $archivo ]; then - texto=$(echo -n "$archivo") - if [ -n "$texto" ]; then - xterm -hold -e "cd && sed -n '/^#!\/bin\/dash/,/```/p' \"$HOME/automatisiere-lieblingstexte/README.md\" | sed '/^```/d' | sed '/^$/d' > /tmp/automatisiere-lieblingstexte.tmp.sh && dash /tmp/automatisiere-lieblingstexte.tmp.sh" & - fi - fi -fi \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..15261b5 --- /dev/null +++ b/run.sh @@ -0,0 +1,25 @@ +#!/bin/dash + +archivo=$(cat "$HOME/automatisiere-lieblingstexte/README.md" | grep 'mytext=' | awk -F"=" '{print $2}' | tr -d "'") + +if echo -n $1 | grep -q start; then + if [ -f "$archivo" ]; then + OLD=$(echo -n $(mktemp -u | cut -d. -f2)) + mv "$archivo" "${archivo}.${OLD}.txt" + fi + + # Abre una ventana de xterm que ejecuta "dash run" + if wmctrl -l | grep -qv 'Yad Icon panel'; then + sleep 1 && ( xdotool windowmove "$(xdotool search --name 'bash yad' | head -n 1)" 1247 536 && xdotool windowsize "$(xdotool search --name 'bash yad' | head -n 1)" 28 160 ) & + xterm -hold -e "bash $HOME/automatisiere-lieblingstexte/yad-panel.sh" & + fi +fi + +if echo -n $1 | grep -q 'Z9SWsMuc89'; then + if [ -f $archivo ]; then + texto=$(echo -n "$archivo") + if [ -n "$texto" ]; then + xterm -hold -e "cd && sed -n '/^#!\/bin\/dash/,/```/p' \"$HOME/automatisiere-lieblingstexte/README.md\" | sed '/^```/d' | sed '/^$/d' > /tmp/automatisiere-lieblingstexte.tmp.sh && dash /tmp/automatisiere-lieblingstexte.tmp.sh" & + fi + fi +fi \ No newline at end of file -- cgit v1.2.3