local function lazy_load() {
local -xr thunk="$(cat)"
# (u) removes duplicates
local -xr triggers=(${(u)@})
# Only if length of triggers is greater than zero
# otherwise the function will immediately execute.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import todoist | |
api = todoist.TodoistAPI(token='<your_token_here') | |
# Initial sync of your account | |
api.sync() | |
# Find Inbox in project - can be adapted to delete completed tasks for other projects as well | |
projects = api.projects.all() | |
inbox = next(p for p in projects if 'inbox_project' in p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To permanently cache the credentials | |
git config --global credential.helper store | |
# To ignore files that could cause issues across different workspaces | |
touch .gitignore | |
echo ".obsidian/cache | |
.trash/ | |
.DS_Store" > .gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sdkman recommands settings SDKMAN_DIR and sourcing sdkman-init.sh | |
# this can really slow down shell startup, so here's my attempt to lazy-load sdk() | |
# | |
# This snippet lives in my ~/.profile but generally could live in any zsh-related startup file. | |
# | |
# the logic of this custom sdk is kind of odd, but it basically checks if the current | |
# definition of sdk() is too short (less than 10 lines). If so, it tries to source | |
# the init script and then pass through all the arguments to the real sdk function. | |
export SDKMAN_DIR="$HOME/.sdkman" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/starship.toml | |
[battery] | |
full_symbol = "🔋" | |
charging_symbol = "🔌" | |
discharging_symbol = "⚡" | |
[[battery.display]] | |
threshold = 30 | |
style = "bold red" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Luke's config for the Zoomer Shell | |
# Enable colors and change prompt: | |
autoload -U colors && colors | |
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " | |
# History in cache directory: | |
HISTSIZE=10000 | |
SAVEHIST=10000 | |
HISTFILE=~/.cache/zsh/history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trigger] | |
Operation = Remove | |
Type = Package | |
Target = * | |
[Action] | |
Description = Clearing cache... | |
When = PostTransaction | |
Exec = /home/<user>/.local/bin/tools/removehook |
tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced power features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the
NetworkManager supports WiFi powersaving but the function is rather undocumented.
From the source code: wifi.powersave can have the following value:
- NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
- NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
- NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave