1
0

Compare commits

...

3 Commits

Author SHA1 Message Date
2474ac0fd5 Added kanto config on Windows
Changed config location for starship on Windows
Updated dots.bat to include patch function
Use patch to strip hostname prefixes when installing
Style change for all caps in dots.bat
2025-10-01 02:25:38 +01:00
ce8e8fe6ec 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.
2025-09-29 17:44:50 +01:00
a184195a29 Made config vaguely work on Windows
Added dots.bat script for installing and pulling
Added clink config for cmd
Removed auto-split on start in nvim
Added guifont in nvim
Added workaround for shellpipe in nvim
2025-09-27 21:52:48 +01:00
12 changed files with 265 additions and 31 deletions

10
config/clink/inputrc Normal file
View File

@@ -0,0 +1,10 @@
$if clink
set mark-symlinked-directories on
set expand-tilde on
"\C-W": unix-filename-rubout
"\t": old-menu-complete
# Fix issue with Shift-Backspace not doing anything
"\e[27;2;8~": "\C-H"
$endif

View File

@@ -0,0 +1,6 @@
-- Set config location to be in %APPDATA% rather than the default %USERPROFILE%\.config
local appdata = os.getenv("APPDATA")
os.setenv("STARSHIP_CONFIG", appdata .. "\\starship.toml")
-- Load starship
load(io.popen('starship init cmd'):read("*a"))()

View File

@@ -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

View File

@@ -44,6 +44,12 @@ vim.o.completeopt = "preview"
vim.o.wildmode = "full"
vim.o.cinoptions = "l1,b-s"
vim.o.statusline = "%#LineNr# [%n] %#Default# %f%m%r %= %#StatusLineNC# %w[%{&ft == '' ? 'None' : ''}%Y] %#LineNr# Line: %l Column: %c "
vim.o.guifont = "Ubuntu Mono:h11"
if vim.loop.os_uname().sysname == "Windows_NT" then
-- Workaround for https://github.com/neovim/neovim/issues/32504
vim.o.shellpipe = ">%s 2>&1"
end
vim.opt.errorformat = {
"%f:%l:%c: fatal %trror: %m", -- gcc/clang fatal error
@@ -239,13 +245,6 @@ local function MakeScratch()
vim.api.nvim_buf_set_name(bufnr, "scratch")
vim.api.nvim_buf_set_text(bufnr, 0, 0, 0, -1, { "-*- Scratch Buffer -*-" })
-- @Hack: There isn't really any way to get the fullscreen size, 150 greater than the
-- half-screen width on all of my devices as we don't want to split in that case
if vim.o.columns > 150 then
vim.cmd(string.format("vsplit #%d", bufnr))
vim.cmd("wincmd p")
end
end
local function AlignEq()

View File

@@ -37,4 +37,4 @@ configuration {
kb-custom-10: "Super+0";
}
@theme "tokyo"
@theme "theme"

View File

@@ -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;

View File

@@ -1,31 +1,33 @@
add_newline = false
add_newline = false
scan_timeout = 10
format = "\\[$username$hostname\\] :: $directory $cmd_duration$character"
format = "\\[$username$hostname\\] :: $directory $cmd_duration$character"
[line_break]
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]

143
config/sway/kanto.sway Normal file
View File

@@ -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/*

View File

@@ -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

View File

@@ -1,6 +1,6 @@
# Background colour
#
color=00000
color=000000
# Basic options
#

17
dots
View File

@@ -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
}

58
dots.bat Normal file
View File

@@ -0,0 +1,58 @@
@ECHO OFF
SETLOCAL DISABLEDELAYEDEXPANSION
IF "%1" == "install" (
CALL :Install
) ELSE (
IF "%1" == "pull" (
CALL :Pull
) ELSE (
ECHO usage: %0 ^<install^|pull^|diff^>
)
)
GOTO :EOF
:Install
ECHO [Info] :: Installing dotfiles
XCOPY /E /I /Y /Q "config\nvim" "%LOCALAPPDATA%\nvim" > NUL
COPY /Y "config\starship.toml" "%APPDATA%\" > NUL
COPY /Y "config\clink\inputrc" "%LOCALAPPDATA%\.inputrc" > NUL
CALL :Patch %APPDATA%\starship.toml
WHERE /q "starship"
IF %ERRORLEVEL% equ 0 (
IF NOT EXIST "%LOCALAPPDATA%\clink" ( MKDIR "%LOCALAPPDATA%\clink" )
COPY "config\clink\starship.lua" "%LOCALAPPDATA%\clink\" > NUL
)
GOTO :EOF
:Pull
ECHO [Info] :: Pulling dotfile changes
XCOPY /E /I /Y "%LOCALAPPDATA%\nvim" "config\nvim"
COPY /Y "%LOCALAPPDATA%\.inputrc" "config\clink\inputrc"
GOTO :EOF
:Patch
SET "PREFIX=#%COMPUTERNAME% "
SET "REPLACEMENT="
SET "TEMPFILE=%TEMP%\tmpdots%RANDOM%"
FOR /f "DELIMS=" %%A in ('FINDSTR /N "^" "%1"') DO (
SET "LINE=%%A"
SETLOCAL ENABLEDELAYEDEXPANSION
SET "LINE=!LINE:%PREFIX%=%REPLACEMENT%!"
SET "LINE=!LINE:*:=!"
ECHO:!LINE!>> %TEMPFILE%
ENDLOCAL
)
MOVE /Y %TEMPFILE% %1 > NUL
GOTO :EOF