更新polybar; 调整脚本目录;增加bspwm配置;增加壁纸设置;增加锁屏脚本

master
yutent 2023-07-07 02:28:48 +00:00
parent 440e2bffa1
commit a952141d9b
10 changed files with 81 additions and 19 deletions

View File

@ -0,0 +1,53 @@
#!/bin/bash
# 颜色定义, 同alacritty主题
color_black='#323F4D'
color_red='#F33E22'
color_green='#19BC9C'
color_yellow='#F5BD07'
color_blue='#62aeef'
color_magenta='#9595D0'
color_cyan='#05979A'
color_white='#CED6E0'
# 干掉已经运行的进程
killall -9 sxhkd bspc
# bspwm 基础配置
bspc config border_width 2
bspc config window_gap 8
bspc config split_ratio 0.52
bspc config focused_border_color "$color_blue"
bspc config normal_border_color "$color_blue"
bspc config active_border_color "$color_blue"
bspc config presel_feedback_color "$color_blue"
# 删除已有的规则
bspc rule -r *:*
# 终端默认设为浮动
bspc rule -a Alacritty follow=on focus=on
bspc rule -a Xfce4-terminal follow=on focus=on
# 一些软件, 也设为浮动
for app_c in Thunar Code Sublime_text Google-chrome Inkscape do
bspc rule -a $app_c follow=on focus=on
done
# 设置壁纸
feh --bg-fill ~/.local/share/debian.png
sxhkd &
~/.local/bin/scripts/polybar.sh

View File

@ -1,28 +1,22 @@
; 空格
[module/space]
; 3个空格分隔模块
[module/pipe]
type = custom/text
content = %{T1} %{T-}
; 一个点
[module/dot]
; 双倍分隔
[module/pipe-db]
type = custom/text
content =
content-foreground = ${color.altbackground}
content-padding = 1
content-font = 4
content = %{T1} %{T-}
; 颜色反转的点
[module/dot-alt]
inherit = module/dot
content-foreground = ${color.altforeground}
; 左半圆符号, 用于来实现polybar圆角的
; 左半圆
[module/LD]
type = custom/text
content = "%{T3}%{T-}"
content-background = ${color.background}
content-foreground = ${color.altbackground}
; 右半圆
[module/RD]
type = custom/text
content = "%{T3}%{T-}"

View File

@ -6,4 +6,4 @@ content = %{T9}襤%{T-}
content-foreground = ${color.red}
content-padding = 2
click-left = ~/.config/bspwm/scripts/powermenu.sh
click-left = ~/.local/bin/scripts/powermenu.sh

View File

@ -0,0 +1,4 @@
# 键盘绑定
super + Return
alacritty

View File

@ -19,7 +19,7 @@ rofi_powermenu() {
confirm_run () {
selected="$(~/.config/bspwm/scripts/confirm.sh)"
selected="$(~/.local/bin/scripts/confirm.sh)"
if [[ "$selected" == "$yes" ]]; then
${1}
@ -34,13 +34,13 @@ chosen="$(rofi_powermenu)"
case ${chosen} in
$option_1)
xflock4 --lock
xscreensaver-command --lock
;;
$option_2)
confirm_run 'bspc quit'
;;
$option_3)
confirm_run 'systemctl hibernate'
confirm_run 'xscreensaver-command --lock && systemctl hibernate'
;;
$option_4)
confirm_run 'systemctl reboot'

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ "$1" == "--lock" ]; then
i3lock -n -F -i $HOME/.local/share/xlock.png -k -e \
--radius=180 --ring-width=16 --ring-color=64b5f6 --inside-color=64b5f680 \
--verif-color=48c9b0 --wrong-color=fc7661 \
--layout-size=32 --verif-size=32 --wrong-size=32 --greeter-size=32 \
--time-align 1 --date-align 1 --time-color=f2f5fc --date-color=ced6e0 \
--time-size=96 --date-size=64 --time-font="Raleway,sans-serif" --date-font="Raleway,sans-serif" \
--time-pos="100:h-300" --date-pos="100:h-200"
fi

BIN
home/local/share/debian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

BIN
home/local/share/xlock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB