improve structure; move stuff to relevant folders

This commit is contained in:
2025-12-31 14:53:07 +02:00
parent e4296a3251
commit e405894cc2
34 changed files with 1452 additions and 80 deletions

View File

@@ -72,9 +72,8 @@ set $dp2_x 3840
set $dp2_bar_height 24 set $dp2_bar_height 24
set $dp2_bar_font pango: FontAwesome, monospace 10 set $dp2_bar_font pango: FontAwesome, monospace 10
# Display/bar profile overrides (written by a toggle script). # Display/bar profile overrides for 330Hz gamemode
# If this file doesn't exist, sway will just use the defaults below. include /home/raga/.config/sway/scripts/display-profile/display-profile.conf
include /home/raga/.config/sway/display-profile.conf
############################################################################### ###############################################################################
# Output configuration # Output configuration
@@ -82,12 +81,15 @@ include /home/raga/.config/sway/display-profile.conf
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
output * bg /home/raga/.config/sway/wallpaper.jpg fill # output * bg /home/raga/.config/sway/wallpaper.jpg fill
# Multi-monitor setup # Multi-monitor setup
# You can get your output names by running: swaymsg -t get_outputs # You can get your output names by running: swaymsg -t get_outputs
# DP-2 is the primary monitor on the left, and DP-1 is on the right. # DP-2 is the primary monitor on the left, and DP-1 is on the right.
output DP-1 { output DP-1 {
adaptive_sync on
render_bit_depth 10
position 0 0 position 0 0
# ECO # ECO
@@ -111,15 +113,9 @@ output DP-2 {
# Idle configuration # Idle configuration
############################################################################### ###############################################################################
# Lock screen after 900 seconds of inactivity, then turn off displays
#exec swayidle -w \
# timeout 900 'swaylock -f -c 000000' \
# timeout 1800 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
# Lock screen after 900 seconds of inactivity
exec swayidle -w \ exec swayidle -w \
timeout 900 'swaylock -f -c 000000' \ timeout 900 'swaylock -f -c 000000' \
# timeout 1800 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000'
############################################################################### ###############################################################################
@@ -237,7 +233,7 @@ bindsym $mod+Shift+s exec systemctl suspend
# Custom scripts (OSRS mode) # Custom scripts (OSRS mode)
############################################################################### ###############################################################################
set $osrs_scripts /home/raga/repos/linux/sway-new-config set $osrs_scripts /home/raga/repos/linux/sway-new-config/scripts/osrs
set $osrs_mode OSRS set $osrs_mode OSRS
#bindsym f12 mode "$osrs_mode" #bindsym f12 mode "$osrs_mode"
@@ -498,9 +494,9 @@ bindsym $mod+r mode "Resize Mode"
############################################################################### ###############################################################################
# Volume control (works with both PulseAudio and PipeWire) # Volume control (works with both PulseAudio and PipeWire)
bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ~/.config/sway/volume-notify-sway.sh bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ~/.config/sway/scripts/sway/volume-notify.sh
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && ~/.config/sway/volume-notify-sway.sh bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% && ~/.config/sway/scripts/sway/volume-notify.sh
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && ~/.config/sway/volume-notify-sway.sh bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && ~/.config/sway/scripts/sway/volume-notify.sh
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Brightness control # Brightness control
@@ -588,7 +584,7 @@ exec lxqt-policykit-agent # Authentication agent (comment out if not needed)
exec --no-startup-id blueman-applet exec --no-startup-id blueman-applet
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec --no-startup-id home_dotfiles/.config/sway/set_random_bg.sh exec --no-startup-id home_dotfiles/.config/sway/scripts/i3status/set-random-bg.sh
# Include additional config files if they exist # Include additional config files if they exist
include /etc/sway/config.d/* include /etc/sway/config.d/*

View File

@@ -3,20 +3,20 @@
[[block]] [[block]]
block = "custom" block = "custom"
command = "~/.config/sway/osrs-mode-status.sh" command = "~/.config/sway/scripts/osrs/osrs-mode-status.sh"
format = " $text " format = " $text "
interval = 1 interval = 1
click = [ click = [
{button = "left", cmd = "~/.config/sway/osrs-mode-toggle.sh", update = true} {button = "left", cmd = "~/.config/sway/scripts/osrs/osrs-mode-toggle.sh", update = true}
] ]
[[block]] [[block]]
block = "custom" block = "custom"
command = "~/.config/sway/display-profile-status.sh" command = "~/.config/sway/scripts/display-profile/display-profile-status.sh"
format = " $text " format = " $text "
interval = 1 interval = 1
click = [ click = [
{button = "left", cmd = "~/.config/sway/display-profile-toggle.sh", update = true} {button = "left", cmd = "~/.config/sway/scripts/display-profile/display-profile-toggle.sh", update = true}
] ]
[[block]] [[block]]
@@ -25,12 +25,12 @@ command = "echo ''"
format = " $text " format = " $text "
interval = 1 interval = 1
click = [ click = [
{button = "left", cmd = "~/.config/sway/set_random_bg.sh", update = false}, {button = "left", cmd = "~/.config/sway/scripts/i3status/set-random-bg.sh", update = false},
] ]
#[[block]] #[[block]]
#block = "custom" #block = "custom"
#command = "~/.config/sway/get-focused-window.sh" #command = "~/.config/sway/scripts/i3status/get-focused-window.sh"
#format = " $text " #format = " $text "
#interval = 5 #interval = 5
@@ -76,7 +76,7 @@ disconnected_format = ""
# Custom Bluetooth connected devices block # Custom Bluetooth connected devices block
[[block]] [[block]]
block = "custom" block = "custom"
command = "~/.config/sway/bluetooth-sway.sh" command = "~/.config/sway/scripts/i3status/bluetooth.sh"
format = " $text " format = " $text "
interval = 10 interval = 10
click = [ click = [
@@ -87,7 +87,7 @@ click = [
# Custom weather block using your wttr.in script # Custom weather block using your wttr.in script
# [[block]] # [[block]]
# block = "custom" # block = "custom"
# command = "~/.config/sway/weather-sway.sh" # command = "~/.config/sway/scripts/i3status/wttrin-weather.sh"
# format = " 🌤 $text " # format = " 🌤 $text "
# interval = 1800 # interval = 1800
# click = [ # click = [
@@ -99,7 +99,7 @@ click = [
# Uncomment and modify this block if you want weather for a different city # Uncomment and modify this block if you want weather for a different city
[[block]] [[block]]
block = "custom" block = "custom"
command = "~/.config/sway/weather-sway.sh" command = "~/.config/sway/scripts/i3status/wttrin-weather.sh"
format = "$text" format = "$text"
interval = 1800 interval = 1800
@@ -108,7 +108,7 @@ interval = 1800
# 1 = current conditions, 2 = current + today, 3 = current + today + tomorrow, 4 = current + 3 days # 1 = current conditions, 2 = current + today, 3 = current + today + tomorrow, 4 = current + 3 days
# [[block]] # [[block]]
# block = "custom" # block = "custom"
# command = "weather_format='2' ~/.config/sway/weather-sway.sh" # command = "weather_format='2' ~/.config/sway/scripts/i3status/wttrin-weather.sh"
# format = " 📅 $text " # format = " 📅 $text "
# interval = 1800 # interval = 1800

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
PROFILE_FILE="/home/raga/.config/sway/display-profile.conf" PROFILE_FILE="/home/raga/.config/sway/scripts/display-profile/display-profile.conf"
mode_str="" mode_str=""
if [[ -f "$PROFILE_FILE" ]]; then if [[ -f "$PROFILE_FILE" ]]; then

View File

@@ -4,7 +4,7 @@ set -euo pipefail
# Toggle DP-1 between 4K@165 and 1080p@330 and keep DP-2 positioned flush so # Toggle DP-1 between 4K@165 and 1080p@330 and keep DP-2 positioned flush so
# you don't get a "dead gap" for the mouse. # you don't get a "dead gap" for the mouse.
PROFILE_FILE="/home/raga/.config/sway/display-profile.conf" PROFILE_FILE="/home/raga/.config/sway/scripts/display-profile/display-profile.conf"
MODE_4K="3840x2160@165Hz" MODE_4K="3840x2160@165Hz"
MODE_GAME="1920x1080@330Hz" MODE_GAME="1920x1080@330Hz"

View File

@@ -1,5 +1,5 @@
# This file is intended to be rewritten by scripts (see display-profile-toggle.sh). # Default display profile
# Keep it small so the toggle is fast. # Rewritten and toggled in `display-profile-toggle.sh`
# DP-1 (4K / gaming output) # DP-1 (4K / gaming output)
set $dp1_mode 3840x2160@165Hz set $dp1_mode 3840x2160@165Hz
@@ -10,4 +10,3 @@ set $dp1_bar_font pango: FontAwesome, monospace 14
set $dp2_x 3840 set $dp2_x 3840
set $dp2_bar_height 24 set $dp2_bar_height 24
set $dp2_bar_font pango: FontAwesome, monospace 10 set $dp2_bar_font pango: FontAwesome, monospace 10

View File

@@ -11,4 +11,4 @@ if [ "$muted" = "yes" ]; then
notify-send -t 1000 "Volume" "Muted" notify-send -t 1000 "Volume" "Muted"
else else
notify-send -t 1000 "Volume" "$volume" notify-send -t 1000 "Volume" "$volume"
fi fi

View File

@@ -149,3 +149,5 @@ alias info="pacman -Si "
source /usr/share/nvm/init-nvm.sh source /usr/share/nvm/init-nvm.sh
source ~/.aliases source ~/.aliases
export JAVA_HOME=/usr/lib/jvm/java-21-temurin

View File

@@ -9,7 +9,7 @@ echo "Installing Oh My Zsh and related requirements..."
# Install base packages # Install base packages
echo "Installing base packages..." echo "Installing base packages..."
sudo pacman -S \ sudo pacman -S --needed \
zsh \ zsh \
git \ git \
curl \ curl \

View File

@@ -159,7 +159,7 @@ echo " - Default location: Pärnu (wttr.in, no API key needed)"
echo " - Shows weather + sunrise/sunset times" echo " - Shows weather + sunrise/sunset times"
echo " - Left click: detailed weather notification" echo " - Left click: detailed weather notification"
echo " - Right click: open wttr.in website" echo " - Right click: open wttr.in website"
echo " - Change location: edit ~/.config/sway/weather-sway.sh" echo " - Change location: edit ~/.config/sway/scripts/i3status/wttrin-weather.sh"
echo "" echo ""
echo "3. Key applications configured:" echo "3. Key applications configured:"
echo " - Terminal: foot" echo " - Terminal: foot"

View File

@@ -47,53 +47,65 @@ echo "Installing i3status-rust config..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/i3status-rust.toml ~/.config/sway/i3status-rust.toml cp $SCRIPT_DIR/home_dotfiles/.config/sway/i3status-rust.toml ~/.config/sway/i3status-rust.toml
echo "✓ i3status-rust config installed to ~/.config/sway/i3status-rust.toml" echo "✓ i3status-rust config installed to ~/.config/sway/i3status-rust.toml"
# === DISPLAY PROFILE TOGGLE (MODE / BAR HEIGHT / OUTPUT POSITION) ===
echo ""
echo "Installing display profile toggle scripts/config..."
mkdir -p ~/.config/sway/scripts/display-profile
for file in display-profile.conf display-profile-toggle.sh display-profile-status.sh; do
if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/display-profile/$file" ]; then
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/display-profile/$file" ~/.config/sway/scripts/display-profile/$file
case "$file" in
*.sh)
chmod +x ~/.config/sway/scripts/display-profile/$file
;;
esac
echo "✓ Installed ~/.config/sway/scripts/display-profile/$file"
else
echo "$file not found, skipping..."
fi
done
# === OSRS MODE SCRIPTS === # === OSRS MODE SCRIPTS ===
echo "" echo ""
echo "Installing OSRS mode helper scripts..." echo "Installing OSRS mode helper scripts..."
for script in osrs-mode-status.sh osrs-mode-toggle.sh get-focused-window.sh; do mkdir -p ~/.config/sway/scripts/osrs
if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ]; then for script in osrs-mode-status.sh osrs-mode-toggle.sh; do
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ~/.config/sway/$script if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/osrs/$script" ]; then
chmod +x ~/.config/sway/$script cp "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/osrs/$script" ~/.config/sway/scripts/osrs/$script
echo "✓ Installed ~/.config/sway/$script" chmod +x ~/.config/sway/scripts/osrs/$script
echo "✓ Installed ~/.config/sway/scripts/osrs/$script"
else else
echo "$script not found, skipping..." echo "$script not found, skipping..."
fi fi
done done
# === CHANGE WALLPAPER SCRIPT === # === i3status BAR SCRIPTS ===
echo "" echo ""
echo "Installing change wallpaper script..." echo "Installing i3status bar scripts..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/set_random_bg.sh ~/.config/sway/set_random_bg.sh mkdir -p ~/.config/sway/scripts/i3status
chmod +x ~/.config/sway/set_random_bg.sh for script in bluetooth.sh wttrin-weather.sh set-random-bg.sh get-focused-window.sh; do
echo "✓ Change wallpaper script installed to ~/.config/sway/set_random_bg.sh" if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/i3status/$script" ]; then
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/i3status/$script" ~/.config/sway/scripts/i3status/$script
chmod +x ~/.config/sway/scripts/i3status/$script
echo "✓ Installed ~/.config/sway/scripts/i3status/$script"
else
echo "$script not found, skipping..."
fi
done
# === WEATHER SCRIPT === # === SWAY CONFIG SCRIPTS ===
# Comment out this section if you don't want the weather script
echo "" echo ""
echo "Installing weather script..." echo "Installing sway config scripts..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/weather-sway.sh ~/.config/sway/weather-sway.sh mkdir -p ~/.config/sway/scripts/sway
chmod +x ~/.config/sway/weather-sway.sh for script in volume-notify.sh; do
echo "✓ Weather script installed to ~/.config/sway/weather-sway.sh" if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/sway/$script" ]; then
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/sway/$script" ~/.config/sway/scripts/sway/$script
# === BLUETOOTH SCRIPT === chmod +x ~/.config/sway/scripts/sway/$script
echo "" echo "✓ Installed ~/.config/sway/scripts/sway/$script"
echo "Installing bluetooth script..." else
cp $SCRIPT_DIR/home_dotfiles/.config/sway/bluetooth-sway.sh ~/.config/sway/bluetooth-sway.sh echo "$script not found, skipping..."
chmod +x ~/.config/sway/bluetooth-sway.sh fi
echo "✓ Bluetooth script installed to ~/.config/sway/bluetooth-sway.sh" done
# === VOLUME NOTIFY SCRIPT ===
# Comment out this section if you don't want volume notifications
if [ -f $SCRIPT_DIR/home_dotfiles/.config/sway/volume-notify-sway.sh ]; then
echo ""
echo "Installing volume notify script..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/volume-notify-sway.sh ~/.config/sway/volume-notify-sway.sh
chmod +x ~/.config/sway/volume-notify-sway.sh
echo "✓ Volume notify script installed to ~/.config/sway/volume-notify-sway.sh"
else
echo ""
echo "⚠ volume-notify-sway.sh not found, skipping..."
fi
# === SET THUNAR AS DEFAULT FILE MANAGER === # === SET THUNAR AS DEFAULT FILE MANAGER ===
echo "" echo ""
@@ -132,11 +144,14 @@ echo "- ~/.config/mako/config (notification styling)"
echo "- ~/.config/sway/config (main Sway config)" echo "- ~/.config/sway/config (main Sway config)"
echo "- ~/.config/swayimg/swayimgrc (image viewer config)" echo "- ~/.config/swayimg/swayimgrc (image viewer config)"
echo "- ~/.config/sway/i3status-rust.toml (status bar config)" echo "- ~/.config/sway/i3status-rust.toml (status bar config)"
echo "- ~/.config/sway/weather-sway.sh (weather script)" echo "- ~/.config/sway/scripts/display-profile/display-profile.conf (display profile state/overrides)"
echo "- ~/.config/sway/scripts/display-profile/display-profile-toggle.sh (click-to-toggle display profile)"
echo "- ~/.config/sway/scripts/display-profile/display-profile-status.sh (status bar label for display profile)"
echo "- ~/.config/sway/scripts/i3status/wttrin-weather.sh (weather script)"
echo "- thunar set as default file manager" echo "- thunar set as default file manager"
echo "- swayimg set as default image viewer" echo "- swayimg set as default image viewer"
if [ -f ~/.config/sway/volume-notify-sway.sh ]; then if [ -f ~/.config/sway/scripts/sway/volume-notify.sh ]; then
echo "- ~/.config/sway/volume-notify-sway.sh (volume notifications)" echo "- ~/.config/sway/scripts/sway/volume-notify.sh (volume notifications)"
fi fi
makoctl reload makoctl reload

View File

@@ -11,10 +11,3 @@ RemainAfterExit=yes
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

File diff suppressed because it is too large Load Diff