diff --git a/home/config/bspwm/bspwmrc b/home/config/bspwm/bspwmrc index 936a72b..43a11d5 100644 --- a/home/config/bspwm/bspwmrc +++ b/home/config/bspwm/bspwmrc @@ -35,7 +35,7 @@ xrandr --output HDMI-2 --mode 1920x1080 --rate 60 --right-of HDMI-1 --mode 1920x # 干掉已经运行的进程 -killall -9 sxhkd picom nm-applet dunst xsettingsd +killall -9 sxhkd picom nm-applet dunst xsettingsd polybar # 2个显示器, 左显示器配置4个工作区, 右显示器只配置1个工作区 bspc monitor HDMI-1 -d I II III IV @@ -79,8 +79,8 @@ xsetroot -cursor_name left_ptr # 设置系统主题 xsettingsd & -~/.local/bin/scripts/polybar.sh - +# 启动配套的服务 +polybar main -r & sxhkd & nm-applet & dunst & diff --git a/home/config/polybar/modules/power.ini b/home/config/polybar/modules/power.ini index 3ef7e1d..ec8cccc 100644 --- a/home/config/polybar/modules/power.ini +++ b/home/config/polybar/modules/power.ini @@ -6,4 +6,4 @@ content = %{T9}襤%{T-} content-foreground = ${color.red} content-padding = 2 -click-left = ~/.local/bin/scripts/powermenu.sh \ No newline at end of file +click-left = ~/.local/bin/scripts/rofi_powermenu.sh \ No newline at end of file diff --git a/home/local/bin/scripts/polybar.sh b/home/local/bin/scripts/polybar.sh deleted file mode 100755 index 98612dd..0000000 --- a/home/local/bin/scripts/polybar.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# 干掉旧进程 -killall -9 polybar -# 等待1秒再启动新的 -sleep 1 -polybar main -r & diff --git a/home/local/bin/scripts/confirm.sh b/home/local/bin/scripts/rofi_confirm.sh similarity index 100% rename from home/local/bin/scripts/confirm.sh rename to home/local/bin/scripts/rofi_confirm.sh diff --git a/home/local/bin/scripts/rofi_password.sh b/home/local/bin/scripts/rofi_password.sh new file mode 100644 index 0000000..d88f923 --- /dev/null +++ b/home/local/bin/scripts/rofi_password.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +rofi -dmenu -password -i -p "Enter your password" -theme password diff --git a/home/local/bin/scripts/powermenu.sh b/home/local/bin/scripts/rofi_powermenu.sh similarity index 81% rename from home/local/bin/scripts/powermenu.sh rename to home/local/bin/scripts/rofi_powermenu.sh index b31702c..ef76cbd 100644 --- a/home/local/bin/scripts/powermenu.sh +++ b/home/local/bin/scripts/rofi_powermenu.sh @@ -19,7 +19,7 @@ rofi_powermenu() { confirm_run () { - selected="$(~/.local/bin/scripts/confirm.sh)" + selected="$(~/.local/bin/scripts/rofi_confirm.sh)" if [[ "$selected" == "$yes" ]]; then ${1} @@ -29,9 +29,13 @@ confirm_run () { } xlock () { - ~/.local/bin/scripts/xlock --lock + ~/.local/bin/scripts/xlock.sh --lock } +hibernate () { + xlock + systemctl hibernate +} chosen="$(rofi_powermenu)" @@ -43,7 +47,7 @@ case ${chosen} in confirm_run 'bspc quit' ;; $option_3) - confirm_run 'xlock && systemctl hibernate' + confirm_run 'hibernate' ;; $option_4) confirm_run 'systemctl reboot'