1
0

Added sway config for tokyo

Laptop sway configuration
Updated installer script to pull/push the new configuration files
This commit is contained in:
2025-09-25 21:01:22 +01:00
parent 42189f6687
commit ae69d852fe
2 changed files with 157 additions and 2 deletions

141
config/sway/tokyo.sway Normal file
View File

@@ -0,0 +1,141 @@
#
# Variables
#
set $LAUNCH 'rofi -show drun'
set $LOCK 'swaylock'
set $MOD Mod4
set $WS0 0一
set $WS1 1二
set $WS2 2三
set $WS3 3四
set $WS4 4五
set $WS5 5六
set $WS6 6七
set $WS7 7八
set $WS8 8九
set $WS9 9十
set $DPY eDP-1
#
# Input & keybinds
#
input "type:keyboard" {
xkb_layout gb
xkb_options caps:swapescape
}
floating_modifier $MOD normal
bindsym $MOD+return exec footclient
bindsym $MOD+shift+q kill
bindsym $MOD+d exec $LAUNCH
bindsym $MOD+shift+r reload
bindsym $MOD+shift+e exec swaynag -t warning -m 'Quit sway?' -b 'Exit' 'swaymsg exit'
bindsym $MOD+shift+x exec $LOCK
bindsym $MOD+shift+space floating toggle
bindsym $MOD+f fullscreen
bindsym $MOD+s split toggle
bindsym $MOD+k focus up
bindsym $MOD+j focus down
bindsym $MOD+h focus left
bindsym $MOD+l focus right
bindsym $MOD+shift+k move up
bindsym $MOD+shift+j move down
bindsym $MOD+shift+h move left
bindsym $MOD+shift+l move right
bindsym $MOD+1 workspace $WS0
bindsym $MOD+2 workspace $WS1
bindsym $MOD+3 workspace $WS2
bindsym $MOD+4 workspace $WS3
bindsym $MOD+5 workspace $WS4
bindsym $MOD+6 workspace $WS5
bindsym $MOD+7 workspace $WS6
bindsym $MOD+8 workspace $WS7
bindsym $MOD+9 workspace $WS8
bindsym $MOD+0 workspace $WS9
bindsym $MOD+shift+1 move container to workspace $WS0
bindsym $MOD+shift+2 move container to workspace $WS1
bindsym $MOD+shift+3 move container to workspace $WS2
bindsym $MOD+shift+4 move container to workspace $WS3
bindsym $MOD+shift+5 move container to workspace $WS4
bindsym $MOD+shift+6 move container to workspace $WS5
bindsym $MOD+shift+7 move container to workspace $WS6
bindsym $MOD+shift+8 move container to workspace $WS7
bindsym $MOD+shift+9 move container to workspace $WS8
bindsym $MOD+shift+0 move container to workspace $WS9
#
# Visuals
#
output $DPY position 0 0 mode 1920x1080@60Hz
output * background "background" fill #232323
# Gaps and outline
#
gaps inner 5
default_border pixel 2
# Window colours
#
client.focused #3185FC #181818 #FFFFFF #3185FC #3185FC
client.focused_inactive #86B8FD #181818 #FFFFFF #86B8FD #86B8FD
client.unfocused #252525 #181818 #FFFFFF #252525 #252525
font pango:Noto Sans CJK JP 11
# swaybar
#
bar {
id 1
position top
gaps 5
workspace_min_width 25
strip_workspace_numbers yes
separator_symbol '|'
status_edge_padding 10
font pango:Noto Sans CJK JP 11
# @Todo: Make better or switch to waybar or something but I really can't be bothered using
# css to configure my desktop applications. I've already had to do it for rofi. They've
# already taken my icons from me
#
status_command while date +'時間:%a %d %b, %H:%M'; do sleep 10; done
colors {
background #181818
statusline #FFFFFF
separator #FFFFFF
active_workspace #86B8FD #86B8FD #181818
inactive_workspace #181818 #181818 #FFFFFF
focused_workspace #3185FC #3185FC #181818
}
}
# Startup applications
#
exec $LOCK
exec foot --server
exec swayidle -w \
timeout 300 'swaymsg "output * dpms off"' \
timeout 600 $LOCK \
resume 'swaymsg "output * dpms on"' \
before-sleep $LOCK
# Import any system level configuration changes
#
include /etc/sway/config.d/*

18
dots
View File

@@ -14,7 +14,20 @@ Install() {
cp "bash_profile" "$1/.bash_profile" cp "bash_profile" "$1/.bash_profile"
cp "bash_aliases" "$1/.bash_aliases" cp "bash_aliases" "$1/.bash_aliases"
cp -RT "config" "$1/.config" mkdir -p "$1/.config"
cp -r "config/nvim" "$1/.config"
cp "config/starship.toml" "$1/.config"
# Graphical setups
#
case $HOSTNAME in
kanto|tokyo)
mkdir -p "$1/.config/sway"
cp "config/sway/$HOSTNAME.sway" "$1/.config/sway/config"
;;
esac
} }
Pull() { Pull() {
@@ -24,6 +37,7 @@ Pull() {
cp -r "$1/.config/nvim" "config/" cp -r "$1/.config/nvim" "config/"
cp "$1/.config/starship.toml" "config/starship.toml" cp "$1/.config/starship.toml" "config/starship.toml"
cp "$1/.config/sway/config" "config/sway/$HOSTNAME.sway"
cp "$1/.bashrc" "bashrc" cp "$1/.bashrc" "bashrc"
cp "$1/.bash_profile" "bash_profile" cp "$1/.bash_profile" "bash_profile"
@@ -43,7 +57,7 @@ case $ACTION in
Pull $INSTALL_DIR Pull $INSTALL_DIR
;; ;;
*) *)
echo "usage: $0 <push|pull|diff> [dir]" echo "usage: $0 <install|pull|diff> [dir]"
;; ;;
esac esac