Compare commits

...

6 Commits

4 changed files with 66 additions and 11 deletions

View File

@ -225,7 +225,10 @@
nixosConfigurations.torch = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
({ ... }: { nixpkgs.overlays = mkOverlays system; })
({ ... }: {
nixpkgs.overlays = mkOverlays system;
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
})
(import ./machines/torch inputs)
inputs.home-manager.nixosModules.home-manager
];

View File

@ -58,10 +58,7 @@
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
bindsym $mod+p exec "${pkgs.rofi}/bin/rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
bindsym $mod+p exec "${pkgs.rofi}/bin/rofi --combi-modi window#drun -show combi -modi combi -show-icons"
# change focus
bindsym $mod+h focus left
@ -184,12 +181,17 @@
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command ${pkgs.i3status}/bin/i3status
position top
}
exec_always --no-startup-id ${
pkgs.writeShellScriptBin "launch-polybar.sh" ''
# note: all polybar configs have to have IPC enabled in order for
# this to work!
${pkgs.polybarFull}/bin/polybar-msg cmd quit
${pkgs.polybarFull}/bin/polybar --config=${
./polybar.ini
} top 2>&1 | tee -a /tmp/polybar-top.log & disown
''
}/bin/launch-polybar.sh
# Automatically send things to the right workspaces
assign [class="browser"] 2

47
nixos/i3/polybar.ini Normal file
View File

@ -0,0 +1,47 @@
[bar/top]
enable-ipc = true
modules-left = i3
modules-right = cpu battery backlight date
[module/backlight]
type = internal/backlight
card = intel_backlight
format = <ramp>
; TODO: need a font that supports emoji
ramp-0 = 🌕
ramp-1 = 🌔
ramp-2 = 🌓
ramp-3 = 🌒
ramp-4 = 🌑
[module/battery]
type = internal/battery
full-at = 89
; see formatting options at https://github.com/polybar/polybar/wiki/Module:-battery
[module/cpu]
type = internal/cpu
format = <label> <ramp-coreload>
label = CPU %percentage%%
; Spacing between individual per-core ramps
ramp-coreload-spacing = 1
ramp-coreload-0 =
ramp-coreload-1 =
ramp-coreload-2 =
ramp-coreload-3 =
ramp-coreload-4 =
ramp-coreload-5 =
ramp-coreload-6 =
ramp-coreload-7 =
[module/date]
type = internal/date
date = %A, %B %d, %Y%
time = %I:%M %p%
label = %date% %time%
[module/i3]
type = internal/i3

View File

@ -9,6 +9,9 @@
xkbOptions = "ctrl:nocaps";
autoRepeatDelay = 250;
autoRepeatInterval = 40;
libinput = {
enable = true;