diff --git a/configuration.nix b/configuration.nix
index 3671759..2362037 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -65,7 +65,7 @@
isNormalUser = true;
home = "/home/elias";
shell = pkgs.zsh;
- extraGroups = [ "wheel" "networkmanager" ];
+ extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
hashedPassword =
"$6$pdAJt1f0v7Zb13Ri$1WpKrErAp5JCb7eXs7EeeWYRMBLu5/WKDdMyGzJyYQDijG2NiywUXpAkl/8p1noxOOqYbb.MTw7JmTzhWGsT21";
};
@@ -82,6 +82,8 @@
dmenu
acpilight # For setting Backlight.
+ pulseaudio
+ pulseaudio-ctl
gnome.nautilus
lxqt.lxqt-policykit # provides a default authentication client for policykit
@@ -106,15 +108,10 @@
programs.zsh.enable = true;
# Audio
- # rtkit is optional but recommended
- security.rtkit.enable = true;
- services.pipewire = {
- enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- pulse.enable = true;
- jack.enable = true;
- };
+ sound.enable = true;
+ hardware.pulseaudio.enable = true;
+ hardware.pulseaudio.support32Bit =
+ true; # # If compatibility with 32-bit applications is desired.
# Set stateVersion. Leave it as set.
system.stateVersion = "23.11";
diff --git a/home/TODOS.md b/home/TODOS.md
index 892f32a..af2f3d7 100644
--- a/home/TODOS.md
+++ b/home/TODOS.md
@@ -16,12 +16,7 @@
## Audio
-- ???
-
-## Planify
-
-- Installieren
-- Sync
+- alsa
## Lockscreen
@@ -40,11 +35,6 @@
- Installieren
- Spiele
-## Element
-
-- Installieren
-- Matrix connecten
-
## Spotify
- Installieren?
@@ -121,6 +111,7 @@
- Hotkeys einrichten
- i3
+ - mit alsa
- Workspaces
## git
@@ -148,6 +139,7 @@
- Akku
- Netzwerk
- i3?
+ - Audio
## Dateien
diff --git a/home/extras/images.nix b/home/extras/images.nix
new file mode 100644
index 0000000..3136228
--- /dev/null
+++ b/home/extras/images.nix
@@ -0,0 +1,16 @@
+{ ... }:
+
+{
+ login = builtins.fetchurl {
+ url =
+ "https://github.com/zhichaoh/catppuccin-wallpapers/blob/main/minimalistic/unicat.png?raw=true";
+ sha256 = "1pa0mlnzna96d0gkrc9yphg11vmjdxvk5vyj8h5jq4ngsm20p6cy";
+ };
+
+ lock = builtins.fetchurl {
+ url =
+ "https://github.com/zhichaoh/catppuccin-wallpapers/blob/main/landscapes/yosemite.png?raw=true";
+ sha256 = "0zyphcvh6dxbq997h716lcr2kpilp4jid9hp2sdjphpxpf824nck";
+ };
+}
+
diff --git a/home/programs/xmonad/src/xmobar/scripts/backlight.sh b/home/programs/xmonad/src/xmobar/scripts/backlight.sh
new file mode 100755
index 0000000..e7899c0
--- /dev/null
+++ b/home/programs/xmonad/src/xmobar/scripts/backlight.sh
@@ -0,0 +1,2 @@
+Out=$(xbacklight -get)
+echo "\xe3aa $Out%"
diff --git a/home/programs/xmonad/src/xmobar/xmobar.hs b/home/programs/xmonad/src/xmobar/xmobar.hs
index c059d40..429e9e5 100644
--- a/home/programs/xmonad/src/xmobar/xmobar.hs
+++ b/home/programs/xmonad/src/xmobar/xmobar.hs
@@ -5,56 +5,70 @@ config =
defaultConfig
{ font = "Fira Code"
, position = TopH 30
- , borderColor = "#1e2030"
+ , borderColor = "#402339"
, border = FullB
- , borderWidth = 3
- , bgColor = "#24273a"
- , fgColor = "#cad3f5"
- , commands = [ Run $ Cpu [ "--template", "\xf085 %"
- , "--Low","3"
- , "--High","50"
- , "--low","#bbc2cf"
- , "--normal","#bbc2cf"
- , "--high","#fb4934"] 50
- , Run $ Memory ["-t","\xF2DB %"
- ,"-H","80"
- ,"-L","10"
- ,"-l","#bbc2cf"
- ,"-n","#bbc2cf"
- ,"-h","#fb4934"] 50
- , Run $ Date "\xf017 %a %b %_d %H:%M" "date" 300
- , Run $ DynNetwork ["-t","\xf063 \xf062 "
- ,"-H","200"
- ,"-L","10"
- ,"-h","#bbc2cf"
- ,"-l","#bbc2cf"
- ,"-n","#bbc2cf"] 50
- , Run $ CoreTemp ["-t", "\xf2c7 °"
- , "-L", "30"
- , "-H", "75"
- , "-l", "lightblue"
- , "-n", "#bbc2cf"
- , "-h", "#aa4450"] 50
- , Run $ BatteryP [ "BAT1" ]
- [ "--template" , "\xf240 "
- , "--Low" , "10" -- units: %
- , "--High" , "80" -- units: %
- , "--low" , "#fb4934"
- , "--normal" , "#bbc2cf"
- , "--high" , "#98be65"
- , "--" -- battery specific options
- -- discharging status
- , "-o" , "% ()"
- -- AC "on" status
- , "-O" , "% (Charging)"
- -- charged status
- , "-i" , "Charged"
- ] 50
- , Run XMonadLog
- ]
+ , borderWidth = 2
+ , bgColor = "#381f32"
+ , fgColor = "#a8dfe3"
+ , commands =
+ [
+ Run $ Com "./scripts/backlight.sh" [] "backlight" 10
+ Run $ Cpu
+ [
+ "--template", "\xf085 %"
+ , "--Low","3"
+ , "--High","50"
+ , "--low","#bbc2cf"
+ , "--normal","#bbc2cf"
+ , "--high","#fb4934"
+ ] 50
+ , Run $ Memory
+ [
+ "-t","\xF2DB %"
+ ,"-H","80"
+ ,"-L","10"
+ ,"-l","#bbc2cf"
+ ,"-n","#bbc2cf"
+ ,"-h","#fb4934"
+ ] 50
+ , Run $ Alsa "default" "Master"
+ [
+ "--template", "\xe050>/fc> "
+ , "--suffix" , "True"
+ , "--"
+ , "--on", "\xe050>/fc> "
+ ]
+ , Run $ Date "\xf017 %d.%m.%y %H:%M" "date" 300
+ , Run $ DynNetwork
+ [
+ "-t","\xf063 \xf062 "
+ ,"-H","200"
+ ,"-L","10"
+ ,"-h","#bbc2cf"
+ ,"-l","#bbc2cf"
+ ,"-n","#bbc2cf"
+ ] 50
+ , Run $ BatteryP [ "BAT0" ]
+ [
+ "--template" , "\xf240 "
+ , "--Low" , "10" -- units: %
+ , "--High" , "80" -- units: %
+ , "--low" , "#fb4934"
+ , "--normal" , "#bbc2cf"
+ , "--high" , "#98be65"
+ , "--" -- battery specific options
+ -- discharging status
+ , "-o" , "% ()"
+ -- AC "on" status
+ , "-O" , "% (Charging)"
+ -- charged status
+ , "-i" , "Charged"
+ ] 50
+ , Run XMonadLog
+ ]
, sepChar = "%"
, alignSep = "}{"
- , template = "%XMonadLog% }{ %cpu% | %coretemp% | %memory% | %battery% | %dynnetwork% | %date% |"
+ , template = "%XMonadLog% }{ %backlight% | %cpu% | %memory% | %battery% | %dynnetwork% | %date% "
}
main :: IO ()
diff --git a/home/programs/xmonad/src/xmonad.hs b/home/programs/xmonad/src/xmonad.hs
index b134644..3a4454f 100644
--- a/home/programs/xmonad/src/xmonad.hs
+++ b/home/programs/xmonad/src/xmonad.hs
@@ -5,29 +5,65 @@ import XMonad.Util.EZConfig
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
+import XMonad.Layout.ThreeColumns
+import XMonad.Layout.Magnifier
+import XMonad.Util.ClickableWorkspaces
+import XMonad.Util.Loggers
+import Data.ByteString (maximum)
+import Text.XHtml (gray)
-main = xmonad . ewmhFullscreen . ewmh . xmobarProp $ def
- { terminal = "alacritty"
- , normalBorderColor = "#050508"
- , focusedBorderColor = "#89b4fa"
- }
- `additionalKeysP`
- [ ("M-p", spawn "rofi -show \"drun\"")
- , ("M-c", spawn "firefox")
- --, ("", spawn "xbacklight -inc 10")
- --, ("", spawn "xbacklight -dec 10")
- --, ("", spawn "wpctl set-mute 58 toggle")
- --, ("", spawn "wpctl set-volume 58 0.05+")
- --, ("", spawn "wpctl set-volume 58 0.05-")
- --, ("", spawn "wpctl set-mute 52 toggle")
- ]
- `removeKeysP`
- [ "M-q"
- ]
+main = xmonad . ewmhFullscreen . ewmh . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey $ myconfig
+
+myconfig = def
+ {
+ layoutHook = myLayout
+ , terminal = "alacritty"
+ , normalBorderColor = "#050508"
+ , focusedBorderColor = "#89b4fa"
+ }
+ `additionalKeysP`
+ [
+ ("M-p", spawn "rofi -show \"drun\"")
+ , ("M-c", spawn "firefox")
+ , ("", spawn "xbacklight -inc 10")
+ , ("", spawn "xbacklight -dec 10")
+ --, ("", spawn "wpctl set-mute 58 toggle")
+ --, ("", spawn "wpctl set-volume 58 0.05+")
+ --, ("", spawn "wpctl set-volume 58 0.05-")
+ --, ("", spawn "wpctl set-mute 52 toggle")
+ ]
+ `removeKeysP` []
+
+myXmobarPP :: PP
+myXmobarPP = def
+ {
+ ppSep = magenta " • "
+ , ppWsSep = ""
+ , ppCurrent = wrap " " "" . xmobarBorder "Top" "#a8dfe3" 2
+ , ppHidden = wrap " " ""
+ , ppHiddenNoWindows = gray . wrap " " ""
+ , ppUrgent = red . wrap (yellow "!") (yellow "!")
+ , ppTitleSanitize = xmobarStrip
+ , ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
+ , ppExtras = [logTitles formatFocused formatUnfocused]
+ }
+ where
+ formatFocused = wrap "[" "]" . magenta . ppWindow
+ formatUnfocused = wrap "[" "]" . gray . ppWindow
+
+ ppWindow :: String -> String
+ ppWindow = xmobarRaw . (\w -> if null w then "???" else w) . shorten 15 -- set maximum length of windowtitle to 15
+
+ magenta, gray, red, yellow :: String -> String
+ magenta = xmobarColor "#ff79c6" ""
+ gray = xmobarColor "#5c5e5e" ""
+ red = xmobarColor "#ff5555" ""
+ yellow = xmobarColor "#f1fa8c" ""
+
+
+myLayout = Tall 1 (3/100) (1/2) ||| Mirror (Tall 1 (3/100) (1/2)) ||| Full ||| ThreeColMid 1 (3/100) (1/2) -- wenn wieder zoom von fokusierten Seitenfenstern gewünscht, dann Fireox fixn und: magnifiercz' 1.3 (ThreeColMid 1 (3/100) (1/2))
myStartupHook :: X ()
myStartupHook = do
mapM_ spawnOnce ["xmobar -x " ++ show sid | sid <- [0..9]]
-
-
diff --git a/home/services/xscreenlocker.nix b/home/services/xscreenlocker.nix
new file mode 100644
index 0000000..c19e060
--- /dev/null
+++ b/home/services/xscreenlocker.nix
@@ -0,0 +1,19 @@
+{ pkgs, ... }:
+
+let images = pkgs.callPackage ../extras/images.nix { };
+in {
+ home.packages = with pkgs; [ xsecurelock ];
+
+ home.sessionVariables = rec {
+ XSECURELOCK_COMPOSITE_OBSCURER = 0;
+ XSECURELOCK_PASSWORD_PROMPT = "asterisks";
+ };
+
+ services.screen-locker = {
+ enable = true;
+ inactiveInterval = 1;
+ lockCmd = "${pkgs.xsecurelock}/bin/xsecurelock";
+ xautolock.extraOptions = [ "Xautolock.killer: systemctl suspend" ];
+ };
+}
+