mirror of
https://github.com/rywng/dotfiles.git
synced 2024-11-22 10:51:49 +08:00
Compare commits
No commits in common. "e9b51b16db00802f6ba2e93912f0da017f73172d" and "851557200a675d60c03aee17570fa6f2a936d80a" have entirely different histories.
e9b51b16db
...
851557200a
@ -12,9 +12,9 @@ choice=$(echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt
|
||||
|
||||
|
||||
if test "$choice" = lock ; then
|
||||
# don't sleep when power on
|
||||
# sleep less when power on
|
||||
if acpi -a | grep -q on; then
|
||||
sleep_time=86400
|
||||
sleep_time=3600
|
||||
else
|
||||
sleep_time=10
|
||||
fi
|
||||
@ -23,9 +23,7 @@ if test "$choice" = lock ; then
|
||||
bright=`light`
|
||||
|
||||
swayidle -w \
|
||||
timeout 5 "light -S 1" resume "light -S $bright" \
|
||||
timeout $sleep_time 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' \
|
||||
&
|
||||
timeout 5 "light -S 1" resume "light -S $bright" &
|
||||
idlepid=$!
|
||||
|
||||
# swaylock -e -c 282828 --inside-color 00000003
|
||||
|
@ -6,8 +6,8 @@ standard_dialogs=gtk3
|
||||
style=Adwaita-Dark
|
||||
|
||||
[Fonts]
|
||||
fixed=@Variant(\0\0\0@\0\0\0\x1a\0I\0\x42\0M\0 \0P\0l\0\x65\0x\0 \0M\0o\0n\0o@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
general=@Variant(\0\0\0@\0\0\0\x1a\0I\0\x42\0M\0 \0P\0l\0\x65\0x\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
fixed=@Variant(\0\0\0@\0\0\0\x12\0N\0o\0t\0o\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
general=@Variant(\0\0\0@\0\0\0\x12\0N\0o\0t\0o\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -6,8 +6,8 @@ standard_dialogs=gtk3
|
||||
style=Adwaita
|
||||
|
||||
[Fonts]
|
||||
fixed=@Variant(\0\0\0@\0\0\0\x1a\0I\0\x42\0M\0 \0P\0l\0\x65\0x\0 \0M\0o\0n\0o@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
general=@Variant(\0\0\0@\0\0\0\x1a\0I\0\x42\0M\0 \0P\0l\0\x65\0x\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
fixed=@Variant(\0\0\0@\0\0\0\x12\0N\0o\0t\0o\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
general=@Variant(\0\0\0@\0\0\0\x12\0N\0o\0t\0o\0 \0S\0\x61\0n\0s@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -6,8 +6,8 @@ standard_dialogs=gtk3
|
||||
style=Adwaita-Dark
|
||||
|
||||
[Fonts]
|
||||
fixed="IBM Plex Mono,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="IBM Plex Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
fixed="Noto Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="Noto Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -6,8 +6,8 @@ standard_dialogs=gtk3
|
||||
style=Adwaita
|
||||
|
||||
[Fonts]
|
||||
fixed="IBM Plex Mono,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="IBM Plex Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
fixed="Noto Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
general="Noto Sans,12,-1,5,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
|
||||
[Interface]
|
||||
activate_item_on_single_click=1
|
||||
|
@ -1,36 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Modified from sway's locking script
|
||||
|
||||
|
||||
if [[ ! $(which swayidle 2> /dev/null) ]]; 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)
|
||||
|
||||
|
||||
choice=`echo -e "suspend\nshutdown\npoweroff\nreboot\nlock" | wofi -d --prompt " Choose power option" -Oalphabetical`
|
||||
if test "$choice" = lock ; then
|
||||
# sleep less when power on
|
||||
if acpi -a | grep -q on; then
|
||||
sleep_time=3600
|
||||
else
|
||||
sleep_time=10
|
||||
fi
|
||||
sleep 0.3
|
||||
|
||||
bright=`light`
|
||||
|
||||
swayidle -w \
|
||||
timeout 5 "light -S 1" resume "light -S $bright" \
|
||||
timeout $sleep_time 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
timeout 10 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
|
||||
&
|
||||
idlepid=$!
|
||||
swaylock -e -c 282828 --inside-color 00000003
|
||||
kill $idlepid
|
||||
swaymsg "output * power on"
|
||||
light -S $bright
|
||||
elif test -n "$choice"; then
|
||||
systemctl $choice
|
||||
else
|
||||
loginctl $choice
|
||||
fi
|
||||
|
@ -46,4 +46,4 @@ else
|
||||
ln -s ~/Pictures/wall/sway/dark ~/.config/sway/Wallpaper
|
||||
fi
|
||||
|
||||
hyprctl reload
|
||||
sway reload
|
||||
|
8
.zshrc
8
.zshrc
@ -91,14 +91,10 @@ zstyle ':prompt:pure:git:stash' show yes
|
||||
zstyle ':prompt:pure:prompt:success' color default
|
||||
|
||||
#edit in vim
|
||||
autoload -Uz edit-command-line
|
||||
autoload edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '' edit-command-line
|
||||
|
||||
# better CTRL-w
|
||||
autoload -Uz select-word-style
|
||||
select-word-style bash
|
||||
|
||||
zmodload zsh/complist
|
||||
bindkey -M menuselect 'h' vi-backward-char
|
||||
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||
@ -129,7 +125,7 @@ export MANROFFOPT="-c"
|
||||
export BAT_THEME="ansi"
|
||||
|
||||
#local path
|
||||
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.scripts:${HOME}/cargo/bin:${HOME}/.cache/go/bin:${HOME}/.local/share/nvim/mason/bin}"
|
||||
export PATH="${PATH}:${HOME}/.local/bin:${HOME}/.scripts:${HOME}/cargo/bin:${HOME}/.cache/go/bin:${HOME}/.local/share/nvim/mason/bin"
|
||||
export MANPATH="${MANPATH}:${HOME}/.local/share/man"
|
||||
|
||||
#ccache support
|
||||
|
Loading…
Reference in New Issue
Block a user