about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--awesome/.config/awesome/rc.lua93
-rw-r--r--nix/awesome.nix44
-rw-r--r--nix/devel.nix13
-rw-r--r--nix/games.nix28
4 files changed, 87 insertions, 91 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua
index 38a9c75..5dd0c1a 100644
--- a/awesome/.config/awesome/rc.lua
+++ b/awesome/.config/awesome/rc.lua
@@ -89,12 +89,12 @@ local modkey = "Mod4"
 
 -- Table of layouts to cover with awful.layout.inc, order matters.
 awful.layout.layouts = {
-  awful.layout.suit.fair,
-  --awful.layout.suit.fair.horizontal,
-  awful.layout.suit.tile,
+  --awful.layout.suit.tile,
   --awful.layout.suit.tile.left,
-  --awful.layout.suit.tile.bottom,
+  awful.layout.suit.tile.bottom,
   --awful.layout.suit.tile.top,
+  awful.layout.suit.fair,
+  --awful.layout.suit.fair.horizontal,
   --awful.layout.suit.spiral,
   --awful.layout.suit.spiral.dwindle,
   awful.layout.suit.max,
@@ -155,13 +155,15 @@ local function showclipboard()
   local items = {}
   for c in order:gmatch(".") do
     local f = io.open(base .. c)
-    table.insert(items, {f:read("*a"):gsub("\n", " "), function ()
-      local new_order = order:gsub(c .. "(.*)", "%1" .. c)
-      io.open(base .. "order", "w"):write(new_order):close()
-      awful.spawn.easy_async("clipbuzz", spawner"xdotool key shift+Insert")
-      awful.spawn(("xclip %s"):format(base .. c))
-    end})
-    f:close()
+    if f ~= nil then
+      table.insert(items, {f:read("*a"):gsub("\n", " "), function ()
+        local new_order = order:gsub(c .. "(.*)", "%1" .. c)
+        io.open(base .. "order", "w"):write(new_order):close()
+        awful.spawn.easy_async("clipbuzz", spawner"xdotool key shift+Insert")
+        awful.spawn(("xclip %s"):format(base .. c))
+      end})
+      f:close()
+    end
   end
   awful.menu{items = items, theme = {width = 911}}:show()
 end
@@ -204,7 +206,7 @@ vicious.register(mybattery_text, vicious.widgets.bat,
                    return (" %s%03d%%"):format(args[1], args[2])
                  end, 7, "BAT0")
 local mybattery = wibox.container.background(mybattery_text, beautiful.green)
-mybattery.fg = beautiful.gray
+mybattery.fg = beautiful.black
 
 -- Create a volume widget
 local myvolume_text = wibox.widget.textbox()
@@ -238,7 +240,7 @@ local function volume_mute(parameter)
 end
 
 local myvolume = wibox.container.background(myvolume_text, beautiful.cyan)
-myvolume.fg = beautiful.gray
+myvolume.fg = beautiful.black
 myvolume:buttons(awful.util.table.join(
   awful.button({}, 1, volume_setter"+5"),
   awful.button({}, 2, volume_mute),
@@ -263,7 +265,7 @@ local function seeker(time, sign)
 end
 
 local myplayer = wibox.container.background(myplayer_text, beautiful.magenta)
-myplayer.fg = beautiful.gray
+myplayer.fg = beautiful.black
 myplayer:buttons(awful.util.table.join(
   awful.button({}, 1, spawner(forward)),
   awful.button({}, 2, spawner(play_pause)),
@@ -399,26 +401,26 @@ awful.screen.connect_for_each_screen(function (s)
      -- mylauncher,
      {mytextclock,
       bg = beautiful.red,
-      fg = beautiful.gray,
+      fg = beautiful.black,
       widget = wibox.container.background},
-     wibox.widget.imagebox(arrow(beautiful.red, beautiful.yellow)),
+     wibox.widget.imagebox(arrow(beautiful.red, beautiful.orange)),
      {mycpuusage,
-      bg = beautiful.yellow,
-      fg = beautiful.gray,
+      bg = beautiful.orange,
+      fg = beautiful.black,
       widget = wibox.container.background},
-     wibox.widget.imagebox(arrow(beautiful.yellow, beautiful.green)),
+     wibox.widget.imagebox(arrow(beautiful.orange, beautiful.yellow)),
      {mymemusage,
-      bg = beautiful.green,
-      fg = beautiful.gray,
+      bg = beautiful.yellow,
+      fg = beautiful.black,
       widget = wibox.container.background},
-     --wibox.widget.imagebox(arrow(beautiful.yellow, beautiful.green)),
-     --mybattery,
-     --wibox.widget.imagebox(arrow(beautiful.yellow, beautiful.cyan)),
-     --myvolume,
-     wibox.widget.imagebox(arrow(beautiful.green, beautiful.blue)),
+     wibox.widget.imagebox(arrow(beautiful.yellow, beautiful.green)),
+     mybattery,
+     wibox.widget.imagebox(arrow(beautiful.green, beautiful.cyan)),
+     myvolume,
+     wibox.widget.imagebox(arrow(beautiful.cyan, beautiful.blue)),
      {myweather,
       bg = beautiful.blue,
-      fg = beautiful.gray,
+      fg = beautiful.black,
       widget = wibox.container.background},
      wibox.widget.imagebox(arrow(beautiful.blue, beautiful.magenta)),
      myplayer,
@@ -494,31 +496,6 @@ local globalkeys = awful.util.table.join(
   awful.key({modkey}, "]",
             function () awful.screen.focus_relative(1) end,
             {description = "focus the next screen", group = "screen"}),
-  awful.key({modkey}, "0",
-            function ()
-              for s in screen do
-                if s.geometry.width > 2880 then
-                  local geo = s.geometry
-                  s.phy_width = geo.width
-                  s:fake_resize(geo.x, geo.y, 1920, geo.height)
-                  s.fake = screen.fake_add(geo.x + 1920, geo.y,
-                                           s.phy_width - 1920, geo.height)
-                end
-              end
-            end,
-            {description = "add fake screens", group = "screen"}),
-  awful.key({modkey, "Shift"}, "0",
-            function ()
-              for s in screen do
-                if s.fake ~= nil then
-                  local geo = s.geometry
-                  s:fake_resize(geo.x, geo.y, s.phy_width, geo.height)
-                  s.fake:fake_remove()
-                  s.fake = nil
-                end
-              end
-            end,
-            {description = "add fake screens", group = "screen"}),
   awful.key({modkey, "Shift"}, "u", awful.client.urgent.jumpto,
             {description = "jump to urgent client", group = "client"}),
   awful.key({modkey}, "Tab",
@@ -554,7 +531,7 @@ local globalkeys = awful.util.table.join(
   awful.key({modkey, "Shift"}, "f", spawner"torbrowser-launcher",
             {description = "open Tor Browser", group = "launcher"}),
   awful.key({modkey}, "o", function ()
-              awful.spawn.with_shell("mpv --ytdl-format=b $(xclip -out -selection clipboard)")
+              awful.spawn.with_shell('mpv --ytdl-format=b "$(xclip -out -selection clipboard)"')
             end,
             {description = "open URL with mpv", group = "launcher"}),
   awful.key({modkey}, "t", spawner"transmission-gtk",
@@ -575,10 +552,8 @@ local globalkeys = awful.util.table.join(
             {description = "lock screen then suspend", group = "launcher"}),
   awful.key({modkey}, "i", spawner(senpai),
             {description = "open senpai", group = "launcher"}),
-  awful.key({modkey, "Shift"}, "m", spawner"nheko -p halogen",
-            {description = "open Nheko for Halogen City", group = "launcher"}),
-  awful.key({modkey}, "m", spawner"nheko -p loang",
-            {description = "open Nheko for loang network", group = "launcher"}),
+  awful.key({modkey}, "m", spawner"nheko",
+            {description = "open Nheko", group = "launcher"}),
   awful.key({modkey, "Shift"}, "-", spawner"audacious",
             {description = "Audacious: jump-to-song", group = "multimedia"}),
   awful.key({modkey}, "=", spawner(play_pause),
@@ -601,6 +576,10 @@ local globalkeys = awful.util.table.join(
              group = "multimedia"}),
   awful.key({"Shift"}, "Print", spawner(scrot),
             {description = "capture a screenshot", group = "multimedia"}),
+  awful.key({}, "XF86MonBrightnessUp", spawner"brillo -A 5",
+            {description = "raise 5% volume", group = "multimedia"}),
+  awful.key({}, "XF86MonBrightnessDown", spawner"brillo -U 5",
+            {description = "raise 5% volume", group = "multimedia"}),
   awful.key({}, "XF86AudioRaiseVolume", volume_setter"+5",
             {description = "raise 5% volume", group = "multimedia"}),
   awful.key({}, "XF86AudioLowerVolume", volume_setter"-5",
diff --git a/nix/awesome.nix b/nix/awesome.nix
index 5ef2fe5..20d703e 100644
--- a/nix/awesome.nix
+++ b/nix/awesome.nix
@@ -1,20 +1,28 @@
 { pkgs, ... }:
 {
-  environment.systemPackages = with pkgs; let wee-slack = weechat.override {
+  users.users.sea.packages = with pkgs; let wee-slack = weechat.override {
     configure = { ... }: {
       scripts = [ weechatScripts.wee-slack ];
     };
   };
   in [
-    aerc amfora calcurse dante mu ncdu ranger scrot senpai zathura
+    aerc amfora dante mu scrot senpai ueberzugpp zathura
     arandr audacious kid3 qsynth rxvt-unicode
     clipbuzz keynav playerctl pulsemixer xclip xdotool xorg.xkill
+    gnome.adwaita-icon-theme
     libreoffice liferea nheko tor-browser-bundle-bin wee-slack
-    networkmanagerapplet nextcloud-client transmission-gtk
-    gnome.adwaita-icon-theme qt5ct
+    networkmanagerapplet transmission-gtk
+    python3Packages.argostranslate
   ];
 
-  fonts.packages = with pkgs; [ lmodern noto-fonts-cjk-sans noto-fonts-emoji ];
+  fonts = {
+    fontconfig.defaultFonts = {
+      monospace = [ "Latin Modern Mono" ];
+      sansSerif = [ "Latin Modern Sans" ];
+      serif = [ "Latin Modern Roman" ];
+    };
+    packages = with pkgs; [ lmodern noto-fonts-cjk-sans noto-fonts-emoji ];
+  };
 
   hardware.brillo.enable = true;
 
@@ -81,13 +89,17 @@
     slock.enable = true;
   };
 
-  qt = {
-    enable = true;
-    platformTheme = "qt5ct";
-  };
-
   services = {
     autorandr.enable = true;
+    libinput.enable = true; # touchpad
+
+    pipewire = {
+      enable = true;
+      alsa.enable = true;
+      jack.enable = true;
+      pulse.enable = true;
+    };
+
     xserver = {
       videoDrivers = [ "intel" ];
       deviceSection = ''
@@ -95,13 +107,15 @@
       '';
 
       enable = true;
-      desktopManager.xterm.enable = false;
-      displayManager.startx.enable = true;
+      displayManager.sx.enable = true;
       windowManager.awesome.enable = true;
 
-      layout = "us";
-      xkbOptions = "caps:ctrl_modifier,compose:menu";
-      libinput.enable = true; # Enable touchpad support.
+      xkb = {
+        layout = "us";
+        options = "caps:ctrl_modifier,compose:menu";
+      };
     };
   };
+
+  users.users.sea.extraGroups = [ "video" ]; # for brillo
 }
diff --git a/nix/devel.nix b/nix/devel.nix
index d977dd4..fd3d4b4 100644
--- a/nix/devel.nix
+++ b/nix/devel.nix
@@ -1,13 +1,12 @@
-{ lib, pkgs, ... }:
+{ config, lib, pkgs, ... }:
 
 {
-  environment.systemPackages = with pkgs; [
+  users.users.sea.packages = with pkgs; [
     bintools gdb gnumake pkg-config
-    gcc go guile_3_0 lua rakudo zig
+    gcc go janet lua python3 zig
     fd htmlq jq ripgrep rlwrap
-    man-pages man-pages-posix stdman
+    man-pages-posix stdman
     texlive.combined.scheme-full
-    (python3.withPackages (pypkgs: with pypkgs; [ flit rsskey ]))
     (vim_configurable.customize {
       vimrcConfig = {
         customRC = ''
@@ -74,7 +73,9 @@
             autocmd FileType vim,sh,scheme,lua,tex,cmake,plantuml,html,pascal
                   \ setlocal shiftwidth=2
             autocmd FileType cpp
-                  \ setlocal cindent cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
+                  \ setlocal cindent tabstop=8
+            autocmd FileType cpp
+                  \ setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
             autocmd FileType rst setlocal shiftwidth=3
             autocmd FileType mail,markdown,rst,tex setlocal spell
             autocmd BufWinEnter *
diff --git a/nix/games.nix b/nix/games.nix
index 7b90d75..0189ca7 100644
--- a/nix/games.nix
+++ b/nix/games.nix
@@ -1,17 +1,19 @@
-{ config, pkgs, ... }:
+{ pkgs, ... }:
 {
-  environment.systemPackages = with pkgs; [
-    _20kly hedgewars scorched3d # strategy
-    astromenace chromium-bsu # scrolling
-    taisei # shmup
-    bastet moon-buggy n2048 ttyper # text
+  users.users.sea.packages = with pkgs; [
+    _20kly hedgewars # strategy
+    bastet moon-buggy n2048 # text
     blackshades xonotic-glx # fps
-    blobwars superTux teeworlds # platformer
-    bonzomatic # engine
-    extremetuxracer gl117 gltron superTuxKart # vehicle
-    flare freedroidrpg hyperrogue # slash
-    frozen-bubble pinball xbill # coffeebreak
-    neverball # puzzle
+    superTux # platformer
+    pianobooster # engine
+    extremetuxracer superTuxKart # vehicle
+    flare # slash
+    frozen-bubble neverball pinball xbill # coffeebreak
+    steamPackages.steam-fhsenv-without-steam.run
   ];
-  hardware.opengl.driSupport32Bit = true;
+
+  hardware = {
+    opengl.driSupport32Bit = true;
+    pulseaudio.support32Bit = true;
+  };
 }