Animation, lock, kitty integration

This commit is contained in:
Ryan 2023-12-03 13:36:10 +08:00
parent 8447ed667d
commit e08fe061df
6 changed files with 57 additions and 17 deletions

View File

@ -1,7 +1,6 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, N, exec, kitty
bind = $mainMod, W, killactive,
bind = $mainMod + CTRL, Q, exit,
@ -9,6 +8,12 @@ bind = $mainMod + SHIFT, SPACE, togglefloating,
bind = $mainMod + SHIFT, RETURN, exec, wofi --show drun
bind = $mainMod + SHIFT, P, pseudo, # dwindle
# Software binds
bind = $mainMod CTRL, r, exec, hyprctl reload
bind = $mainMod CTRL, 65, exec, fcitx5-remote -t
bind = $mainMod, M, exec, swaync-client -t
bind = $mainMod CTRL, l, exec, ~/.config/hypr/scripts/logout.sh
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
@ -68,15 +73,6 @@ bind = $mainMod, mouse_up, workspace, e+1
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# reload hyprland
bind = $mainMod CTRL, r, exec, hyprctl reload
# change IME
bind = $mainMod CTRL, 65, exec, fcitx5-remote -t
# open swayNC
bind = $mainMod, M, exec, swaync-client -t
# fn keys
bind=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-

View File

@ -22,7 +22,13 @@ decoration {
}
animations {
enabled = false
# enabled = false
bezier = easeInQuart, 0.5, 0, 0.75, 0
bezier = easeInQuint, 0.64, 0, 0.78, 0
animation = windows,1,2,easeInQuart, popin 80%
animation = workspaces,1,2,easeInQuint, slidefade 30%
animation = specialWorkspace,1,2,easeInQuint,slidefadevert 30%
animation = fade,1,1.2,easeInQuart
}
dwindle {
@ -52,3 +58,5 @@ misc {
xwayland {
force_zero_scaling = true
}
# vim: set filetype=conf:

25
.config/hypr/scripts/logout.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# Modified from sway's locking script
if [[ ! -e /bin/swayidle ]]; then
notify-send "ERROR" "Swayidle not found"
exit 1
fi
choice=`echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt "󰚥 Choose power option" -Oalphabetical`
if test "$choice" = lock ; then
bright=`light`
swayidle -w \
timeout 5 "light -S 1" resume "light -S $bright" \
timeout 10 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' \
&
idlepid=$!
swaylock -e -c 282828 --inside-color 00000003
kill $idlepid
hyprctl dispatch dpms on
light -S $bright
else
loginctl $choice
fi

View File

@ -35,3 +35,7 @@ listen_on unix:/tmp/fifo
map kitty_mod+n new_os_window_with_cwd
include themes/dark.conf
tab_bar_style fade
tab_fade 0.00390625 0.0625 0.31640625 1

4
.config/kitty/ssh.conf Normal file
View File

@ -0,0 +1,4 @@
# env ZDOTDIR=$HOME/.cache/kitty-zsh
# copy --dest .cache/kitty-zsh/.zshrc .zshrc
copy .zshrc

15
.zshrc
View File

@ -16,16 +16,15 @@ source "$ZINIT_HOME/zinit.zsh"
# Zinit packages
zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh'
zinit light sindresorhus/pure
zinit wait lucid for \
zdharma-continuum/fast-syntax-highlighting \
agkozak/zsh-z \
zpm-zsh/colorize \
juancldcmt/shortify.zsh
zinit ice as"command" from"gh-r" \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
zinit light starship/starship
juancldcmt/shortify.zsh \
juancldcmt/kitty-zsh
zinit light zsh-users/zsh-autosuggestions
zinit light hlissner/zsh-autopair
@ -72,6 +71,10 @@ unsetopt beep
bindkey -v
# End of lines configured by zsh-newuser-install
# Pure prompt
zstyle ':prompt:pure:git:stash' show yes
zstyle ':prompt:pure:prompt:success' color default
#edit in vim
export KEYTIMEOUT=1
autoload edit-command-line