From 49689e4dd06df8ebcff0be03a3e0fc3d804656ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 18 Sep 2021 13:43:19 +0200 Subject: [PATCH] add shortcut keys for editing master and / or full file --- scripts/rofi-lectures.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/rofi-lectures.py b/scripts/rofi-lectures.py index 8e0e567..3f4bbad 100755 --- a/scripts/rofi-lectures.py +++ b/scripts/rofi-lectures.py @@ -4,8 +4,8 @@ from rofi import rofi from utils import generate_short_title from config import MAX_LEN -script = Courses().current.notes -lectures = script.lectures +notes = Courses().current.notes +lectures = notes.lectures sorted_lectures = sorted(lectures, key=lambda l: -l.number) @@ -24,11 +24,17 @@ key, index, selected = rofi('Select lecture', options, [ '-lines', 5, '-markup-rows', '-kb-row-down', 'Down', - '-kb-custom-1', 'Ctrl+n' + '-kb-custom-1', 'Alt+n', + '-kb-custom-2', 'Alt+m', + '-kb-custom-3', 'Alt+s' ]) if key == 0: sorted_lectures[index].edit() elif key == 1: - new_lecture = script.new_lecture() + new_lecture = notes.new_lecture() new_lecture.edit() +elif key == 2: + notes.edit_master() +elif key == 3: + notes.edit_full()