Skip to content

Commit

Permalink
Merge pull request #214 from mr-mustash/u/pking/everything_else_updated
Browse files Browse the repository at this point in the history
Bulk update from personal laptop
  • Loading branch information
mr-mustash authored Nov 17, 2024
2 parents c9af147 + 11fc9ba commit c2de801
Show file tree
Hide file tree
Showing 19 changed files with 93 additions and 137 deletions.
2 changes: 1 addition & 1 deletion tilde/.config/fish/colors.fish
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if not set -q __pking_init_colors
set -U fish_color_search_match --bold --background=magenta
set -U fish_color_selection white --bold --background=brblack
set -U fish_color_user green --bold
set -U fish_color_valid_path --underline
# set -U fish_color_valid_path --underline
set -U fish_pager_color_description B3A06D yellow
set -U fish_pager_color_prefix white --bold --underline
set -U fish_pager_color_progress brwhite --background=cyan
Expand Down
4 changes: 4 additions & 0 deletions tilde/.config/fish/conf.d/aliases.fish
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ if status --is-interactive
abbr --add git-clean 'git pull ;and git remote prune origin ;and git gc'
abbr --add grh 'git reset --hard'
abbr --add gbf fuzzy_git_branch
abbr --add gpom --function git_pull_origin_default
abbr --add gcm --function git_checkout_default
abbr --add gdm --function git_diff_default

# `gpom`, `gdm`, and `gcm` are now set in:
# prompt/prompt_functions/__fish_prompt_git_checkout_default.fish

Expand Down
4 changes: 4 additions & 0 deletions tilde/.config/fish/conf.d/pyenv.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin

pyenv init - | source
15 changes: 15 additions & 0 deletions tilde/.config/fish/functions/brew-update.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function brew-update --description="update brew and cleanup after itself"
set -lx bold (tput bold)
set -lx normal (tput sgr0)

echo -e "$bold Brew Update $normal"
command brew update

echo -e "$bold Brew Upgrde $normal"
command brew upgrade

echo -e "$bold Brew Cleanup $normal"
command brew cleanup --prune-prefix
command brew cleanup
command brew cleanup -s
end
8 changes: 8 additions & 0 deletions tilde/.config/fish/functions/git_checkout_default.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function git_checkout_default -d 'git pull origin refs/remotes/origin/HEAD'
if git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null 1>&2
set -l default_branch (git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
echo "git checkout $default_branch"
else
echo "Not a git directory!"
end
end
8 changes: 8 additions & 0 deletions tilde/.config/fish/functions/git_diff_default.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function git_diff_default -d 'git pull origin refs/remotes/origin/HEAD'
if git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null 1>&2
set -l default_branch (git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
echo "git diff $default_branch"
else
echo "Not a git directory!"
end
end
8 changes: 8 additions & 0 deletions tilde/.config/fish/functions/git_pull_origin_default.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function git_pull_origin_default -d 'git pull origin refs/remotes/origin/HEAD'
if git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null 1>&2
set -l default_branch (git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
echo "git pull origin $default_branch"
else
echo "Not a git directory!"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ function __fish_prompt_git
set -l __status (git status --porcelain --branch)
__fish_prompt_git_branch $__status
__fish_prompt_git_status $__status
__fish_prompt_git_checkout_default_abbr
else
set -e __git_current_dir
end
Expand Down

This file was deleted.

Binary file removed tilde/.hammerspoon/app-config/default.profraw
Binary file not shown.
29 changes: 0 additions & 29 deletions tilde/.hammerspoon/app-config/mailmate.lua

This file was deleted.

45 changes: 45 additions & 0 deletions tilde/.hammerspoon/app-config/movies.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
local movies = {}

local previousBrightness = hs.brightness.get()

-- List of applications to watch
local watchedApps = {
"Movist Pro",
"TV" -- Add other app names here as needed
}

local function isWatchedApp(name)
for _, appName in ipairs(watchedApps) do
if name == appName then
return true
end
end
return false
end

local function moviestCall(name, eventType, _)
if isWatchedApp(name) then -- Check if the app is in the watched list
if eventType == hs.application.watcher.activated then
previousBrightness = hs.brightness.get()
_log(string.format("%s activated. Previous brightness was %s.", name, previousBrightness))

hs.shortcuts.run("Enable Vivid")
hs.brightness.set(100)

elseif eventType == hs.application.watcher.deactivated then
_log(string.format("%s deactivated. Restoring brightness to %s.", name, previousBrightness))

hs.shortcuts.run("Disable Vivid")
hs.brightness.set(previousBrightness)
end
end
end

function movies.init()
local initStart = os.clock()
moviestWatcher = hs.application.watcher.new(moviestCall)
moviestWatcher:start()
_log(string.format("%s loaded in %.4f seconds.", debug.getinfo(1, "S").short_src:match("([^/]+)$"), os.clock() - initStart))
end

return movies
21 changes: 0 additions & 21 deletions tilde/.hammerspoon/app-config/moviest.lua

This file was deleted.

18 changes: 0 additions & 18 deletions tilde/.hammerspoon/app-config/vivid.lua

This file was deleted.

Binary file added tilde/.hammerspoon/assets/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tilde/.hammerspoon/assets/phone.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tilde/.hammerspoon/assets/thescore.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions tilde/.hammerspoon/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ display = require("system/display")
Dock = require("system/dock")
networking = require("system/networking")
videoCalls = require("system/videoCalls")
-- Keytrap = require("system/keytrap")


audioControl.init()
Expand All @@ -121,7 +120,6 @@ display.init()
Dock.init()
networking.init()
videoCalls.init()
-- Keytrap.init()
-- ========================================================================= }}}

-- App configuration ======================================================= {{{
Expand Down
50 changes: 0 additions & 50 deletions tilde/.hammerspoon/system/ping.lua

This file was deleted.

0 comments on commit c2de801

Please sign in to comment.