mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
feat: Adds weather desktop file, I may need to fix how it gets copied in the dev-env script.
This commit is contained in:
19
dev-env
19
dev-env
@@ -42,8 +42,8 @@ update_dirs() {
|
|||||||
log "copying over files from: $1"
|
log "copying over files from: $1"
|
||||||
pushd $1 &>/dev/null
|
pushd $1 &>/dev/null
|
||||||
(
|
(
|
||||||
# Copy everything except systemd and zsh folders, they need treated differently.
|
# 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" \) -prune -o -type d -print)
|
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
|
for c in $configs; do
|
||||||
directory=${2%/}/${c#./}
|
directory=${2%/}/${c#./}
|
||||||
log " removing: rm -rf $directory"
|
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
|
update_dirs $DEV_ENV/env/.local $HOME/.local
|
||||||
|
|
||||||
# SYSTEMD
|
# 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
|
copy_files $DEV_ENV/env/.config/systemd/user $XDG_CONFIG_HOME/systemd/user
|
||||||
|
|
||||||
# ZSH
|
# ZSH
|
||||||
# NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and
|
# NOTE: This keeps from clobbering zsh history and plugins vs. wiping the entire directory and
|
||||||
# copying configuration.
|
# copying configuration.
|
||||||
copy $DEV_ENV/env/.zshenv $HOME/.zshenv
|
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
|
update_dirs $DEV_ENV/env/.config/zsh $XDG_CONFIG_HOME/zsh
|
||||||
copy_files $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
|
copy $DEV_ENV/env/.tmux.conf $HOME/.tmux.conf
|
||||||
|
|
||||||
# GPG
|
# GPG
|
||||||
mkdir $HOME/.gnupg
|
mkdir $HOME/.gnupg >/dev/null 2>&1
|
||||||
copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg
|
copy_files $DEV_ENV/env/.gnupg $HOME/.gnupg
|
||||||
|
|
||||||
# Wallpapers
|
# Wallpapers
|
||||||
mkdir $HOME/wallpapers
|
mkdir $HOME/wallpapers >/dev/null 2>&1
|
||||||
copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers
|
copy_files $DEV_ENV/env/wallpapers $HOME/wallpapers
|
||||||
|
|
||||||
# MISC
|
# MISC
|
||||||
mkdir $HOME/Pictures
|
mkdir $HOME/Pictures >/dev/null 2>&1
|
||||||
mkdir -p $XDG_DATA_HOME/clipse/tmp_files
|
mkdir -p $XDG_DATA_HOME/clipse/tmp_files
|
||||||
copy $DEV_ENV/dev-env $HOME/.local/scripts/dev-env
|
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
|
systemctl --user daemon-reload
|
||||||
hyprctl reload
|
hyprctl reload
|
||||||
exec zsh -l
|
exec zsh -l
|
||||||
|
|||||||
38
env/.config/hypr/keybinds.conf
vendored
38
env/.config/hypr/keybinds.conf
vendored
@@ -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, 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, L, Focus window - right, movefocus, r # move window focus using vim keys
|
||||||
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
|
bindd = $mainMod SHIFT, L, Workspace - forward, workspace, +1
|
||||||
bindd = $HYPER, L, [L]ock computer, exec, hyprlock
|
bindd = $HYPER, L, [L]ock computer, exec, hyprlock
|
||||||
bindd = $mainMod, M, [M]usic - apple, exec, $pwa --focus "https://music.apple.com"
|
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 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, 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, P, Toggle [p]seudo window mode, pseudo, # dwindle
|
||||||
bindd = $mainMod SHIFT, R, [R]estart menu bar, exec, $scripts/waybar-restart
|
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, 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, U, [U]nifi, exec, $pwa "https://unifi.ui.com"
|
||||||
bindd = $mainMod SHIFT, U, [U]ninstall desktop app, exec, $uninstallDesktop
|
bindd = $mainMod SHIFT, U, [U]ninstall desktop app, exec, $uninstallDesktop
|
||||||
bindd = $mainMod, V, Clipboard history, exec, $clipboardHistory
|
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, 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
|
bindd = $mainMod SHIFT, 0, Switch all workspaces to monitor [0], exec, $scripts/mv-all-workspaces-to-monitor 0
|
||||||
|
|
||||||
####################################################
|
#######################################################################################
|
||||||
# Window controls
|
# Window controls
|
||||||
#
|
#
|
||||||
# These should in general use the $windowMod prefix
|
# These should in general use the $windowMod prefix
|
||||||
######################################################
|
#######################################################################################
|
||||||
# MOD # KEY # DESC # Action #
|
# MOD # KEY # DESC # Action #
|
||||||
######################################################
|
#######################################################################################
|
||||||
bindd = CTRL SHIFT, F, Toggle [f]loating, exec, $scripts/window-toggle-floating
|
bindd = CTRL SHIFT, F, Toggle [f]loating, exec, $scripts/window-toggle-floating
|
||||||
# TODO: Decide which is prefered to switch to fullscreen.
|
# TODO: Decide which is prefered to switch to fullscreen.
|
||||||
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
|
bindd = CTRL, F, Toggle [f]ullscreen, fullscreen,
|
||||||
bindd = $windowMod, 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, 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, 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 = $HYPER, J, Toggle split orientation, togglesplit # dwindle
|
||||||
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
|
bindd = $windowMod, K, Move window - up, movewindow, u # move windows with windowMod + vim keys
|
||||||
bindd = $HYPER, J, Toggle split orientation, togglesplit # dwindle
|
bindd = $windowMod, L, Move window - right , movewindow, r # move windows with windowMod + vim keys
|
||||||
bindd = $windowMod, S, Move window to [s]pecial workspace, movetoworkspacesilent, special:magic
|
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
|
# FIX: Changes size of window, this works a different depending on if
|
||||||
# the window is on the right or left of the screen.
|
# the window is on the right or left of the screen.
|
||||||
#
|
#
|
||||||
# Resize horizontally
|
# Resize horizontally
|
||||||
bindd = $windowMod, EQUAL, Increase 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
|
bindd = $windowMod, MINUS, Decrease window size - horizontal, resizeactive, -20 0
|
||||||
# Resize vertically
|
# Resize vertically
|
||||||
bindd = $windowMod SHIFT, EQUAL, Increase window size - vertical, resizeactive, 0 20
|
bindd = $windowMod SHIFT, EQUAL, Increase window size - vertical, resizeactive, 0 20
|
||||||
bindd = $windowMod SHIFT, MINUS, Decrease 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
14
env/.local/scripts/get-weather
vendored
Executable 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.
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
BIN
env/.local/share/applications/icons/weather.png
vendored
Normal file
BIN
env/.local/share/applications/icons/weather.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 250 KiB |
9
env/.local/share/applications/weather.desktop
vendored
Normal file
9
env/.local/share/applications/weather.desktop
vendored
Normal 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
2
webapp
@@ -54,7 +54,7 @@ install() {
|
|||||||
|
|
||||||
# Install local icons if needed
|
# Install local icons if needed
|
||||||
mkdir -p $XDG_DATA_HOME/applications/icons
|
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
|
if [[ ! -f $XDG_DATA_HOME/applications/icons/$i ]] && [[ $dry_run == "0" ]]; then
|
||||||
cp $i $XDG_DATA_HOME/applications/icons
|
cp $i $XDG_DATA_HOME/applications/icons
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user