Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dotfiles

Configuration files for pleasant developer experience with OSX
Configuration files for macOS and Arch Linux.

## Installation

Expand All @@ -26,3 +26,23 @@ cd dotfiles
After starting tmux session, don't forget to install tpm plugins by pressing `ctrl + shift + I`

If you are using iTerm 2/3 as a terminal emulator, you need to enable `Applications in terminal may access clipboard` in it's settings in order to copy the content from Tmux into the system clipboard.

## Linux-specific notes

### NVIDIA GPU

The NVIDIA driver is not managed by pacman and must be installed manually from [nvidia.com](https://www.nvidia.com/drivers).

After installing the driver, enable kernel mode setting by adding `nvidia-drm.modeset=1` to the kernel parameters in `/boot/loader/entries/arch.conf`:

```
options root=UUID=<your-uuid> rw nvidia-drm.modeset=1
```

#### External monitor hotplug

Due to a known wlroots + NVIDIA hybrid graphics limitation, external monitors are not detected on hotplug. After plugging in a monitor, briefly close and open the laptop lid to trigger display re-detection.

### Boot loader

This setup uses **systemd-boot**, not GRUB. The boot entry at `/boot/loader/entries/arch.conf` is machine-specific (root partition UUID) and is not tracked in this repo.
6 changes: 3 additions & 3 deletions configs/common/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"img-clip.nvim": { "branch": "main", "commit": "d8b6b030672f9f551a0e3526347699985a779d93" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"litee-calltree.nvim": { "branch": "main", "commit": "b50c809d136ad479caf761a7f030da98c56c7976" },
"litee.nvim": { "branch": "main", "commit": "4efaf373322d9e71eaff31164abb393417cc6f6a" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
Expand All @@ -36,8 +36,8 @@
"nvim-lspconfig": { "branch": "master", "commit": "463b16bd6a347a129367a7fd00ebcdd9442d9a96" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
"obsidian.nvim": { "branch": "main", "commit": "14e0427bef6c55da0d63f9a313fd9941be3a2479" },
"oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
Expand Down
22 changes: 22 additions & 0 deletions configs/linux/.config/kanshi/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
profile laptop {
output eDP-1 scale 2
exec ~/.config/sway/scripts/outputs.sh eDP-1
}

profile docked_hdmi {
output eDP-1 scale 2
output HDMI-A-1 scale 1.75
exec ~/.config/sway/scripts/outputs.sh HDMI-A-1
}

profile docked_dp1 {
output eDP-1 scale 2
output DP-1 scale 1.75
exec ~/.config/sway/scripts/outputs.sh DP-1
}

profile docked_dp2 {
output eDP-1 scale 2
output DP-2 scale 1.75
exec ~/.config/sway/scripts/outputs.sh DP-2
}
2 changes: 1 addition & 1 deletion configs/linux/.config/sway/config
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ bindsym $mod+r mode "resize"

exec waybar

exec ~/.config/sway/scripts/outputs.sh
exec kanshi

input * {
natural_scroll enabled
Expand Down
15 changes: 8 additions & 7 deletions configs/linux/.config/sway/scripts/outputs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash

OUTPUTS=$(swaymsg -t get_outputs)
# Move all workspaces to the given output (default: eDP-1)
TARGET=${1:-eDP-1}

if echo "$OUTPUTS" | grep -q '"name": "eDP-1"'; then
swaymsg output eDP-1 scale 2
fi
sleep 0.5

if echo "$OUTPUTS" | grep -q '"name": "HDMI-A-1"'; then
swaymsg output HDMI-A-1 scale 1.75
fi
for ws in 1 2 3 4 5; do
swaymsg "workspace --no-auto-back-and-forth number $ws; move workspace to output $TARGET"
done

swaymsg workspace number 1