feat: gamemode, toggle-touchpad and restore-waybar \n fix: albert glitches and bugs in the scripts \n And appearance changes concerning waybar and single windows
This commit is contained in:
parent
6e4c3bb974
commit
d33ecc32e7
|
@ -6,11 +6,14 @@ telemetry=false
|
||||||
|
|
||||||
[albert]
|
[albert]
|
||||||
global_handler_enabled=false
|
global_handler_enabled=false
|
||||||
|
trigger=albert
|
||||||
|
|
||||||
[applications]
|
[applications]
|
||||||
enabled=true
|
enabled=true
|
||||||
fuzzy=true
|
fuzzy=true
|
||||||
terminal=kitty
|
terminal=kitty
|
||||||
|
use_generic_name=false
|
||||||
|
use_keywords=true
|
||||||
|
|
||||||
[caffeine]
|
[caffeine]
|
||||||
enabled=false
|
enabled=false
|
||||||
|
@ -50,10 +53,13 @@ command_reboot=reboot
|
||||||
enabled=true
|
enabled=true
|
||||||
trigger=sys
|
trigger=sys
|
||||||
|
|
||||||
|
[triggers]
|
||||||
|
trigger=?
|
||||||
|
|
||||||
[widgetsboxmodel]
|
[widgetsboxmodel]
|
||||||
alwaysOnTop=true
|
alwaysOnTop=true
|
||||||
clearOnHide=false
|
clearOnHide=false
|
||||||
clientShadow=true
|
clientShadow=false
|
||||||
darkTheme=Seventy Eight
|
darkTheme=Seventy Eight
|
||||||
displayScrollbar=false
|
displayScrollbar=false
|
||||||
followCursor=true
|
followCursor=true
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
3
|
|
@ -91,8 +91,11 @@ animations {
|
||||||
animation = fadeLayersOut, 1, 1.39, almostLinear
|
animation = fadeLayersOut, 1, 1.39, almostLinear
|
||||||
|
|
||||||
animation = workspaces, 1, 1.94, almostLinear, fade
|
animation = workspaces, 1, 1.94, almostLinear, fade
|
||||||
animation = workspacesIn, 1, 3, easeOutQuint, slidefade
|
animation = workspacesIn, 1, 3, easeOutQuint, slide
|
||||||
animation = workspacesOut, 1, 5, easeOutQuint, slidefade
|
animation = workspacesOut, 1, 3, easeOutQuint, slide
|
||||||
|
|
||||||
|
#animation = workspacesIn, 1, 3, easeOutQuint, slidefade
|
||||||
|
#animation = workspacesOut, 1, 5, easeOutQuint, slidefade
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
||||||
|
@ -151,3 +154,13 @@ windowrule=noshadow,^(albert)$
|
||||||
windowrule=float,^(albert)$
|
windowrule=float,^(albert)$
|
||||||
windowrule=stayfocused,^(albert)$
|
windowrule=stayfocused,^(albert)$
|
||||||
windowrule=nodim,^(albert)$
|
windowrule=nodim,^(albert)$
|
||||||
|
|
||||||
|
# Prism Launcher
|
||||||
|
windowrulev2=pseudo, class:(org.prismlauncher.PrismLauncher)
|
||||||
|
windowrulev2=size 65% 70%, class:(org.prismlauncher.PrismLauncher), title:^(Prism Launcher .*)$
|
||||||
|
|
||||||
|
# TODO Automatically fullscreen single apps
|
||||||
|
# - Seems impossible for now (try mixing with workspace rules)
|
||||||
|
|
||||||
|
# Increase gaps for single apps
|
||||||
|
workspace=w[t1], gapsout:2
|
||||||
|
|
|
@ -17,6 +17,7 @@ input {
|
||||||
|
|
||||||
touchpad {
|
touchpad {
|
||||||
natural_scroll = true
|
natural_scroll = true
|
||||||
|
disable_while_typing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +89,14 @@ bind = $mainMod SHIFT, agrave, movetoworkspace, 10
|
||||||
bind = $mainMod, S, togglespecialworkspace, magic
|
bind = $mainMod, S, togglespecialworkspace, magic
|
||||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||||
|
|
||||||
|
# Minimize function (uses scratchpad)
|
||||||
|
# For testing, may be removed in future releases
|
||||||
|
bind = $mainMod, N, togglespecialworkspace, magic
|
||||||
|
bind = $mainMod, N, movetoworkspace, +0
|
||||||
|
bind = $mainMod, N, togglespecialworkspace, magic
|
||||||
|
bind = $mainMod, N, movetoworkspace, special:magic
|
||||||
|
bind = $mainMod, N, togglespecialworkspace, magic
|
||||||
|
|
||||||
# Scroll through existing workspaces with mainMod + scroll
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
bind = $mainMod, mouse_down, workspace, e+1
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
bind = $mainMod, mouse_up, workspace, e-1
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
@ -107,17 +116,29 @@ bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 6%-
|
||||||
bindel = SHIFT, XF86MonBrightnessUp, exec, brightnessctl s 2%+
|
bindel = SHIFT, XF86MonBrightnessUp, exec, brightnessctl s 2%+
|
||||||
bindel = SHIFT, XF86MonBrightnessDown, exec, brightnessctl s 2%-
|
bindel = SHIFT, XF86MonBrightnessDown, exec, brightnessctl s 2%-
|
||||||
|
|
||||||
# Requires playerctl
|
# (Requires playerctl)
|
||||||
bindl = , XF86AudioNext, exec, playerctl next
|
bindl = , XF86AudioNext, exec, playerctl next
|
||||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||||
|
|
||||||
|
# Function keys
|
||||||
|
|
||||||
|
# Settings
|
||||||
|
bindel = , XF86Launch1, exec, kitty vim ~/.config/hypr/config
|
||||||
# Screenshot
|
# Screenshot
|
||||||
bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh
|
bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh
|
||||||
|
# Touchpad toggle
|
||||||
|
# (On galaxy books, pressing the disable touchpad key also triggers SUPER and CONTROL keys, this is why there are present here)
|
||||||
|
bind = SUPER CONTROL, XF86TouchpadToggle, exec, ~/.config/hypr/scripts/toggle-touchpad.sh
|
||||||
|
|
||||||
|
# Desktop related shortcuts
|
||||||
|
|
||||||
# Toggle waybar
|
# Toggle waybar
|
||||||
bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh
|
bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh
|
||||||
|
|
||||||
# Reload desktop
|
# Reload desktop
|
||||||
bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh
|
bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh
|
||||||
|
|
||||||
|
# Gamemode
|
||||||
|
bind = $mainMod, F11, exec, ~/.config/hypr/scripts/gamemode.sh
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
preload = ~/.config/hypr/images/wallpaper.jpg
|
preload = ~/.config/hypr/images/wallpaper.JPG
|
||||||
wallpaper = , ~/.config/hypr/images/wallpaper.jpg
|
wallpaper = , ~/.config/hypr/images/wallpaper.JPG
|
||||||
|
|
BIN
.config/hypr/images/wallpaper.JPG
Executable file
BIN
.config/hypr/images/wallpaper.JPG
Executable file
Binary file not shown.
After Width: | Height: | Size: 8.1 MiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB |
|
@ -8,11 +8,4 @@ hyprpaper &
|
||||||
albert &
|
albert &
|
||||||
# mako &
|
# mako &
|
||||||
systemctl --user start hyprpolkitagent &
|
systemctl --user start hyprpolkitagent &
|
||||||
|
~/.config/hypr/scripts/restore-waybar.sh
|
||||||
# Launch waybar depending on the last status
|
|
||||||
waybar_status=~/.config/hypr/status/waybar
|
|
||||||
if [ "$(cat $waybar_status)" == "on" ]; then
|
|
||||||
waybar &
|
|
||||||
elif [ "$(cat $waybar_status)" != "off" ]; then
|
|
||||||
hyprctl notify 0 3000 0 Failed to retrieve waybar status
|
|
||||||
fi
|
|
22
.config/hypr/scripts/gamemode.sh
Executable file
22
.config/hypr/scripts/gamemode.sh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# From Hyprland documentation - https://wiki.hyprland.org/0.41.2/Configuring/Uncommon-tips--tricks/#toggle-animationsbluretc-hotkey
|
||||||
|
|
||||||
|
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
|
||||||
|
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||||
|
hyprctl --batch "\
|
||||||
|
keyword animations:enabled 0;\
|
||||||
|
keyword decoration:drop_shadow 0;\
|
||||||
|
keyword decoration:blur:enabled 0;\
|
||||||
|
keyword general:gaps_in 0;\
|
||||||
|
keyword general:gaps_out 0;\
|
||||||
|
keyword general:border_size 1;\
|
||||||
|
keyword decoration:rounding 0"
|
||||||
|
killall waybar
|
||||||
|
hyprctl notify 1 2000 0 "Enabled game mode"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
hyprctl reload
|
||||||
|
~/.config/hypr/scripts/restore-waybar.sh
|
||||||
|
hyprctl notify 1 2000 0 "Disabled game mode"
|
10
.config/hypr/scripts/restore-waybar.sh
Executable file
10
.config/hypr/scripts/restore-waybar.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Launch waybar depending on the last status
|
||||||
|
waybar_status=~/.config/hypr/status/waybar
|
||||||
|
if [ "$(cat $waybar_status)" == "on" ]; then
|
||||||
|
killall waybar
|
||||||
|
waybar &
|
||||||
|
elif [ "$(cat $waybar_status)" != "off" ]; then
|
||||||
|
hyprctl notify 0 3000 0 Failed to retrieve waybar status
|
||||||
|
fi
|
34
.config/hypr/scripts/toggle-touchpad.sh
Executable file
34
.config/hypr/scripts/toggle-touchpad.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
device=znt0001:00-14e5:650e-touchpad
|
||||||
|
toggle_variable="device[${device}]:enabled"
|
||||||
|
|
||||||
|
hyprctl keyword "${toggle_variable}" true
|
||||||
|
|
||||||
|
status_file="$XDG_RUNTIME_DIR/touchpad.status"
|
||||||
|
|
||||||
|
enable_touchpad() {
|
||||||
|
printf "true" > "${status_file}"
|
||||||
|
|
||||||
|
hyprctl notify 1 2000 0 "Enabled touchpad"
|
||||||
|
|
||||||
|
hyprctl keyword "${toggle_variable}" true
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_touchpad() {
|
||||||
|
printf "false" > "${status_file}"
|
||||||
|
|
||||||
|
hyprctl notify 0 2000 0 "Disabled Touchpad"
|
||||||
|
|
||||||
|
hyprctl keyword "${toggle_variable}" false
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! [ -f "${status_file}" ]; then
|
||||||
|
enable_touchpad
|
||||||
|
else
|
||||||
|
if [ $(cat "${status_file}") = "true" ]; then
|
||||||
|
disable_touchpad
|
||||||
|
elif [ $(cat "${status_file}") = "false" ]; then
|
||||||
|
enable_touchpad
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "left",
|
"position": "left",
|
||||||
"margin": "1 2 1 1",
|
"margin": "1 1 1 1",
|
||||||
"reload_style_on_change": true,
|
"reload_style_on_change": true,
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
//"custom/updates",
|
//"custom/updates",
|
||||||
"hyprland/workspaces",
|
"hyprland/workspaces",
|
||||||
"hyprland/submap"
|
"hyprland/submap"
|
||||||
//"group/info"
|
//"group/info",
|
||||||
//"hyprland/window"
|
//"hyprland/window"
|
||||||
],
|
],
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
|
|
|
@ -18,9 +18,9 @@ window#waybar {
|
||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
transition-duration: 0.5s;
|
transition-duration: 0.5s;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid alpha(@active, 0.7);
|
border: 1px solid alpha(@active, 0.3);
|
||||||
background: @background;
|
background: @background;
|
||||||
background: alpha(@background, 0.8);
|
background: alpha(@background, 0.7);
|
||||||
color: lighter(@active);
|
color: lighter(@active);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
.zshrc
7
.zshrc
|
@ -47,7 +47,9 @@ zinit cdreplay -q # Optimize cache (recommended by the zinit doc)
|
||||||
bindkey -e # Use emacs keybindings
|
bindkey -e # Use emacs keybindings
|
||||||
bindkey '^p' history-search-backward
|
bindkey '^p' history-search-backward
|
||||||
bindkey '^n' history-search-forward
|
bindkey '^n' history-search-forward
|
||||||
bindkey '~' delete-char # Makes the delete key work properly
|
bindkey '^[[3~' delete-char # Makes the delete key work properly
|
||||||
|
bindkey '^[[3;5~' kill-word # Makes the delete key work properly
|
||||||
|
# Missing ctrl+delete
|
||||||
bindkey "^[[1;5C" forward-word # Same with M-arrows
|
bindkey "^[[1;5C" forward-word # Same with M-arrows
|
||||||
bindkey "^[[1;5D" backward-word
|
bindkey "^[[1;5D" backward-word
|
||||||
|
|
||||||
|
@ -70,6 +72,7 @@ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' # Makes completions case
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Makes completions colored
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Makes completions colored
|
||||||
zstyle ':completion:*' menu no # Hide the default completions menu (replaced by fzf)
|
zstyle ':completion:*' menu no # Hide the default completions menu (replaced by fzf)
|
||||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
||||||
|
setopt correct # 'Did you mean'
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
export PATH=$PATH:~/.local/bin
|
export PATH=$PATH:~/.local/bin
|
||||||
|
@ -81,6 +84,8 @@ alias zcfg='vim ~/.zshrc'
|
||||||
alias icat='kitten icat'
|
alias icat='kitten icat'
|
||||||
alias nv='nvim'
|
alias nv='nvim'
|
||||||
alias cg='cargo'
|
alias cg='cargo'
|
||||||
|
alias rqr='rust-quick-run.sh'
|
||||||
|
alias vm='quickemu --vm *.conf'
|
||||||
# Power management
|
# Power management
|
||||||
alias pprof='cat /sys/firmware/acpi/platform_profile' # Get current performance profile
|
alias pprof='cat /sys/firmware/acpi/platform_profile' # Get current performance profile
|
||||||
alias pprof-list='cat /sys/firmware/acpi/platform_profile_choices' # Lists the available performance profiles
|
alias pprof-list='cat /sys/firmware/acpi/platform_profile_choices' # Lists the available performance profiles
|
||||||
|
|
Loading…
Reference in a new issue