Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix strftime discrepancy on video capture #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion escrotum/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def __init__(self, filename=None, selection=False, xid=None, delay=None,
self.set_keep_above(True)
self.connect("draw", self.on_expose)

self.now = datetime.datetime.now()

if delay:
if countdown:
sys.stdout.write("Taking shot in ..%s" % delay)
Expand Down Expand Up @@ -394,7 +396,7 @@ def on_owner_change(self, clipboard, event):
exit()

def _expand_argument(self, width, height, string):
string = datetime.datetime.now().strftime(string)
string = self.now.strftime(string)
string = string.replace("$w", str(width))
string = string.replace("$h", str(height))
string = os.path.expanduser(string)
Expand Down