Commit f1be0640 by Juan

listo

1 parent 32be77e2
IMG/ico.png

360 Bytes

No preview for this file type
No preview for this file type
import sys
from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu
from PyQt5.QtGui import QIcon
#from gui import login
estado = ''
instancia = ''
ventana = ''
padre = ''
def action():
print('System tray icon clicked.')
global estado
global ventana
if estado == 'abierto':
estado = 'cerrado'
ventana.hide()
print(estado)
return()
if estado == 'cerrado':
estado = 'abierto'
ventana.show()
print(estado)
return()
def iniciar(self, parent, MainWindow):
global estado
estado = 'abierto'
global instancia
instancia = self
global ventana
ventana = MainWindow
global padre
padre = parent
self.icon = QSystemTrayIcon(QIcon('IMG/Browser.png'), parent)
self.icon.show()
self.menu = QMenu()
self.menu.aboutToShow.connect(action)
self.icon.setContextMenu(self.menu)
def CambioIcono(self, icono, parent):
self.icon.setIcon(QIcon(icono))
#showMessage(self)
#print('correjir sytem tray')
def showMessage(self):
global estado
estado = 'abierto'
global instancia
instancia = self
global ventana
global padre
icon = QSystemTrayIcon.MessageIcon(QIcon('icons/server-on.png'), 10)
self.trayIcon.showMessage(self.titleEdit.text(),
self.bodyEdit.toPlainText(), icon,
self.durationSpinBox.value() * 1000)
\ No newline at end of file
#!/bin/bash
## who am i? ##
_script="$(readlink -f ${BASH_SOURCE[0]})"
## Delete last component from $_script ##
_base="$(dirname $_script)"
## Okay, print it ##
echo "Script name : $_script"
echo "Current working dir : $PWD"
echo "Script location path (dir) : $_base"
cd $_base
while [ True ]
do
python3 interface.py
done
\ No newline at end of file
......@@ -6,6 +6,20 @@ Remoto = {"nombre": "Remoto", "CARPETA": "/home/juan/.cromes/remoto", "SSHprox":
"HOME": "https://nextcloud.anacsoft.com", "SSHport":"4200", "SSHdom":"s2.hgtec.com.ar",
"SSHuser":"juan", "SSHpass":"xvc7733455"}
cciv = {"nombre": "cciv", "CARPETA": "/home/juan/.cromes/cciv", "SSHprox":"3457",
"HOME": "http://192.168.0.111", "SSHport":"4200", "SSHdom":"s2.hgtec.com.ar",
"SSHuser":"juan", "SSHpass":"xvc7733455"}
isva = {"nombre": "isva", "CARPETA": "/home/juan/.cromes/isva", "SSHprox":"3457",
"HOME": "http://10.0.0.104", "SSHport":"4200", "SSHdom":"s2.hgtec.com.ar",
"SSHuser":"juan", "SSHpass":"xvc7733455"}
atlas = {"nombre": "atlas", "CARPETA": "/home/juan/.cromes/atlas", "SSHprox":"3457",
"HOME": "https://10.0.0.1", "SSHport":"4200", "SSHdom":"s2.hgtec.com.ar",
"SSHuser":"juan", "SSHpass":"xvc7733455"}
Personal = {"nombre": "Personal", "CARPETA": "/home/juan/.cromes/personal"}
nabegadores = [HGT, Remoto, Personal]
\ No newline at end of file
Temp = {"nombre": "Temporal", "CARPETA": "/dev/shm/personal"}
nabegadores = [HGT, Temp, Remoto, Personal, cciv, isva, atlas]
\ No newline at end of file
#!/usr/bin/python3
import sys
import configuracion as config
import archivos
from LIBs import archivos, tray
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton
from PyQt5.QtGui import QIcon
from PyQt5 import QtGui
class App(QWidget):
......@@ -22,6 +23,8 @@ class App(QWidget):
self.setGeometry(self.left, self.top, self.width, self.height)
self.show()
self.GenerarBotones()
self.setWindowIcon(QtGui.QIcon('IMG/Browser.png'))
self.hide()
def GenerarBotones(self):
......@@ -44,6 +47,7 @@ class App(QWidget):
pass
print(comando)
archivos.ejecutar(self, comando)
self.hide()
def constructor(self, name, id):
self.ordenV += 25
......@@ -55,4 +59,5 @@ class App(QWidget):
if __name__ == '__main__':
app = QApplication(sys.argv)
ex = App()
tray.iniciar(ex, ex, ex)
sys.exit(app.exec_())
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!