From 20e475728998bd6d0714699c8519e3af2ece5f5a Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 20 May 2024 22:01:36 -0600 Subject: update sway config --- sway/.config/sway/config | 485 +++++++++++++++++++-------------------- sway/.config/waybar/config | 163 ------------- sway/.config/waybar/config.jsonc | 219 ++++++++++++++++++ sway/.config/waybar/style.css | 69 ------ 4 files changed, 451 insertions(+), 485 deletions(-) delete mode 100644 sway/.config/waybar/config create mode 100644 sway/.config/waybar/config.jsonc delete mode 100644 sway/.config/waybar/style.css (limited to 'sway') diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 58800d6..0fa72fb 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -1,216 +1,188 @@ -# 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. +# Created: 2024-05-24 + +# See `man 5 sway` for more information + +############################################################################### +# Variables + +# Mod4 = Logo key. Mod1 = Alt. set $mod Mod4 -set $alt Mod1 # Home row direction keys, like vim set $left h set $down j set $up k set $right l + # Your preferred terminal emulator -#set $term kitty -set $term alacritty -# 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 -- -#set $menu dmenu-wl_path | dmenu-wl | xargs swaymsg exec -- - -#set $menu wofi -#set $menu dmenu_run | xargs swaymsg exec -- - -# when term alacritty -set $menu exec $term --class=launcher -e bash -c 'compgen -c | grep -v fzf | sort -u | fzf --layout=reverse | xargs -r swaymsg -t command exec' -for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8 - -### 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 - - # Framework 13" (FreeBSD) - output eDP-1 pos 0 0 res 2256x1504 - output eDP-1 scale 1.25 -# output DP-2 pos 0 1080 res 3840x1100 -# output DP-2 scale 2 - - # move windows across outputs outputs - bindsym $mod+x move workspace to output right - bindsym $mod+u move workspace to output up - - - #xwayland enable - -### Idle configuration - # 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. - - 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' - # Inhibit Idle if a window is fullscreen - for_window [class="^.*"] inhibit_idle fullscreen for_window [app_id="^.*"] inhibit_idle fullscreen +set $term foot + +### Application Launcher +# Note: pass the final command to swaymsg so resulting window can open on +# workspace command was run on. + +##### Default: wmenu +set $menu dmenu_path | wmenu | xargs swaymsg exec -- + +##### Alacritty popup +# Note: i haven't tested with the new lines + escapes +# set $menu exec $term \ +# --class=launcher \ +# -e bash \ +# -c 'compgen -c | grep -v fzf | sort -u | fzf --layout=reverse \ +# | xargs -r swaymsg -t command exec' +# for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8 + +############################################################################### +# Output configuration + +### Displays +# You can get the names of your outputs by running: swaymsg -t get_outputs +output eDP-1 scale 1.25 + +### Wallpaper +# output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill +output * bg ~/Sync/Files/wallpaper/PagedOut_002_wallpaper_30.png fill +# output * bg ~/Sync/Files/wallpaper/Photo\ by\ Pramod\ Tiwari\ \(uvld3ZQxK1g\).jpg fill + + +############################################################################### +# Idle 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' + +# Inhibit idle if a window is full screen (e.g. videos) +for_window [class="^.*"] inhibit_idle fullscreen \ + for_window [app_id="^.*"] inhibit_idle fullscreen ### 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_options ctrl:nocaps - } -### Key bindings -# -# Basics: -# - # Start a terminal - bindsym $mod+Return exec $term - - # Kill focused window - bindsym $mod+Shift+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 - - # Reload the configuration file - # bindsym $mod+Shift+c reload # I think this causes sway to run out of IPC fds - #bindsym $mod+Shift+r restart - - # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' - - # Screenshot a region - #bindsym $alt+Shift+4 exec grim -g "$(slurp)" - | wl-copy - bindsym $alt+Shift+4 exec grim -g "$(slurp)" /tmp/ss.png && /home/jason/bin/linode-uploader /tmp/ss.png && rm /tmp/ss.png - - # Volume Control - #bindsym XF86AudioLowerVolume exec ~/.config/sway/scripts/volume_down.sh - #bindsym XF86AudioRaiseVolume exec ~/.config/sway/scripts/volume_up.sh - #bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 ) + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' > $SWAYSOCK.wob -# -# 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 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 - # 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 - # 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 -# + +input "2362:628:PIXA3854:00_093A:0274_Touchpad" { + tap enabled + # disable while typing + # dwt enabled +} + +input type:keyboard { + xkb_options ctrl:nocaps +} + +############################################################################### +# 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 + +# 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 + +# 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 'Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit' + +# 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 + +# move windows across outputs outputs +bindsym $mod+x move workspace to output right +bindsym $mod+u move workspace to output up + +# 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 + +# 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 @@ -233,57 +205,64 @@ mode "resize" { } bindsym $mod+r mode "resize" -# -# Status Bar: -# -# Read `man 5 sway-bar` for more information about this section. -bar { - position bottom - - # When the status_command prints a new line to stdout, swaybar updates. - # The default just shows the current date and time. - # status_command while ~/.config/sway/scripts/statusbar.sh; do sleep 10; done - # colors { - # statusline #ffffff - # background #323232 - # inactive_workspace #32323200 #32323200 #5c5c5c - # } - swaybar_command waybar -} +# Screenshot +#bindsym $alt+Shift+4 exec grim -g "$(slurp)" - | wl-copy +# bindsym $alt+Shift+4 exec grim -g "$(slurp)" /tmp/ss.png && ~/bin/linode-uploader /tmp/ss.png && rm /tmp/ss.png + +# Volume Control +# bindsym XF86AudioLowerVolume exec ~/.config/sway/scripts/volume_down.sh +# bindsym XF86AudioRaiseVolume exec ~/.config/sway/scripts/volume_up.sh +# bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $( pactl list short sinks | sed -e 's,^\([0-9][0-9]*\)[^0-9].*,\1,' | head -n 1 ) + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' > $SWAYSOCK.wob + +############################################################################### +# Status Bar + +bar swaybar_command waybar +# # Read `man 5 sway-bar` for more information about this section. +# 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 +'%Y-%m-%d %X'; do sleep 1; done + +# colors { +# statusline #ffffff +# background #323232 +# inactive_workspace #32323200 #32323200 #5c5c5c +# } +# } + +############################################################################### +# App Configuration + +# Float the Intellij splash screen +for_window [class="jetbrains-idea" title="win0"] floating enable; +# for_window [class="^jetbrains-.+"][window_type=dialog] focus +for_window [class="^jetbrains-idea"][window_type="floating_con"] focus +for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 + +# Fix the Firefox cursor theme +# exec_always gsettings set org.gnome.desktop.interface cursor-theme "Pop" + +# Fix giant mic sharing indicator by making it small and sticky until it's +# fixed in Firefox. +# for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable + +# Fix issue with GPG pinentry +# exec_always dbus-update-activation-environment DISPLAY XAUTHORITY + +# Fix slow loading GTK+ apps, waybar, and GPG pinentry +# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK +# exec hash dbus-update-activation-environment 2>/dev/null && \ +# dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XAUTHORITY + +############################################################################### +# Startup Apps +exec [ ! "$(pidof pipewire)" ] && pipewire +exec [ ! "$(pidof syncthing)" ] && syncthing serve + +#exec mako # notifications +#exec kanshi # autorandr -# -# App Configuration: -# - # Float the Intellij splash screen - for_window [class="jetbrains-idea" title="win0"] floating enable; - # for_window [class="^jetbrains-.+"][window_type=dialog] focus - for_window [class="^jetbrains-idea"][window_type="floating_con"] focus - for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 - - # Fix the cursor theme in Firefox - exec_always gsettings set org.gnome.desktop.interface cursor-theme "Pop" - # Fix the giant mic sharing indicator by making it small and sticky until - # it's fixed in firefox - for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable - - # Fix issue with GPG pinentry - #exec_always dbus-update-activation-environment DISPLAY XAUTHORITY - # Fix slow loading GTK+ apps, waybar, and GPG pinentry - exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK - exec hash dbus-update-activation-environment 2>/dev/null && \ - dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XAUTHORITY - - #exec nm-applet - #exec blueman-applet - #exec run_keybase -a - #exec sleep 1 && keepassxc - ##exec pasystray - #exec mako # notifications - #exec kanshi # autorandr - # Clipboard manager with wofi - # Broken until wlroots 0.13.0 (libwlroots8) - # https://github.com/swaywm/wlroots/pull/2739/files - #exec wl-paste -t text --watch clipman store - #bindsym $alt+Ctrl+v exec clipman pick -t wofi - -include @sysconfdir@/sway/config.d/* +# include /etc/sway/config.d/* \ No newline at end of file diff --git a/sway/.config/waybar/config b/sway/.config/waybar/config deleted file mode 100644 index 21f1f68..0000000 --- a/sway/.config/waybar/config +++ /dev/null @@ -1,163 +0,0 @@ -{ - "layer": "top", // Waybar at top layer - "position": "bottom", // Waybar position (top|bottom|left|right) - "height": 25, // Waybar height (to be removed for auto height) - // "width": 1280, // Waybar width - // Choose the order of the modules - "modules-left": ["sway/workspaces"], - //"modules-center": ["sway/window"], - "modules-center": [], - "modules-right": ["pulseaudio", "backlight", "battery", "idle_inhibitor", "tray", "clock"], - // "modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "cpu", "memory", "temperature", "battery", "backlight", "clock", "tray"], - // Modules configuration - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": false, - "format": "{name}: {icon}", - "format-icons": { - "1": "", - "2": "", - "7": "", - "10": "", - "urgent": "", - "focused": "", - "default": "" - } - }, - "sway/mode": { - "format": "{}" - }, -// "custom/warp": { -// "format": "Warp: {}", -// "interval": 30, -// "exec": "warp-cli status | grep Status | awk '{print $3}'", -// }, - "mpd": { - "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ", - "format-disconnected": "Disconnected ", - "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", - "unknown-tag": "N/A", - "interval": 2, - "consume-icons": { - "on": " " - }, - "random-icons": { - "off": " ", - "on": " " - }, - "repeat-icons": { - "on": " " - }, - "single-icons": { - "on": "1 " - }, - "state-icons": { - // reversed to show the action to take since it's clickable - "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 - }, - //"custom/clock": { - // "exec": "date +'%a, %b %d %H:%M:%S %Z'", - // "interval": 10 - //}, - "clock": { - "interval": 60, - "format": "{:%a, %b %d %H:%M %Z}", - "max-length": 25 - }, - "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": { - // find in /sys/class/backlight - "device": "amdgpu_bl1", - // "device": "acpi_video1", - "format": "{percent}% {icon}", - "format-icons": ["", ""] - }, - "battery": { - // find in /sys/class/power_supply - "bat": "BAT1", - //"adapter": "AC", - "states": { - // "good": 95, - "warning": 15, - "critical": 10 - }, - "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": "{ifname}: {ipaddr}/{cidr} ", - "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 - } -} diff --git a/sway/.config/waybar/config.jsonc b/sway/.config/waybar/config.jsonc new file mode 100644 index 0000000..d1df43d --- /dev/null +++ b/sway/.config/waybar/config.jsonc @@ -0,0 +1,219 @@ +// -*- mode: jsonc -*- +{ + + "layer": "top", // `bottom` to have waybar behind windows + "position": "bottom", // Waybar position (top|bottom|left|right) + // "height": 30, + // "width": 1280, + // "spacing": 2, // Gaps between modules (4px) + // Choose the order of the modules + "modules-left": [ + "sway/workspaces", + "sway/mode", + "sway/scratchpad", + "custom/media" + ], + // "modules-center": [ + // "sway/window" + // ], + "modules-right": [ + "network", + "cpu", + "memory", + // "temperature", + "wireplumber", + "backlight", + "bluetooth", + // "keyboard-state", + // "sway/language", + "battery", + // "battery#bat2", + "power-profiles-daemon", + "idle_inhibitor", + "clock", + "tray" + ], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "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": 5, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "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": "{:%Y %B}\n{calendar}", + "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": "{temperatureF}°F {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-full": "{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" + }, +"bluetooth": { + "format": " {status}", + "format-connected": " {device_alias}", + "format-connected-battery": " {device_alias} {device_battery_percentage}%", + // "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device + "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" +}, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "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" + }, + "wireplumber": { + "format": "{volume}% {icon}", + "format-muted": "", + // "on-click": "helvum", + "format-icons": ["", "", ""] + }, + "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 + } +} diff --git a/sway/.config/waybar/style.css b/sway/.config/waybar/style.css deleted file mode 100644 index b76297f..0000000 --- a/sway/.config/waybar/style.css +++ /dev/null @@ -1,69 +0,0 @@ -* { - border: none; - border-radius: 0; - font-family: "Noto Sans Mono", "Font Awesome 5 Free", "Font Awesome 5 Brands"; - font-size: 14px; - min-height: 0; -} - -window#waybar { - background: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); - color: white; -} - -#workspaces button { - padding: 0 5px; - background: transparent; - color: white; - border-bottom: 3px solid transparent; -} - -#workspaces button.focused { - background: #64727D; - border-bottom: 3px solid white; -} - -#mode, #clock, #custom-clock, #battery { - padding: 0 10px; - margin: 0 5px; -} -#network, #pulseaudio, #backlight, #temperature, #memory, #cpu, #idle_inhibitor { - padding: 0 7px; -} - -#mode { - background: #64727D; - border-bottom: 3px solid white; -} - -#custom-clock, #clock { - background-color: #64727D; -} - -/*#battery { - background-color: #ffffff; - color: black; -}*/ - -#battery.charging { - color: white; - background-color: #26A65B; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: black; - } -} - -#battery.warning:not(.charging) { - background: #f53c3c; - color: white; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} -- cgit v1.2.1