unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "bdju" via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Hugo Buddelmeijer" <hugo@buddelmeijer.nl>, <65769@debbugs.gnu.org>
Subject: bug#65769:
Date: Fri, 20 Oct 2023 05:02:02 -0500	[thread overview]
Message-ID: <CWD6HVE5HFES.27T40KFYIL9XN@masaki> (raw)
In-Reply-To: <CA+Jv8O1uVKrOST5-tW-dx5UK3StKRF2V8Gp56fzDALTER0gr8A@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 732 bytes --]

On Fri Oct 20, 2023 at 4:01 AM CDT, Hugo Buddelmeijer wrote:
> It would be greatly appreciated if someone could post an example Guix
> config for Sway that should run out of the box with the libre kernel
> without any extra channels. For example on a virtual machine. Then we
> have a shared starting point that we can all confirm to work, so we
> can detangle issues specific to our own hardware and software
> configuration, and issues related to Sway+Guix in general.
>
> Cheers,
> Hugo
>

I am running Sway on Guix System with the libre kernel. My hardware is a
ThinkPad T440p, intel graphics. I do not use any channels.

I've attached my config.scm, manifest, and sway config files in case
it's useful to you.

[-- Attachment #2: anpan-guix-config.scm --]
[-- Type: text/x-scheme, Size: 4834 bytes --]

;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu)
	(gnu services dbus)
	(gnu services pm)
	(gnu services linux)
	(gnu services virtualization)
	(gnu system setuid)
	(guix packages))
(use-service-modules audio base desktop networking ssh sound xorg)
(use-package-modules shells wm android gnome)

; workaround to use swaylock with PAM, requires disabling setuid
;	(define-public swaylock-pam-service-type
;		(service-type (name 'swaylock)
;			(extensions (list (service-extension pam-root-service-type
;				(const (list (pam-service
;					(name "swaylock")
;					(auth (list
;						(pam-entry
;							(control "include")
;							(module "greetd"))))))))))
;			(description "Swaylock pam configuration")
;			(default-value '())))

; attempt to restore a PAM-less swaylock
(define-public swaylock/no-pam
	(package
		(inherit swaylock)
		(name "swaylock-no-pam")
		(inputs
			(filter
				(lambda (input)
					(not (string=? "linux-pam" (car input))))
				(package-inputs swaylock)))))

(operating-system
	(locale "en_US.utf8")
	(timezone "America/Chicago")
	(keyboard-layout (keyboard-layout "us"))
	(host-name "anpan")
	(users (cons* (user-account
		(name "brad")
		(comment "Bradley")
		(group "users")
		(shell (file-append zsh "/bin/zsh"))
		(home-directory "/home/brad")
		(supplementary-groups
			'("wheel" "netdev" "audio" "video" "libvirt" "kvm" "adbusers"
			 "plugdev" "tor" "tty" "input" "dialout")))
		%base-user-accounts))

	(groups
		(cons* (user-group
			(name "adbusers")
			(system? #t))
			(user-group
			(name "plugdev")
			(system? #t))
		%base-groups))

	(packages
		(append
			(map specification->package '("adwaita-icon-theme"
							"hicolor-icon-theme"
							"gnome-themes-extra"
							"gvfs"
							"fwupd"
							"intel-vaapi-driver"
							"nss-certs"
							"neovim"
							"sway"
							"tmux"
							"v4l2loopback-linux-module"
							"vim-full"))
			(list swaylock/no-pam)
			%base-packages))

	(services
		(cons*
			(service openssh-service-type (openssh-configuration
							(password-authentication? #t)
							(use-pam? #f)))
		(service tor-service-type)
		(service network-manager-service-type)
		(service wpa-supplicant-service-type)
		(service ntp-service-type)
		(service tlp-service-type (tlp-configuration (cpu-scaling-governor-on-ac (list "performance"))))
		(service thermald-service-type)
		(service upower-service-type)
		(service earlyoom-service-type)
		(service alsa-service-type)
		(service polkit-service-type)
		(service dbus-root-service-type)
		(service udisks-service-type)
		(service libvirt-service-type
			(libvirt-configuration
				(unix-sock-group "libvirt")
				(tls-port "16555")))
		(service virtlog-service-type
			(virtlog-configuration
			(max-clients 1000)))
		(udev-rules-service 'controller-nintendo-gamecube-adapter
			(udev-rule "51-gcadapter.rules"
				(string-append
					"SUBSYSTEM==\"usb\", ENV{DEVTYPE}==\"usb_device\", "
					"ATTRS{idVendor}==\"057e\", ATTRS{idProduct}==\"0337\", "
					"MODE=\"0666\"")))
;			(service udev-service-type
;				(udev-configuration
;					(rules (cons android-udev-rules
;						(udev-configuration-rules config)))))
			(service elogind-service-type (elogind-configuration (handle-lid-switch 'ignore)))
			(simple-service 'fuse-etc etc-service-type
				(list `("fuse.conf" ,(plain-file "fuse.conf" "user_allow_other\n"))))
			(simple-service 'ratbagd dbus-root-service-type (list libratbag))
	%base-services))

	(bootloader
		(bootloader-configuration
			(bootloader grub-efi-bootloader)
			(targets (list "/boot/efi"))
			(keyboard-layout keyboard-layout)))
	(swap-devices (list (swap-space
					(target "/swapfile"))))
	(mapped-devices
		(list
			(mapped-device
				(source
				(uuid "6098315e-f945-4450-8438-29cf49eea790"))
				(targets (list "cryptroot"))
				(type luks-device-mapping))))
			;(mapped-device
			;	(type luks-device-mapping)
			;	(source
			;	(uuid "b458c6b9-6781-474c-8623-ad869c02f194"))
			;	(targets (list "sidecar")))))
			;(mapped-device
			;	(type luks-device-mapping)
			;	(source
			;	(uuid "cb7b1caa-0448-4a35-9d40-7ab1d82a18f1"))
			;	(targets (list "bullet")))))

	(file-systems
		(cons* (file-system
				(mount-point "/")
				(device "/dev/mapper/cryptroot")
				(type "btrfs")
				(dependencies mapped-devices))
			(file-system
				(mount-point "/boot/efi")
				(device (uuid "F1AB-B8B3" 'fat32))
				(type "vfat"))
			;(file-system
			;	(mount-point "/data0")
			;	(dependencies mapped-devices)
			;	(device "/dev/mapper/sidecar")
			;	(type "btrfs"))
			;(file-system
			;	(mount-point "/data0")
			;	(dependencies mapped-devices)
			;	(device "/dev/mapper/bullet")
			;	(type "btrfs"))
	%base-file-systems))
	(setuid-programs (append (list (setuid-program (program (file-append swaylock/no-pam "/bin/swaylock")))) %setuid-programs))
	)

[-- Attachment #3: anpan-guix-manifest.scm --]
[-- Type: text/x-scheme, Size: 5616 bytes --]

(use-package-modules admin bittorrent disk dunst emacs engineering figlet fonts fontutils ftp games gnome gnuzilla image-viewers imagemagick irc lxde mail messaging mpd ncdu password-utils pdf pulseaudio shells suckless telephony terminals video vim web-browsers xdisorg)

;(define alacritty/fresh
;	(package
;		(inherit alacritty


(specifications->manifest
	(list
		"acl"
		"acpi"
		"adb"
		"aegisub"
		;"aerc"
		"alacritty"
		"alsa-utils"
		"android-udev-rules"
		"anki"
		"arm-none-eabi-toolchain"
		"aspell"
		"aspell-dict-en"
		"audacity"
		"avrdude"
		"avr-toolchain"
		"barcode"
		"bashtop"
		"bat"
		"bdftopcf"
		"beep"
		"bemenu"
		"bind:utils"
		"binutils"
		"bitlbee"
		"blender"
		"bombadillo"
		"bpytop"
		"breeze"
		"breeze-icons"
		"bsnes"
		"btop"
		"btrfs-progs"
		"buku"
		;"castor"
		"cataclysm-dda"
		"cataclysm-dda:tiles"
		;"chirp"
		"compsize"
		"cool-retro-term"
		"countdown"
		"cowsay"
		"crawl-tiles"
		"cryptsetup"
		"curl"
		;"dconf"
		"ddcutil"
		"ddrescue"
		"desktop-file-utils"
		"desmume"
		"dfu-programmer"
		"dfu-util"
		"dino"
		"dino:debug"
		;"dolphin-emu"
		"dosfstools"
		"dragon-drop"
		"dvtm"
		"efibootmgr"
		"emacs"
		"emacs-consult"
		"emacs-counsel-tramp"
		"emacs-debbugs"
		"emacs-elpher"
		"emacs-evil"
		"emacs-evil-collection"
		"emacs-evil-org"
		"emacs-expand-region"
		"emacs-geiser"
		"emacs-general"
		"emacs-guix"
		"emacs-hydra"
		"emacs-ivy"
		"emacs-ivy-rich"
		"emacs-link-hint"
		"emacs-magit"
		"emacs-markdown-mode"
		"emacs-modus-themes"
		"emacs-nix-mode"
		"emacs-nov-el"
		"emacs-org"
		"emacs-org-drill"
		"emacs-org-roam"
		"emacs-pdf-tools"
		"emacs-persp-mode"
		"emacs-platformio-mode"
		"emacs-rg"
		"emacs-scad-mode"
		"emacs-undo-tree"
		"emacs-vertico"
		"emacs-which-key"
		"espeak"
		"espeak-ng"
		"evolution"
		"exa"
		"exercism"
		"exfat-utils"
		"f3"
		"fasd"
		"fastboot"
		"fd"
		"feh"
		"fennel"
		"ffmpeg"
		"figlet"
		"file"
		"file-roller"
		"filezilla"
		"fish"
		;"fnlfmt"
		"font-adobe-source-code-pro"
		"font-adobe-source-han-sans:jp"
		"font-awesome"
		"font-cozette"
		"font-dejavu"
		"font-fira-code"
		"font-ghostscript"
		"font-gnu-freefont"
		"font-gnu-unifont"
		"font-google-noto"
		"font-google-roboto"
		"font-inconsolata"
		"font-openmoji"
		"font-terminus"
		"font-terminus:pcf-8bit"
		"fontconfig"
		"foot"
		"freecad"
		"freerdp"
		"fuse-exfat"
		;"fzf"
		"fzy"
		"gajim"
		"gajim-omemo"
		"gallery-dl"
		"gcc-toolchain"
		"gdb"
		"gimp"
		"git"
		"gnupg"
		"gnucobol"
		"go"
		"go-ipfs"
		"godot"
		"gpick"
		"grim"
		"groff"
		"hedgewars"
		"hexchat"
		"higan"
		"htop"
		"ibus"
		"ibus-anthy"
		"icecat"
		"icedove"
		"imagemagick"
		"imv"
		"inkscape"
		"ioquake3"
		"irssi"
		"jami"
		"jmtpfs"
		"jq"
		"kaidan"
		"kakoune"
		"kanshi"
		"kdeconnect"
		"kdenlive"
		"keepassxc"
		"khal"
		"kicad"
		"kicad-doc"
		"kicad-footprints"
		"kicad-symbols"
		"kicad-templates"
		"kimageformats"
		"lagrange"
		"ldns"
		"ldns:drill"
		"lf"
		"libappindicator"
		;"libfive"
		"libjpeg"
		"libnotify"
		"libreoffice"
		"libwacom"
		"licensecheck"
		"lm-sensors"
		"love"
		"lshw"
		"lsof"
		"lxappearance"
		"lxqt-config"
		"lxqt-qtplugin"
		"lynx"
		"magic-wormhole"
		"magic-wormhole-transit-relay"
		"make"
		"mako"
		"mc"
		"mcg"
		"megatools"
		"mesa-utils"
		"mgba"
		"minetest"
		"mkfontdir"
		"mkvtoolnix"
		"mkvtoolnix:gui"
		"moreutils"
		"mosh"
		"mousepad"
		"mpc"
		"mpd"
		"mpd-mpc"
		"mpdscribble"
		"mpv"
		"quaternion"
		"mtools"
		"mtpaint"
		"mumble"
		"mupdf"
		"ncdu"
		"ncmpcpp"
		"neofetch"
		"nestopia-ue"
		"net-tools"
		"netcat"
		"nethack"
		"neverball"
		"newsboat"
		"nheko"
		"nicotine+"
		"nim"
		"nmap"
		"nnn"
		"node"
		"ntfs-3g"
		"nushell"
		"nyxt"
		"obs"
		"obs-wlrobs"
		"offlineimap3"
		"oil"
		"openjdk"
		"openscad"
		"openshot"
		"opensurge"
		"p7zip"
		"pqiv"
		"parallel"
		"parted"
		"patchelf"
		"pavucontrol"
		"pcmanfm-qt"
		;"pcsxr"
		"perl"
		"perl-image-exiftool"
		"pfetch"
		"pinentry"
		"piper"
		"pipewire"
		"ponymix"
		"powertop"
		"profanity"
		"prusa-slicer"
		"pulseaudio"
		"pulsemixer"
		"python"
		"python-axolotl"
		"python-keyring"
		"python-matplotlib"
		"python-pillow"
		"python-secretstorage"
		"python-wrapper"
		"qt5ct"
		"qtimageformats"
		"qtwayland"
		"qtgraphicaleffects"
		"quaternion"
		"quaternion:debug"
		"qemu"
		"qrencode"
		"qutebrowser"
		"racket"
		"rakudo"
		"ranger"
		"readline"
		"recutils"
		"red-eclipse"
		"rgbds"
		"ripgrep"
		"rlwrap"
		"rofi"
		"rsync"
		"ruby"
		"ruby-pry"
		"sakura"
		"shellcheck"
		"sicp"
		"slurp"
		"smartmontools"
		"spacefm"
		"speedcrunch"
		"sqlite"
		"sshfs"
		"stepmania"
		"stow"
		"strace"
		"pipe-viewer"
		"supertuxkart"
		"surfraw"
		"swayidle"
		;"swaylock"
		"swaynotificationcenter"
		"nsxiv"
		"syncthing"
		"syncthing-gtk"
		"sysstat"
		"taisei"
		"teeworlds"
		"telescope"
		"tesseract-ocr"
		"texi2html"
		"texinfo"
		"thermald"
		"thinkfan"
		;"tiled"
		"tome4"
		"tor"
		"torsocks"
		"toxic"
		"transmission"
		"transmission:gui"
		"ungoogled-chromium-wayland"
		"unzip"
		"upower"
		"urlscan"
		"vde2"
		"vifm"
		"vim-guix-vim"
		"vinagre"
		"virt-manager"
		"vis"
		"visidata"
		"vitetris"
		"w3m"
		"waybar"
		"waypipe"
		"weechat"
		"wesnoth"
		"wesnoth-server"
		"wf-recorder"
		"wfetch"
		"wget"
		"wireplumber"
		"wl-clipboard"
		"wlr-randr"
		"wlsunset"
		"wofi"
		"xclip"
		"xdelta"
		"xdg-utils"
		"xdg-desktop-portal-wlr"
		"xdot"
		"xdotool"
		"xev"
		"xinit"
		"xlsfonts"
		"xmodmap"
		"xonotic"
		"xournal"
		"xournalpp"
		"xrandr"
		"xrdb"
		"xxd"
		"yt-dlp"
		"zathura"
		"zathura-djvu"
		"zathura-pdf-mupdf"
		"zig"
		"zsh"
		"zsh-syntax-highlighting"
	))


[-- Attachment #4: anpan-guix-sway-config --]
[-- Type: text/plain, Size: 13424 bytes --]

# Read `man 5 sway` for a complete reference.

### Variables
# Super key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term foot
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
#set $menu dmenu_path | dmenu | xargs swaymsg exec
set $menu bemenu-run
set $menu2 wofi | xargs -d '\n' swaymsg exec
set $brad-menu $HOME/bin/brad-menu
set $mpv-clipboard wl-paste | xargs -d '\n' mpv --force-window=immediate --osd-level=3 --save-position-on-quit | xargs swaymsg exec
set $mpv-clipboard-primary wl-paste -p | xargs -d '\n' mpv --force-window=immediate --osd-level=3 --save-position-on-quit | xargs swaymsg exec
set $mpv-stream-clipboard wl-paste | xargs -d '\n' mpv --pause=no --cache-secs=10 --demuxer-readahead-secs=10 --untimed --force-window=immediate --osd-level=3 --save-position-on-quit | xargs swaymsg exec
set $mpv-stream-clipboard-primary wl-paste -p | xargs -d '\n' mpv --pause=no --cache-secs=10 --demuxer-readahead-secs=10 --untimed --force-window=immediate --osd-level=3 --save-position-on-quit | xargs swaymsg exec
set $xdg-clipboard wl-paste | xargs -d '\n' xdg-open | xargs swaymsg exec
set $xdg-clipboard-primary wl-paste -p | xargs -d '\n' xdg-open | xargs swaymsg exec

# hide titlebars
#default_border none
default_border pixel 1
#new_window normal
#for_window [class="^.*"] border pixel 1
for_window [app_id="term-temp"] floating enable, border pixel 3
for_window [app_id="term-scratch"] floating enable, border pixel 3
#for_window [app_id="picker"] floating enable, border pixel 3, resize set 1200 800, move down 500
for_window [app_id="picker"] border pixel 3, resize set 1200 800
for_window [app_id="imv"] floating enable, border pixel 3, resize set 500 700, move position 100 ppt 100 ppt, move left 520, move up 750
no_focus [app_id="imv"]

#font
font pango:monospace 9

# autostart programs
exec --no-startup-id mpdscribble
exec --no-startup-id mako
exec --no-startup-id xrdb ~/.Xresources
exec sh -c 'dbus-launch --autolaunch=$(dbus-uuidgen --get) mako'
#exec --no-startup-id emacs
exec --no-startup-id "sh -c 'sleep 10; exec foot --app-id=term-local'"
exec --no-startup-id "sh -c 'sleep 15; exec foot --app-id=term-masaki'"
exec --no-startup-id "sh -c 'sleep 10; exec foot --app-id=term-editor'"

# gnome-keyring
exec eval $(gnome-keyring-daemon --start)
exec export SSH_AUTH_SOCK

set $laptop 'Chimei Innolux Corporation 0x14D4 0x00000000'
set $landscape 'Hewlett Packard HP ZR24w CNT037144C'
set $portrait 'Hewlett Packard HP ZR24w CNT03512JN'
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable

### Output configuration
output $landscape bg $HOME/pictures/wallpaper/1529004448340.jpg fill
output $portrait bg $HOME/pictures/wallpaper/portrait/DYabJ0FV4AACG69.jpg fill

# random wallpaper
#set $wallpapers_path $HOME/pictures/wallpaper
#output * bg `find $wallpapers_path -type f | shuf -n 1` fill

# set $portrait as left monitor and rotate it anticlockwise
output $portrait pos 0 1200 transform 270
#
# broken
#exec swaymsg move workspace 1 to output $landscape
#exec swaymsg move workspace 2 to output $portrait
#exec swaymsg focus output $landscape

### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
#          timeout 300 'swaylock -f -c 000000' \
#          timeout 600 'swaymsg "output * dpms off"' \
#               resume 'swaymsg "output * dpms on"' \
#          before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.

### Input configuration

# mouse
input type:pointer accel_profile flat

# keyboards

# universal settings
input type:keyboard repeat_delay 280
input type:keyboard repeat_rate 40

# Pinky4
input "21582:28724:tamanishi_Pinky4_Keyboard" {
	xkb_layout us
	xkb_options compose:caps
}

# ThinkPad keyboard
input "1:1:AT_Translated_Set_2_keyboard" {
	xkb_layout us
	xkb_variant workman
	xkb_options compose:caps
}

# workman and qwerty, swappable, internal keyboard
#input "1:1:AT_Translated_Set_2_keyboard" {
#xkb_layout us,us
#xkb_variant workman,
#xkb_options compose:caps
#}


### Key bindings
    # start a terminal
    bindsym $mod+Return exec $term

    # kill focused window
    bindsym $mod+Shift+q kill

    # start your launcher
    bindsym $mod+d exec $menu
    bindsym $mod+Shift+d exec $menu2
    bindsym $mod+q exec $brad-menu

    # focus-menu
    bindsym ctrl+$mod+f exec $HOME/bin/focus-menu

    # open clipboard contents in mpv
    bindsym $mod+p exec $mpv-clipboard
    bindsym $mod+Shift+p exec $mpv-clipboard-primary
    bindsym $mod+Mod1+p exec $mpv-stream-clipboard
    bindsym $mod+Mod1+Shift+p exec $mpv-stream-clipboard-primary

    # open clipboard contents with xdg-open
    bindsym $mod+Mod1+o exec $xdg-clipboard
    bindsym $mod+Mod1+Shift+o exec $xdg-clipboard-primary

    # mouse button for dragging.
    floating_modifier $mod normal

    # reload the configuration file
    bindsym $mod+Shift+c reload

    # exit sway (logs you out of your Wayland session)
    bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'

    # lock screen
    bindsym $mod+Shift+x exec swaylock -f -c 000000

    # emoji
    bindsym $mod+z exec ~/bin/emoji

    # clip-menu
    bindsym $mod+c exec ~/bin/bemenuclip

### Scrot
    # screenshot selected area
    bindsym $mod+x exec grim -g "$(slurp)" ~/scrot/$(date +'%Y-%m-%d-%H%M%S_grim.png')
    # screenshot all outputs
    bindsym Print exec grim ~/scrot/$(date +'%Y-%m-%d-%H%M%S_grim_desktop.png')
    # screenshot focused output
    bindsym ctrl+Print exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') ~/scrot/$(date +'%Y-%m-%d-%H%M%S_grim.png')
    # screenshot focused window
    bindsym Mod1+Print exec ~/bin/windowscrot
    # screenshot selected area after a few seconds
    bindsym Shift+Print exec ~/bin/geoscrot

### Focus
    # focus anki
    bindsym ctrl+$mod+a [class="Anki"] focus

    # focus browser (qutebrowser)
    bindsym ctrl+$mod+b [app_id="org.qutebrowser.qutebrowser"] focus ; [class="qutebrowser"] focus ; [app_id="icecat"] focus

    # focus browser (chromium)
    bindsym ctrl+Shift+$mod+b [app_id="chromium-browser"] focus

    # focus chat (nheko)
    bindsym ctrl+$mod+c [title="nheko"] focus

    # focus da file manager (pcmanfm-qt)
    #bindsym ctrl+$mod+d [class="Deluge"] focus
    bindsym ctrl+$mod+d [app_id="pcmanfm-qt"] focus ; [class="pcmanfm-qt"] focus

    # focus emacs
    bindsym ctrl+$mod+e [class="Emacs"] focus ; [app_id="term-editor"] focus

    # focus gajim
    bindsym ctrl+$mod+g [app_id="org.gajim.Gajim"] focus

    # focus safe (keepassxc)
    bindsym ctrl+$mod+s [class="KeePassXC"] focus ; [app_id="org.keepassxc.KeePassXC"] focus

    # focus local terminal
    bindsym ctrl+$mod+l [app_id="term-local"] focus

    # focus masaki terminal
    bindsym ctrl+$mod+m [app_id="term-masaki"] focus

    # focus obs (obs)
    bindsym ctrl+$mod+o [class="obs"] focus

    # focus video (mpv)
    bindsym ctrl+$mod+v [app_id="mpv"] focus

    # focus xmpp (dino)
    bindsym ctrl+$mod+x [app_id="dino"] focus

#
# Moving around:
#
    # Move your focus around
    bindsym $mod+$left focus left
    bindsym $mod+$down focus down
    bindsym $mod+$up focus up
    bindsym $mod+$right focus right
    # or use $mod+[up|down|left|right]
    bindsym $mod+Left focus left
    bindsym $mod+Down focus down
    bindsym $mod+Up focus up
    bindsym $mod+Right focus right
    bindsym ctrl+$mod+j focus output right
    bindsym ctrl+$mod+k focus output left

    # _move_ the focused window with the same, but add Shift
    bindsym $mod+Shift+$left move left
    bindsym $mod+Shift+$down move down
    bindsym $mod+Shift+$up move up
    bindsym $mod+Shift+$right move right
    # ditto, with arrow keys
    bindsym $mod+Shift+Left move left
    bindsym $mod+Shift+Down move down
    bindsym $mod+Shift+Up move up
    bindsym $mod+Shift+Right move right
#
# Workspaces:
#
    # switch to workspace
    bindsym $mod+1 workspace 1
    bindsym $mod+2 workspace 2
    bindsym $mod+3 workspace 3
    bindsym $mod+4 workspace 4
    bindsym $mod+5 workspace 5
    bindsym $mod+6 workspace 6
    bindsym $mod+7 workspace 7
    bindsym $mod+8 workspace 8
    bindsym $mod+9 workspace 9
    bindsym $mod+0 workspace 10
    bindsym ctrl+$mod+n workspace next_on_output
    bindsym ctrl+$mod+p workspace prev_on_output 
    # move focused container to workspace
    bindsym $mod+Shift+1 move container to workspace 1
    bindsym $mod+Shift+2 move container to workspace 2
    bindsym $mod+Shift+3 move container to workspace 3
    bindsym $mod+Shift+4 move container to workspace 4
    bindsym $mod+Shift+5 move container to workspace 5
    bindsym $mod+Shift+6 move container to workspace 6
    bindsym $mod+Shift+7 move container to workspace 7
    bindsym $mod+Shift+8 move container to workspace 8
    bindsym $mod+Shift+9 move container to workspace 9
    bindsym $mod+Shift+0 move container to workspace 10
    # move workspaces between monitors
    bindsym $mod+o move workspace to output left

    # Note: workspaces can have any name you want, not just numbers.
    # We just use 1-10 as the default.
#
# Layout stuff:
#
    # You can "split" the current object of your focus with
    # $mod+b or $mod+v, for horizontal and vertical splits
    # respectively.
    bindsym $mod+b splith
    bindsym $mod+v splitv

    # Switch the current container between different layout styles
    bindsym $mod+s layout stacking
    bindsym $mod+w layout tabbed
    bindsym $mod+e layout toggle split

    # Make the current focus fullscreen
    bindsym $mod+f fullscreen

    # Toggle the current focus between tiling and floating mode
    bindsym $mod+Shift+space floating toggle

    # Swap focus between the tiling area and the floating area
    bindsym $mod+space focus mode_toggle

    # move focus to the parent container
    bindsym $mod+a focus parent
    bindsym $mod+Shift+a focus child
    
    assign [class="Firefox"] 2
    assign [class="Nightly"] 2
    assign [class="IceCat"] 2
    assign [class="Navigator"] 2
    assign [class="qutebrowser"] 2
    assign [class="Deluge"] 3
    assign [app_id="icecat"] 2
    assign [app_id="mpv"] 1
    assign [app_id="term-masaki"] 2
    assign [app_id="term-local"] 1
    assign [app_id="term-editor"] 1

#
# Scratchpad:
#
    # Sway has a "scratchpad", which is a bag of holding for windows.
    # You can send windows there and get them back later.

    # Move the currently focused window to the scratchpad
    bindsym $mod+Shift+minus move scratchpad

    # Show the next scratchpad window or hide the focused scratchpad window.
    # If there are multiple scratchpad windows, this command cycles through them.
    bindsym $mod+minus scratchpad show

# colors
# class                 border  backgr. text    indicator child_border
client.focused          #222222 #000000 #ffffff #6c7172   #7fffd4
client.focused_inactive #222222 #000000 #E1E1E1 #6c7172   #222222
client.unfocused        #222222 #000000 #888888 #292d2e   #222222
client.urgent           #2f343a #900000 #ffffff #900000   #900000
client.placeholder      #000000 #000000 #ffffff #000000   #0c0c0c

#
# Resizing containers:
#
mode "resize" {
    # left will shrink the containers width
    # right will grow the containers width
    # up will shrink the containers height
    # down will grow the containers height
    bindsym $left resize shrink width 10px
    bindsym $down resize grow height 10px
    bindsym $up resize shrink height 10px
    bindsym $right resize grow width 10px

    # ditto, with arrow keys
    bindsym Left resize shrink width 10px
    bindsym Down resize grow height 10px
    bindsym Up resize shrink height 10px
    bindsym Right resize grow width 10px

    # return to default mode
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"

    bindsym $mod+i mode "j: japanese; k: korean; v: vietnamese; esc: english"

    mode "j: japanese; k: korean; v: vietnamese; esc: english" {
        bindsym j exec ibus engine anthy; mode "default"
        bindsym k exec ibus engine hangul; mode "default"
        bindsym v exec ibus engine Unikey; mode "default"
        bindsym Return exec ibus engine xkb:us::eng; mode "default"
        bindsym Escape exec ibus engine xkb:us::eng; mode "default"
    }

#
# Status Bar:
#
# Read `man 5 sway-bar` for more information about this section.

bar {
    swaybar_command waybar
}

#bar {
#    position top
#
#    # When the status_command prints a new line to stdout, swaybar updates.
#    # The default just shows the current date and time.
#    status_command while date +'%A %Y-%m-%d %H:%M:%S'; do sleep 1; done
#
#    colors {
#        background #000000
#      	separator  #000000
#        statusline #ffffff
#
#      	focused_workspace  #ffffff #ffffff #000000
#      	active_workspace   #000000 #000000 #ffffff
#        inactive_workspace #000000 #000000 #ffffff
#	urgent_workspace   #000000 #e60000 #ffffff
#    }
#}

  reply	other threads:[~2023-10-20 10:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  3:04 bug#65769: greetd-wlgreet-sway-session result is blinking cursor chris
2023-09-06  5:00 ` bug#65769: wlgreet-sway-session chris
2023-09-06  5:10 ` chris
2023-09-06  5:22   ` chris
2023-09-06 12:34     ` Josselin Poiret via Bug reports for GNU Guix
2023-09-06  5:32   ` chris
2023-09-06 15:57 ` bug#65769: no elogind chris
2023-09-08 14:46 ` bug#65769: greetd-wlgreet-sway-session result is blinking cursor paren--- via Bug reports for GNU Guix
2023-09-08 15:31   ` chris
2023-09-08 15:37     ` paren--- via Bug reports for GNU Guix
2023-09-08 16:01       ` chris
2023-09-08 16:08         ` paren--- via Bug reports for GNU Guix
2023-09-09 11:11         ` Josselin Poiret via Bug reports for GNU Guix
2024-10-31 20:56           ` David Arroyo
2024-11-01 10:03             ` chris
2024-11-01 10:25             ` chris
2023-10-20  9:01 ` bug#65769: Hugo Buddelmeijer
2023-10-20 10:02   ` bdju via Bug reports for GNU Guix [this message]
2023-10-20 12:14     ` bug#65769: Hugo Buddelmeijer
2023-10-20 13:49       ` bug#65769: Hugo Buddelmeijer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CWD6HVE5HFES.27T40KFYIL9XN@masaki \
    --to=bug-guix@gnu.org \
    --cc=65769@debbugs.gnu.org \
    --cc=bdju@tilde.team \
    --cc=hugo@buddelmeijer.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).