Compare commits

...

5 Commits

Author SHA1 Message Date
97e6fdca0e disable some unused sway config parts, keep it more basic 2025-12-31 15:03:10 +02:00
af151a41af ensure firefox is default 2025-12-31 14:56:07 +02:00
9fcef4b4ed pavucontrol as floater 2025-12-31 14:56:00 +02:00
e405894cc2 improve structure; move stuff to relevant folders 2025-12-31 14:53:07 +02:00
e4296a3251 gamemode 1080p 330hz toggle 2025-12-30 22:48:38 +02:00
34 changed files with 1601 additions and 96 deletions

View File

@@ -63,29 +63,44 @@ set $menu fuzzel
# File manager (Arch alternatives)
set $filemanager thunar
# Defaults (kept here so the config still loads even if the included file is missing)
set $dp1_mode 3840x2160@165Hz
set $dp1_bar_height 40
set $dp1_bar_font pango: FontAwesome, monospace 14
set $dp2_x 3840
set $dp2_bar_height 24
set $dp2_bar_font pango: FontAwesome, monospace 10
# Display/bar profile overrides for 330Hz gamemode
include /home/raga/.config/sway/scripts/display-profile/display-profile.conf
###############################################################################
# Output configuration
###############################################################################
# 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 /home/raga/.config/sway/wallpaper.jpg fill
# output * bg /home/raga/.config/sway/wallpaper.jpg fill
# Multi-monitor setup
# 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.
output DP-1 {
adaptive_sync on
render_bit_depth 10
position 0 0
# ECO
# mode 2560x1440@60Hz
# FULL
mode 3840x2160@165Hz
mode $dp1_mode
}
output DP-2 {
position 3840 0
position $dp2_x 0
# ECO
# mode 2560x1440@60Hz
@@ -98,15 +113,9 @@ output DP-2 {
# 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 \
timeout 900 'swaylock -f -c 000000' \
# timeout 1800 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000'
###############################################################################
@@ -143,6 +152,7 @@ input type:pointer {
# Floating window rules
floating_maximum_size -1 x -1
for_window [app_id="floating_window"] floating enable
for_window [app_id="pavucontrol"] floating enable
# Border configuration
default_floating_border pixel 1
@@ -209,26 +219,25 @@ bindsym $mod+Ctrl+r reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
## Session // Reboot // <><Shift> b ##
bindsym $mod+Shift+b exec systemctl reboot
#bindsym $mod+Shift+b exec systemctl reboot
## Session // Power Down // <><Shift> p ##
bindsym $mod+Shift+p exec systemctl poweroff
#bindsym $mod+Shift+p exec systemctl poweroff
## Session // Lock Screen // <> Escape ##
bindsym $mod+Escape exec swaylock -f -c 000000
## Session // Sleep // <><Shift> s ##
bindsym $mod+Shift+s exec systemctl suspend
#bindsym $mod+Shift+s exec systemctl suspend
###############################################################################
# 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
#bindsym f12 mode "$osrs_mode"
mode "$osrs_mode" {
bindsym q exec $osrs_scripts/osrs-drop.sh
bindsym w exec $osrs_scripts/osrs-click.sh
@@ -247,10 +256,10 @@ mode "$osrs_mode" {
###############################################################################
## Modify // Settings // <> c ##
bindsym $mod+c exec env XDG_CURRENT_DESKTOP=GNOME gnome-control-center
#bindsym $mod+c exec env XDG_CURRENT_DESKTOP=GNOME gnome-control-center
## Modify // Display Settings // <> d ##
bindsym $mod+d exec wdisplays
#bindsym $mod+d exec wdisplays
## Modify // Wifi Settings // <> w ##
bindsym $mod+w exec nm-connection-editor
@@ -331,7 +340,7 @@ bindsym $mod+Ctrl+Shift+Tab workspace prev_on_output
bindsym $mod+Ctrl+h workspace prev_on_output
## Navigate // Scratchpad // <><Ctrl> a ##
bindsym $mod+Ctrl+a scratchpad show
#bindsym $mod+Ctrl+a scratchpad show
###############################################################################
# Window and Workspace Configuration
@@ -362,10 +371,10 @@ bindsym $mod+Ctrl+Shift+k move workspace to output up
bindsym $mod+Ctrl+Shift+l move workspace to output right
## Modify // Vertical Window Orientation // <> v ##
bindsym $mod+v splitv
#bindsym $mod+v splitv
## Modify // Horizontal Window Orientation // <> g ##
bindsym $mod+g splith
#bindsym $mod+g splith
## Modify // Toggle Window Orientation // <> BackSpace ##
bindsym $mod+BackSpace split toggle
@@ -377,13 +386,13 @@ bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f floating toggle
## Modify // Move to Scratchpad // <><Ctrl> m ##
bindsym $mod+Ctrl+m move to scratchpad
#bindsym $mod+Ctrl+m move to scratchpad
## Modify // Tile/Float Focus Toggle // <><Shift> t ##
bindsym $mod+Shift+t focus mode_toggle
#bindsym $mod+Shift+t focus mode_toggle
## Modify // Window Layout Mode // <> t ##
bindsym $mod+t layout toggle tabbed splith splitv
#bindsym $mod+t layout toggle tabbed splith splitv
# Move focused container to workspace
## Modify // Move Window to Workspace 1 - 10 // <><Shift> 0..9 ##
@@ -434,14 +443,14 @@ bindsym $mod+$alt+$ws_high_key+$ws8_key move container to workspace number $ws18
bindsym $mod+$alt+$ws_high_key+$ws9_key move container to workspace number $ws19; workspace number $ws19
# Layout bindings (matching i3 defaults)
bindsym $mod+s layout stacking
bindsym $mod+e layout toggle split
#bindsym $mod+s layout stacking
#bindsym $mod+e layout toggle split
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
#bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
bindsym $mod+minus scratchpad show
#bindsym $mod+minus scratchpad show
###############################################################################
# Resize Mode
@@ -485,9 +494,9 @@ bindsym $mod+r mode "Resize Mode"
###############################################################################
# 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 XF86AudioLowerVolume 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/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/scripts/sway/volume-notify.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
# Brightness control
@@ -510,14 +519,12 @@ bar {
output DP-1
position bottom
mode dock
height 40
#font pango:monospace 10
font pango: FontAwesome, monospace 14
height $dp1_bar_height
font $dp1_bar_font
separator_symbol " "
strip_workspace_numbers yes
workspace_min_width 36
# Try to use i3status-rust for better functionality, fallback to basic status
status_command i3status-rs ~/.config/sway/i3status-rust.toml || while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
colors {
@@ -537,14 +544,12 @@ bar {
output DP-2
position bottom
mode dock
height 24
#font pango:monospace 10
font pango: FontAwesome, monospace 10
height $dp2_bar_height
font $dp2_bar_font
separator_symbol " "
strip_workspace_numbers yes
workspace_min_width 36
# Try to use i3status-rust for better functionality, fallback to basic status
status_command i3status-rs ~/.config/sway/i3status-rust.toml || while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
colors {
@@ -575,7 +580,7 @@ exec lxqt-policykit-agent # Authentication agent (comment out if not needed)
exec --no-startup-id blueman-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 /etc/sway/config.d/*

View File

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

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
PROFILE_FILE="/home/raga/.config/sway/scripts/display-profile/display-profile.conf"
mode_str=""
if [[ -f "$PROFILE_FILE" ]]; then
mode_str="$(awk '$1=="set" && $2=="$dp1_mode" {print $3; found=1} END {if(!found) print ""}' "$PROFILE_FILE" 2>/dev/null)"
fi
# Display-related FontAwesome icon + a short label.
case "$mode_str" in
3840x2160@*|4096x2160@*) echo " 4K";;
1920x1080@*) echo " 1080p";;
"") echo "";;
*) echo "${mode_str}";;
esac

View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -euo pipefail
# 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.
PROFILE_FILE="/home/raga/.config/sway/scripts/display-profile/display-profile.conf"
MODE_4K="3840x2160@165Hz"
MODE_GAME="1920x1080@330Hz"
# Bar tuning per mode
BAR_HEIGHT_4K="40"
BAR_FONT_4K="pango: FontAwesome, monospace 14"
BAR_HEIGHT_GAME="16"
BAR_FONT_GAME="pango: FontAwesome, monospace 8"
# DP-2 bar settings (static)
DP2_BAR_HEIGHT="24"
DP2_BAR_FONT="pango: FontAwesome, monospace 10"
get_current_profile_mode() {
# Reads the last-written profile state instead of querying the monitor.
# This makes toggling deterministic even if the display reports odd modes.
if [[ ! -f "$PROFILE_FILE" ]]; then
echo "$MODE_4K"
return
fi
# Example line: set $dp1_mode 3840x2160@165Hz
awk '$1=="set" && $2=="$dp1_mode" {print $3; found=1} END {if(!found) exit 1}' "$PROFILE_FILE" 2>/dev/null \
|| echo "$MODE_4K"
}
write_profile() {
local dp1_mode="$1"
local dp1_bar_height="$2"
local dp1_bar_font="$3"
local dp2_x="$4"
local tmp
tmp="$(mktemp)"
cat >"$tmp" <<EOF
# Autogenerated by display-profile-toggle.sh. Manual edits will be overwritten.
set \$dp1_mode ${dp1_mode}
set \$dp1_bar_height ${dp1_bar_height}
set \$dp1_bar_font ${dp1_bar_font}
set \$dp2_x ${dp2_x}
set \$dp2_bar_height ${DP2_BAR_HEIGHT}
set \$dp2_bar_font ${DP2_BAR_FONT}
EOF
mkdir -p "$(dirname "$PROFILE_FILE")"
mv -f "$tmp" "$PROFILE_FILE"
}
main() {
local current_mode
current_mode="$(get_current_profile_mode)"
if [[ "$current_mode" == "$MODE_4K" ]]; then
# Switch to game mode (1080p @ high refresh)
write_profile "$MODE_GAME" "$BAR_HEIGHT_GAME" "$BAR_FONT_GAME" "1920"
else
# Switch back to 4K
write_profile "$MODE_4K" "$BAR_HEIGHT_4K" "$BAR_FONT_4K" "3840"
fi
swaymsg reload >/dev/null
}
main "$@"

View File

@@ -0,0 +1,12 @@
# Default display profile
# Rewritten and toggled in `display-profile-toggle.sh`
# DP-1 (4K / gaming output)
set $dp1_mode 3840x2160@165Hz
set $dp1_bar_height 40
set $dp1_bar_font pango: FontAwesome, monospace 14
# DP-2 (secondary output)
set $dp2_x 3840
set $dp2_bar_height 24
set $dp2_bar_font pango: FontAwesome, monospace 10

View File

@@ -149,3 +149,5 @@ alias info="pacman -Si "
source /usr/share/nvm/init-nvm.sh
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
echo "Installing base packages..."
sudo pacman -S \
sudo pacman -S --needed \
zsh \
git \
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 " - Left click: detailed weather notification"
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 "3. Key applications configured:"
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
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 ===
echo ""
echo "Installing OSRS mode helper scripts..."
for script in osrs-mode-status.sh osrs-mode-toggle.sh get-focused-window.sh; do
if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ]; then
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ~/.config/sway/$script
chmod +x ~/.config/sway/$script
echo "✓ Installed ~/.config/sway/$script"
mkdir -p ~/.config/sway/scripts/osrs
for script in osrs-mode-status.sh osrs-mode-toggle.sh; do
if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/osrs/$script" ]; then
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/scripts/osrs/$script" ~/.config/sway/scripts/osrs/$script
chmod +x ~/.config/sway/scripts/osrs/$script
echo "✓ Installed ~/.config/sway/scripts/osrs/$script"
else
echo "$script not found, skipping..."
fi
done
# === CHANGE WALLPAPER SCRIPT ===
# === i3status BAR SCRIPTS ===
echo ""
echo "Installing change wallpaper script..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/set_random_bg.sh ~/.config/sway/set_random_bg.sh
chmod +x ~/.config/sway/set_random_bg.sh
echo "✓ Change wallpaper script installed to ~/.config/sway/set_random_bg.sh"
# === WEATHER SCRIPT ===
# Comment out this section if you don't want the weather script
echo ""
echo "Installing weather script..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/weather-sway.sh ~/.config/sway/weather-sway.sh
chmod +x ~/.config/sway/weather-sway.sh
echo "✓ Weather script installed to ~/.config/sway/weather-sway.sh"
# === BLUETOOTH SCRIPT ===
echo ""
echo "Installing bluetooth script..."
cp $SCRIPT_DIR/home_dotfiles/.config/sway/bluetooth-sway.sh ~/.config/sway/bluetooth-sway.sh
chmod +x ~/.config/sway/bluetooth-sway.sh
echo "✓ Bluetooth script installed to ~/.config/sway/bluetooth-sway.sh"
# === 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"
echo "Installing i3status bar scripts..."
mkdir -p ~/.config/sway/scripts/i3status
for script in bluetooth.sh wttrin-weather.sh set-random-bg.sh get-focused-window.sh; do
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 ""
echo "⚠ volume-notify-sway.sh not found, skipping..."
echo "$script not found, skipping..."
fi
done
# === SWAY CONFIG SCRIPTS ===
echo ""
echo "Installing sway config scripts..."
mkdir -p ~/.config/sway/scripts/sway
for script in volume-notify.sh; do
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
chmod +x ~/.config/sway/scripts/sway/$script
echo "✓ Installed ~/.config/sway/scripts/sway/$script"
else
echo "$script not found, skipping..."
fi
done
# === SET THUNAR AS DEFAULT FILE MANAGER ===
echo ""
@@ -107,6 +119,16 @@ echo "Setting swayimg as default image viewer..."
xdg-mime default swayimg.desktop image/jpeg image/jpg image/png image/gif image/webp image/bmp image/tiff image/svg+xml
echo "✓ swayimg set as default image viewer"
# === SET FIREFOX AS DEFAULT BROWSER ===
echo ""
echo "Setting Firefox as default browser..."
if command -v firefox >/dev/null 2>&1; then
xdg-settings set default-web-browser firefox.desktop
echo "✓ Firefox set as default browser"
else
echo "⚠ Firefox not installed, skipping default browser setup"
fi
# === SET WALLPAPER ===
echo ""
echo "Setting wallpaper..."
@@ -132,11 +154,14 @@ echo "- ~/.config/mako/config (notification styling)"
echo "- ~/.config/sway/config (main Sway config)"
echo "- ~/.config/swayimg/swayimgrc (image viewer 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 "- swayimg set as default image viewer"
if [ -f ~/.config/sway/volume-notify-sway.sh ]; then
echo "- ~/.config/sway/volume-notify-sway.sh (volume notifications)"
if [ -f ~/.config/sway/scripts/sway/volume-notify.sh ]; then
echo "- ~/.config/sway/scripts/sway/volume-notify.sh (volume notifications)"
fi
makoctl reload

View File

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

File diff suppressed because it is too large Load Diff