From patchwork Tue Jun 2 04:54:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "vasilii.smirnov--- via Guix-patches\" via" X-Patchwork-Id: 22518 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A0F9127BBE1; Tue, 2 Jun 2020 05:55:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 41A3127BBE3 for ; Tue, 2 Jun 2020 05:55:07 +0100 (BST) Received: from localhost ([::1]:37752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfyx8-0006N5-Nq for patchwork@mira.cbaines.net; Tue, 02 Jun 2020 00:55:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfyx4-0006Mz-Dw for guix-patches@gnu.org; Tue, 02 Jun 2020 00:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfyx4-0001WO-48 for guix-patches@gnu.org; Tue, 02 Jun 2020 00:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jfyx4-0004LM-1D for guix-patches@gnu.org; Tue, 02 Jun 2020 00:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#39271] Status: Add a guide to the guix cookbook about setting up sway. Resent-From: Joshua Branson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Jun 2020 04:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39271 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: bug#39271 <39271@debbugs.gnu.org> Received: via spool by 39271-submit@debbugs.gnu.org id=B39271.159107368716670 (code B ref 39271); Tue, 02 Jun 2020 04:55:01 +0000 Received: (at 39271) by debbugs.gnu.org; 2 Jun 2020 04:54:47 +0000 Received: from localhost ([127.0.0.1]:37666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfywp-0004Kn-E7 for submit@debbugs.gnu.org; Tue, 02 Jun 2020 00:54:47 -0400 Received: from mx2.dismail.de ([159.69.191.136]:17068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfywm-0004KY-OM for 39271@debbugs.gnu.org; Tue, 02 Jun 2020 00:54:45 -0400 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 68bb4327 for <39271@debbugs.gnu.org>; Tue, 2 Jun 2020 06:54:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=20190914; bh=9icehIG8m9WyeSk/HCN75Ih6sRiuSK+iWy jJS0I7zcA=; b=fsTzJXFX3KQ8BNAHHuZ9TkBgFSTMPvdBdFpJsrLXkXT07lKm+c 526phUjzIKvXHX2iiaSR7kHAuWMV4lfjKZqamksmou8xeMsMiPlQZ+Ro7y8Dtpmt qRcqZCn3wWQ8VNbnbu4LtcQPyCymXywa61U6VFdXcieSnCiI5GWjqfLVjqiMP2Ib DAhkMrREk2QeD3VKoA4pF767hn10JH3U/Hj+JB1NrO22CoWUpHQESuhLvm8/8RKj 7WRH+06Owovx2/r4sjPSiLugOMzjMqi3YrHGb3RWocj77Se5p+E4KsZHWpU7pY2w Hu3dC+tiJaFPszdxZTQlLxxNpX7tF/TmZe/A== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx2.dismail.de (OpenSMTPD) with ESMTP id ee81eb3b for <39271@debbugs.gnu.org>; Tue, 2 Jun 2020 06:54:36 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 70538228 for <39271@debbugs.gnu.org>; Tue, 2 Jun 2020 06:54:36 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2111b44a (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for <39271@debbugs.gnu.org>; Tue, 2 Jun 2020 06:54:35 +0200 (CEST) References: <7a8627b16fee4c4609d38e87f260d15f@dismail.de> <87v9kaz4h5.fsf@dismail.de> Date: Tue, 02 Jun 2020 00:54:31 -0400 In-Reply-To: <87v9kaz4h5.fsf@dismail.de> (Joshua Branson's message of "Mon, 01 Jun 2020 20:38:46 -0400") Message-ID: <87o8q2ysmw.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Joshua Branson , Joshua Branson via Guix-patches X-Patchwork-Original-From: Joshua Branson via Guix-patches via From: "vasilii.smirnov--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches From 81cf42cebd6697f16a6b760618bd1a2265c8844e Mon Sep 17 00:00:00 2001 From: Joshua Branson Date: Mon, 1 Jun 2020 20:12:15 -0400 Subject: [PATCH] doc: Add a sway configuration example. * doc/guix-cookbook.texi (Sway): Add a sway configuration example. --- doc/guix-cookbook.texi | 94 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 8651bc4429..a2ed25fdfc 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1617,6 +1617,100 @@ Then you need to add the following code to a StumpWM configuration file (set-font (make-instance 'xft:font :family "DejaVu Sans Mono" :subfamily "Book" :size 11)) @end lisp +@node Sway +@subsection Sway +@cindex Sway + +Sway is a tiling window manager written for wayland. Since sway does not +officially support login managers, some users may need to execute +"sway" at the virtual console after login. However, according to Sway's +developers, the GNOME display manager, usually works to start sway. + +To get started using sway, install sway, and the configuration +file. + +@example +$ guix package -i sway wget +$ wget https://raw.githubusercontent.com/swaywm/sway/master/config.in +$ mkdir -p ~/.config/sway/ +$ mv config.in ~/.config/sway/config +# optionally remove wget +$ guix package -r wget +@end example + +Sway supports several configuration options including your default +terminal and keyboard layout. Read @code{man sway} for details. + +You will need to use @code{%desktop-services} to run sway. Try to login +into sway with gdm. If gdm does not work then try to remove +@code{gdm-service-type} like so. + +@lisp + (use-modules (gnu) (guix) + (srfi srfi-1)) + + (use-service-modules desktop xorg) + + (operating-system + (host-name "dobby") + (timezone "America/Indiana/Indianapolis") + (locale "en_US.utf8") + ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the + ;; target hard disk, and "my-root" is the label of the target + ;; root file system. + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (target "/dev/sda"))) + + (file-systems + (cons* (file-system + (mount-point "/") + (device "/dev/sda1") + (type "btrfs")) + %base-file-systems)) + (users (cons* + (user-account + (name "username") + (comment "user name") + (group "users") + (home-directory "/home/user") + (supplementary-groups + '("wheel" "netdev" "audio" "video"))) + %base-user-accounts)) + + ;; Globally-installed packages. + (packages (append (map specification->package + '("nss-certs")) + %base-packages)) + + (services + (cons* + (modify-services + (remove (lambda (service) + (member (service-kind service) + (list + gdm-service-type + ))) + %desktop-services) ;;end of remove services + )))) + +@end lisp + +You can now login to sway after login to the virtual console by typing + +@example +$ sway +@end example + +You can also set up sway to autostart after you login. Add this to your +~/.bash_profile + +@example +if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then + XKB_DEFAULT_LAYOUT=us exec sway +fi +@end example + @node Session lock @subsection Session lock @cindex sessionlock