almost usable
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
[main]
|
||||||
|
font=JetBrainsMono Nerd Font:size=14
|
||||||
+17
-15
@@ -12,6 +12,8 @@ set $menu wmenu-run
|
|||||||
|
|
||||||
exec "foot --server"
|
exec "foot --server"
|
||||||
|
|
||||||
|
output * bg ~/Pictures/henri.jpg fill
|
||||||
|
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_layout "se"
|
xkb_layout "se"
|
||||||
xkb_variant "nodeadkeys"
|
xkb_variant "nodeadkeys"
|
||||||
@@ -31,6 +33,8 @@ bindsym $mod+shift+q exec wlogout
|
|||||||
bindsym $mod+Return exec $term
|
bindsym $mod+Return exec $term
|
||||||
bindsym $mod+q kill
|
bindsym $mod+q kill
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec $menu
|
||||||
|
bindsym $mod+space floating toggle
|
||||||
|
bindsym $mod+Shift+r reload
|
||||||
|
|
||||||
bindsym $mod+Alt+h splith
|
bindsym $mod+Alt+h splith
|
||||||
bindsym $mod+Alt+v splitv
|
bindsym $mod+Alt+v splitv
|
||||||
@@ -41,6 +45,11 @@ bindsym $mod+$down focus down
|
|||||||
bindsym $mod+$up focus up
|
bindsym $mod+$up focus up
|
||||||
bindsym $mod+$right focus right
|
bindsym $mod+$right focus right
|
||||||
|
|
||||||
|
bindsym $mod+Shift+$left move left
|
||||||
|
bindsym $mod+Shift+$down move down
|
||||||
|
bindsym $mod+Shift+$up move up
|
||||||
|
bindsym $mod+Shift+$right move right
|
||||||
|
|
||||||
bindsym $mod+1 workspace number 1
|
bindsym $mod+1 workspace number 1
|
||||||
bindsym $mod+2 workspace number 2
|
bindsym $mod+2 workspace number 2
|
||||||
bindsym $mod+3 workspace number 3
|
bindsym $mod+3 workspace number 3
|
||||||
@@ -72,20 +81,13 @@ mode "resize" {
|
|||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
gaps inner 10
|
gaps inner 10
|
||||||
bar {
|
exec_always pkill waybar; waybar
|
||||||
position top
|
|
||||||
|
|
||||||
# When the status_command prints a new line to stdout, swaybar updates.
|
bindsym $mod+Shift+s exec 'grim -l 0 -g "$(slurp)" - | wl-copy'
|
||||||
# The default just shows the current date and time.
|
bindsym $mod+Alt+s exec 'mkdir -p ~/Pictures/Screenshots && grim -l 0 -g "$(slurp)" ~/Pictures/Screenshots/$(date +"%Y-%m-%d_%H-%M-%S").png'
|
||||||
status_command while date +'%y-%m-%d (%a w%V) %H:%M'; do sleep 1; done
|
|
||||||
|
|
||||||
colors {
|
exec swayidle -w \
|
||||||
statusline $white
|
timeout 300 'swaylock -f -c 1a1b26' \
|
||||||
background $black
|
timeout 600 'swaymsg "output * dpms off"' \
|
||||||
urgent_workspace $red $black $red
|
resume 'swaymsg "output * dpms on"' \
|
||||||
focused_workspace $black $black $red
|
before-sleep 'swaylock -f -c 1a1b26'
|
||||||
inactive_workspace $black $black $white
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bindsym $mod+Shift+s exec 'grim -l 0 -g "$(slurp)" - wl-copy'
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"height": 24,
|
||||||
|
"modules-left": ["sway/workspaces"],
|
||||||
|
"modules-center": ["clock"],
|
||||||
|
"modules-right": ["cpu", "battery"],
|
||||||
|
|
||||||
|
"sway/workspaces": {
|
||||||
|
"disable-scroll": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%y-%m-%d (%a w%V) %H:%M}",
|
||||||
|
"interval": 60
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"format": "CPU {usage}%",
|
||||||
|
"interval": 2
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"format": " {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-full": " FULL",
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
* {
|
||||||
|
font-family: JetBrainsMono Nerd Font;
|
||||||
|
font-size: 13px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: #0a0a0a;
|
||||||
|
color: #f3eeea;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
color: #f3eeea;
|
||||||
|
background: transparent;
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
color: #cd0a00;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: #cd0a00;
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
color: #f3eeea;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
color: #f3eeea;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: #f3eeea;
|
||||||
|
padding: 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: #cd0a00;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: #cd0a00;
|
||||||
|
}
|
||||||
@@ -80,6 +80,8 @@
|
|||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,25 +1,11 @@
|
|||||||
{config, pkgs, ...}:
|
{config, pkgs, ...}:
|
||||||
{
|
{
|
||||||
|
# ── Identity ────────────────────────────────────────────────────────────────
|
||||||
home.username = "ulve";
|
home.username = "ulve";
|
||||||
home.homeDirectory = "/home/ulve";
|
home.homeDirectory = "/home/ulve";
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
settings.user.name = "ulve";
|
|
||||||
settings.user.email = "johansson.olov@gmail.com";
|
|
||||||
delta.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.eza = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
git = true;
|
|
||||||
icons = "auto";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bat = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "26.05";
|
||||||
|
|
||||||
|
# ── Shell ───────────────────────────────────────────────────────────────────
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
@@ -28,26 +14,36 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
options = [ "--cmd z" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
n = "nvim";
|
n = "nvim";
|
||||||
rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
rebuild = "sudo nixos-rebuild switch --flake ~/nixos-dotfiles";
|
||||||
|
tree = "eza --tree --level=2";
|
||||||
|
};
|
||||||
|
history = {
|
||||||
|
size = 10000;
|
||||||
|
save = 10000;
|
||||||
|
ignoreDups = true;
|
||||||
|
share = true;
|
||||||
|
extended = true;
|
||||||
};
|
};
|
||||||
initContent = ''
|
initContent = ''
|
||||||
bindkey "^[[A" history-search-backward
|
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
|
||||||
bindkey "^[[B" history-search-forward
|
zle -N up-line-or-beginning-search
|
||||||
|
zle -N down-line-or-beginning-search
|
||||||
|
bindkey "^[[A" up-line-or-beginning-search
|
||||||
|
bindkey "^[[B" down-line-or-beginning-search
|
||||||
|
bindkey "^[OA" up-line-or-beginning-search
|
||||||
|
bindkey "^[OB" down-line-or-beginning-search
|
||||||
|
|
||||||
|
function y() {
|
||||||
|
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||||
|
command yazi "$@" --cwd-file="$tmp"
|
||||||
|
IFS= read -r -d "" cwd < "$tmp"
|
||||||
|
[ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd"
|
||||||
|
rm -f -- "$tmp"
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -95,6 +91,46 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ── CLI tools ────────────────────────────────────────────────────────────────
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
options = [ "--cmd z" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
git = true;
|
||||||
|
icons = "auto";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
_ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── Git ─────────────────────────────────────────────────────────────────────
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
settings.user.name = "ulve";
|
||||||
|
settings.user.email = "johansson.olov@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.delta = {
|
||||||
|
enable = true;
|
||||||
|
enableGitIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# ── SSH ─────────────────────────────────────────────────────────────────────
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
@@ -105,38 +141,62 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# ── Config files ─────────────────────────────────────────────────────────────
|
||||||
xdg.configFile."qtile".source = ./config/qtile;
|
xdg.configFile."qtile".source = ./config/qtile;
|
||||||
xdg.configFile."nvim" = {
|
xdg.configFile."nvim" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "/home/ulve/nixos-dotfiles/config/dottily";
|
source = config.lib.file.mkOutOfStoreSymlink "/home/ulve/nixos-dotfiles/config/dottily";
|
||||||
};
|
};
|
||||||
xdg.configFile."sway".source = ./config/sway;
|
xdg.configFile."sway".source = ./config/sway;
|
||||||
|
xdg.configFile."waybar".source = ./config/waybar;
|
||||||
|
xdg.configFile."foot".source = ./config/foot;
|
||||||
|
|
||||||
|
# ── Packages ─────────────────────────────────────────────────────────────────
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
# general
|
||||||
claude-code # ai coding assistant
|
claude-code # ai coding assistant
|
||||||
|
brave # browser
|
||||||
|
fastfetch # vanity
|
||||||
|
jq # json processor
|
||||||
|
powershell # yes
|
||||||
|
teams-for-linux # teams
|
||||||
|
|
||||||
|
# desktop / wayland
|
||||||
wl-clipboard # wayland copy utils
|
wl-clipboard # wayland copy utils
|
||||||
slurp # select region in wayland for copy
|
slurp # select region in wayland for copy
|
||||||
grim # grab images from wayland
|
grim # grab images from wayland
|
||||||
brave # browser
|
|
||||||
fastfetch # vanity
|
|
||||||
wlogout # logout menu
|
wlogout # logout menu
|
||||||
foot # terminal
|
|
||||||
wmenu # dynamic menu
|
wmenu # dynamic menu
|
||||||
|
swaylock # lock screen
|
||||||
|
swayidle # idle management (dims/locks/sleeps)
|
||||||
|
waybar # status bar with left/center/right sections
|
||||||
|
|
||||||
|
telegram-desktop # Messaging
|
||||||
|
signal-desktop # Messaging
|
||||||
|
|
||||||
|
# terminal
|
||||||
|
foot # terminal
|
||||||
|
tmux # terminal multiplexer
|
||||||
btop # resource monitor
|
btop # resource monitor
|
||||||
htop # process viewer
|
htop # process viewer
|
||||||
tmux # terminal multiplexer
|
|
||||||
neovim # editor
|
|
||||||
fd # fast find alternative
|
fd # fast find alternative
|
||||||
ripgrep # fast grep alternative
|
ripgrep # fast grep alternative
|
||||||
gcc # c compiler (also needed by treesitter)
|
|
||||||
nodejs # javascript runtime
|
# file managers
|
||||||
powershell # yes
|
|
||||||
teams-for-linux # teams
|
|
||||||
yazi # terminal file manager
|
yazi # terminal file manager
|
||||||
thunar # gui file manager
|
thunar # gui file manager
|
||||||
|
|
||||||
|
# editors
|
||||||
|
neovim # editor
|
||||||
|
|
||||||
|
# compilers / runtimes
|
||||||
|
gcc # c compiler (also needed by treesitter)
|
||||||
|
nodejs # javascript runtime
|
||||||
|
go # go toolchain (needed by gopls + revive)
|
||||||
|
dotnet-sdk # .net sdk (c#)
|
||||||
|
|
||||||
|
# nvim: lsp servers
|
||||||
tree-sitter # parser generator (nvim)
|
tree-sitter # parser generator (nvim)
|
||||||
nil # language server for nix
|
nil # language server for nix
|
||||||
nixpkgs-fmt # nix code formatter
|
|
||||||
lua-language-server # lsp: lua
|
lua-language-server # lsp: lua
|
||||||
pyright # lsp: python
|
pyright # lsp: python
|
||||||
bash-language-server # lsp: bash
|
bash-language-server # lsp: bash
|
||||||
@@ -145,21 +205,18 @@
|
|||||||
omnisharp-roslyn # lsp: c#
|
omnisharp-roslyn # lsp: c#
|
||||||
efm-langserver # lsp: general purpose (runs linters/formatters)
|
efm-langserver # lsp: general purpose (runs linters/formatters)
|
||||||
|
|
||||||
|
# nvim: formatters and linters
|
||||||
|
nixpkgs-fmt # formatter: nix
|
||||||
stylua # formatter: lua
|
stylua # formatter: lua
|
||||||
lua54Packages.luacheck # linter: lua
|
|
||||||
black # formatter: python
|
black # formatter: python
|
||||||
python3Packages.flake8 # linter: python
|
|
||||||
prettierd # formatter: js/ts/html/css/json (daemon)
|
prettierd # formatter: js/ts/html/css/json (daemon)
|
||||||
eslint_d # linter: js/ts (daemon)
|
|
||||||
fixjson # formatter: json
|
fixjson # formatter: json
|
||||||
shellcheck # linter: bash/sh
|
|
||||||
shfmt # formatter: bash/sh
|
|
||||||
gofumpt # formatter: go (stricter gofmt)
|
gofumpt # formatter: go (stricter gofmt)
|
||||||
go # go toolchain (needed by gopls + revive)
|
shfmt # formatter: bash/sh
|
||||||
|
lua54Packages.luacheck # linter: lua
|
||||||
|
python3Packages.flake8 # linter: python
|
||||||
|
eslint_d # linter: js/ts (daemon)
|
||||||
|
shellcheck # linter: bash/sh
|
||||||
revive # linter: go
|
revive # linter: go
|
||||||
|
|
||||||
dotnet-sdk # .net sdk (c#)
|
|
||||||
jq # json processor
|
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user