Skip to content

Commit 2a915a5

Browse files
committed
feat(tmux): 🎡change emojis to devicons in tmux statusline
1 parent a337aba commit 2a915a5

1 file changed

Lines changed: 77 additions & 61 deletions

File tree

tmux/tmux.conf

Lines changed: 77 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -238,19 +238,20 @@ set -g status-left-length 40
238238
set -g status-right-length 180
239239

240240
# 状态栏左边显示的信息定制.
241-
set -g status-left "#[fg=#CE0000,bold] ♥︎ #S "
241+
set -g status-left "#[fg=#CE0000,bold] #S "
242242

243243
# 状态栏右边显示的信息定制.
244244
set -g status-right "#{prefix_highlight} \
245245
#[fg=orange,bold]#{iptmthd} \
246-
🍀#[fg=#ff5f5f,bold]#{current_colorscheme} #[fg=#ff5f87]#{current_opacity} \
247-
👑#[fg=#ff875f]#{current_font} #{current_font_style} #[fg=#ff8787]#{current_font_size} \
248-
🏄#[fg=#009100,bold]Google: #{online_status} \
249-
💻#{cpu_fg_color}#{cpu_percentage} #{ram_percentage} \
250-
🔥#{cpu_temp_fg_color}#{cpu_temp} #{fan_speed} \
251-
#[fg=#ff5f87]#{volume_icon}#{volume_value} \
246+
#[fg=#ff5f5f,bold]#{current_colorscheme} #[fg=#ff5f87]#{current_opacity} \
247+
#[fg=#ff875f]#{current_font} #{current_font_style} #[fg=#ff8787]#{current_font_size} \
248+
#{online_status} \
249+
#{cpu_fg_color}#{cpu_percentage} #{ram_percentage} \
250+
#{cpu_temp_fg_color}#{cpu_temp} #{fan_speed} \
251+
#[fg=#ff5f87]#{volume_icon} #{volume_value} \
252252
#{battery_color_charge_fg}#{battery_icon_status}#{battery_percentage} \
253253
#[fg=#ff5f87]#{weather} \
254+
#{moon_phase_icon} \
254255
#[fg=#009393]⌚️%a %m-%d %H:%M:%S"
255256

256257
# b 显示或隐藏当前 session 的状态栏.
@@ -293,52 +294,6 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
293294
set -g @tpm-clean 'u' # 重新绑定卸载插件的快捷键.
294295
# ==============================
295296

296-
297-
# 在状态栏显示电量百分比.
298-
set -g @plugin 'vimhack/tmux-battery'
299-
# 正在为电池充电.
300-
set -g @batt_icon_status_charging '⚡️'
301-
# 电池已充满电, 且电源插头没有拔掉.
302-
set -g @batt_icon_status_charged '🔌'
303-
# 已拔掉电源插头.
304-
set -g @batt_icon_status_discharging '🔋'
305-
# 电源插头已连接, 但还未开始充电.
306-
set -g @batt_icon_status_attached '⚠️'
307-
# 未知的状态.
308-
set -g @batt_icon_status_unknown ''
309-
# >= 95%
310-
set -g @batt_color_charge_primary_tier8 '#008700'
311-
# >= 80%
312-
set -g @batt_color_charge_primary_tier7 '#00af5f'
313-
# >= 65%
314-
set -g @batt_color_charge_primary_tier6 '#00d75f'
315-
# >= 50%
316-
set -g @batt_color_charge_primary_tier5 '#87ff5f'
317-
# >= 35%
318-
set -g @batt_color_charge_primary_tier4 '#ffc000'
319-
# >= 20%
320-
set -g @batt_color_charge_primary_tier3 '#ff8000'
321-
# > 5%
322-
set -g @batt_color_charge_primary_tier2 '#ff4000'
323-
# <= 5%
324-
set -g @batt_color_charge_primary_tier1 '#ff0000'
325-
326-
# 在状态栏显示 CPU 和内存利用率, CPU 温度, 风扇转速等信息.
327-
# #{cpu_percentage} #{ram_percentage} #{cpu_temp} #{fan_speed}
328-
set -g @plugin 'vimhack/tmux-cpu'
329-
# CPU 利用率配置.
330-
set -g @cpu_low_fg_color "#[fg=#8787af]"
331-
set -g @cpu_medium_fg_color "#[fg=#ff8000]"
332-
set -g @cpu_high_fg_color "#[fg=#ff0000]"
333-
set -g @cpu_medium_thresh "30"
334-
set -g @cpu_high_thresh "70"
335-
# CPU 温度配置.
336-
set -g @cpu_temp_low_fg_color "#[fg=#8787af]"
337-
set -g @cpu_temp_medium_fg_color "#[fg=#ff8000]"
338-
set -g @cpu_temp_high_fg_color "#[fg=#ff0000]"
339-
set -g @cpu_temp_medium_thresh "75"
340-
set -g @cpu_temp_high_thresh "85"
341-
342297
# 按 prefix 或 prefix + [ 或 prefix + ctrl y 等按键的时候, 在状态栏高亮显示.
343298
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
344299
set -g @prefix_highlight_fg 'black'
@@ -354,12 +309,6 @@ set -g @prefix_highlight_copy_prompt 'Copy'
354309
# ctrl y 进入窗格同步模式时, 显示 Sync.
355310
set -g @prefix_highlight_sync_prompt 'Sync'
356311

357-
# 在状态栏显示网络是否在线, 默认是通过 curl www.google.com 来检测网络连通性的,
358-
# 可修改 ~/.tmux/plugins/tmux-online-status/scripts/online_status_icon.sh 更改检测方式.
359-
set -g @plugin 'vimhack/tmux-online-status'
360-
set -g @online_icon "ok"
361-
set -g @offline_icon "off"
362-
363312
# ctrl s 保存当前 session.
364313
# ctrl r 由于服务器重启或 tmux kill-server 等原因导致丢失 session 后,
365314
# 可以使用此命令恢复 session.
@@ -424,6 +373,62 @@ set -g @open-S 'https://www.google.com/search?q='
424373
# 可修改 ~/.tmux/plugins/tmux-inputmethod/scripts/check_inputmethod.sh 改变显示样式.
425374
set -g @plugin 'ki-chi/tmux-inputmethod'
426375

376+
# 在状态栏显示电量百分比.
377+
set -g @plugin 'vimhack/tmux-battery'
378+
# 正在为电池充电.
379+
set -g @batt_icon_status_charging ''
380+
# 电池已充满电, 且电源插头没有拔掉.
381+
set -g @batt_icon_status_charged ''
382+
# 已拔掉电源插头.
383+
set -g @batt_icon_status_discharging ''
384+
# 电源插头已连接, 但还未开始充电.
385+
set -g @batt_icon_status_attached ''
386+
# 未知的状态.
387+
set -g @batt_icon_status_unknown ''
388+
# >= 95%
389+
set -g @batt_color_charge_primary_tier8 '#008700'
390+
# >= 80%
391+
set -g @batt_color_charge_primary_tier7 '#00af5f'
392+
# >= 65%
393+
set -g @batt_color_charge_primary_tier6 '#00d75f'
394+
# >= 50%
395+
set -g @batt_color_charge_primary_tier5 '#87ff5f'
396+
# >= 35%
397+
set -g @batt_color_charge_primary_tier4 '#ffc000'
398+
# >= 20%
399+
set -g @batt_color_charge_primary_tier3 '#ff8000'
400+
# > 5%
401+
set -g @batt_color_charge_primary_tier2 '#ff4000'
402+
# <= 5%
403+
set -g @batt_color_charge_primary_tier1 '#ff0000'
404+
405+
# 在状态栏显示 CPU 和内存利用率, CPU 温度, 风扇转速等信息.
406+
# #{cpu_percentage} #{ram_percentage} #{cpu_temp} #{fan_speed}
407+
set -g @plugin 'vimhack/tmux-cpu'
408+
# CPU 利用率配置.
409+
set -g @cpu_low_fg_color "#[fg=#8787af]"
410+
set -g @cpu_medium_fg_color "#[fg=#ff8000]"
411+
set -g @cpu_high_fg_color "#[fg=#ff0000]"
412+
set -g @cpu_medium_thresh "30"
413+
set -g @cpu_high_thresh "70"
414+
# CPU 温度配置.
415+
set -g @cpu_temp_low_fg_color "#[fg=#8787af]"
416+
set -g @cpu_temp_medium_fg_color "#[fg=#ff8000]"
417+
set -g @cpu_temp_high_fg_color "#[fg=#ff0000]"
418+
set -g @cpu_temp_medium_thresh "75"
419+
set -g @cpu_temp_high_thresh "85"
420+
421+
# 在状态栏显示网络是否在线, 默认是通过 curl www.google.com 来检测网络连通性的.
422+
set -g @plugin 'vimhack/tmux-onlinestatus#main'
423+
set -g @check_interval_seconds 30
424+
set -g @online_icon ""
425+
set -g @offline_icon ""
426+
set -g @online_fgcolor "#00afaf"
427+
set -g @offline_fgcolor "#767676"
428+
set -g @curl_timeout 6
429+
set -g @url_to_curl "https://www.google.com"
430+
set -g @terminal_proxy "http://10.16.13.18:8080"
431+
427432
# #{weather} 在状态栏显示当前的天气信息.
428433
set -g @plugin 'vimhack/tmux-weather'
429434
# 天气信息更新间隔, 单位分钟, 默认值: 15
@@ -433,7 +438,13 @@ set-option -g @tmux-weather-interval 10
433438
set-option -g @tmux-weather-location "Beijing"
434439
# 设置天气信息显示格式.
435440
# doc: https://github.com/chubin/wttr.in#one-line-output
436-
set-option -g @tmux-weather-format "+%c+%t+%w+%m"
441+
set-option -g @tmux-weather-format "+%c+%t+%w"
442+
443+
# #{moon_phase_icon}
444+
# #{moon_phase_emoji}
445+
# #{moon_phase_text}
446+
set -g @plugin 'vimhack/tmux-moon-phase#main'
447+
set -g @moon_phase_icon_color '#f1fa8c'
437448

438449
# #{current_colorscheme} 状态栏显示 Alacritty/Vim/Neovim 当前的 colorscheme.
439450
# #{current_font} Alacritty 当前的 font.
@@ -444,7 +455,12 @@ set -g @plugin 'vimhack/tmux-show-colorscheme#main'
444455

445456
# #{volume_icon} 状态栏显示当前音量图标.
446457
# #{volume_value} 状态栏显示当前音量值: 1-100
447-
set -g @plugin 'vimhack/tmux-audio-volume'
458+
set -g @plugin 'vimhack/tmux-audio-volume#main'
459+
set -g @speaker_muted_volume_icon ""
460+
set -g @speaker_low_volume_icon ""
461+
set -g @speaker_medium_volume_icon ''
462+
set -g @speaker_high_volume_icon ""
463+
set -g @headphone_icon ""
448464

449465
# *** TMUX plugin manager End
450466
#

0 commit comments

Comments
 (0)