From b00b2dd8d49d80edb89001095715f5d49a0feb69 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Wed, 28 Aug 2024 19:52:05 -0400 Subject: [PATCH] meta: Document usage of dwm on phone This worked and was *significantly* faster than Phosh but resulted in a lot of phone things broken like phone calls and the camera. Overall quite cool to run dwm on the PinePhone but not really practical when trying to use the PinePhone as a phone. --- home/dwm.nix | 10 +++++++--- home/xresources.nix | 1 + hosts/phone/configuration.nix | 13 ++----------- specializations/dwm.nix | 2 ++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/home/dwm.nix b/home/dwm.nix index 9336ba56..12b2c9cc 100644 --- a/home/dwm.nix +++ b/home/dwm.nix @@ -2,6 +2,8 @@ let barScript = "dwm/bar.fish"; + + phosh-backgrounds = pkgs.callPackage ../packages/phosh-backgrounds.nix { }; in { home = { @@ -9,6 +11,7 @@ in feh xclip scrot + CuboCore.corekeyboard ]; file.".xinitrc" = { @@ -26,14 +29,15 @@ in export SDL_IM_MODULE=fcitx export GLFW_IM_MODULE=ibus export GTK_CSD=0 + export MOZ_USE_XINPUT2=1 xrdb -merge ~/.Xresources xset r rate 300 50 - feh --no-fehbg --bg-scale ${config.stylix.image} + feh --no-fehbg --bg-scale ${phosh-backgrounds}/wall-lock.jpg ~/.config/${barScript} & - picom --daemon - ${pkgs.nemo}/bin/nemo-desktop & fcitx5 & + kitty & + corekeyboard & while true; do dbus-launch --sh-syntax --exit-with-session dwm diff --git a/home/xresources.nix b/home/xresources.nix index 5fa02efa..afd995ae 100644 --- a/home/xresources.nix +++ b/home/xresources.nix @@ -6,5 +6,6 @@ "Xft.lcdfilter" = "lcddefault"; "Xft.hintstyle" = "hintfull"; "Xft.rgba" = "rgb"; + "Xft.dpi" = 192; }; } diff --git a/hosts/phone/configuration.nix b/hosts/phone/configuration.nix index 267af306..73e55bbe 100644 --- a/hosts/phone/configuration.nix +++ b/hosts/phone/configuration.nix @@ -36,7 +36,9 @@ in home-manager.sharedModules = attrValues { inherit (self.homeModules) + dwm eza + fcitx fish git gpg @@ -263,19 +265,8 @@ in }; services = { - xserver = { - displayManager.lightdm.enable = false; - - desktopManager.phosh = { - enable = true; - group = "users"; - user = username; - }; - }; - udisks2.enable = mkForce false; pipewire.enable = mkForce false; - greetd.enable = mkForce false; }; boot = { diff --git a/specializations/dwm.nix b/specializations/dwm.nix index 0346f324..301b4eeb 100644 --- a/specializations/dwm.nix +++ b/specializations/dwm.nix @@ -70,6 +70,7 @@ in static const char *dmenucmd[] = { "rofi", "-show", "drun" }; static const char *quitcmd[] = { "kill", "xinit" }; static const char *termcmd[] = { "kitty", NULL }; + static const char *keyboardcmd[] = { "corekeyboard", NULL }; static const char *brighter[] = { "brightnessctl", "set", "5%+", NULL }; static const char *dimmer[] = { "brightnessctl", "set", "5%-", NULL }; static const char *up_vol[] = { "wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL }; @@ -108,6 +109,7 @@ in static const Button buttons[] = { { ClkTagBar, 0, Button1, view, {0} }, + { ClkStatusText, 0, Button1, spawn, {.v = keyboardcmd } }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, };