diff --git a/home/config/bspwm/bspwmrc b/home/config/bspwm/bspwmrc index e69de29..fbd403f 100644 --- a/home/config/bspwm/bspwmrc +++ b/home/config/bspwm/bspwmrc @@ -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 + diff --git a/home/config/polybar/modules/comm.ini b/home/config/polybar/modules/comm.ini index 2fd80b1..d3fd71d 100644 --- a/home/config/polybar/modules/comm.ini +++ b/home/config/polybar/modules/comm.ini @@ -1,30 +1,24 @@ -; 空格 -[module/space] +; 3个空格分隔模块 +[module/pipe] type = custom/text -content = %{T1} %{T-} +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-}" content-background = ${color.background} -content-foreground = ${color.altbackground} \ No newline at end of file +content-foreground = ${color.altbackground} diff --git a/home/config/polybar/modules/power.ini b/home/config/polybar/modules/power.ini index 65a2092..3ef7e1d 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 = ~/.config/bspwm/scripts/powermenu.sh \ No newline at end of file +click-left = ~/.local/bin/scripts/powermenu.sh \ No newline at end of file diff --git a/home/config/sxhkd/sxhkdrc b/home/config/sxhkd/sxhkdrc new file mode 100644 index 0000000..7b9d8dd --- /dev/null +++ b/home/config/sxhkd/sxhkdrc @@ -0,0 +1,4 @@ +# 键盘绑定 + +super + Return + alacritty \ No newline at end of file diff --git a/home/config/bspwm/scripts/confirm.sh b/home/local/bin/scripts/confirm.sh similarity index 100% rename from home/config/bspwm/scripts/confirm.sh rename to home/local/bin/scripts/confirm.sh diff --git a/home/config/polybar/launch.sh b/home/local/bin/scripts/polybar.sh similarity index 100% rename from home/config/polybar/launch.sh rename to home/local/bin/scripts/polybar.sh diff --git a/home/config/bspwm/scripts/powermenu.sh b/home/local/bin/scripts/powermenu.sh similarity index 82% rename from home/config/bspwm/scripts/powermenu.sh rename to home/local/bin/scripts/powermenu.sh index 197078f..d6a2127 100644 --- a/home/config/bspwm/scripts/powermenu.sh +++ b/home/local/bin/scripts/powermenu.sh @@ -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' diff --git a/home/local/bin/scripts/xlock.sh b/home/local/bin/scripts/xlock.sh new file mode 100644 index 0000000..8b40272 --- /dev/null +++ b/home/local/bin/scripts/xlock.sh @@ -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 diff --git a/home/local/share/debian.png b/home/local/share/debian.png new file mode 100644 index 0000000..b4e3fa6 Binary files /dev/null and b/home/local/share/debian.png differ diff --git a/home/local/share/xlock.png b/home/local/share/xlock.png new file mode 100644 index 0000000..b6d78d7 Binary files /dev/null and b/home/local/share/xlock.png differ