add tmux package and dotfiles

This commit is contained in:
desolate
2026-05-27 22:56:43 +03:00
parent c9399ce79c
commit 5b1e1f92ba
12 changed files with 173 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
install_dotfiles "$HOME" "$DOTFILES_DIR" "tmux"
+1
View File
@@ -12,5 +12,6 @@ INSTALLING DOTFILES:
. "$DOTFILES_DIR/install-mango.sh" . "$DOTFILES_DIR/install-mango.sh"
. "$DOTFILES_DIR/install-river.sh" . "$DOTFILES_DIR/install-river.sh"
. "$DOTFILES_DIR/install-scooter.sh" . "$DOTFILES_DIR/install-scooter.sh"
. "$DOTFILES_DIR/install-tmux.sh"
. "$DOTFILES_DIR/install-yazi.sh" . "$DOTFILES_DIR/install-yazi.sh"
. "$DOTFILES_DIR/install-zsh.sh" . "$DOTFILES_DIR/install-zsh.sh"
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
set -eu pipefail
read -r bat_capacity </sys/class/power_supply/BAT0/capacity
battery="$bat_capacity"
echo "$battery"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu pipefail
brightness=$(light -G | awk '{print int($1)}')
echo "$brightness"
+5
View File
@@ -0,0 +1,5 @@
#!/bin/sh
set -eu pipefail
cpu=$(top -bn1 | awk '/Cpu\(s\):/ {print $2 + $4}' | tr -d '\n')
echo "$cpu"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu pipefail
date="$(date "+%a %d %b")"
echo "$date"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu pipefail
memory=$(free -m | awk '/^Mem:/ {printf "%.1f", $3/1024}')
echo "$memory"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu pipefail
time="$(date "+%I:%M %p")"
echo "$time"
+123
View File
@@ -0,0 +1,123 @@
# Enable 256-color and true-color (24-bit) support in tmux
set -g default-terminal "screen-256color" # Set terminal type for 256-color support
set -ga terminal-overrides ",*256col*:Tc" # Override to enable true-color for compatible terminals
unbind r
bind r source-file ~/.config/tmux/tmux.conf
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
set-option -g status-position top
set -g mouse on
set -g set-clipboard on
set -g status-interval 1
set -g detach-on-destroy off
# Enable vi mode to allow vim movements
set-window-option -g mode-keys vi
# Start selecting text with "v"
bind-key -T copy-mode-vi 'v' send -X begin-selection
# Copy text with "y"
bind -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "pbcopy"
# Do not exit copy mode when dragging with mouse
unbind -T copy-mode-vi MouseDragEnd1Pane
# Start windows and panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on # automatically renumber windows when one is closed
# DATA
cpu="#(~/.config/tmux/cpu.sh)"
mem="#(~/.config/tmux/mem.sh)"
bat="#(~/.config/tmux/bat.sh)"
volume="#(~/.config/tmux/volume.sh)"
bright="#(~/.config/tmux/brightness.sh)"
date="#(~/.config/tmux/date.sh)"
time="#(~/.config/tmux/time.sh)"
# STYLE
c_status_bg="default"
c_status_fg="#CCCCCC"
c_status_left_bg=$c_status_bg
c_status_left_fill="#A3BE8C"
c_status_left_fg="#000000"
c_session_bg=$c_status_left_bg
c_session_fill=$c_status_left_fill
c_session_fg=$c_status_left_fg
c_status_middle_bg=$c_status_bg
c_window_current_bg=$c_status_middle_bg
c_window_current_fill="#88C0D0"
c_window_current_fg="#000000"
c_window_bg=$c_status_middle_bg
c_window_fill="#224444"
c_window_fg="#88C0D0"
c_status_right_bg=$c_status_bg
c_status_right_fill="#CD96CD"
c_status_right_fg="#242424"
c_cpu_bg=$c_status_right_fill
c_cpu_fg=$c_status_right_fg
c_mem_bg=$c_status_right_fill
c_mem_fg=$c_status_right_fg
c_batt_bg=$c_status_right_fill
c_batt_fg=$c_status_right_fg
c_volume_bg=$c_status_right_fill
c_volume_fg=$c_status_right_fg
c_bright_bg=$c_status_right_fill
c_bright_fg=$c_status_right_fg
c_date_bg="#ABABAB"
c_date_fg=$c_status_right_fg
c_time_bg="#ABABAB"
c_time_fg=$c_status_right_fg
c_message_bg="#EEB422"
c_message_fg="#111111"
c_mode_bg="#CD96CD"
c_mode_fg="#101010"
c_pane_border="#5D478B"
c_pane_active_border="#B452CD"
session_pill="#[fg=${c_session_fg},bg=${c_session_fill}]  #S #[fg=${c_session_fill},bg=${c_session_bg}]"
window_current_pill="#[fg=${c_window_current_fill}]#[fg=${c_window_current_fg},bg=${c_window_current_fill}] #I #W #[fg=${c_window_current_fill},bg=${c_window_current_bg}]"
window_pill="#[fg=${c_window_fill}]#[fg=${c_window_fg},bg=${c_window_fill}] #I #W #[fg=${c_window_fill},bg=${c_window_bg}]"
cpu_pill="#[fg=${c_cpu_bg}]#[fg=${c_cpu_fg},bg=${c_cpu_bg}] ${cpu}%#[fg=${c_cpu_bg},bg=${c_status_right_bg}]"
mem_pill="#[fg=${c_mem_bg}]#[fg=${c_mem_fg},bg=${c_mem_bg}] ${mem}G#[fg=${c_mem_bg},bg=${c_status_right_bg}]"
batt_pill="#[fg=${c_batt_bg}]#[fg=${c_batt_fg},bg=${c_batt_bg}] ${bat}%#[fg=${c_batt_bg},bg=${c_status_right_bg}]"
volume_pill="#[fg=${c_volume_bg}]#[fg=${c_volume_fg},bg=${c_volume_bg}]󰋋 ${volume}%#[fg=${c_volume_bg},bg=${c_status_right_bg}]"
bright_pill="#[fg=${c_bright_bg}]#[fg=${c_bright_fg},bg=${c_bright_bg}]󰛨 ${bright}%#[fg=${c_bright_bg},bg=${c_status_right_bg}]"
date_pill="#[fg=${c_date_bg}]#[fg=${c_date_fg},bg=${c_date_bg}]󰃭 ${date}#[fg=${c_date_bg},bg=${c_status_right_bg}]"
time_pill="#[fg=${c_time_bg}]#[fg=${c_time_fg},bg=${c_time_bg}]󰥔 ${time}#[fg=${c_time_bg},bg=${c_status_right_bg}]"
set -g status-justify centre
set -g status-left-length 200
set -g status-right-length 200
set -g status-style "fg=${c_status_fg},bg=${c_status_bg}"
set -g status-left ${session_pill}
set -g status-right "${cpu_pill} ${mem_pill} ${batt_pill} ${volume_pill} ${bright_pill} ${date_pill} ${time_pill}"
set -g window-status-current-format $window_current_pill
set -g window-status-format $window_pill
set -g message-style "fg=${c_message_fg},bg=${c_message_bg}"
set -g mode-style "fg=${c_mode_fg},bg=${c_mode_bg}"
set -g pane-border-style "fg=${c_pane_border}"
set -g pane-active-border-style "fg=${c_pane_active_border}"
# Enable second level status line and make it empty
set -g status 2
set -g status-format[1] ''
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
set -eu pipefail
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{printf "%.0f\n", $2*100}')
echo "$volume"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
install_package "tmux"
+1
View File
@@ -35,6 +35,7 @@ INSTALLING PACKAGES:
. "$PACKAGES_DIR/install-slurp.sh" . "$PACKAGES_DIR/install-slurp.sh"
. "$PACKAGES_DIR/install-socklog-void.sh" . "$PACKAGES_DIR/install-socklog-void.sh"
. "$PACKAGES_DIR/install-stow.sh" . "$PACKAGES_DIR/install-stow.sh"
. "$PACKAGES_DIR/install-tmux.sh"
. "$PACKAGES_DIR/install-tree.sh" . "$PACKAGES_DIR/install-tree.sh"
. "$PACKAGES_DIR/install-udisks2.sh" . "$PACKAGES_DIR/install-udisks2.sh"
. "$PACKAGES_DIR/install-usbutils.sh" . "$PACKAGES_DIR/install-usbutils.sh"