wip
This commit is contained in:
parent
9bc65d1754
commit
69ce287939
2 changed files with 13 additions and 119 deletions
|
@ -1,110 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# ─< scriptdir declaration >──────────────────────────────────────────────────────────────
|
|
||||||
SCRIPTS="$HOME/.config/hypr/.scripts"
|
|
||||||
|
|
||||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
|
||||||
command_exists() {
|
|
||||||
command -v "$@" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
_kill_() {
|
|
||||||
# ─< Kill already running processes >─────────────────────────────────────────────────────
|
|
||||||
hyprpanel="gjs" # since hyprpanel has so many different wordings, making it clear that this is currently the hyprpanel service name
|
|
||||||
_ps=(gBar wofi swaync waybar $hyprpanel)
|
|
||||||
for _prs in "${_ps[@]}"; do
|
|
||||||
if pidof "${_prs}" >/dev/null; then
|
|
||||||
pkill "${_prs}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
_redshift() {
|
|
||||||
. $SCRIPTS/redshift.sh && notify-send -u low "" "Redshift active"
|
|
||||||
}
|
|
||||||
|
|
||||||
# ─< Relaunch waybar >────────────────────────────────────────────────────────────────────
|
|
||||||
pywall_waybar() {
|
|
||||||
notify-send -u low "Bar" "waybar is launching with wal.."
|
|
||||||
waybar --style $HOME/.config/waybar/pywal_style.css
|
|
||||||
}
|
|
||||||
|
|
||||||
_hyprpanel() {
|
|
||||||
notify-send -u low "Bar" "hyprpanel is loading.."
|
|
||||||
hyprpanel &
|
|
||||||
}
|
|
||||||
|
|
||||||
_waybar() {
|
|
||||||
if command_exists wal; then
|
|
||||||
pywall_waybar
|
|
||||||
else
|
|
||||||
notify-send -u normal "Bar" "waybar is loading.."
|
|
||||||
waybar --config $HOME/.config/waybar/ai_config.jsonc --style $HOME/.config/waybar/ai_style.css &
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# ─< Relaunch gBar >──────────────────────────────────────────────────────────────────────
|
|
||||||
_gBar() {
|
|
||||||
notify-send -u low "Bar" "gBar is loading.."
|
|
||||||
gBar bar 0 &
|
|
||||||
gBar bar 1 &
|
|
||||||
}
|
|
||||||
|
|
||||||
_bar() {
|
|
||||||
if command_exists hyprpanel; then
|
|
||||||
_hyprpanel
|
|
||||||
elif command_exists gBar; then
|
|
||||||
_gBar
|
|
||||||
elif command_exists waybar; then
|
|
||||||
_waybar
|
|
||||||
else
|
|
||||||
notify-send -u critical "ERROR" "No 'bar'-provider found! Install either hyprpanel, gBar or waybar!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# # for cava-pywal (note, need to manually restart cava once wallpaper changes)
|
|
||||||
# # ln -sf "$HOME/.cache/wal/cava-colors" "$HOME/.config/cava/config" || true
|
|
||||||
# if [ -d "$HOME/.cache/wal/" ]; then
|
|
||||||
# ln -sf "$HOME/.cache/wal/colors-rofi-dark.rasi" "$HOME/.config/rofi/pywal-color/pywal-theme.rasi" || true
|
|
||||||
# if [ -e "$HOME/.config/waybar/pywal.css" ]; then
|
|
||||||
# rm $HOME/.config/waybar/pywal.css
|
|
||||||
# command cat $HOME/.cache/wal/colors.css >$HOME/.config/waybar/pywal.css
|
|
||||||
# # pywall_waybar || _waybar
|
|
||||||
# _gBar
|
|
||||||
# else
|
|
||||||
# # _waybar
|
|
||||||
# _gBar
|
|
||||||
# fi
|
|
||||||
# else
|
|
||||||
# # _waybar
|
|
||||||
# _gBar
|
|
||||||
# notify-send -u critical "ERROR" "critical failure! wal is not present!!"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
main() {
|
|
||||||
|
|
||||||
# notify-send "low" "terminating main wm elements"
|
|
||||||
_kill_
|
|
||||||
|
|
||||||
# relaunch swaync
|
|
||||||
sleep 0.3
|
|
||||||
|
|
||||||
hyprctl reload
|
|
||||||
|
|
||||||
sleep 0.2
|
|
||||||
# swaync >/dev/null 2>&1 &
|
|
||||||
# notify-send "low" "bar" "launching.."
|
|
||||||
bash "$SCRIPTS/bar"
|
|
||||||
|
|
||||||
notify-send "low" "wallpaper" "loading.."
|
|
||||||
bash "$SCRIPTS/wallpaper"
|
|
||||||
|
|
||||||
if command_exists redshift; then
|
|
||||||
notify-send "low" "redshift" "protecting your eyes from the blue light.."
|
|
||||||
_redshift
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
22
hotkeys.conf
22
hotkeys.conf
|
@ -33,7 +33,7 @@ device {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ─────────────────< See https://wiki.hyprland.org/Configuring/Keywords/ >───────────────
|
# ─────────────────< See https://wiki.hyprland.org/Configuring/Keywords/ >───────────────
|
||||||
$scripts = ~/.config/hypr/.scripts
|
$SCRIPTS = ~/.config/hypr/.scripts
|
||||||
|
|
||||||
# ─< set mod key >────────────────────────────────────────────────────────────────────────
|
# ─< set mod key >────────────────────────────────────────────────────────────────────────
|
||||||
$mainMod = ALT # Sets "ALT" key as main modifier
|
$mainMod = ALT # Sets "ALT" key as main modifier
|
||||||
|
@ -46,24 +46,26 @@ $rofi = pkill rofi || rofi -show drun -modi drun,filebrowser,run,window,ssh
|
||||||
$tofi = pkill tofi || tofi-drun -c $HOME/.config/tofi/config
|
$tofi = pkill tofi || tofi-drun -c $HOME/.config/tofi/config
|
||||||
$wofi = pkill wofi || wofi --show drun,dmenu
|
$wofi = pkill wofi || wofi --show drun,dmenu
|
||||||
$fuzzel = pkill fuzzel || fuzzel
|
$fuzzel = pkill fuzzel || fuzzel
|
||||||
|
|
||||||
# lockscreens
|
# lockscreens
|
||||||
$swaylock = swaylock --screenshots --clock --indicator --effect-pixelate 18 --effect-blur 8x8
|
$swaylock = swaylock --screenshots --clock --indicator --effect-pixelate 18 --effect-blur 8x8
|
||||||
$hyprlock = hyprlock
|
$hyprlock = hyprlock
|
||||||
|
|
||||||
# screenshots
|
# screenshots
|
||||||
# $screenshotTool = hyprshot --clipboard-only -m region
|
# $screenshotTool = hyprshot --clipboard-only -m region
|
||||||
$screenshotTool = $scripts/screenshot
|
$screenshotTool = $SCRIPTS/screenshot
|
||||||
|
|
||||||
# ─< Set programs that you use >──────────────────────────────────────────────────────────
|
# ─< Set programs that you use >──────────────────────────────────────────────────────────
|
||||||
$menu = $fuzzel
|
$menu = $fuzzel
|
||||||
$lockscreen = $hyprlock
|
$lockscreen = $hyprlock
|
||||||
|
|
||||||
$wallpaper = "$scripts/wallpaper random"
|
$wallpaper = "$SCRIPTS/wallpaper random"
|
||||||
$test = $scripts/a.sh
|
# $test = $SCRIPTS/a.sh
|
||||||
|
|
||||||
$terminal = foot # kitty --class="shell" -e zsh # wezterm start --always-new-process zsh #bash ghostty kitty --class="shell" -e zsh
|
$terminal = foot # kitty --class="shell" -e zsh # wezterm start --always-new-process zsh #bash ghostty kitty --class="shell" -e zsh
|
||||||
$browser = zen-browser # brave-browser
|
$browser = zen-browser # brave-browser
|
||||||
$fileManager = caja # pcmanfm nautilus cosmic-files caja thunar dolphin
|
$fileManager = caja # pcmanfm nautilus cosmic-files caja thunar dolphin
|
||||||
$logout = $scripts/wlogout.sh
|
$logout = $SCRIPTS/wlogout.sh
|
||||||
|
|
||||||
# ─< exit hyprland >──────────────────────────────────────────────────────────────────────
|
# ─< exit hyprland >──────────────────────────────────────────────────────────────────────
|
||||||
bind = $mainMod, M, exit,
|
bind = $mainMod, M, exit,
|
||||||
|
@ -73,6 +75,8 @@ bind = $mainMod, Q, killactive,
|
||||||
bind = $mainMod SHIFT, F, togglefloating,
|
bind = $mainMod SHIFT, F, togglefloating,
|
||||||
bind = $mainMod, F, fullscreen, 1
|
bind = $mainMod, F, fullscreen, 1
|
||||||
|
|
||||||
|
bind = SUPER, V, exec, copyq show
|
||||||
|
|
||||||
# ─< start predefined applications >─────────────────────────────────────────────────────────────────
|
# ─< start predefined applications >─────────────────────────────────────────────────────────────────
|
||||||
bind = $mainMod, T, exec, $terminal
|
bind = $mainMod, T, exec, $terminal
|
||||||
bind = $mainMod SHIFT, T, exec, kitty bash
|
bind = $mainMod SHIFT, T, exec, kitty bash
|
||||||
|
@ -95,11 +99,11 @@ bind = $mainMod, O, exec, obsidian
|
||||||
bind = $mainMod, N, exec, neovide
|
bind = $mainMod, N, exec, neovide
|
||||||
bind = $mainMod, V, exec, virt-manager
|
bind = $mainMod, V, exec, virt-manager
|
||||||
|
|
||||||
# ─< Hotkeys to scripts >─────────────────────────────────────────────────────────────────
|
# ─< Hotkeys to SCRIPTS >─────────────────────────────────────────────────────────────────
|
||||||
bind = $mainMod SHIFT, R, exec, $scripts/refresh.sh
|
bind = $mainMod SHIFT, R, exec, $SCRIPTS/refresh
|
||||||
bind = $mainMod CTRL, G, exec, $scripts/looking-glass.sh
|
bind = $mainMod CTRL, G, exec, $SCRIPTS/looking-glass.sh
|
||||||
# Test keybindings
|
# Test keybindings
|
||||||
# bind = $mainMod SHIFT, T, exec, $scripts/a.sh
|
# bind = $mainMod SHIFT, T, exec, $SCRIPTS/a.sh
|
||||||
|
|
||||||
# ─< Switch workspaces with mainMod + [0-9] >─────────────────────────────────────────────
|
# ─< Switch workspaces with mainMod + [0-9] >─────────────────────────────────────────────
|
||||||
bind = $mainMod, 1, workspace, 1
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue