调整polybar的volume;调整电源按钮的事件
parent
acc97d69ad
commit
177fd4f406
17
README.md
17
README.md
|
@ -1,18 +1,23 @@
|
||||||
# wm-logs
|
# wm-logs
|
||||||
记录`debian bookworm + wm`从0开始配置的历险记。
|
记录`debian bookworm + wm`从0开始配置的历险记。
|
||||||
|
|
||||||
|
## 社区源
|
||||||
|
部分软件只有社区源(`https://repo.izero.im`)里有, debian官方源里并没有。
|
||||||
|
|
||||||
|
|
||||||
## 基础安装
|
## 基础安装
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# sudo apt install i3 ly alacritty xserver-xorg picom polybar rofi feh
|
# sudo apt install i3 ly alacritty xserver-xorg picom polybar rofi feh
|
||||||
sudo apt install bspwm ly alacritty xserver-xorg picom polybar rofi feh
|
sudo apt install bspwm ly i3lock-color alacritty xserver-xorg picom polybar rofi feh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
- `ly` 一个TUI形式的`display manager`
|
- `ly` 一个TUI形式的`display manager`
|
||||||
- ~~`i3` 平铺式窗口管理管理器~~ // 从入门到放弃, 改为用bspwm了
|
- ~~`i3` 平铺式窗口管理管理器~~ // 从入门到放弃, 改为用bspwm了
|
||||||
- `bspwm` 另外一个平铺式窗口管理器
|
- `bspwm` 另外一个平铺式窗口管理器
|
||||||
- `xserver-xorg` X
|
- `xserver-xorg` X服务, 也可以装`xorg`包
|
||||||
|
- `i3lock-color` i3lock的升级版, 支持背景 (需要加社区源, 见上方)
|
||||||
- `picom` 一个轻量的流行的特效合成器
|
- `picom` 一个轻量的流行的特效合成器
|
||||||
- `polybar` 状态栏
|
- `polybar` 状态栏
|
||||||
- `rofi` 应用启动器
|
- `rofi` 应用启动器
|
||||||
|
@ -22,6 +27,14 @@ sudo apt install bspwm ly alacritty xserver-xorg picom polybar rofi feh
|
||||||
## 配套
|
## 配套
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
||||||
|
# 字体 (需要要加社区源)
|
||||||
|
# 这2个官方源里就有
|
||||||
|
sudo apt install fonts-noto-cjk fonts-noto-color-emoji
|
||||||
|
# 这几个在社区源里
|
||||||
|
sudo apt install fonts-harmony-os-sans fonts-material-icons fonts-menlo fonts-raleway fonts-symbols-nerd-font
|
||||||
|
|
||||||
|
|
||||||
# 音频相关
|
# 音频相关
|
||||||
## sudo apt install pavucontrol pulseaudio
|
## sudo apt install pavucontrol pulseaudio
|
||||||
sudo apt install pipewire
|
sudo apt install pipewire
|
||||||
|
|
|
@ -11,6 +11,7 @@ include-file = ./modules.ini
|
||||||
|
|
||||||
[bar/main]
|
[bar/main]
|
||||||
;override-redirect = true
|
;override-redirect = true
|
||||||
|
owm-restack = genery
|
||||||
;owm-restack = bspwm
|
;owm-restack = bspwm
|
||||||
|
|
||||||
;locale = zh_CN.UTF-8
|
;locale = zh_CN.UTF-8
|
||||||
|
@ -40,7 +41,7 @@ fixed-center = true
|
||||||
|
|
||||||
modules-left = logo workspace pipe-db mpd
|
modules-left = logo workspace pipe-db mpd
|
||||||
modules-center = date
|
modules-center = date
|
||||||
modules-right = netspeed volume pipe power
|
modules-right = netspeed pipe volume pipe power
|
||||||
|
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
|
@ -49,6 +50,7 @@ tray-padding = 5
|
||||||
tray-detached = false
|
tray-detached = false
|
||||||
tray-background = ${color.background}
|
tray-background = ${color.background}
|
||||||
tray-scale = 1.0
|
tray-scale = 1.0
|
||||||
|
pseudo-transparency = true
|
||||||
|
|
||||||
|
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
|
|
|
@ -11,7 +11,8 @@ use-ui-max = false
|
||||||
|
|
||||||
|
|
||||||
; 音量显示格式
|
; 音量显示格式
|
||||||
format-volume = <ramp-volume> <bar-volume>
|
; 可用标签 <bar-volume> 音量条
|
||||||
|
format-volume = <ramp-volume> <label-volume>
|
||||||
format-volume-background = ${color.background}
|
format-volume-background = ${color.background}
|
||||||
format-volume-padding = 1
|
format-volume-padding = 1
|
||||||
|
|
||||||
|
@ -28,24 +29,24 @@ label-muted = " "
|
||||||
label-muted-foreground = ${color.altforeground}
|
label-muted-foreground = ${color.altforeground}
|
||||||
|
|
||||||
; 音量条
|
; 音量条
|
||||||
bar-volume-width = 5
|
;bar-volume-width = 5
|
||||||
bar-volume-gradient = false
|
;bar-volume-gradient = false
|
||||||
|
|
||||||
bar-volume-indicator = 雷
|
;bar-volume-indicator = 雷
|
||||||
bar-volume-indicator-font = 2
|
;bar-volume-indicator-font = 2
|
||||||
bar-volume-indicator-foreground = ${color.blue}
|
;bar-volume-indicator-foreground = ${color.blue}
|
||||||
|
|
||||||
bar-volume-fill = 絛
|
;bar-volume-fill = 絛
|
||||||
bar-volume-fill-font = 3
|
;bar-volume-fill-font = 3
|
||||||
bar-volume-foreground-0 = ${color.blue}
|
;bar-volume-foreground-0 = ${color.blue}
|
||||||
bar-volume-foreground-1 = ${color.blue}
|
;bar-volume-foreground-1 = ${color.blue}
|
||||||
bar-volume-foreground-2 = ${color.blue}
|
;bar-volume-foreground-2 = ${color.blue}
|
||||||
bar-volume-foreground-3 = ${color.blue}
|
;bar-volume-foreground-3 = ${color.blue}
|
||||||
bar-volume-foreground-4 = ${color.blue}
|
;bar-volume-foreground-4 = ${color.blue}
|
||||||
|
|
||||||
bar-volume-empty = 絛
|
;bar-volume-empty = 絛
|
||||||
bar-volume-empty-font = 3
|
;bar-volume-empty-font = 3
|
||||||
bar-volume-empty-foreground = ${color.altbackground}
|
;bar-volume-empty-foreground = ${color.altbackground}
|
||||||
|
|
||||||
; 根据音量变换图标
|
; 根据音量变换图标
|
||||||
ramp-volume-0 = 奄
|
ramp-volume-0 = 奄
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
prompt="Are you sure?"
|
prompt="Select the action..."
|
||||||
mesg="Uptime : `uptime -p | sed -e 's/up //g'`"
|
mesg="Uptime : `uptime -p | sed -e 's/up //g'`"
|
||||||
|
|
||||||
option_1=""
|
option_1=""
|
||||||
|
@ -24,23 +24,26 @@ confirm_run () {
|
||||||
if [[ "$selected" == "$yes" ]]; then
|
if [[ "$selected" == "$yes" ]]; then
|
||||||
${1}
|
${1}
|
||||||
else
|
else
|
||||||
echo $selected, $1
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xlock () {
|
||||||
|
~/.local/bin/scripts/xlock --lock
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
chosen="$(rofi_powermenu)"
|
chosen="$(rofi_powermenu)"
|
||||||
|
|
||||||
case ${chosen} in
|
case ${chosen} in
|
||||||
$option_1)
|
$option_1)
|
||||||
xscreensaver-command --lock
|
xlock
|
||||||
;;
|
;;
|
||||||
$option_2)
|
$option_2)
|
||||||
confirm_run 'bspc quit'
|
confirm_run 'bspc quit'
|
||||||
;;
|
;;
|
||||||
$option_3)
|
$option_3)
|
||||||
confirm_run 'xscreensaver-command --lock && systemctl hibernate'
|
confirm_run 'xlock && systemctl hibernate'
|
||||||
;;
|
;;
|
||||||
$option_4)
|
$option_4)
|
||||||
confirm_run 'systemctl reboot'
|
confirm_run 'systemctl reboot'
|
||||||
|
|
Loading…
Reference in New Issue