From 148ba6ee0a3241dad19f0ae8a8190459d14de22e Mon Sep 17 00:00:00 2001
From: Matei Adriel <rafaeladriel11@gmail.com>
Date: Mon, 9 Nov 2020 17:13:52 +0200
Subject: [PATCH] feat: steam I think

---
 .vscode/settings.json                 |  3 +++
 modules/applications/default.nix      | 11 +++++----
 modules/applications/misc.nix         | 35 +++++++++++++++------------
 modules/applications/steam.nix        |  8 ++++++
 modules/applications/xmonad/xmonad.hs |  8 ++++--
 modules/theme/fonts.nix               |  1 +
 6 files changed, 44 insertions(+), 22 deletions(-)
 create mode 100644 modules/applications/steam.nix

diff --git a/.vscode/settings.json b/.vscode/settings.json
index 410d18c..e4ac5c8 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,7 @@
 {
     "cSpell.words": [
+        "Ewmh",
+        "Fullscreen",
         "Kmix",
         "alacritty",
         "concat",
@@ -10,6 +12,7 @@
         "ksplashqml",
         "ksplashsimple",
         "ksplashx",
+        "ksysgurad",
         "milkytracker",
         "mklicense",
         "pnpm",
diff --git a/modules/applications/default.nix b/modules/applications/default.nix
index a51a073..2f988ae 100644
--- a/modules/applications/default.nix
+++ b/modules/applications/default.nix
@@ -2,17 +2,18 @@
   imports = [
     ./git
     ./shells
-    ./wakatime
+    # ./wakatime
     ./xmonad
 
-    ./wine.nix
-    ./docker.nix
+    # ./wine.nix
+    ./steam.nix
+    # ./docker.nix
     ./misc.nix
     ./locale.nix
-    ./memes.nix
+    # ./memes.nix
     ./alacritty.nix
     ./rofi.nix
-    ./postgres.nix
+    # ./postgres.nix
   ];
 }
 
diff --git a/modules/applications/misc.nix b/modules/applications/misc.nix
index a7c70b4..6b67161 100644
--- a/modules/applications/misc.nix
+++ b/modules/applications/misc.nix
@@ -7,32 +7,36 @@
     gnupg
     typespeed # speed typing game
     unixtools.xxd # to dump binary stuff into a text file (used it for a ctf)
-    youtube-dl # download from youtube
+    # youtube-dl # download from youtube
     neofetch # display system information
     xclip # copy paste stuff
     feh # image viewer
     unzip # for working with .zip files
     speedtest-cli # test the internet speed and stuff
-    openssl
-    pkgconfig
-    ngrok
+    # openssl
+    # pkgconfig
+    # ngrok
     hugo
+    unrar
+    # jdk11o
+    # jdk8
+    # gtk3
 
     # editors
     # vscodium
     vscode
     vim
     neovim
-    emacs
+    # emacs
 
     # chat apps
     discord
     # discord-canary
-    deluge
+    # deluge
     slack
     tdesktop # telegram for the desktop
     zoom-us
-    teams
+    # teams
 
     # browsers
     google-chrome
@@ -40,21 +44,22 @@
     firefox
 
     # other stuff
-    milkytracker # music tracker thingy
+    # milkytracker # music tracker thingy
     spectacle # take screenshots
     vlc # video player
     gimp # image editing
-    korganizer # calendar
+    # korganizer # calendar
     libreoffice # free office suite
     # edopro # yugioh simulator (my derivation doesn't work yet)
-    akonadi
-    obs-studio # video recorder
+    # akonadi
+    # obs-studio # video recorder
     # blueman # bluetooth manager
-    freesweep # minesweeper I can play w the keyboard.
+    # freesweep # minesweeper I can play w the keyboard.
+    # multimc
 
     # Nes emulators and stuff
-    zsnes
-    higan
-    fceux
+    # zsnes
+    # higan
+    # fceux
   ];
 }
diff --git a/modules/applications/steam.nix b/modules/applications/steam.nix
new file mode 100644
index 0000000..6af6788
--- /dev/null
+++ b/modules/applications/steam.nix
@@ -0,0 +1,8 @@
+{ pkgs, ... }: {
+  # 32 bit stuff
+  hardware.opengl.driSupport32Bit = true;
+  hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
+  hardware.pulseaudio.support32Bit = true;
+
+  home-manager.users.adrielus.home.packages = with pkgs; [ steam ];
+}
diff --git a/modules/applications/xmonad/xmonad.hs b/modules/applications/xmonad/xmonad.hs
index e5d255c..1b567c9 100644
--- a/modules/applications/xmonad/xmonad.hs
+++ b/modules/applications/xmonad/xmonad.hs
@@ -6,18 +6,22 @@ import           XMonad.Config.Kde
 import           XMonad.Util.EZConfig
 import           XMonad.Actions.SpawnOn
 import           XMonad.Hooks.ManageDocks
+import           XMonad.Hooks.EwmhDesktops      ( fullscreenEventHook )
+import           XMonad.Hooks.EwmhDesktops      ( ewmh )
 
 import           XMonad.Layout.Spacing
 import           XMonad.Layout.ThreeColumns
 
 main =
   xmonad
+    $                 ewmh
     $                 docks
     $                 kdeConfig
-                        { modMask    = mod4Mask
+                        { modMask = mod4Mask
                         , layoutHook = myLayoutHook
                         , manageHook = manageDocks <+> myManagerHook <+> manageHook kdeConfig
-                        , terminal   = myTerminal
+                        , handleEventHook = handleEventHook kdeConfig <+> fullscreenEventHook
+                        , terminal = myTerminal
                         }
     `additionalKeysP` keymap
  where
diff --git a/modules/theme/fonts.nix b/modules/theme/fonts.nix
index 739705c..b580662 100644
--- a/modules/theme/fonts.nix
+++ b/modules/theme/fonts.nix
@@ -3,5 +3,6 @@
     fira-code
     fira-code-symbols
     source-code-pro
+    corefonts
   ];
 }