From ce8e8fe6ecc0a396ca06aec5616e787aa58aae30 Mon Sep 17 00:00:00 2001 From: James Bulman Date: Mon, 29 Sep 2025 17:44:50 +0100 Subject: [PATCH] Added linux config for kanto Updated dots script to correctly install across multiple systems Simplified rofi configuration Added sway config for kanto Fixed swaylock colour missing a zero Minor updates for specific font sizes, colours etc. --- config/foot/foot.ini | 3 +- config/rofi/{tokyo.rofi => config.rasi} | 2 +- config/rofi/{tokyo.theme => theme.rasi} | 13 ++- config/starship.toml | 22 ++-- config/sway/kanto.sway | 143 ++++++++++++++++++++++++ config/sway/tokyo.sway | 3 +- config/swaylock/config | 2 +- dots | 17 ++- 8 files changed, 183 insertions(+), 22 deletions(-) rename config/rofi/{tokyo.rofi => config.rasi} (98%) rename config/rofi/{tokyo.theme => theme.rasi} (95%) create mode 100644 config/sway/kanto.sway diff --git a/config/foot/foot.ini b/config/foot/foot.ini index a320d21..f2dda80 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -1,7 +1,8 @@ # Basic # term=xterm-256color -font=Ubuntu Mono:size=11.5 +#tokyo font=Ubuntu Mono:size=11.5 +#kanto font=Ubuntu Mono:size=10 [colors] alpha=1.0 diff --git a/config/rofi/tokyo.rofi b/config/rofi/config.rasi similarity index 98% rename from config/rofi/tokyo.rofi rename to config/rofi/config.rasi index 57eb025..e4d8a91 100644 --- a/config/rofi/tokyo.rofi +++ b/config/rofi/config.rasi @@ -37,4 +37,4 @@ configuration { kb-custom-10: "Super+0"; } -@theme "tokyo" +@theme "theme" diff --git a/config/rofi/tokyo.theme b/config/rofi/theme.rasi similarity index 95% rename from config/rofi/tokyo.theme rename to config/rofi/theme.rasi index 7168d3e..9687239 100644 --- a/config/rofi/tokyo.theme +++ b/config/rofi/theme.rasi @@ -1,11 +1,20 @@ * { font: "Noto Sans CJK JP 11"; - bg: #181818; - fg: #FFFFFF; + bg: #181818; + fg: #FFFFFF; + +/*tokyo selected: #3185FC; urgent: #0567F1; active: #86B8FD; +tokyo*/ + +/*kanto + selected: #85FF85; + urgent: #5CFF5C; + active: #C2FFC2; +kanto*/ background-color: transparent; text-color: @fg; diff --git a/config/starship.toml b/config/starship.toml index 9f44658..d0d39f9 100644 --- a/config/starship.toml +++ b/config/starship.toml @@ -7,25 +7,27 @@ disabled = true [hostname] ssh_only = false -style = "bright-blue bold" -format = "[@$hostname]($style)" +format = "[@$hostname]($style)" +#tokyo style = "bright-blue bold" +#kanto style = "bright-green bold" [username] show_always = true -style_user = "bright-blue bold" -style_root = "bright-red bold" -format="[$user]($style)" +format = "[$user]($style)" +style_root = "bright-red bold" +#tokyo style_user = "bright-blue bold" +#kanto style_user = "bright-green bold" [directory] truncation_length = 3 truncate_to_repo = true -style = "blue" -read_only = "!" -read_only_style = "red" -format = "[$path]($style)[$read_only]($read_only_style)" +style = "blue" +read_only = "!" +read_only_style = "red" +format = "[$path]($style)[$read_only]($read_only_style)" [cmd_duration] -style = "bold yellow" +style = "bold yellow" format = "[+$duration]($style) " [character] diff --git a/config/sway/kanto.sway b/config/sway/kanto.sway new file mode 100644 index 0000000..72cc47d --- /dev/null +++ b/config/sway/kanto.sway @@ -0,0 +1,143 @@ +# +# variables +# + +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 $DPYL DP-3 +set $DPYR DP-1 + +# +# Input & keybinds +# + +input "type:keyboard" { + xkb_layout gb +} + +floating_modifier $MOD normal + +bindsym $MOD+return exec footclient +bindsym $MOD+shift+q kill +bindsym $MOD+d exec 'rofi -show drun' +bindsym $MOD+w exec 'rofi -show window' + +bindsym $MOD+shift+r reload +bindsym $MOD+shift+e exec 'swaynag -t error -m "Hard Restart" -b "Yes" "swaymsg exit" -s "No" --button-gap 0' +bindsym $MOD+shift+x exec $LOCK +bindsym $MOD+shift+s exec 'grimshot copy area' + +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 $DPYL position 0 0 mode 3840x2160@60Hz scale 2 +output $DPYR position 1920 0 mode 1920x1080@144Hz +output * background "background" fill #232323 + +# Gaps and outline +# +gaps inner 5 +default_border pixel 2 + +# Window colours +# +client.focused #85FF85 #181818 #FFFFFF #85FF85 #85FF85 +client.focused_inactive #C2FFC2 #181818 #FFFFFF #C2FFC2 #C2FFC2 +client.unfocused #252525 #181818 #FFFFFF #252525 #252525 + +font pango:Noto Sans CJK JP 10 + +# 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 10 + + # @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 #C2FFC2 #C2FFC2 #181818 + inactive_workspace #181818 #181818 #FFFFFF + focused_workspace #85FF85 #85FF85 #181818 + } +} + +# Startup applications +# +exec $LOCK +exec foot --server + +exec swayidle -w \ + timeout 900 'swaymsg "output * dpms off"' \ + timeout 1800 $LOCK \ + resume 'swaymsg "output * dpms on"' \ + before-sleep $LOCK + +# Import any system level configuration changes +# +include /etc/sway/config.d/* diff --git a/config/sway/tokyo.sway b/config/sway/tokyo.sway index d91cd30..3426dc6 100644 --- a/config/sway/tokyo.sway +++ b/config/sway/tokyo.sway @@ -36,8 +36,9 @@ bindsym $MOD+d exec 'rofi -show drun' bindsym $MOD+w exec 'rofi -show window' bindsym $MOD+shift+r reload -bindsym $MOD+shift+e exec swaynag -t warning -m 'Quit sway?' -b 'Exit' 'swaymsg exit' +bindsym $MOD+shift+e exec 'swaynag -t error -m "Hard Restart" -b "Yes" "swaymsg exit" -s "No" --button-gap 0' bindsym $MOD+shift+x exec $LOCK +bindsym $MOD+shift+s exec 'grimshot copy area' bindsym $MOD+shift+space floating toggle bindsym $MOD+f fullscreen diff --git a/config/swaylock/config b/config/swaylock/config index d3adbdd..6b804af 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -1,6 +1,6 @@ # Background colour # -color=00000 +color=000000 # Basic options # diff --git a/dots b/dots index 8e59c07..b0bd381 100755 --- a/dots +++ b/dots @@ -19,20 +19,25 @@ Install() { cp -r "config/nvim" "$1/.config" cp "config/starship.toml" "$1/.config" + sed -i "s/#$HOSTNAME //" "$1/.config/starship.toml" + # Graphical setups # case $HOSTNAME in kanto|tokyo) mkdir -p "$1/.config/sway" mkdir -p "$1/.config/swaylock" - mkdir -p "$1/.config/rofi" mkdir -p "$1/.config/foot" - cp "config/sway/$HOSTNAME.sway" "$1/.config/sway/config" - cp "config/swaylock/config" "$1/.config/swaylock" - cp "config/rofi/$HOSTNAME.rofi" "$1/.config/rofi/config.rasi" - cp "config/rofi/$HOSTNAME.theme" "$1/.config/rofi/$HOSTNAME.rasi" - cp "config/foot/foot.ini" "$1/.config/foot/foot.ini" + cp "config/sway/$HOSTNAME.sway" "$1/.config/sway/config" + cp "config/swaylock/config" "$1/.config/swaylock" + cp "config/foot/foot.ini" "$1/.config/foot/foot.ini" + cp -r "config/rofi" "$1/.config" + + sed -i "s/#$HOSTNAME //" "$1/.config/foot/foot.ini" + + sed -i "s/\\/\\*$HOSTNAME//" "$1/.config/rofi/theme.rasi" + sed -i "s/$HOSTNAME\\*\\///" "$1/.config/rofi/theme.rasi" ;; esac }