1
1
mirror of https://github.com/rywng/dotfiles.git synced 2024-11-22 02:41:50 +08:00

fix: waybar, term, and sway

This commit is contained in:
Ryan 2024-04-22 21:08:35 +08:00
parent 99a5fe023a
commit 352287e060
8 changed files with 21 additions and 16 deletions

View File

@ -1,6 +1,6 @@
# output=<not set>
font=sans:size=14
dpi-aware=yes
dpi-aware=auto
prompt="> "
# icon-theme=hicolor
# icons-enabled=yes
@ -9,7 +9,7 @@ fields=name
filter-desktop=yes
# fuzzy=yes
show-actions=true
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
terminal=/bin/kitty -e
# launch-prefix=<not set>
# lines=15

View File

@ -1,6 +1,6 @@
# output=<not set>
font=sans:size=14
dpi-aware=yes
dpi-aware=auto
prompt="> "
# icon-theme=hicolor
# icons-enabled=yes
@ -9,7 +9,7 @@ fields=name
filter-desktop=yes
# fuzzy=yes
show-actions=true
# terminal=$TERMINAL -e # Note: you cannot actually use environment variables here
terminal=/bin/kitty -e
# launch-prefix=<not set>
# lines=15

@ -1 +1 @@
Subproject commit 4fd5fd0e0ceef326f1b569354449187c9323014e
Subproject commit fa5aa0c57609254ce23d7479e344d0c3e292efd9

View File

@ -1,3 +1,7 @@
# vim: filetype=swayconfig
include ~/.config/sway/conf.d/custom.d/*
# Systemd integration
exec "systemctl --user import-environment {,WAYLAND_}DISPLAY SWAYSOCK; systemctl --user start sway-session.target"
exec swaymsg -t subscribe '["shutdown"]' && systemctl --user stop sway-session.target

View File

@ -19,14 +19,14 @@ if test "$choice" = lock; then
sleep_time=10
fi
sleep 0.3
playerctl stop
# playerctl stop
bright=$(light)
bright=$(xbacklight -get)
swayidle -w \
timeout 5 "light -S 1" resume "light -S $bright" \
timeout $sleep_time 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
timeout 5 "xbacklight -set 0" resume "xbacklight -set $bright" \
&
# timeout $sleep_time 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
idlepid=$!
# swaylock -e -c 282828 --inside-color 00000003
@ -35,7 +35,7 @@ if test "$choice" = lock; then
kill $idlepid
swaymsg "output * power on"
light -S $bright
xbacklight -set $bright
elif test -n "$choice"; then
systemctl $choice
fi

View File

@ -0,0 +1,6 @@
[Unit]
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

View File

@ -25,7 +25,7 @@
]
},
{
"layer": "top",
// "layer": "top",
"name": "alt",
"output": "XMI Redmi 27 NU 3948622WH08F4",
"modules-left": [

5
.zshrc
View File

@ -1,8 +1,3 @@
cat ~/.config/splash 2> /dev/null || true
echo
echo '\033[0;35m /w '$(awk -F "=" '/^NAME/ {print $2}' 2> /dev/null < /etc/os-release || uname -o)
echo '\033[0;34m @ '$HOST
# Install zinit if no zinit is present
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
if [[ ! -f $ZINIT_HOME/zinit.zsh ]]; then