Skip to content

Commit

Permalink
feat: Sway cleanup, added terminal, better defaults, xdg-desktop-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
ABeltramo committed Jul 6, 2024
1 parent e0ac331 commit 2ebe28b
Show file tree
Hide file tree
Showing 6 changed files with 431 additions and 5 deletions.
3 changes: 2 additions & 1 deletion images/base-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ _INSTALL_GAMESCOPE
# Install Sway
#################################
RUN apt-get update -y && \
apt-get install -y sway waybar fonts-font-awesome xwayland && \
apt-get install -y sway xwayland kitty nano \
waybar fonts-font-awesome xdg-desktop-portal xdg-desktop-portal-gtk psmisc && \
rm -rf /var/lib/apt/lists/*

COPY configs /cfg
Expand Down
17 changes: 16 additions & 1 deletion images/base-app/configs/sway/config
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ include /etc/sway/config-vars.d/*
# Basics:
#
# Start a terminal
# bindsym $mod+Return exec $term
bindsym $mod+Return exec kitty

# Kill focused window
# Cemu doesn't have a close button on some of its menus (sway doesn't support those button types yet)
Expand Down Expand Up @@ -87,6 +87,21 @@ mode "resize" {

include /etc/sway/config.d/*

# Font, borders, and gaps
gaps inner 4
gaps outer -4
gaps top -2
gaps bottom 0
default_border pixel 2
default_floating_border pixel 2

# Colours
client.background n/a #434c5e n/a
client.focused #4C566A #434c5e #eceff4 #434c5e #434c5e
client.focused_inactive #3b4252 #3b4252 #eceff4 #3b4252 #3b4252
client.unfocused #3b4252 #3b4252 #eceff4 #3b4252 #3b4252
client.urgent #4C566A #434c5e #eceff4 #434c5e #434c5e

bar swaybar_command waybar

# Need to autostart something after this line, for example:
Expand Down
100 changes: 100 additions & 0 deletions images/base-app/configs/waybar/config.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// -*- mode: jsonc -*-
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": [
"sway/workspaces",
"sway/mode",
"sway/scratchpad",
"custom/kitty"
],
"modules-center": [
"sway/window"
],
"modules-right": [
"pulseaudio",
"network",
"cpu",
"memory",
"temperature",
"sway/language",
"clock"
],
"custom/kitty": {
"format": "{} ",
"tooltip": false,
"on-click": "kitty"
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"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",
"format-icons": ["", "", ""]
},
"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": ["", "", ""]
}
}
}
Loading

0 comments on commit 2ebe28b

Please sign in to comment.