From 7a85d75acf1ed375cf38f34173c1a16a6f087a22 Mon Sep 17 00:00:00 2001 From: luisgulo Date: Thu, 25 Apr 2024 15:01:32 +0200 Subject: [PATCH] Subida inicial --- Tile On-Off.desktop | 11 +++++++++++ cortile-On_Off.sh | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 Tile On-Off.desktop create mode 100755 cortile-On_Off.sh diff --git a/Tile On-Off.desktop b/Tile On-Off.desktop new file mode 100755 index 0000000..fd33bd6 --- /dev/null +++ b/Tile On-Off.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Terminal=false +Name[es_ES]=Tile On-Off +Exec=/home/USUARIO/.local/bin/cortile-On_Off.sh +Comment[es_ES]=Iniciar/Detener Cortile Tile Window +Icon=org.xfce.workspaces +Icon[es_ES]=org.xfce.workspaces +Name=Tile On-Off +Comment=Iniciar/Detener Cortile Tile Window diff --git a/cortile-On_Off.sh b/cortile-On_Off.sh new file mode 100755 index 0000000..9af1ff3 --- /dev/null +++ b/cortile-On_Off.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# SOLOCONLINUX. Script para Iniciar/Detener el servicio de cortile "tile window manager" + +# Preguntar al servicio de Cortile +nCortiles=$(systemctl --user --no-pager -l status cortile.service |grep 'Active'|grep -i 'running'|wc -l|awk '{print $1}') +# 0 => Apagado / 1 => Encendido +if [ $nCortiles == 0 ] ; then + # No esta corriendo lo inicio + systemctl --user start cortile.service + #echo "Cortile Iniciado" +else + # Iniciado. Lo Detengo + systemctl --user stop cortile.service + #echo "Cortile Detenido" +fi +