Added calendard plus changed launcher options
This commit is contained in:
parent
c78839f440
commit
5e2dd7ca3d
Binary file not shown.
0
src/Pytop/PyTop.py
Executable file → Normal file
0
src/Pytop/PyTop.py
Executable file → Normal file
0
src/Pytop/PyTop.sh
Executable file → Normal file
0
src/Pytop/PyTop.sh
Executable file → Normal file
@ -255,14 +255,22 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="timeLabel">
|
<object class="GtkEventBox" id="timeLabelEveBox">
|
||||||
<property name="width_request">126</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="track_visited_links">False</property>
|
<property name="above_child">True</property>
|
||||||
<attributes>
|
<signal name="button-release-event" handler="toggleCalPopover" swapped="no"/>
|
||||||
<attribute name="scale" value="1.5"/>
|
<child>
|
||||||
</attributes>
|
<object class="GtkLabel" id="timeLabel">
|
||||||
|
<property name="width_request">126</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="track_visited_links">False</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="scale" value="1.5"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -280,6 +288,22 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkPopover" id="calendarPopup">
|
||||||
|
<property name="width_request">420</property>
|
||||||
|
<property name="height_request">225</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="relative_to">timeLabelEveBox</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCalendar" id="calendarWid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="year">2020</property>
|
||||||
|
<property name="month">3</property>
|
||||||
|
<property name="day">22</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
<object class="GtkImage" id="createImage">
|
<object class="GtkImage" id="createImage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
@ -19,9 +19,7 @@ class CrossClassSignals:
|
|||||||
# Displays Timer
|
# Displays Timer
|
||||||
def displayclock(self):
|
def displayclock(self):
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
timeStr = now.strftime("%I:%M %p %m/%d/%Y")
|
||||||
# timeStr = now.strftime("%H:%M %m/%d/%y")
|
|
||||||
timeStr = now.strftime("%I:%M %p %m/%d/%y")
|
|
||||||
self.timeLabel.set_label(timeStr)
|
self.timeLabel.set_label(timeStr)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
2
src/Pytop/signal_classes/DrawSignals.py
Executable file → Normal file
2
src/Pytop/signal_classes/DrawSignals.py
Executable file → Normal file
@ -111,7 +111,7 @@ class DrawSignals:
|
|||||||
ah = area.get_allocated_height()
|
ah = area.get_allocated_height()
|
||||||
self.aw = aw
|
self.aw = aw
|
||||||
self.ah = ah
|
self.ah = ah
|
||||||
self.xStep = aw / 200 # For x-axis
|
self.xStep = aw / 200 # For x-axis 60 * 2 per 1 sec steps
|
||||||
self.yStep = ah / 100 # For y-axis %s
|
self.yStep = ah / 100 # For y-axis %s
|
||||||
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, aw, ah)
|
self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, aw, ah)
|
||||||
self.brush = cairo.Context(self.surface)
|
self.brush = cairo.Context(self.surface)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# Python imports
|
# Python imports
|
||||||
import threading
|
import threading
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
# Gtk imports
|
# Gtk imports
|
||||||
import gi
|
import gi
|
||||||
@ -24,6 +25,23 @@ class TaskbarSignals:
|
|||||||
self.setPagerWidget()
|
self.setPagerWidget()
|
||||||
self.setTasklistWidget()
|
self.setTasklistWidget()
|
||||||
|
|
||||||
|
def toggleCalPopover(self, widget, eve):
|
||||||
|
calendarPopup = self.builder.get_object('calendarPopup')
|
||||||
|
if (calendarPopup.get_visible() == False):
|
||||||
|
calendarWid = self.builder.get_object('calendarWid')
|
||||||
|
now = datetime.now()
|
||||||
|
timeStr = now.strftime("%m/%d/%Y")
|
||||||
|
parts = timeStr.split("/")
|
||||||
|
month = int(parts[0])
|
||||||
|
day = int(parts[1])
|
||||||
|
year = int(parts[2])
|
||||||
|
calendarWid.select_day(day)
|
||||||
|
calendarWid.select_month(month, year)
|
||||||
|
calendarPopup.popup()
|
||||||
|
else:
|
||||||
|
calendarPopup.popdown()
|
||||||
|
|
||||||
|
|
||||||
def setPagerWidget(self):
|
def setPagerWidget(self):
|
||||||
pager = wnck.Pager()
|
pager = wnck.Pager()
|
||||||
|
|
||||||
|
Binary file not shown.
BIN
src/Pytop/signal_classes/__pycache__/GridSignals.cpython-36.pyc
Normal file
BIN
src/Pytop/signal_classes/__pycache__/GridSignals.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
src/Pytop/signal_classes/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/signal_classes/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
@ -62,7 +62,7 @@ class FileHandler:
|
|||||||
else: # Create Folder
|
else: # Create Folder
|
||||||
os.mkdir(name)
|
os.mkdir(name)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -86,7 +86,7 @@ class FileHandler:
|
|||||||
shutil.move(finalForm, toPath)
|
shutil.move(finalForm, toPath)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -106,7 +106,7 @@ class FileHandler:
|
|||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("An error occured deleting the file:")
|
print("An error occured deleting the file:")
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -129,7 +129,7 @@ class FileHandler:
|
|||||||
print("The folder/file does not exist")
|
print("The folder/file does not exist")
|
||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@ -144,7 +144,7 @@ class FileHandler:
|
|||||||
print("The folder/file does not exist")
|
print("The folder/file does not exist")
|
||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print( repr(e) )
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
BIN
src/Pytop/utils/__pycache__/Dragging.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/Dragging.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/FileHandler.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/FileHandler.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/Settings.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/Settings.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/utils/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/utils/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/Grid.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/Grid.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/Icon.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/Icon.cpython-36.pyc
Normal file
Binary file not shown.
BIN
src/Pytop/widgets/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
src/Pytop/widgets/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user