概況
支援的 module:
- alsa
- backlight
- date
- notify (基于dunst)
- upload
- download
- battery
- keyboard
- filesystem
- mpd
- i3
- weather
- info-hackspeed
- daily-poem
- temperature
- memory
- cpu
依賴:
- Font Awesome、bdf-unifont
、ttf-fira-codeAUR
、Weather IconAUR
、ttf-monacoAUR
、powerline-fontsArchlinuxcn
(所需字型)AUR
- jq(weather [polybar] 元件需要)
- Dunst 、xdotool(notify [polybar] 元件顯示曆史通知需要)
- mpd、ncmpcpp、mpc(mpd [polybar] 、music [i3] 元件需要)
- unicode-rxvt(urxvt)
AUR
- compton
- feh
- fcit-sogoupinyin、fcitx-lilydjwg-git
、fcitx-configtoolAUR
- rofi(rofi [i3] 元件需要)
- electron-ssr
- utool(已上傳至代碼庫)
- cmatrix
- vundle(vim需要)
- i3lock-fancy
注:标亮依賴可自選,若不選請将i3配置檔案中的相關語句注釋或删除
效果預覽
配置檔案
i3配置檔案
i3wm + polybar
alsa
顯示目前音量,根據音量共有三種不同顔色圖示。預設聲霸卡選擇為
default
,可在.config/polybar/config裡調整聲霸卡選項。
動作 | 事件 |
---|---|
滑鼠左擊 | 靜音/恢複 |
滾輪上 | 音量 +,每次 +5% |
滾輪下 | 音量 -,每次 -5% |
backlight
通過寫入/sys/class/backlight/intel_backlight/brightness以改變螢幕亮度,配置位于.config/i3/
開機時會彈窗要求輸入密碼以更改相關檔案的權限,否則無法正常改變螢幕亮度或關機
date
顯示時間。
動作 | 事件 |
---|---|
滑鼠左擊 | 切換日期/時間顯示 |
notify
通知圖示。
動作 | 事件 |
---|---|
滑鼠左擊 | 模拟 ctrl+grave,即預設的 dunst 曆史快捷鍵 |
upload
顯示上傳及下載下傳速度,需要在.config/polybar/config中
interface
字段設定自己的網絡裝置。
battery
顯示電池資訊,需要在
nord-config
中設定
battery-full-at
、
battery-bat
以及
battery-adp
字段。
keyboard
顯示鍵盤大寫鎖定。因為使用的鍵盤沒有 NumLock,是以暫時不支援,如果需要請自行添加。
mpd
顯示 mpd 資訊,當 mpd 程序不存在時隐藏。總共有三種顯示方式,分别為播放中、暫停以及停止。
- 顯示内容包括暫停、上一首、下一首、停止、清單循環、單曲循環、清單随機以及歌手 - 歌名.
需要在.config/mpd/mpd.conf中設定
mpd-host
及
mpd-port
。
i3
顯示 i3 workspace 圖示,圖示可在.config/i3/config中定義。
動作 | 事件 |
---|---|
滑鼠左擊 | i3-msg workspace %index |
滾輪上 | i3-msg workspace prev |
滾輪下 | i3-msg workspace next |
weather
顯示 Openweather 天氣資訊,使用的腳本來自于openweather-fullfeatured,需要個人API及城市代碼,在腳本中設定,具體情況可檢視項目 Readme。
info-hackspeed
顯示每分鐘輸入速度,機關預設為 cpm (char per minute),可選 wpm (word per minute),在腳本中設定。來自于info-hackspeed。
daily-poem
顯示今日詩詞,使用了 V友@lhx2008 分享的今日詩詞 API,支援顯示詩詞推薦、來源以及比對标簽。使用需 token,可到 https://v2.jinrishici.com/token 擷取 token 後替換.config/polybar/config中的 token。
動作 | 事件 |
---|---|
滑鼠左擊 | 顯示詩詞内容 |
滾輪上 | 顯示詩詞來源 |
滾輪下 | 顯示比對标簽 |
滑鼠右擊 | 更新詩詞 |
filesystem
顯示根目錄空間占用率
temperature
顯示溫度,可在.config/polybar/config中設定
thermal-zone
,預設為0。當溫度低于
base-temperature
時切換為最低溫度顯示,當溫度高于
warn-temperature
時切換為警戒溫度顯示,溫度圖示顔色會根據溫度在
base-temperature
到
warn-temperature
之間變化,根據自身情況設定合理的值即可。
memory
顯示記憶體使用情況,格式為 used/total。
cpu
顯示 cpu 使用情況。