Switch from catppuccin to ayu mirage for various tools, switch from p10k to starship, self made tmux and sway statusbar update
This commit is contained in:
parent
886818cd1f
commit
93e41aef46
11 changed files with 412 additions and 1874 deletions
51
linux_home/.config/sway/ayu_mirage
Normal file
51
linux_home/.config/sway/ayu_mirage
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# colors.ayu
|
||||
|
||||
# Primary Colors
|
||||
set $ayu_accent #FFCC66
|
||||
set $ayu_bg #1F2430
|
||||
set $ayu_fg #CCCAC2
|
||||
set $ayu_ui #707A8C
|
||||
|
||||
# Functional Colors
|
||||
set $ayu_tag #5CCFE6
|
||||
set $ayu_func #FFD173
|
||||
set $ayu_entity #73D0FF
|
||||
set $ayu_string #D5FF80
|
||||
set $ayu_regexp #95E6CB
|
||||
set $ayu_markup #F28779
|
||||
set $ayu_keyword #FFAD66
|
||||
set $ayu_special #FFDFB3
|
||||
set $ayu_comment #6C7A8B
|
||||
set $ayu_constant #DFBFFF
|
||||
set $ayu_operator #F29E74
|
||||
set $ayu_error #FF6666
|
||||
set $ayu_lsp_parameter #D3B8F9
|
||||
|
||||
# Layout & UI Colors
|
||||
set $ayu_line #171B24
|
||||
set $ayu_panel_bg #1C212B
|
||||
set $ayu_panel_shadow #161922
|
||||
set $ayu_panel_border #101521
|
||||
|
||||
set $ayu_gutter_normal #4A505A
|
||||
set $ayu_gutter_active #757B84
|
||||
|
||||
set $ayu_selection_bg #274364
|
||||
set $ayu_selection_inactive #23344B
|
||||
set $ayu_selection_border #232A4C
|
||||
|
||||
set $ayu_guide_active #444A55
|
||||
set $ayu_guide_normal #323843
|
||||
|
||||
# Version Control Colors
|
||||
set $ayu_vcs_added #87D96C
|
||||
set $ayu_vcs_modified #80BFFF
|
||||
set $ayu_vcs_removed #F27983
|
||||
|
||||
set $ayu_vcs_added_bg #313D37
|
||||
set $ayu_vcs_removed_bg #3E373A
|
||||
|
||||
# Miscellaneous Colors
|
||||
set $ayu_fg_idle #707A8C
|
||||
set $ayu_warning #FFA759
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
include catppuccin_macchiato
|
||||
include ayu_mirage
|
||||
|
||||
# Remap caps lock to escape
|
||||
input * {
|
||||
|
|
@ -131,35 +131,41 @@ mode "resize" {
|
|||
}
|
||||
bindsym $mod+space mode "resize"
|
||||
|
||||
font pango:JetBrains Mono Nerd Font Regular 12
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Rea# target title bg text indicator border
|
||||
client.focused $lavender $base $text $rosewater $lavender
|
||||
client.focused_inactive $overlay0 $base $text $rosewater $overlay0
|
||||
client.unfocused $overlay0 $base $text $rosewater $overlay0
|
||||
client.urgent $peach $base $peach $overlay0 $peach
|
||||
client.placeholder $overlay0 $base $text $overlay0 $overlay0
|
||||
client.background $based `man 5 sway-bar` for more information about this section.
|
||||
client.focused $ayu_regexp $ayu_regexp $ayu_regexp $ayu_entity $ayu_regexp
|
||||
client.focused_inactive $ayu_ui $ayu_ui $ayu_ui $ayu_entity $ayu_ui
|
||||
client.unfocused $ayu_bg $ayu_bg $ayu_bg $ayu_entity $ayu_bg
|
||||
client.urgent $ayu_keyword $ayu_bg $ayu_fg $ayu_ui $ayu_keyword
|
||||
client.placeholder $ayu_ui $ayu_ui $ayu_fg $ayu_ui $ayu_ui
|
||||
client.background $ayu_bg `man 5 sway-bar` for more information about this section.
|
||||
|
||||
# Hack to remove the titlebar or minimizing it.
|
||||
font pango:CaskaydiaCove NFM SemiLight 1
|
||||
default_border none
|
||||
default_floating_border none
|
||||
titlebar_padding 1
|
||||
titlebar_border_thickness 0
|
||||
|
||||
bar {
|
||||
position bottom
|
||||
font pango:JetBrains Mono Nerd Font Regular 12
|
||||
font pango:CaskaydiaCove NFM SemiLight 14
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# status_command while date +'%Y-%m-%d %X'; do sleep 1; done
|
||||
status_command ~/.config/sway/status.sh
|
||||
|
||||
colors {
|
||||
background $base
|
||||
statusline $text
|
||||
focused_statusline $text
|
||||
focused_separator $base
|
||||
focused_workspace $base $base $green
|
||||
active_workspace $base $base $blue
|
||||
inactive_workspace $base $base $surface1
|
||||
urgent_workspace $base $base $surface1
|
||||
binding_mode $base $base $surface1
|
||||
background $ayu_bg
|
||||
statusline $ayu_fg
|
||||
focused_statusline $ayu_fg
|
||||
focused_separator $ayu_bg
|
||||
focused_workspace $ayu_bg $ayu_bg $ayu_accent
|
||||
active_workspace $ayu_bg $ayu_bg $ayu_tag
|
||||
inactive_workspace $ayu_bg $ayu_bg $ayu_ui
|
||||
urgent_workspace $ayu_bg $ayu_bg $ayu_ui
|
||||
binding_mode $ayu_bg $ayu_bg $ayu_ui
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,64 +1,76 @@
|
|||
#!/bin/sh
|
||||
#!/bin/zsh
|
||||
# Icons
|
||||
vpn_icon=""
|
||||
wifi_icon=" "
|
||||
brightness_icon=""
|
||||
bluetooth_icon=""
|
||||
keyboard_icon="⌨"
|
||||
date_icon=""
|
||||
|
||||
while true; do
|
||||
# VPN (Mullvad)
|
||||
vpn_status=$(mullvad status)
|
||||
# Example output:
|
||||
# -------------------------
|
||||
# Connected
|
||||
# Relay: se-mma-wg-101
|
||||
# Features: Quantum Resistance
|
||||
# Visible location: Sweden, Malmö. IPv4: 45.83.220.204
|
||||
# -------------------------
|
||||
is_connected=$(echo "$vpn_status" | grep -oP "Connected" | wc -l)
|
||||
if [ $is_connected -eq 1 ]; then
|
||||
is_connected=$(echo "$vpn_status" | grep -c "Connected")
|
||||
if [ "$is_connected" -eq 1 ]; then
|
||||
visible_location=$(echo "$vpn_status" | grep -oP "Visible location:\s+\K.*" | cut -d. -f1)
|
||||
vpn_status="VPN: $visible_location"
|
||||
vpn_display="$vpn_icon $visible_location"
|
||||
else
|
||||
vpn_status="VPN: Disconnected"
|
||||
vpn_display="$vpn_icon Disconnected"
|
||||
fi
|
||||
|
||||
# Network status
|
||||
ssid=$(nmcli -t -f ACTIVE,SSID dev wifi | grep -E '^yes' | cut -d: -f2)
|
||||
if [ -z "$ssid" ]; then
|
||||
network_status="WiFi: Disconnected"
|
||||
network_display="$wifi_icon Disconnected"
|
||||
else
|
||||
network_status="WiFi: $ssid"
|
||||
network_display="$wifi_icon $ssid"
|
||||
fi
|
||||
|
||||
# Date and time
|
||||
date_time=$(date +"%Y-%m-%d %H:%M")
|
||||
# Date/time
|
||||
date_time_icon="$date_icon $(date +"%a %b %d, %H:%M")"
|
||||
|
||||
# Battery status and power consumption
|
||||
battery_path="/sys/class/power_supply/macsmc-battery"
|
||||
if [ -d "$battery_path" ]; then
|
||||
battery_capacity=$(cat $battery_path/capacity)
|
||||
power_consumption=$(cat $battery_path/power_now) # in microwatts
|
||||
power_consumption_watts=$(echo "scale=2; $power_consumption / 1000000" | bc)
|
||||
battery="Battery: $battery_capacity% ($power_consumption_watts W)"
|
||||
else
|
||||
battery="Battery: N/A"
|
||||
fi
|
||||
# Battery
|
||||
battery=$("$HOME/.config/confutils/get-battery.sh")
|
||||
|
||||
# Brightness status
|
||||
# Brightness
|
||||
brightness=$(brightnessctl | grep -oP '[0-9]+(?=%)')
|
||||
brightness_status="Brightness: $brightness%"
|
||||
brightness_display="$brightness_icon $brightness%"
|
||||
|
||||
bluetooth_device=$(bluetoothctl devices Connected | awk '{$1=$2=""; print $0}' | sed 's/^ *//g')
|
||||
# Bluetooth
|
||||
bluetooth_device=$(bluetoothctl devices Connected \
|
||||
| awk '{$1=$2=""; print $0}' \
|
||||
| sed 's/^ *//g')
|
||||
if [ -z "$bluetooth_device" ]; then
|
||||
bluetooth_status=""
|
||||
bluetooth_display=""
|
||||
else
|
||||
bluetooth_status="Bluetooth: $bluetooth_device"
|
||||
bluetooth_display="$bluetooth_icon $bluetooth_device"
|
||||
fi
|
||||
|
||||
# Combine all statuses
|
||||
# Keyboard layout
|
||||
language_index=$(swaymsg -t get_inputs | jq -r '.[] | select(.type=="keyboard") | .xkb_active_layout_index' | head -n 1)
|
||||
if [ "$language_index" -eq 0 ]; then
|
||||
keyboard_layout="US"
|
||||
else
|
||||
keyboard_layout="SE"
|
||||
fi
|
||||
keyboard_display="$keyboard_icon $keyboard_layout"
|
||||
|
||||
# Combine all statuses, separated by tabs (\t).
|
||||
# - In zsh, you can do literal tabs with $'\t'
|
||||
final_status=""
|
||||
if [ -n "$bluetooth_status" ]; then
|
||||
final_status="$bluetooth_status | "
|
||||
if [ -n "$bluetooth_display" ]; then
|
||||
final_status="$bluetooth_display"
|
||||
fi
|
||||
final_status="$final_status$brightness_status | $battery | $vpn_status | $network_status | $date_time "
|
||||
echo "$final_status"
|
||||
|
||||
space=" "
|
||||
final_status="$final_status$space$brightness_display"
|
||||
final_status="$final_status$space$battery"
|
||||
final_status="$final_status$space$keyboard_display"
|
||||
final_status="$final_status$space$vpn_display"
|
||||
final_status="$final_status$space$network_display"
|
||||
final_status="$final_status$space$date_time_icon"
|
||||
final_status="$final_status "
|
||||
|
||||
echo "$final_status"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue