tapmap.autostart.windows_autostart
tapmap.autostart.windows_autostart
Manage TapMap autostart on Windows.
PREFERRED_ARGUMENTS = '--no-browser'
module-attribute
logger = logging.getLogger(__name__)
module-attribute
_UNREADABLE_STATUS = NativeAutostartStatus(queryable=False, present=False, recognized=False, enabled=False, matches_preferred_definition=False)
module-attribute
AutostartDecision
Bases: NamedTuple
State to display and action to perform when clicked.
Source code in src/tapmap/state/autostart.py
56 57 58 59 | |
ElevationStatus
Bases: Enum
Whether TapMap is running with administrator privileges.
Source code in src/tapmap/state/autostart.py
28 29 30 31 32 | |
NativeAutostartStatus
dataclass
Current state of the operating system's autostart entry.
Other fields are ignored when the state cannot be queried.
Source code in src/tapmap/state/autostart.py
42 43 44 45 46 47 48 49 50 51 52 53 | |
WriteOutcome
Bases: Enum
Result of an autostart write attempt.
Source code in src/tapmap/state/autostart.py
35 36 37 38 39 | |
TaskInfo
dataclass
Information used to identify a Task Scheduler task.
Source code in src/tapmap/autostart/windows_identity.py
16 17 18 19 20 21 22 23 24 25 26 27 28 | |
decide_autostart_display(*, status, elevation, is_source_run)
Return the autostart display state and click action.
Source code in src/tapmap/state/autostart.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
is_recognized_as_ours(task, *, current_username, exe_path)
Return whether a task can be identified as TapMap's task.
Source code in src/tapmap/autostart/windows_identity.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
matches_preferred_definition(task)
Return whether the task uses the preferred arguments.
Source code in src/tapmap/autostart/windows_identity.py
67 68 69 70 | |
is_elevated()
Return whether TapMap is running with administrator privileges.
Source code in src/tapmap/autostart/windows_autostart.py
38 39 40 41 42 43 44 45 46 47 | |
_current_username()
Return the current Windows username.
Source code in src/tapmap/autostart/windows_autostart.py
50 51 52 | |
_classify(task, *, exe_path)
Convert a Task Scheduler task to TapMap's autostart state.
Source code in src/tapmap/autostart/windows_autostart.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
query_display_state(*, exe_path, is_frozen)
Return the state and action for the autostart control.
Source code in src/tapmap/autostart/windows_autostart.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
enable(*, exe_path)
Enable the TapMap autostart task.
Source code in src/tapmap/autostart/windows_autostart.py
106 107 108 109 110 111 112 113 114 115 116 | |
disable(*, exe_path)
Disable the TapMap autostart task.
Source code in src/tapmap/autostart/windows_autostart.py
119 120 121 122 123 124 125 126 127 128 129 | |
create(*, exe_path)
Create the TapMap autostart task.
Source code in src/tapmap/autostart/windows_autostart.py
132 133 134 135 136 137 138 139 140 141 142 143 144 | |
repair_and_enable(*, exe_path)
Repair and enable the TapMap autostart task.
Source code in src/tapmap/autostart/windows_autostart.py
147 148 149 | |
run_startup_setup(*, app_data_dir, exe_path, is_frozen)
Set up autostart on first launch when needed.
Failures are logged and must not prevent TapMap from starting.
Source code in src/tapmap/autostart/windows_autostart.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
_verify_created_task(*, exe_path)
Verify that the newly created task has the expected configuration.
Source code in src/tapmap/autostart/windows_autostart.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |