about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-11 17:40:08 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-09-14 22:20:52 +0200
commit004d54e9fe6880edabcf18cb0ae7c9a86bb28e85 (patch)
tree133e4748410224ffe2f0db4016a36da633a073dd
parentXlock: Respect dpms off screen (diff)
downloadnixos-config-004d54e9fe6880edabcf18cb0ae7c9a86bb28e85.tar.gz
nixos-config-004d54e9fe6880edabcf18cb0ae7c9a86bb28e85.tar.bz2
nixos-config-004d54e9fe6880edabcf18cb0ae7c9a86bb28e85.zip
Implement initial wayland support
-rw-r--r--dotfiles/.bash_profile11
-rwxr-xr-xdotfiles/river/init172
-rw-r--r--dotfiles/sway_config234
-rw-r--r--dotfiles/waybar/config168
-rw-r--r--dotfiles/waybar/style.css58
-rw-r--r--flake.lock2
-rw-r--r--hosts/configuration.nix8
-rw-r--r--hosts/home.nix18
-rw-r--r--overlays/base/default.nix10
9 files changed, 676 insertions, 5 deletions
diff --git a/dotfiles/.bash_profile b/dotfiles/.bash_profile
index 0dc5034..9857c11 100644
--- a/dotfiles/.bash_profile
+++ b/dotfiles/.bash_profile
@@ -3,7 +3,16 @@
 
 [[ -f ~/.bashrc ]] && . "$HOME/.bashrc"
 
-# StartX
+if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
+    export MOZ_ENABLE_WAYLAND=1
+fi
+
+# Start River
 if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
+    exec river
+fi
+
+# StartX
+if [[ ! $DISPLAY && $XDG_VTNR -eq 2 ]]; then
     exec startx
 fi
diff --git a/dotfiles/river/init b/dotfiles/river/init
new file mode 100755
index 0000000..106f6f1
--- /dev/null
+++ b/dotfiles/river/init
@@ -0,0 +1,172 @@
+#!/bin/sh
+
+# This is the example configuration file for river.
+#
+# If you wish to edit this, you will probably want to copy it to
+# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
+#
+# See the river(1), riverctl(1), and rivertile(1) man pages for complete
+# documentation.
+
+# Note: the "$mod" modifier is also known as Logo, GUI, Windows, Mod4, etc.
+
+xrdb ~/.Xresources &
+swaybg -i ~/Images/Wallpapers/Day/wave.jpg &
+
+riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
+riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
+
+# $mod+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot)
+mod="Mod1"
+
+riverctl map normal $mod Return spawn "st -e zsh"
+riverctl map normal $mod D spawn "dmenu_run &"
+riverctl map normal $mod Tab focus-previous-tags
+
+# $mod+Q to close the focused view
+riverctl map normal $mod Q close
+
+# $mod+Shift+E to exit river
+riverctl map normal $mod+Shift E exit
+
+# $mod+J and $mod+K to focus the next/previous view in the layout stack
+riverctl map normal $mod J focus-view next
+riverctl map normal $mod K focus-view previous
+
+# $mod+Shift+J and $mod+Shift+K to swap the focused view with the next/previous
+# view in the layout stack
+riverctl map normal $mod+Shift J swap next
+riverctl map normal $mod+Shift K swap previous
+
+# $mod+Period and $mod+Comma to focus the next/previous output
+riverctl map normal $mod Period focus-output next
+riverctl map normal $mod Comma focus-output previous
+
+# $mod+Shift+{Period,Comma} to send the focused view to the next/previous output
+riverctl map normal $mod+Shift Period send-to-output next
+riverctl map normal $mod+Shift Comma send-to-output previous
+
+# $mod+Return to bump the focused view to the top of the layout stack
+riverctl map normal $mod+Shift Return zoom
+
+# $mod+H and $mod+L to decrease/increase the main ratio of rivertile(1)
+riverctl map normal $mod H send-layout-cmd rivertile "main-ratio -0.05"
+riverctl map normal $mod L send-layout-cmd rivertile "main-ratio +0.05"
+
+# $mod+Shift+H and $mod+Shift+L to increment/decrement the main count of rivertile(1)
+riverctl map normal $mod+Shift H send-layout-cmd rivertile "main-count +1"
+riverctl map normal $mod+Shift L send-layout-cmd rivertile "main-count -1"
+
+# $mod+Alt+{H,J,K,L} to move views
+riverctl map normal $mod+Alt H move left 100
+riverctl map normal $mod+Alt J move down 100
+riverctl map normal $mod+Alt K move up 100
+riverctl map normal $mod+Alt L move right 100
+
+# $mod+Alt+Control+{H,J,K,L} to snap views to screen edges
+riverctl map normal $mod+Alt+Control H snap left
+riverctl map normal $mod+Alt+Control J snap down
+riverctl map normal $mod+Alt+Control K snap up
+riverctl map normal $mod+Alt+Control L snap right
+
+# $mod+Alt+Shift+{H,J,K,L} to resize views
+riverctl map normal $mod+Alt+Shift H resize horizontal -100
+riverctl map normal $mod+Alt+Shift J resize vertical 100
+riverctl map normal $mod+Alt+Shift K resize vertical -100
+riverctl map normal $mod+Alt+Shift L resize horizontal 100
+
+# $mod + Left Mouse Button to move views
+riverctl map-pointer normal $mod BTN_LEFT move-view
+
+# $mod + Right Mouse Button to resize views
+riverctl map-pointer normal $mod BTN_RIGHT resize-view
+
+for i in $(seq 1 9)
+do
+    tags=$((1 << ($i - 1)))
+
+    # $mod+[1-9] to focus tag [0-8]
+    riverctl map normal $mod $i set-focused-tags $tags
+
+    # $mod+Shift+[1-9] to tag focused view with tag [0-8]
+    riverctl map normal $mod+Shift $i set-view-tags $tags
+
+    # $mod+Ctrl+[1-9] to toggle focus of tag [0-8]
+    riverctl map normal $mod+Control $i toggle-focused-tags $tags
+
+    # $mod+Shift+Ctrl+[1-9] to toggle tag [0-8] of focused view
+    riverctl map normal $mod+Shift+Control $i toggle-view-tags $tags
+done
+
+# $mod+0 to focus all tags
+# $mod+Shift+0 to tag focused view with all tags
+all_tags=$(((1 << 32) - 1))
+riverctl map normal $mod 0 set-focused-tags $all_tags
+riverctl map normal $mod+Shift 0 set-view-tags $all_tags
+
+# $mod+Space to toggle float
+riverctl map normal $mod Space toggle-float
+
+# $mod+F to toggle fullscreen
+riverctl map normal $mod F toggle-fullscreen
+
+# $mod+{Up,Right,Down,Left} to change layout orientation
+riverctl map normal $mod Up    send-layout-cmd rivertile "main-location top"
+riverctl map normal $mod Right send-layout-cmd rivertile "main-location right"
+riverctl map normal $mod Down  send-layout-cmd rivertile "main-location bottom"
+riverctl map normal $mod Left  send-layout-cmd rivertile "main-location left"
+
+# Declare a passthrough mode. This mode has only a single mapping to return to
+# normal mode. This makes it useful for testing a nested wayland compositor
+riverctl declare-mode passthrough
+
+# $mod+F11 to enter passthrough mode
+riverctl map normal $mod F11 enter-mode passthrough
+
+# $mod+F11 to return to normal mode
+riverctl map passthrough $mod F11 enter-mode normal
+
+# Various media key mapping examples for both normal and locked mode which do
+# not have a modifier
+for mode in normal locked
+do
+    # Eject the optical drive (well if you still have one that is)
+    riverctl map $mode None XF86Eject spawn 'eject -T'
+
+    # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
+    riverctl map $mode None XF86AudioRaiseVolume  spawn 'pamixer -i 5'
+    riverctl map $mode None XF86AudioLowerVolume  spawn 'pamixer -d 5'
+    riverctl map $mode None XF86AudioMute         spawn 'pamixer --toggle-mute'
+
+    # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
+    riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
+    riverctl map $mode None XF86AudioPlay  spawn 'playerctl play-pause'
+    riverctl map $mode None XF86AudioPrev  spawn 'playerctl previous'
+    riverctl map $mode None XF86AudioNext  spawn 'playerctl next'
+
+    # Control screen backlight brightness with light (https://github.com/haikarainen/light)
+    riverctl map $mode None XF86MonBrightnessUp   spawn 'light -A 5'
+    riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
+done
+
+# Set background and border color
+riverctl background-color 0x002b36
+riverctl border-color-focused 0x93a1a1
+riverctl border-color-unfocused 0x586e75
+
+# Set keyboard repeat rate
+riverctl set-repeat 50 300
+
+# Make certain views start floating
+riverctl float-filter-add app-id float
+riverctl float-filter-add title "popup title with spaces"
+
+# Set app-ids and titles of views which should use client side decorations
+riverctl csd-filter-add app-id "gedit"
+
+riverctl spawn "waybar &"
+
+# Set the default layout generator to be rivertile and start it.
+# River will send the process group of the init executable SIGTERM on exit.
+riverctl default-layout rivertile
+rivertile -view-padding 6 -outer-padding 6 -main-ratio 0.5
diff --git a/dotfiles/sway_config b/dotfiles/sway_config
new file mode 100644
index 0000000..a3d4ea8
--- /dev/null
+++ b/dotfiles/sway_config
@@ -0,0 +1,234 @@
+# Default config for sway
+#
+# Copy this to ~/.config/sway/config and edit it to your liking.
+#
+# Read `man 5 sway` for a complete reference.
+
+### Variables
+#
+# Logo key. Use Mod1 for Alt.
+set $mod Mod1
+# Home row direction keys, like vim
+
+set $left h
+
+set $down j
+set $up k
+set $right l
+# Your preferred application launcher
+# Note: pass the final command to swaymsg so that the resulting window can be opened
+# on the original workspace that the command was run on.
+set $menu dmenu_path | dmenu | xargs swaymsg exec --
+
+### Output configuration
+#
+# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
+#output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
+#
+# Example configuration:
+#
+#   output HDMI-A-1 resolution 1920x1080 position 1920,0
+#
+# You can get the names of your outputs by running: swaymsg -t get_outputs
+
+### Idle configuration
+#
+# Example configuration:
+#
+# exec swayidle -w \
+#          timeout 300 'swaylock -f -c 000000' \
+#          timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power 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
+#
+# Example configuration:
+#
+#   input "2:14:SynPS/2_Synaptics_TouchPad" {
+#       dwt enabled
+#       tap enabled
+#       natural_scroll enabled
+#       middle_emulation enabled
+#   }
+#
+# You can get the names of your inputs by running: swaymsg -t get_inputs
+# Read `man 5 sway-input` for more information about this section.
+
+input type:keyboard {
+    xkb_layout gb
+}
+
+exec "xrdb ~/.Xresources"
+exec "swaybg -i /home/baitinq/Images/Wallpapers/Day/wave.jpg &"
+
+### Key bindings
+#
+# Basics:
+#
+    # Start a terminal
+    bindsym $mod+Return exec "st -e zsh"
+    bindsym $mod+Tab workspace back_and_forth
+    # Kill focused window
+    bindsym $mod+q kill
+
+    # Start your launcher
+    bindsym $mod+d exec $menu
+
+    # Drag floating windows by holding down $mod and left mouse button.
+    # Resize them with right mouse button + $mod.
+    # Despite the name, also works for non-floating windows.
+    # Change normal to inverse to use left mouse button for resizing and right
+    # mouse button for dragging.
+    floating_modifier $mod normal
+    
+    focus_follows_mouse no
+    mouse_warping none
+    exec wl-paste -t text --watch clipman store --no-persist
+    default_border pixel
+    default_floating_border pixel
+
+    gaps inner 10
+    gaps outer 5
+
+    # Reload the configuration file
+    bindsym $mod+Shift+Escape 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'
+#
+# 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
+
+    # 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 number 1
+    bindsym $mod+2 workspace number 2
+    bindsym $mod+3 workspace number 3
+    bindsym $mod+4 workspace number 4
+    bindsym $mod+5 workspace number 5
+    bindsym $mod+6 workspace number 6
+    bindsym $mod+7 workspace number 7
+    bindsym $mod+8 workspace number 8
+    bindsym $mod+9 workspace number 9
+    bindsym $mod+0 workspace number 10
+    # Move focused container to workspace
+    bindsym $mod+Shift+1 move container to workspace number 1
+    bindsym $mod+Shift+2 move container to workspace number 2
+    bindsym $mod+Shift+3 move container to workspace number 3
+    bindsym $mod+Shift+4 move container to workspace number 4
+    bindsym $mod+Shift+5 move container to workspace number 5
+    bindsym $mod+Shift+6 move container to workspace number 6
+    bindsym $mod+Shift+7 move container to workspace number 7
+    bindsym $mod+Shift+8 move container to workspace number 8
+    bindsym $mod+Shift+9 move container to workspace number 9
+    bindsym $mod+Shift+0 move container to workspace number 10
+    # 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
+#
+# 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
+#
+# 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"
+
+#
+# Status Bar:
+#
+# Read `man 5 sway-bar` for more information about this section.
+bar {
+    swaybar_command waybar
+    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 +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
+
+    colors {
+        statusline #ffffff
+        background #323232
+        inactive_workspace #32323200 #32323200 #5c5c5c
+    }
+}
+
+include @sysconfdir@/sway/config.d/*
diff --git a/dotfiles/waybar/config b/dotfiles/waybar/config
new file mode 100644
index 0000000..391f3e1
--- /dev/null
+++ b/dotfiles/waybar/config
@@ -0,0 +1,168 @@
+{
+    // "layer": "top", // Waybar at top layer
+    // "position": "bottom", // Waybar position (top|bottom|left|right)
+    "height": 26, // Waybar height (to be removed for auto height)
+    // "width": 1280, // Waybar width
+    "spacing": 2, // Gaps between modules (4px)
+    // Choose the order of the modules
+    "modules-left": ["river/tags", "river/mode", "custom/separator", "river/window"],
+    //"modules-center": ["river/window"],
+    "modules-right": ["pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "keyboard-state", "sway/language", "battery", "battery#bat2", "clock", "tray"],
+    // Modules configuration
+     //"sway/workspaces": {
+      //   "disable-scroll": true,
+       //  "all-outputs": true,
+        // "format": "{name}",
+        // "persistent_workspaces": {
+        //     "1": [],
+         //    "2": [],
+          //   "3": [],
+           //  "4": [],
+          //   "5": [],
+          //   "6": [],
+          //   "7": [],
+          //   "8": [],
+          //   "9": []
+         //}
+     //},
+    "river/tags": {
+      "tag-labels": ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
+    },
+    "keyboard-state": {
+        "numlock": true,
+        "capslock": true,
+        "format": "{name} {icon}",
+        "format-icons": {
+            "locked": "",
+            "unlocked": ""
+        }
+    },
+    "sway/mode": {
+        "format": "<span style=\"italic\">{}</span>"
+    },
+    "mpd": {
+        "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
+        "format-disconnected": "Disconnected ",
+        "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
+        "unknown-tag": "N/A",
+        "interval": 2,
+        "consume-icons": {
+            "on": " "
+        },
+        "random-icons": {
+            "off": "<span color=\"#f53c3c\"></span> ",
+            "on": " "
+        },
+        "repeat-icons": {
+            "on": " "
+        },
+        "single-icons": {
+            "on": "1 "
+        },
+        "state-icons": {
+            "paused": "",
+            "playing": ""
+        },
+        "tooltip-format": "MPD (connected)",
+        "tooltip-format-disconnected": "MPD (disconnected)"
+    },
+    "idle_inhibitor": {
+        "format": "{icon}",
+        "format-icons": {
+            "activated": "",
+            "deactivated": ""
+        }
+    },
+    "tray": {
+        // "icon-size": 21,
+        "spacing": 10
+    },
+    "clock": {
+        // "timezone": "America/New_York",
+        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
+        "format-alt": "{:%Y-%m-%d}"
+    },
+    "cpu": {
+        "format": "{usage}% ",
+        "tooltip": false
+    },
+    "memory": {
+        "format": "{}% "
+    },
+    "temperature": {
+        // "thermal-zone": 2,
+        // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
+        "critical-threshold": 80,
+        // "format-critical": "{temperatureC}°C {icon}",
+        "format": "{temperatureC}°C {icon}",
+        "format-icons": ["", "", ""]
+    },
+    "backlight": {
+        // "device": "acpi_video1",
+        "format": "{percent}% {icon}",
+        "format-icons": ["", "", "", "", "", "", "", "", ""]
+    },
+    "battery": {
+        "states": {
+            // "good": 95,
+            "warning": 30,
+            "critical": 15
+        },
+        "format": "{capacity}% {icon}",
+        "format-charging": "{capacity}% ",
+        "format-plugged": "{capacity}% ",
+        "format-alt": "{time} {icon}",
+        // "format-good": "", // An empty format will hide the module
+        // "format-full": "",
+        "format-icons": ["", "", "", "", ""]
+    },
+    "battery#bat2": {
+        "bat": "BAT2"
+    },
+    "network": {
+        // "interface": "wlp2*", // (Optional) To force the use of this interface
+        "format-wifi": "{essid} ({signalStrength}%) ",
+        "format-ethernet": "{ipaddr}/{cidr} ",
+        "tooltip-format": "{ifname} via {gwaddr} ",
+        "format-linked": "{ifname} (No IP) ",
+        "format-disconnected": "Disconnected ⚠",
+        "format-alt": "{ifname}: {ipaddr}/{cidr}"
+    },
+    "pulseaudio": {
+        // "scroll-step": 1, // %, can be a float
+        "format": "{volume}% {icon} {format_source}",
+        "format-bluetooth": "{volume}% {icon} {format_source}",
+        "format-bluetooth-muted": " {icon} {format_source}",
+        "format-muted": " {format_source}",
+        "format-source": "{volume}% ",
+        "format-source-muted": "",
+        "format-icons": {
+            "headphone": "",
+            "hands-free": "",
+            "headset": "",
+            "phone": "",
+            "portable": "",
+            "car": "",
+            "default": ["", "", ""]
+        },
+        "on-click": "pavucontrol"
+    },
+    "custom/media": {
+        "format": "{icon} {}",
+        "return-type": "json",
+        "max-length": 40,
+        "format-icons": {
+            "spotify": "",
+            "default": "🎜"
+        },
+        "escape": true,
+        "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
+        // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
+    },
+    "custom/separator": {
+    "format": "|",
+    "interval": "once",
+    "tooltip": false
+}
+}
+
diff --git a/dotfiles/waybar/style.css b/dotfiles/waybar/style.css
new file mode 100644
index 0000000..fe01a14
--- /dev/null
+++ b/dotfiles/waybar/style.css
@@ -0,0 +1,58 @@
+* {
+	font-size: 12px;
+	font-family: JetBrainsMono;
+	border: none;
+	border-radius: 0;
+}
+
+window#waybar {
+	background: #222222;
+	color: #bbbbbb;
+}
+
+#clock,
+#battery,
+#backlight,
+#pulseaudio {
+	padding: 0 10px;
+	margin: 0 4px;
+}
+
+#window,
+#tags {
+	padding: 0 0;
+	margin: 0 0;
+}
+
+#tags button {
+	padding: 0 7px;
+	margin: 0;
+	color: #bbbbbb;
+}
+
+#tags button.occupied {
+	border-top: 4px solid #bbbbbb;
+	margin: 0;
+	padding: 0 7px;
+}
+
+#tags button.focused {
+	border-top: 0;
+	margin: 0;
+	padding: 0 7px;
+	color: #222222;
+	background: #bbbbbb;
+}
+
+#tags button:hover {
+	background: inherit;
+	color: inherit;
+	box-shadow: inherit;
+	text-shadow: inherit;
+}
+
+#battery.critical:not(.charging) {
+    background-color: darkred;
+    color: #ffffff;
+}
+
diff --git a/flake.lock b/flake.lock
index 095dad5..b9d103a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -4,7 +4,7 @@
       "flake": false,
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-BXCMSsmYMNSRiZX+Bbu4JK0O+/sHWlK1G464+f2n1NI=",
+        "narHash": "sha256-XbslHsWSP0xezZOT1NM0587/x/2lc5fRCYwKkbzL9iQ=",
         "path": "./dotfiles",
         "type": "path"
       },
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index d9215d9..e9721b6 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -66,6 +66,8 @@
     TERMINAL = "st";
     EDITOR = "nvim";
     VISUAL = "nvim";
+
+    XKB_DEFAULT_LAYOUT = "gb";
   };
 
   environment.sessionVariables = rec {
@@ -110,6 +112,11 @@
   # started in user sessions.
   # programs.mtr.enable = true;
 
+  xdg.portal = {
+    enable = true;
+    wlr.enable = true;
+  };
+
   # List services that you want to enable:
   services = {
     openssh = {
@@ -119,6 +126,7 @@
         port = 2222;
       }];
     };
+    dbus.enable = true;
     irqbalance.enable = true;
     fwupd.enable = true;
   };
diff --git a/hosts/home.nix b/hosts/home.nix
index 8ec1aa0..b3057cb 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -36,6 +36,12 @@
       manga-cli
       mov-cli
       smart-wallpaper
+      waybar
+      wl-clipboard
+      sway
+      swaybg
+      river
+      wlr-randr
     ] ++
     (with pkgs.custom; [
       lemacs
@@ -48,9 +54,11 @@
     config = "${inputs.dotfiles}/xmonad.hs";
   };
 
-  programs.xmobar = {
-    enable = true;
-    extraConfig = builtins.readFile "${inputs.dotfiles}/xmobar.hs";
+  programs = {
+    xmobar = {
+      enable = true;
+      extraConfig = builtins.readFile "${inputs.dotfiles}/xmobar.hs";
+    };
   };
 
   home.sessionVariables = {
@@ -258,6 +266,9 @@
   };
 
   xdg = {
+    configFile."sway/config".source = "${inputs.dotfiles}/sway_config";
+    configFile."river/".source = "${inputs.dotfiles}/river/";
+    configFile."waybar/".source = "${inputs.dotfiles}/waybar/";
     configFile."zathura/zathurarc".source = "${inputs.dotfiles}/zathurarc";
     configFile."dunst/dunstrc".source = "${inputs.dotfiles}/dunstrc";
   };
@@ -277,4 +288,5 @@
   xdg.userDirs.desktop = "$HOME/";
 
   home.stateVersion = "22.05";
+
 }
diff --git a/overlays/base/default.nix b/overlays/base/default.nix
index 1eb0edf..3f8b784 100644
--- a/overlays/base/default.nix
+++ b/overlays/base/default.nix
@@ -64,4 +64,14 @@ final: prev:
     ];
   });
 
+  river = prev.river.overrideAttrs (old: {
+    src = prev.fetchFromGitHub {
+      owner = "riverwm";
+      repo = "river";
+      rev = "c0e64829f0517f6512438cbf80ae27bd21986b47";
+      sha256 = "sha256-vvK9DjgChf32fkzFRT+eJhRb00YYwZJYO48+HwRyIkM=";
+      fetchSubmodules = true;
+    };
+  });
+
 }