Horá do descanso! Uma peque aplicação que fiz usando pygtk
Publicado por Eros (última atualização em 06/07/2011)
[ Hits: 6.550 ]
Ai pessoal uma pequena aplicação que fiz em pygtk, que de meia em meia hora exibe uma tela com uma mensagem "ta na hora de descansar". Ótimo pra quem fica no computador e perde a hora na frente do mesmo. uma boa pra lembrar de dar uma pausinha pra ir beber água café e tals. Acho que também serve de dica pra quem ta aprendendo pygtk assim como eu ;)
#!/usr/bin/python
#
# main.py
# Copyright (C) Eros Araújo Alves Reis 2011 <eros.reis@live.com>
#
# hora is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# hora is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#coding: utf-8
#pygtk.require('2.0')
#! /usr/bin/env python
#-*- coding: utf-8 -*-
import pygtk
import gtk
import gobject
minuto = 0
janela = gtk.Window (gtk.WINDOW_TOPLEVEL)
label = gtk.Label("Ta na hora de descansar")
janela.add(label)
janela.show_all()
def verificar():
global minuto
if (minuto < 30):
minuto = minuto+1
janela.hide_all()
else:
janela.show_all()
minuto = 0
return True
a = gobject.timeout_add(60000, verificar)
gtk.main()
Desenhando uma estrela com Python
Nenhum comentário foi encontrado.
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Como realizar um ataque de força bruta para desobrir senhas?
Como usar Gpaste no ambiente Cinnamon
Atualizando o Fedora 42 para 43
Pergunta: Meu teclado não está respondendo direito como e consertar? (0)
SQLITE não quer funcionar no LINUX LMDE6 64 com Lazaruz 4.2 64bit (n... (0)
Secure boot, artigo interessante, nada técnico. (5)









