feat: Adds weather desktop file, I may need to fix how it gets copied in the dev-env script.

This commit is contained in:
2025-10-01 17:26:08 -04:00
parent dccf54e115
commit f37b5f1db2
8 changed files with 55 additions and 27 deletions

19
dev-env
View File

@@ -42,8 +42,8 @@ update_dirs() {
log "copying over files from: $1"
pushd $1 &>/dev/null
(
# Copy everything except systemd and zsh folders, they need treated differently.
configs=$(find . -mindepth 1 -maxdepth 1 -type d \( -name "systemd" -o -name "zsh" \) -prune -o -type d -print)
# Copy everything except systemd, share, and zsh folders, they need treated differently.
configs=$(find . -mindepth 1 -maxdepth 1 -type d \( -name "systemd" -o -name "zsh" -o -name "share" \) -prune -o -type d -print)
for c in $configs; do
directory=${2%/}/${c#./}
log " removing: rm -rf $directory"
@@ -103,14 +103,14 @@ update_dirs $DEV_ENV/env/.config $XDG_CONFIG_HOME
update_dirs $DEV_ENV/env/.local $HOME/.local
# SYSTEMD
mkdir -p $XDG_CONFIG_HOME/systemd/user
mkdir -p $XDG_CONFIG_HOME/systemd/user >/dev/null 2>&1
copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user
# ZSH
# NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and
# copying configuration.
copy $DEV_ENV/env/.zshenv $HOME/.zshenv
mkdir -p $XDG_CONFIG_HOME/zsh
mkdir -p $XDG_CONFIG_HOME/zsh >/dev/null 2>&1
update_dirs $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
@@ -118,18 +118,23 @@ copy_files $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf
# GPG
mkdir $HOME/.gnupg
mkdir $HOME/.gnupg >/dev/null 2>&1
copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg
# Wallpapers
mkdir $HOME/wallpapers
mkdir $HOME/wallpapers >/dev/null 2>&1
copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers
# MISC
mkdir $HOME/Pictures
mkdir $HOME/Pictures >/dev/null 2>&1
mkdir -p $XDG_DATA_HOME/clipse/tmp_files
copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env
mkdir -p $XDG_DATA_HOME/applications/icons
copy_files $DEV_ENV/env/.local/share/applications $XDG_DATA_HOME/applications
copy_files $DEV_ENV/env/.local/share/applications/icons $XDG_DATA_HOME/applications/icons
# TODO: Copy icons
systemctl --user daemon-reload
hyprctl reload
exec zsh -l

View File

@@ -52,14 +52,14 @@ bindd = $mainMod, J, Focus window - down, movefocus, d
bindd = $mainMod, K, Focus window - up, movefocus, u # move window focus using vim keys
bindd = $mainMod, L, Focus window - right, movefocus, r # move window focus using vim keys
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
bindd = $HYPER, L, [L]ock computer, exec, hyprlock
bindd = $mainMod, M, [M]usic - apple, exec, $pwa --focus "https://music.apple.com"
bindd = $HYPER, L, [L]ock computer, exec, hyprlock
bindd = $mainMod, M, [M]usic - apple, exec, $pwa --special music "https://music.apple.com"
bindd = $mainMod SHIFT, M, [M]enu bar - toggle visible, exec, $scripts/toggle-waybar
bindd = $mainMod, P, [P]assword manager, exec, $pwa --special pass "https://pass.proton.me"
bindd = $mainMod SHIFT, P, Toggle [p]seudo window mode, pseudo, # dwindle
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, $scripts/waybar-restart
bindd = $mainMod, S, Toggle [s]pecial workspace, togglespecialworkspace, magic # use $windowMod S to send window to the special workspace
bindd = $mainMod, Y, [Y]ouTube, exec, $pwa "https://youtube.com"
bindd = $mainMod, Y, [Y]ouTube, exec, $pwa --focus "https://youtube.com"
bindd = $mainMod, U, [U]nifi, exec, $pwa "https://unifi.ui.com"
bindd = $mainMod SHIFT, U, [U]ninstall desktop app, exec, $uninstallDesktop
bindd = $mainMod, V, Clipboard history, exec, $clipboardHistory
@@ -81,30 +81,30 @@ bindd = $mainMod, 0, Switch to workspace 1[0], workspace, 10
bindd = $mainMod SHIFT, 1, Switch all workspaces to monitor [1], exec, $scripts/mv-all-workspaces-to-monitor 1
bindd = $mainMod SHIFT, 0, Switch all workspaces to monitor [0], exec, $scripts/mv-all-workspaces-to-monitor 0
####################################################
#######################################################################################
# Window controls
#
# These should in general use the $windowMod prefix
######################################################
# MOD # KEY # DESC # Action #
######################################################
bindd = CTRL SHIFT, F, Toggle [f]loating, exec, $scripts/window-toggle-floating
#######################################################################################
# MOD # KEY # DESC # Action #
#######################################################################################
bindd = CTRL SHIFT, F, Toggle [f]loating, exec, $scripts/window-toggle-floating
# TODO: Decide which is prefered to switch to fullscreen.
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, H, Move window - left, movewindow, l # move windows with windowMod + vim keys
bindd = $windowMod, J, Move window - down, movewindow, d # move windows with windowMod + vim keys
bindd = $windowMod, K, Move window - up, movewindow, u # move windows with windowMod + vim keys
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
bindd = $HYPER, J, Toggle split orientation, togglesplit # dwindle
bindd = $windowMod, S, Move window to [s]pecial workspace, movetoworkspacesilent, special:magic
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, F, Toggle [f]ullscreen, fullscreen,
bindd = $windowMod, H, Move window - left, movewindow, l # move windows with windowMod + vim keys
bindd = $windowMod, J, Move window - down, movewindow, d # move windows with windowMod + vim keys
bindd = $HYPER, J, Toggle split orientation, togglesplit # dwindle
bindd = $windowMod, K, Move window - up, movewindow, u # move windows with windowMod + vim keys
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
bindd = $windowMod, M, Move window to [m]usic workspace, movetoworkspace, special:music
bindd = $windowMod, S, Move window to [s]pecial workspace, movetoworkspacesilent, special:magic
# FIX: Changes size of window, this works a different depending on if
# the window is on the right or left of the screen.
#
# Resize horizontally
bindd = $windowMod, EQUAL, Increase window size - horizontal, resizeactive, 20 0
bindd = $windowMod, MINUS, Decrease window size - horizontal, resizeactive, -20 0
bindd = $windowMod, EQUAL, Increase window size - horizontal, resizeactive, 20 0
bindd = $windowMod, MINUS, Decrease window size - horizontal, resizeactive, -20 0
# Resize vertically
bindd = $windowMod SHIFT, EQUAL, Increase window size - vertical, resizeactive, 0 20
bindd = $windowMod SHIFT, MINUS, Decrease window size - vertical, resizeactive, 0 -20

14
env/.local/scripts/get-weather vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Get the weather for the given location.
location=${1:-Cincinnati}
shouldContinue="1"
while [[ $shouldContinue == "1" ]]; do
echo -e "\e[H\e[2J" # clears the screen.
curl "wttr.in/$1"
shouldContinue=$(gum confirm "Quit / Refresh" --affirmative Quit --negative Refresh && echo "0" || echo "1")
done
echo -e "\e[H\e[2J" # clears the screen.

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=Weather
Comment=Get weather
Exec=ghostty --class=com.ghostty.weather -e /home/michael/.local/scripts/get-weather
Icon=/home/michael/.local/share/applications/icons/weather.png
Terminal=false
Type=Application
StartupNotify=true

2
webapp
View File

@@ -54,7 +54,7 @@ install() {
# Install local icons if needed
mkdir -p $XDG_DATA_HOME/applications/icons
for i in $(find $DEV_ENV/env/icons -mindepth 1 -maxdepth 1 -type f); do
for i in $(find $DEV_ENV/env/.local/share/applications/icons -mindepth 1 -maxdepth 1 -type f); do
if [[ ! -f $XDG_DATA_HOME/applications/icons/$i ]] && [[ $dry_run == "0" ]]; then
cp $i $XDG_DATA_HOME/applications/icons
fi