various updates on nixos,sway,scripts&dockercompose

This commit is contained in:
2025-11-08 17:04:36 +01:00
parent 7e8e812814
commit b6f93f60e4
5 changed files with 154 additions and 73 deletions

View File

@@ -1,6 +1,4 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
# Sway config file, placed at ~/.config/sway/config
#
# Read `man 5 sway` for a complete reference.
@@ -29,9 +27,18 @@ output * bg ~/Sync-tablet/wallpapers/geometry02_croped1920x1080.png fill
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
# home setup:
output HDMI-A-1 resolution 3840x2160 position 1920 0
output eDP-1 resolution 1920x1200 position 0 0
# portable external monitor setup:
# output DP-1 resolution 3840x2160 position 1920 0
# output eDP-1 resolution 1920x1200 position 0 0
# output DP-1 {
# transform 270
# }
### Idle configuration
#
# Example configuration:
@@ -242,7 +249,22 @@ bindsym $mod+Control+Shift+b exec sed -i 's/\"Bold\"#tag_for_shortcut/\"Regular\
# move current workspace to another display
bindsym $mod+Control+k move workspace to output HDMI-A-1
# bindsym $mod+Control+k move workspace to output DP-1
bindsym $mod+Control+j move workspace to output eDP-1
# bindsym $mod+Control+j move workspace to output DP-1
# bindsym $mod+Control+k move workspace to output eDP-1
# bindsym $mod+Control+k move workspace to output DP-1
# remap capslock to control
input * {
xkb_options ctrl:nocaps
}
# for screen sharing
exec systemctl --user import-environment XDG_SESSION_TYPE XDG_CURRENT_DESKTOP
exec dbus-update-activation-environment WAYLAND_DISPLAY
# systemctl --user daemon-reexec
# systemctl --user restart pipewire
# systemctl --user restart xdg-desktop-portal
# systemctl --user restart xdg-desktop-portal-wlr
include /etc/sway/config.d/*

View File

@@ -5,8 +5,8 @@
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)
# date and time format: Tue 2025-08-19 22:37
date_formatted=$(date "+%a %F %H:%M")
temp_raw=$(cat /sys/class/thermal/thermal_zone0/temp)
temp=$(($temp_raw / 1000))
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}')
muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
@@ -19,5 +19,16 @@ muted=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
battery_status=$(cat /sys/class/power_supply/BAT0/status) # "Full", "Discharging", or "Charging"
battery_capacity=$(cat /sys/class/power_supply/BAT0/capacity) # %
# 💎 💻 💡 🔌 ⚡ 📁 \| 🐧
echo $uptime_formatted$volume $muted 🔊 $battery_status $battery_capacity% 🔋 $date_formatted
# date and time format: Tue 2025-08-19 22:37
datetime=$(date "+%a %F %H:%M:%S")
interface=$(ip route get 8.8.8.8 | awk -F'dev ' 'NR==1{split($2,a," ");print a[1]}')
ip=$(ip addr show dev $interface | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
avail_space=$(df -h / | awk 'NR==2 {print $4}')
# 💎 💻 💡 🔌 ⚡ 📁 \| 🐧 🔊 🔋
echo $avail_space \| $temp°C \| $uptime_formatted \| vol: $volume $muted \| $battery_status $battery_capacity% \| $interface $ip \| $datetime