Compare commits

...

7 commits

10 changed files with 394 additions and 143 deletions

View file

@ -0,0 +1,12 @@
{
"editor.fontFamily": "'Fira Code', 'monospace', monospace",
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.acceptSuggestionOnEnter": "off",
"editor.inlineSuggest.enabled": false,
"editor.minimap.enabled": false,
"files.eol": "\n",
"files.insertFinalNewline": true,
"terminal.external.linuxExec": "alacritty",
"terminal.integrated.defaultProfile.linux": "fish"
}

41
i3status-rust/config.toml Normal file
View file

@ -0,0 +1,41 @@
[theme]
theme = "solarized-dark"
[icons]
icons = "awesome5"
[[block]]
block = "cpu"
info_cpu = 20
warning_cpu = 50
critical_cpu = 90
[[block]]
block = "disk_space"
path = "/"
info_type = "available"
alert_unit = "GB"
interval = 20
warning = 20.0
alert = 10.0
format = " $icon root: $available.eng(w:2) "
[[block]]
block = "memory"
format = " $icon $mem_total_used_percents.eng(w:2) "
[[block]]
block = "sound"
[[block]]
block = "time"
interval = 5
format = " $timestamp.datetime(f:'%Y-%m-%d %H:%M:%S') "
[[block]]
block = "battery"
[[block]]
block = "net"
format = " $icon {$ssid|} ^icon_net_down $speed_down.eng(prefix:K) ^icon_net_up $speed_up.eng(prefix:K) "
device = "^(en|wl)\\.*"

163
nixos/configuration-koh.nix Normal file
View file

@ -0,0 +1,163 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
let
userPackages = with pkgs; [
alacritty
libreoffice-fresh
wofi
wofi-emoji
restic
vscodium
texlive.combined.scheme-full
mako
evince
papers
nemo
acpi
brightnessctl
playerctl
i3status-rust
wlr-randr
];
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.bluetooth.enable = true;
networking.hostName = "koh";
networking.domain = "grimpen.net";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_IE.UTF-8";
console.useXkbConfig = true;
services.xserver.xkb.layout = "de";
services.xserver.xkb.variant = "neo";
services.printing.enable = true;
services.udisks2.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
};
services.libinput.enable = true;
services.greetd = {
enable = true;
# The following "patch" is necessary to have the right layout in regreet
settings.default_session.command = "${pkgs.dbus}/bin/dbus-run-session /usr/bin/env XKB_DEFAULT_LAYOUT=${config.services.xserver.xkb.layout} XKB_DEFAULT_VARIANT=${config.services.xserver.xkb.variant} ${lib.getExe pkgs.cage} ${lib.escapeShellArgs config.programs.regreet.cageArgs} -- ${lib.getExe config.programs.regreet.package}";
};
programs.regreet.enable = true;
services.flatpak.enable = true;
programs.ssh.startAgent = true;
programs.fish.enable = true;
users.users.fritz = {
isNormalUser = true;
description = "Fritz Grimpen";
extraGroups = [ "wheel" "networkmanager" "flatpak" "kvm" ];
packages = userPackages;
};
programs.firefox = {
enable = true;
policies = {
PasswordManagerEnabled = false;
Extensions = {
Install = [
"https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"
"https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi"
];
};
DisableFirefoxAccounts = true;
HttpsOnlyMode = "enabled";
};
};
programs.thunderbird.enable = true;
programs.sway = {
enable = true;
xwayland.enable = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
};
programs.neovim = {
enable = true;
vimAlias = true;
};
programs.mosh.enable = true;
programs.git.enable = true;
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
services.avahi = {
enable = true;
ipv6 = true;
};
fonts.packages = with pkgs; [
dejavu_fonts
fira
fira-code
libertinus
font-awesome
];
environment.systemPackages = with pkgs; [
wget
htop
btop
kanshi
];
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -1,60 +1,24 @@
# Default config for sway # Sway configuration
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
set $mod Mod4 set $mod Mod4
## {j}
set $left 44 set $left 44
## {k}
set $down 45 set $down 45
## {l}
set $up 46 set $up 46
## {l>>1}
set $right 47 set $right 47
set $term alacritty set $term alacritty
set $menu wofi --show drun -i set $menu wofi --show drun -i
set $status_command i3status-rs
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \ exec swayidle -w \
timeout 300 'swaylock -f -c 000000' \ timeout 300 'swaylock -f -c 000000' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
lock "swaylock -f -c 000000" \ lock "swaylock -f -c 000000" \
before-sleep 'swaylock -f -c 000000' before-sleep 'swaylock -f -c 000000'
bindcode --release $mod+24 exec pkill -USR1 swayidle
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindcode $mod+Shift+24 kill
# Start your launcher
bindcode $mod+40 exec $menu
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows. # Despite the name, also works for non-floating windows.
@ -62,89 +26,6 @@ bindcode --release $mod+24 exec pkill -USR1 swayidle
# mouse button for dragging. # mouse button for dragging.
floating_modifier $mod normal floating_modifier $mod normal
# Reload the configuration file
bindcode $mod+Shift+54 reload
# Exit sway (logs you out of your Wayland session)
bindcode $mod+Shift+26 exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindcode $mod+$left focus left
bindcode $mod+$down focus down
bindcode $mod+$up focus up
bindcode $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindcode $mod+Shift+$left move left
bindcode $mod+Shift+$down move down
bindcode $mod+Shift+$up move up
bindcode $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+0 workspace number 0
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 0
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindcode $mod+56 splith
bindcode $mod+55 splitv
# Switch the current container between different layout styles
bindcode $mod+39 layout stacking
bindcode $mod+25 layout tabbed
bindcode $mod+26 layout toggle split
# Make the current focus fullscreen
bindcode $mod+41 fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindcode $mod+38 focus parent
bindcode $mod+Shift+38 focus child
# #
# Scratchpad: # Scratchpad:
# #
@ -181,26 +62,19 @@ mode "resize" {
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindcode $mod+27 mode "resize" bindcode $mod+27 mode "resize"
bindcode $mod+23 input * xkb_switch_layout next
#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.
bar { bar {
position top position top
font "pango:Fira Mono 10"
# When the status_command prints a new line to stdout, swaybar updates. status_command $status_command
# The default just shows the current date and time.
status_command while date +'%Y-%m-%d %H:%M:%S %p'; do sleep 1; done
} }
font "pango:Fira Mono 9" font "pango:Fira Mono 10"
titlebar_padding 3 titlebar_padding 3
workspace_auto_back_and_forth yes workspace_auto_back_and_forth yes
input * xkb_layout "de(neo),us(intl)" input type:keyboard xkb_layout "de(neo),us(intl)"
include config.d/* include config.d/*
include /etc/sway/config.d/* include /etc/sway/config.d/*

2
sway/config.d/gestures Normal file
View file

@ -0,0 +1,2 @@
bindgesture swipe:right workspace next
bindgesture swipe:left workspace prev

137
sway/config.d/keybindings Normal file
View file

@ -0,0 +1,137 @@
## Start a terminal [$mod+Return]
bindsym $mod+Return exec $term
## Start launchar {$mod+d}
bindcode $mod+40 exec $menu
## Lock screen {$mod+q}
bindcode $mod+24 exec loginctl lock-session
## Kill focused window {$mod+Shift+q}
bindcode $mod+Shift+24 kill
## Reload the configuration file {$mod+Shift+q}
bindcode $mod+Shift+54 reload
## Logout {$mod+Shift+e}
bindcode $mod+Shift+26 exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
## Move focus left {$mod+$left}
bindcode $mod+$left focus left
## Move focus right {$mod+$right}
bindcode $mod+$right focus right
## Move focus up {$mod+$up}
bindcode $mod+$up focus up
## Move focus down {$mod+$down}
bindcode $mod+$down focus down
## Move focused window left {$mod+Shift+$left}
bindcode $mod+Shift+$left move left
## Move focused window right {$mod+Shift+$right}
bindcode $mod+Shift+$right move right
## Move focused window up {$mod+Shift+$up}
bindcode $mod+Shift+$up move up
## Move focused window down {$mod+Shift+$down}
bindcode $mod+Shift+$down move down
## Switch to workspace 0 [$mod+0]
bindsym $mod+0 workspace number 0
## Switch to workspace 1 [$mod+1]
bindsym $mod+1 workspace number 1
## Switch to workspace 2 [$mod+2]
bindsym $mod+2 workspace number 2
## Switch to workspace 3 [$mod+3]
bindsym $mod+3 workspace number 3
## Switch to workspace 4 [$mod+4]
bindsym $mod+4 workspace number 4
## Switch to workspace 5 [$mod+5]
bindsym $mod+5 workspace number 5
## Switch to workspace 6 [$mod+6]
bindsym $mod+6 workspace number 6
## Switch to workspace 7 [$mod+7]
bindsym $mod+7 workspace number 7
## Switch to workspace 8 [$mod+8]
bindsym $mod+8 workspace number 8
## Switch to workspace 9 [$mod+9]
bindsym $mod+9 workspace number 9
## Move focused window to workspace 0 [$mod+Shift+0]
bindsym $mod+Shift+0 move container to workspace number 0
## Move focused window to workspace 1 [$mod+Shift+1]
bindsym $mod+Shift+1 move container to workspace number 1
## Move focused window to workspace 2 [$mod+Shift+2]
bindsym $mod+Shift+2 move container to workspace number 2
## Move focused window to workspace 3 [$mod+Shift+3]
bindsym $mod+Shift+3 move container to workspace number 3
## Move focused window to workspace 4 [$mod+Shift+4]
bindsym $mod+Shift+4 move container to workspace number 4
## Move focused window to workspace 5 [$mod+Shift+5]
bindsym $mod+Shift+5 move container to workspace number 5
## Move focused window to workspace 6 [$mod+Shift+6]
bindsym $mod+Shift+6 move container to workspace number 6
## Move focused window to workspace 7 [$mod+Shift+7]
bindsym $mod+Shift+7 move container to workspace number 7
## Move focused window to workspace 8 [$mod+Shift+8]
bindsym $mod+Shift+8 move container to workspace number 8
## Move focused window to workspace 9 [$mod+Shift+9]
bindsym $mod+Shift+9 move container to workspace number 9
## Split horizontal {$mod+b}
bindcode $mod+56 splith
## Split vertical {$mod+v}
bindcode $mod+55 splitv
## Switch layout to stacking {$mod+s}
bindcode $mod+39 layout stacking
## Switch layout to tabbed {$mod+w}
bindcode $mod+25 layout tabbed
## Toggle split {$mod+e}
bindcode $mod+26 layout toggle split
## Toggle fullscreen {$mod+f}
bindcode $mod+41 fullscreen
## Toggle tiling and floating mode [$Mod+Shift+space]
bindsym $mod+Shift+space floating toggle
## Swap focus between tiling and floating [$Mod+space]
bindsym $mod+space focus mode_toggle
## Move focus to the parent window {$mod+a}
bindcode $mod+38 focus parent
## Move focus to the child window {$mod+Shift+a}
bindcode $mod+Shift+38 focus child
## Move focus to the child window {$mod+Shift+z}
bindcode $mod+Shift+52 focus child
## Switch to next keyboard layout [$mod+tab]
bindsym $mod+tab input type:keyboard xkb_switch_layout next

8
sway/config.d/mediakeys Normal file
View file

@ -0,0 +1,8 @@
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
bindsym XF86MonBrightnessUp exec brightnessctl set 10%+
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl prev

13
sway/config.d/outputs.koh Normal file
View file

@ -0,0 +1,13 @@
bindswitch lid:on output eDP-1 power off
bindswitch lid:off output eDP-1 power on
workspace 0 output eDP-1
workspace 1 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 2 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 3 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 4 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 5 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 6 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 7 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 8 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1
workspace 9 output 'Dell Inc. DELL U2414H 9TG463CR7TCL' eDP-1

1
sway/config.d/touchpad Normal file
View file

@ -0,0 +1 @@
input type:touchpad scroll_factor 0.5