diff options
| author | jason | 2024-05-20 22:01:36 -0600 |
|---|---|---|
| committer | jason | 2024-05-21 10:13:13 -0600 |
| commit | 20e475728998bd6d0714699c8519e3af2ece5f5a (patch) | |
| tree | a11e480274d2404edf30b7290ca6c46ced75a562 /sway | |
| parent | 6d9a79ccebf5e8f4633e9de3f2f2f34e5c2c59cc (diff) | |
| download | dotfiles-20e475728998bd6d0714699c8519e3af2ece5f5a.tar.gz dotfiles-20e475728998bd6d0714699c8519e3af2ece5f5a.zip | |
update sway config
Diffstat (limited to 'sway')
| -rw-r--r-- | sway/.config/sway/config | 485 | ||||
| -rw-r--r-- | sway/.config/waybar/config.jsonc (renamed from sway/.config/waybar/config) | 150 | ||||
| -rw-r--r-- | sway/.config/waybar/style.css | 69 |
3 files changed, 335 insertions, 369 deletions
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 @@ | |||
| 1 | # Default config for sway | 1 | # Created: 2024-05-24 |
| 2 | # | 2 | |
| 3 | # Copy this to ~/.config/sway/config and edit it to your liking. | 3 | # See `man 5 sway` for more information |
| 4 | # | 4 | |
| 5 | # Read `man 5 sway` for a complete reference. | 5 | ############################################################################### |
| 6 | 6 | # Variables | |
| 7 | ### Variables | 7 | |
| 8 | # | 8 | # Mod4 = Logo key. Mod1 = Alt. |
| 9 | # Logo key. Use Mod1 for Alt. | ||
| 10 | set $mod Mod4 | 9 | set $mod Mod4 |
| 11 | set $alt Mod1 | ||
| 12 | 10 | ||
| 13 | # Home row direction keys, like vim | 11 | # Home row direction keys, like vim |
| 14 | set $left h | 12 | set $left h |
| 15 | set $down j | 13 | set $down j |
| 16 | set $up k | 14 | set $up k |
| 17 | set $right l | 15 | set $right l |
| 16 | |||
| 18 | # Your preferred terminal emulator | 17 | # Your preferred terminal emulator |
| 19 | #set $term kitty | 18 | set $term foot |
| 20 | set $term alacritty | 19 | |
| 21 | # Your preferred application launcher | 20 | ### Application Launcher |
| 22 | # Note: pass the final command to swaymsg so that the resulting window can be opened | 21 | # Note: pass the final command to swaymsg so resulting window can open on |
| 23 | # on the original workspace that the command was run on. | 22 | # workspace command was run on. |
| 24 | # set $menu dmenu_path | dmenu | xargs swaymsg exec -- | 23 | |
| 25 | #set $menu dmenu-wl_path | dmenu-wl | xargs swaymsg exec -- | 24 | ##### Default: wmenu |
| 26 | 25 | set $menu dmenu_path | wmenu | xargs swaymsg exec -- | |
| 27 | #set $menu wofi | 26 | |
| 28 | #set $menu dmenu_run | xargs swaymsg exec -- | 27 | ##### Alacritty popup |
| 29 | 28 | # Note: i haven't tested with the new lines + escapes | |
| 30 | # when term alacritty | 29 | # set $menu exec $term \ |
| 31 | 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' | 30 | # --class=launcher \ |
| 32 | for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8 | 31 | # -e bash \ |
| 33 | 32 | # -c 'compgen -c | grep -v fzf | sort -u | fzf --layout=reverse \ | |
| 34 | ### Output configuration | 33 | # | xargs -r swaymsg -t command exec' |
| 35 | # | 34 | # for_window [app_id="^launcher$"] floating enable, border none, opacity 0.8 |
| 36 | # Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/) | 35 | |
| 37 | # output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill | 36 | ############################################################################### |
| 38 | # | 37 | # Output configuration |
| 39 | # Example configuration: | 38 | |
| 40 | # | 39 | ### Displays |
| 41 | # output HDMI-A-1 resolution 1920x1080 position 1920,0 | 40 | # You can get the names of your outputs by running: swaymsg -t get_outputs |
| 42 | # | 41 | output eDP-1 scale 1.25 |
| 43 | # You can get the names of your outputs by running: swaymsg -t get_outputs | 42 | |
| 44 | 43 | ### Wallpaper | |
| 45 | # Framework 13" (FreeBSD) | 44 | # output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill |
| 46 | output eDP-1 pos 0 0 res 2256x1504 | 45 | output * bg ~/Sync/Files/wallpaper/PagedOut_002_wallpaper_30.png fill |
| 47 | output eDP-1 scale 1.25 | 46 | # output * bg ~/Sync/Files/wallpaper/Photo\ by\ Pramod\ Tiwari\ \(uvld3ZQxK1g\).jpg fill |
| 48 | # output DP-2 pos 0 1080 res 3840x1100 | 47 | |
| 49 | # output DP-2 scale 2 | 48 | |
| 50 | 49 | ############################################################################### | |
| 51 | # move windows across outputs outputs | 50 | # Idle configuration |
| 52 | bindsym $mod+x move workspace to output right | 51 | exec swayidle -w \ |
| 53 | bindsym $mod+u move workspace to output up | 52 | timeout 300 'swaylock -f -c 000000' \ |
| 54 | 53 | timeout 600 'swaymsg "output * power off"' \ | |
| 55 | 54 | resume 'swaymsg "output * power on"' \ | |
| 56 | #xwayland enable | 55 | before-sleep 'swaylock -f -c 000000' |
| 57 | 56 | ||
| 58 | ### Idle configuration | 57 | # Inhibit idle if a window is full screen (e.g. videos) |
| 59 | # This will lock your screen after 300 seconds of inactivity, then turn off | 58 | for_window [class="^.*"] inhibit_idle fullscreen \ |
| 60 | # your displays after another 300 seconds, and turn your screens back on when | 59 | for_window [app_id="^.*"] inhibit_idle fullscreen |
| 61 | # resumed. It will also lock your screen before your computer goes to sleep. | ||
| 62 | |||
| 63 | exec swayidle -w \ | ||
| 64 | timeout 300 'swaylock -f -c 000000' \ | ||
| 65 | timeout 600 'swaymsg "output * dpms off"' \ | ||
| 66 | resume 'swaymsg "output * dpms on"' \ | ||
| 67 | before-sleep 'swaylock -f -c 000000' | ||
| 68 | # Inhibit Idle if a window is fullscreen | ||
| 69 | for_window [class="^.*"] inhibit_idle fullscreen for_window [app_id="^.*"] inhibit_idle fullscreen | ||
| 70 | 60 | ||
| 71 | ### Input configuration | 61 | ### Input configuration |
| 72 | # | 62 | |
| 73 | # Example configuration: | ||
| 74 | # | ||
| 75 | # input "2:14:SynPS/2_Synaptics_TouchPad" { | ||
| 76 | # dwt enabled | ||
| 77 | # tap enabled | ||
| 78 | # natural_scroll enabled | ||
| 79 | # middle_emulation enabled | ||
| 80 | # } | ||
| 81 | # | ||
| 82 | # You can get the names of your inputs by running: swaymsg -t get_inputs | 63 | # You can get the names of your inputs by running: swaymsg -t get_inputs |
| 83 | # Read `man 5 sway-input` for more information about this section. | 64 | # Read `man 5 sway-input` for more information about this section. |
| 84 | input type:keyboard { | 65 | |
| 85 | xkb_options ctrl:nocaps | 66 | input "2362:628:PIXA3854:00_093A:0274_Touchpad" { |
| 86 | } | 67 | tap enabled |
| 87 | ### Key bindings | 68 | # disable while typing |
| 88 | # | 69 | # dwt enabled |
| 89 | # Basics: | 70 | } |
| 90 | # | 71 | |
| 91 | # Start a terminal | 72 | input type:keyboard { |
| 92 | bindsym $mod+Return exec $term | 73 | xkb_options ctrl:nocaps |
| 93 | 74 | } | |
| 94 | # Kill focused window | 75 | |
| 95 | bindsym $mod+Shift+q kill | 76 | ############################################################################### |
| 96 | 77 | # Key bindings | |
| 97 | # Start your launcher | 78 | |
| 98 | bindsym $mod+d exec $menu | 79 | # Start a terminal |
| 99 | 80 | bindsym $mod+Return exec $term | |
| 100 | # Drag floating windows by holding down $mod and left mouse button. | 81 | |
| 101 | # Resize them with right mouse button + $mod. | 82 | # Kill focused window |
| 102 | # Despite the name, also works for non-floating windows. | 83 | bindsym $mod+Shift+q kill |
| 103 | # Change normal to inverse to use left mouse button for resizing and right | 84 | |
| 104 | # mouse button for dragging. | 85 | # Start your launcher |
| 105 | floating_modifier $mod normal | 86 | bindsym $mod+d exec $menu |
| 106 | 87 | ||
| 107 | # Reload the configuration file | 88 | # Drag floating windows by holding down $mod and left mouse button. |
| 108 | # bindsym $mod+Shift+c reload # I think this causes sway to run out of IPC fds | 89 | # Resize them with right mouse button + $mod. |
| 109 | #bindsym $mod+Shift+r restart | 90 | # Despite the name, also works for non-floating windows. |
| 110 | 91 | # Change normal to inverse to use left mouse button for resizing and right | |
| 111 | # Exit sway (logs you out of your Wayland session) | 92 | # mouse button for dragging. |
| 112 | bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' | 93 | floating_modifier $mod normal |
| 113 | 94 | ||
| 114 | # Screenshot a region | 95 | # Reload the configuration file |
| 115 | #bindsym $alt+Shift+4 exec grim -g "$(slurp)" - | wl-copy | 96 | bindsym $mod+Shift+c reload |
| 116 | bindsym $alt+Shift+4 exec grim -g "$(slurp)" /tmp/ss.png && /home/jason/bin/linode-uploader /tmp/ss.png && rm /tmp/ss.png | 97 | |
| 117 | 98 | # Exit sway (logs you out of your Wayland session) | |
| 118 | # Volume Control | 99 | bindsym $mod+Shift+e exec swaynag -t warning \ |
| 119 | #bindsym XF86AudioLowerVolume exec ~/.config/sway/scripts/volume_down.sh | 100 | -m 'Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit' |
| 120 | #bindsym XF86AudioRaiseVolume exec ~/.config/sway/scripts/volume_up.sh | 101 | |
| 121 | #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 | 102 | # Move your focus around |
| 122 | # | 103 | bindsym $mod+$left focus left |
| 123 | # Moving around: | 104 | bindsym $mod+$down focus down |
| 124 | # | 105 | bindsym $mod+$up focus up |
| 125 | # Move your focus around | 106 | bindsym $mod+$right focus right |
| 126 | bindsym $mod+$left focus left | 107 | # Or use $mod+[up|down|left|right] |
| 127 | bindsym $mod+$down focus down | 108 | bindsym $mod+Left focus left |
| 128 | bindsym $mod+$up focus up | 109 | bindsym $mod+Down focus down |
| 129 | bindsym $mod+$right focus right | 110 | bindsym $mod+Up focus up |
| 130 | # Or use $mod+[up|down|left|right] | 111 | bindsym $mod+Right focus right |
| 131 | bindsym $mod+Left focus left | 112 | |
| 132 | bindsym $mod+Down focus down | 113 | # Move the focused window with the same, but add Shift |
| 133 | bindsym $mod+Up focus up | 114 | bindsym $mod+Shift+$left move left |
| 134 | bindsym $mod+Right focus right | 115 | bindsym $mod+Shift+$down move down |
| 135 | 116 | bindsym $mod+Shift+$up move up | |
| 136 | # Move the focused window with the same, but add Shift | 117 | bindsym $mod+Shift+$right move right |
| 137 | bindsym $mod+Shift+$left move left | 118 | # Ditto, with arrow keys |
| 138 | bindsym $mod+Shift+$down move down | 119 | bindsym $mod+Shift+Left move left |
| 139 | bindsym $mod+Shift+$up move up | 120 | bindsym $mod+Shift+Down move down |
| 140 | bindsym $mod+Shift+$right move right | 121 | bindsym $mod+Shift+Up move up |
| 141 | # Ditto, with arrow keys | 122 | bindsym $mod+Shift+Right move right |
| 142 | bindsym $mod+Shift+Left move left | 123 | |
| 143 | bindsym $mod+Shift+Down move down | 124 | # move windows across outputs outputs |
| 144 | bindsym $mod+Shift+Up move up | 125 | bindsym $mod+x move workspace to output right |
| 145 | bindsym $mod+Shift+Right move right | 126 | bindsym $mod+u move workspace to output up |
| 146 | # | 127 | |
| 147 | # Workspaces: | 128 | # Switch to workspace |
| 148 | # | 129 | bindsym $mod+1 workspace number 1 |
| 149 | # Switch to workspace | 130 | bindsym $mod+2 workspace number 2 |
| 150 | bindsym $mod+1 workspace 1 | 131 | bindsym $mod+3 workspace number 3 |
| 151 | bindsym $mod+2 workspace 2 | 132 | bindsym $mod+4 workspace number 4 |
| 152 | bindsym $mod+3 workspace 3 | 133 | bindsym $mod+5 workspace number 5 |
| 153 | bindsym $mod+4 workspace 4 | 134 | bindsym $mod+6 workspace number 6 |
| 154 | bindsym $mod+5 workspace 5 | 135 | bindsym $mod+7 workspace number 7 |
| 155 | bindsym $mod+6 workspace 6 | 136 | bindsym $mod+8 workspace number 8 |
| 156 | bindsym $mod+7 workspace 7 | 137 | bindsym $mod+9 workspace number 9 |
| 157 | bindsym $mod+8 workspace 8 | 138 | bindsym $mod+0 workspace number 10 |
| 158 | bindsym $mod+9 workspace 9 | 139 | # Move focused container to workspace |
| 159 | bindsym $mod+0 workspace 10 | 140 | bindsym $mod+Shift+1 move container to workspace number 1 |
| 160 | # Move focused container to workspace | 141 | bindsym $mod+Shift+2 move container to workspace number 2 |
| 161 | bindsym $mod+Shift+1 move container to workspace 1 | 142 | bindsym $mod+Shift+3 move container to workspace number 3 |
| 162 | bindsym $mod+Shift+2 move container to workspace 2 | 143 | bindsym $mod+Shift+4 move container to workspace number 4 |
| 163 | bindsym $mod+Shift+3 move container to workspace 3 | 144 | bindsym $mod+Shift+5 move container to workspace number 5 |
| 164 | bindsym $mod+Shift+4 move container to workspace 4 | 145 | bindsym $mod+Shift+6 move container to workspace number 6 |
| 165 | bindsym $mod+Shift+5 move container to workspace 5 | 146 | bindsym $mod+Shift+7 move container to workspace number 7 |
| 166 | bindsym $mod+Shift+6 move container to workspace 6 | 147 | bindsym $mod+Shift+8 move container to workspace number 8 |
| 167 | bindsym $mod+Shift+7 move container to workspace 7 | 148 | bindsym $mod+Shift+9 move container to workspace number 9 |
| 168 | bindsym $mod+Shift+8 move container to workspace 8 | 149 | bindsym $mod+Shift+0 move container to workspace number 10 |
| 169 | bindsym $mod+Shift+9 move container to workspace 9 | 150 | |
| 170 | bindsym $mod+Shift+0 move container to workspace 10 | 151 | # You can "split" the current object of your focus with |
| 171 | # Note: workspaces can have any name you want, not just numbers. | 152 | # $mod+b or $mod+v, for horizontal and vertical splits |
| 172 | # We just use 1-10 as the default. | 153 | # respectively. |
| 173 | 154 | bindsym $mod+b splith | |
| 174 | # | 155 | bindsym $mod+v splitv |
| 175 | # Layout stuff: | 156 | |
| 176 | # | 157 | # Switch the current container between different layout styles |
| 177 | # You can "split" the current object of your focus with | 158 | bindsym $mod+s layout stacking |
| 178 | # $mod+b or $mod+v, for horizontal and vertical splits | 159 | bindsym $mod+w layout tabbed |
| 179 | # respectively. | 160 | bindsym $mod+e layout toggle split |
| 180 | bindsym $mod+b splith | 161 | |
| 181 | bindsym $mod+v splitv | 162 | # Make the current focus fullscreen |
| 182 | 163 | bindsym $mod+f fullscreen | |
| 183 | # Switch the current container between different layout styles | 164 | |
| 184 | bindsym $mod+s layout stacking | 165 | # Toggle the current focus between tiling and floating mode |
| 185 | bindsym $mod+w layout tabbed | 166 | bindsym $mod+Shift+space floating toggle |
| 186 | bindsym $mod+e layout toggle split | 167 | |
| 187 | 168 | # Swap focus between the tiling area and the floating area | |
| 188 | # Make the current focus fullscreen | 169 | bindsym $mod+space focus mode_toggle |
| 189 | bindsym $mod+f fullscreen | 170 | |
| 190 | 171 | # Move focus to the parent container | |
| 191 | # Toggle the current focus between tiling and floating mode | 172 | bindsym $mod+a focus parent |
| 192 | bindsym $mod+Shift+space floating toggle | 173 | |
| 193 | 174 | # Scratchpad | |
| 194 | # Swap focus between the tiling area and the floating area | 175 | # # Sway has a "scratchpad", which is a bag of holding for windows. |
| 195 | bindsym $mod+space focus mode_toggle | 176 | # # You can send windows there and get them back later. |
| 196 | 177 | ||
| 197 | # Move focus to the parent container | 178 | # # Move the currently focused window to the scratchpad |
| 198 | bindsym $mod+a focus parent | 179 | # bindsym $mod+Shift+minus move scratchpad |
| 199 | # | 180 | |
| 200 | # Scratchpad: | 181 | # # Show the next scratchpad window or hide the focused scratchpad window. |
| 201 | # | 182 | # # If there are multiple scratchpad windows, this command cycles through them. |
| 202 | # Sway has a "scratchpad", which is a bag of holding for windows. | 183 | # bindsym $mod+minus scratchpad show |
| 203 | # You can send windows there and get them back later. | 184 | |
| 204 | |||
| 205 | # Move the currently focused window to the scratchpad | ||
| 206 | bindsym $mod+Shift+minus move scratchpad | ||
| 207 | |||
| 208 | # Show the next scratchpad window or hide the focused scratchpad window. | ||
| 209 | # If there are multiple scratchpad windows, this command cycles through them. | ||
| 210 | bindsym $mod+minus scratchpad show | ||
| 211 | # | ||
| 212 | # Resizing containers: | 185 | # Resizing containers: |
| 213 | # | ||
| 214 | mode "resize" { | 186 | mode "resize" { |
| 215 | # left will shrink the containers width | 187 | # left will shrink the containers width |
| 216 | # right will grow the containers width | 188 | # right will grow the containers width |
| @@ -233,57 +205,64 @@ mode "resize" { | |||
| 233 | } | 205 | } |
| 234 | bindsym $mod+r mode "resize" | 206 | bindsym $mod+r mode "resize" |
| 235 | 207 | ||
| 236 | # | 208 | # Screenshot |
| 237 | # Status Bar: | 209 | #bindsym $alt+Shift+4 exec grim -g "$(slurp)" - | wl-copy |
| 238 | # | 210 | # bindsym $alt+Shift+4 exec grim -g "$(slurp)" /tmp/ss.png && ~/bin/linode-uploader /tmp/ss.png && rm /tmp/ss.png |
| 239 | # Read `man 5 sway-bar` for more information about this section. | 211 | |
| 240 | bar { | 212 | # Volume Control |
| 241 | position bottom | 213 | # bindsym XF86AudioLowerVolume exec ~/.config/sway/scripts/volume_down.sh |
| 242 | 214 | # bindsym XF86AudioRaiseVolume exec ~/.config/sway/scripts/volume_up.sh | |
| 243 | # When the status_command prints a new line to stdout, swaybar updates. | 215 | # 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 |
| 244 | # The default just shows the current date and time. | 216 | |
| 245 | # status_command while ~/.config/sway/scripts/statusbar.sh; do sleep 10; done | 217 | ############################################################################### |
| 246 | # colors { | 218 | # Status Bar |
| 247 | # statusline #ffffff | 219 | |
| 248 | # background #323232 | 220 | bar swaybar_command waybar |
| 249 | # inactive_workspace #32323200 #32323200 #5c5c5c | 221 | # # Read `man 5 sway-bar` for more information about this section. |
| 250 | # } | 222 | # bar { |
| 251 | swaybar_command waybar | 223 | # position top |
| 252 | } | 224 | |
| 225 | # # When the status_command prints a new line to stdout, swaybar updates. | ||
| 226 | # # The default just shows the current date and time. | ||
| 227 | # status_command while date +'%Y-%m-%d %X'; do sleep 1; done | ||
| 228 | |||
| 229 | # colors { | ||
| 230 | # statusline #ffffff | ||
| 231 | # background #323232 | ||
| 232 | # inactive_workspace #32323200 #32323200 #5c5c5c | ||
| 233 | # } | ||
| 234 | # } | ||
| 235 | |||
| 236 | ############################################################################### | ||
| 237 | # App Configuration | ||
| 238 | |||
| 239 | # Float the Intellij splash screen | ||
| 240 | for_window [class="jetbrains-idea" title="win0"] floating enable; | ||
| 241 | # for_window [class="^jetbrains-.+"][window_type=dialog] focus | ||
| 242 | for_window [class="^jetbrains-idea"][window_type="floating_con"] focus | ||
| 243 | for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 | ||
| 244 | |||
| 245 | # Fix the Firefox cursor theme | ||
| 246 | # exec_always gsettings set org.gnome.desktop.interface cursor-theme "Pop" | ||
| 247 | |||
| 248 | # Fix giant mic sharing indicator by making it small and sticky until it's | ||
| 249 | # fixed in Firefox. | ||
| 250 | # for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable | ||
| 251 | |||
| 252 | # Fix issue with GPG pinentry | ||
| 253 | # exec_always dbus-update-activation-environment DISPLAY XAUTHORITY | ||
| 254 | |||
| 255 | # Fix slow loading GTK+ apps, waybar, and GPG pinentry | ||
| 256 | # exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK | ||
| 257 | # exec hash dbus-update-activation-environment 2>/dev/null && \ | ||
| 258 | # dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XAUTHORITY | ||
| 259 | |||
| 260 | ############################################################################### | ||
| 261 | # Startup Apps | ||
| 262 | exec [ ! "$(pidof pipewire)" ] && pipewire | ||
| 263 | exec [ ! "$(pidof syncthing)" ] && syncthing serve | ||
| 264 | |||
| 265 | #exec mako # notifications | ||
| 266 | #exec kanshi # autorandr | ||
| 253 | 267 | ||
| 254 | # | 268 | # include /etc/sway/config.d/* \ No newline at end of file |
| 255 | # App Configuration: | ||
| 256 | # | ||
| 257 | # Float the Intellij splash screen | ||
| 258 | for_window [class="jetbrains-idea" title="win0"] floating enable; | ||
| 259 | # for_window [class="^jetbrains-.+"][window_type=dialog] focus | ||
| 260 | for_window [class="^jetbrains-idea"][window_type="floating_con"] focus | ||
| 261 | for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 | ||
| 262 | |||
| 263 | # Fix the cursor theme in Firefox | ||
| 264 | exec_always gsettings set org.gnome.desktop.interface cursor-theme "Pop" | ||
| 265 | # Fix the giant mic sharing indicator by making it small and sticky until | ||
| 266 | # it's fixed in firefox | ||
| 267 | for_window [title="\ -\ Sharing\ Indicator$"] floating enable, sticky enable | ||
| 268 | |||
| 269 | # Fix issue with GPG pinentry | ||
| 270 | #exec_always dbus-update-activation-environment DISPLAY XAUTHORITY | ||
| 271 | # Fix slow loading GTK+ apps, waybar, and GPG pinentry | ||
| 272 | exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK | ||
| 273 | exec hash dbus-update-activation-environment 2>/dev/null && \ | ||
| 274 | dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XAUTHORITY | ||
| 275 | |||
| 276 | #exec nm-applet | ||
| 277 | #exec blueman-applet | ||
| 278 | #exec run_keybase -a | ||
| 279 | #exec sleep 1 && keepassxc | ||
| 280 | ##exec pasystray | ||
| 281 | #exec mako # notifications | ||
| 282 | #exec kanshi # autorandr | ||
| 283 | # Clipboard manager with wofi | ||
| 284 | # Broken until wlroots 0.13.0 (libwlroots8) | ||
| 285 | # https://github.com/swaywm/wlroots/pull/2739/files | ||
| 286 | #exec wl-paste -t text --watch clipman store | ||
| 287 | #bindsym $alt+Ctrl+v exec clipman pick -t wofi | ||
| 288 | |||
| 289 | include @sysconfdir@/sway/config.d/* | ||
diff --git a/sway/.config/waybar/config b/sway/.config/waybar/config.jsonc index 21f1f68..d1df43d 100644 --- a/sway/.config/waybar/config +++ b/sway/.config/waybar/config.jsonc | |||
| @@ -1,43 +1,80 @@ | |||
| 1 | // -*- mode: jsonc -*- | ||
| 1 | { | 2 | { |
| 2 | "layer": "top", // Waybar at top layer | 3 | |
| 4 | "layer": "top", // `bottom` to have waybar behind windows | ||
| 3 | "position": "bottom", // Waybar position (top|bottom|left|right) | 5 | "position": "bottom", // Waybar position (top|bottom|left|right) |
| 4 | "height": 25, // Waybar height (to be removed for auto height) | 6 | // "height": 30, |
| 5 | // "width": 1280, // Waybar width | 7 | // "width": 1280, |
| 8 | // "spacing": 2, // Gaps between modules (4px) | ||
| 6 | // Choose the order of the modules | 9 | // Choose the order of the modules |
| 7 | "modules-left": ["sway/workspaces"], | 10 | "modules-left": [ |
| 8 | //"modules-center": ["sway/window"], | 11 | "sway/workspaces", |
| 9 | "modules-center": [], | 12 | "sway/mode", |
| 10 | "modules-right": ["pulseaudio", "backlight", "battery", "idle_inhibitor", "tray", "clock"], | 13 | "sway/scratchpad", |
| 11 | // "modules-right": ["mpd", "idle_inhibitor", "pulseaudio", "cpu", "memory", "temperature", "battery", "backlight", "clock", "tray"], | 14 | "custom/media" |
| 15 | ], | ||
| 16 | // "modules-center": [ | ||
| 17 | // "sway/window" | ||
| 18 | // ], | ||
| 19 | "modules-right": [ | ||
| 20 | "network", | ||
| 21 | "cpu", | ||
| 22 | "memory", | ||
| 23 | // "temperature", | ||
| 24 | "wireplumber", | ||
| 25 | "backlight", | ||
| 26 | "bluetooth", | ||
| 27 | // "keyboard-state", | ||
| 28 | // "sway/language", | ||
| 29 | "battery", | ||
| 30 | // "battery#bat2", | ||
| 31 | "power-profiles-daemon", | ||
| 32 | "idle_inhibitor", | ||
| 33 | "clock", | ||
| 34 | "tray" | ||
| 35 | ], | ||
| 12 | // Modules configuration | 36 | // Modules configuration |
| 13 | "sway/workspaces": { | 37 | // "sway/workspaces": { |
| 14 | "disable-scroll": true, | 38 | // "disable-scroll": true, |
| 15 | "all-outputs": false, | 39 | // "all-outputs": true, |
| 16 | "format": "{name}: {icon}", | 40 | // "warp-on-scroll": false, |
| 41 | // "format": "{name}: {icon}", | ||
| 42 | // "format-icons": { | ||
| 43 | // "1": "", | ||
| 44 | // "2": "", | ||
| 45 | // "3": "", | ||
| 46 | // "4": "", | ||
| 47 | // "5": "", | ||
| 48 | // "urgent": "", | ||
| 49 | // "focused": "", | ||
| 50 | // "default": "" | ||
| 51 | // } | ||
| 52 | // }, | ||
| 53 | "keyboard-state": { | ||
| 54 | "numlock": true, | ||
| 55 | "capslock": true, | ||
| 56 | "format": "{name} {icon}", | ||
| 17 | "format-icons": { | 57 | "format-icons": { |
| 18 | "1": "", | 58 | "locked": "", |
| 19 | "2": "", | 59 | "unlocked": "" |
| 20 | "7": "", | ||
| 21 | "10": "", | ||
| 22 | "urgent": "", | ||
| 23 | "focused": "", | ||
| 24 | "default": "" | ||
| 25 | } | 60 | } |
| 26 | }, | 61 | }, |
| 27 | "sway/mode": { | 62 | "sway/mode": { |
| 28 | "format": "<span style=\"italic\">{}</span>" | 63 | "format": "<span style=\"italic\">{}</span>" |
| 29 | }, | 64 | }, |
| 30 | // "custom/warp": { | 65 | "sway/scratchpad": { |
| 31 | // "format": "Warp: {}", | 66 | "format": "{icon} {count}", |
| 32 | // "interval": 30, | 67 | "show-empty": false, |
| 33 | // "exec": "warp-cli status | grep Status | awk '{print $3}'", | 68 | "format-icons": ["", ""], |
| 34 | // }, | 69 | "tooltip": true, |
| 70 | "tooltip-format": "{app}: {title}" | ||
| 71 | }, | ||
| 35 | "mpd": { | 72 | "mpd": { |
| 36 | "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ", | 73 | "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", |
| 37 | "format-disconnected": "Disconnected ", | 74 | "format-disconnected": "Disconnected ", |
| 38 | "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", | 75 | "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", |
| 39 | "unknown-tag": "N/A", | 76 | "unknown-tag": "N/A", |
| 40 | "interval": 2, | 77 | "interval": 5, |
| 41 | "consume-icons": { | 78 | "consume-icons": { |
| 42 | "on": " " | 79 | "on": " " |
| 43 | }, | 80 | }, |
| @@ -52,9 +89,8 @@ | |||
| 52 | "on": "1 " | 89 | "on": "1 " |
| 53 | }, | 90 | }, |
| 54 | "state-icons": { | 91 | "state-icons": { |
| 55 | // reversed to show the action to take since it's clickable | 92 | "paused": "", |
| 56 | "paused": "", | 93 | "playing": "" |
| 57 | "playing": "" | ||
| 58 | }, | 94 | }, |
| 59 | "tooltip-format": "MPD (connected)", | 95 | "tooltip-format": "MPD (connected)", |
| 60 | "tooltip-format-disconnected": "MPD (disconnected)" | 96 | "tooltip-format-disconnected": "MPD (disconnected)" |
| @@ -67,17 +103,13 @@ | |||
| 67 | } | 103 | } |
| 68 | }, | 104 | }, |
| 69 | "tray": { | 105 | "tray": { |
| 70 | "icon-size": 21, | 106 | // "icon-size": 21, |
| 71 | "spacing": 10 | 107 | "spacing": 10 |
| 72 | }, | 108 | }, |
| 73 | //"custom/clock": { | ||
| 74 | // "exec": "date +'%a, %b %d %H:%M:%S %Z'", | ||
| 75 | // "interval": 10 | ||
| 76 | //}, | ||
| 77 | "clock": { | 109 | "clock": { |
| 78 | "interval": 60, | 110 | // "timezone": "America/New_York", |
| 79 | "format": "{:%a, %b %d %H:%M %Z}", | 111 | "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", |
| 80 | "max-length": 25 | 112 | "format-alt": "{:%Y-%m-%d}" |
| 81 | }, | 113 | }, |
| 82 | "cpu": { | 114 | "cpu": { |
| 83 | "format": "{usage}% ", | 115 | "format": "{usage}% ", |
| @@ -91,26 +123,22 @@ | |||
| 91 | // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", | 123 | // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", |
| 92 | "critical-threshold": 80, | 124 | "critical-threshold": 80, |
| 93 | // "format-critical": "{temperatureC}°C {icon}", | 125 | // "format-critical": "{temperatureC}°C {icon}", |
| 94 | "format": "{temperatureC}°C {icon}", | 126 | "format": "{temperatureF}°F {icon}", |
| 95 | "format-icons": ["", "", ""] | 127 | "format-icons": ["", "", ""] |
| 96 | }, | 128 | }, |
| 97 | "backlight": { | 129 | "backlight": { |
| 98 | // find in /sys/class/backlight | ||
| 99 | "device": "amdgpu_bl1", | ||
| 100 | // "device": "acpi_video1", | 130 | // "device": "acpi_video1", |
| 101 | "format": "{percent}% {icon}", | 131 | "format": "{percent}% {icon}", |
| 102 | "format-icons": ["", ""] | 132 | "format-icons": ["", "", "", "", "", "", "", "", ""] |
| 103 | }, | 133 | }, |
| 104 | "battery": { | 134 | "battery": { |
| 105 | // find in /sys/class/power_supply | ||
| 106 | "bat": "BAT1", | ||
| 107 | //"adapter": "AC", | ||
| 108 | "states": { | 135 | "states": { |
| 109 | // "good": 95, | 136 | // "good": 95, |
| 110 | "warning": 15, | 137 | "warning": 30, |
| 111 | "critical": 10 | 138 | "critical": 15 |
| 112 | }, | 139 | }, |
| 113 | "format": "{capacity}% {icon}", | 140 | "format": "{capacity}% {icon}", |
| 141 | "format-full": "{capacity}% {icon}", | ||
| 114 | "format-charging": "{capacity}% ", | 142 | "format-charging": "{capacity}% ", |
| 115 | "format-plugged": "{capacity}% ", | 143 | "format-plugged": "{capacity}% ", |
| 116 | "format-alt": "{time} {icon}", | 144 | "format-alt": "{time} {icon}", |
| @@ -121,10 +149,32 @@ | |||
| 121 | "battery#bat2": { | 149 | "battery#bat2": { |
| 122 | "bat": "BAT2" | 150 | "bat": "BAT2" |
| 123 | }, | 151 | }, |
| 152 | "bluetooth": { | ||
| 153 | "format": " {status}", | ||
| 154 | "format-connected": " {device_alias}", | ||
| 155 | "format-connected-battery": " {device_alias} {device_battery_percentage}%", | ||
| 156 | // "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device | ||
| 157 | "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", | ||
| 158 | "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", | ||
| 159 | "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", | ||
| 160 | "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" | ||
| 161 | }, | ||
| 162 | "power-profiles-daemon": { | ||
| 163 | "format": "{icon}", | ||
| 164 | "tooltip-format": "Power profile: {profile}\nDriver: {driver}", | ||
| 165 | "tooltip": true, | ||
| 166 | "format-icons": { | ||
| 167 | "default": "", | ||
| 168 | "performance": "", | ||
| 169 | "balanced": "", | ||
| 170 | "power-saver": "" | ||
| 171 | } | ||
| 172 | }, | ||
| 124 | "network": { | 173 | "network": { |
| 125 | // "interface": "wlp2*", // (Optional) To force the use of this interface | 174 | // "interface": "wlp2*", // (Optional) To force the use of this interface |
| 126 | "format-wifi": "{essid} ({signalStrength}%) ", | 175 | "format-wifi": "{essid} ({signalStrength}%) ", |
| 127 | "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", | 176 | "format-ethernet": "{ipaddr}/{cidr} ", |
| 177 | "tooltip-format": "{ifname} via {gwaddr} ", | ||
| 128 | "format-linked": "{ifname} (No IP) ", | 178 | "format-linked": "{ifname} (No IP) ", |
| 129 | "format-disconnected": "Disconnected ⚠", | 179 | "format-disconnected": "Disconnected ⚠", |
| 130 | "format-alt": "{ifname}: {ipaddr}/{cidr}" | 180 | "format-alt": "{ifname}: {ipaddr}/{cidr}" |
| @@ -148,6 +198,12 @@ | |||
| 148 | }, | 198 | }, |
| 149 | "on-click": "pavucontrol" | 199 | "on-click": "pavucontrol" |
| 150 | }, | 200 | }, |
| 201 | "wireplumber": { | ||
| 202 | "format": "{volume}% {icon}", | ||
| 203 | "format-muted": "", | ||
| 204 | // "on-click": "helvum", | ||
| 205 | "format-icons": ["", "", ""] | ||
| 206 | }, | ||
| 151 | "custom/media": { | 207 | "custom/media": { |
| 152 | "format": "{icon} {}", | 208 | "format": "{icon} {}", |
| 153 | "return-type": "json", | 209 | "return-type": "json", |
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 @@ | |||
| 1 | * { | ||
| 2 | border: none; | ||
| 3 | border-radius: 0; | ||
| 4 | font-family: "Noto Sans Mono", "Font Awesome 5 Free", "Font Awesome 5 Brands"; | ||
| 5 | font-size: 14px; | ||
| 6 | min-height: 0; | ||
| 7 | } | ||
| 8 | |||
| 9 | window#waybar { | ||
| 10 | background: rgba(43, 48, 59, 0.5); | ||
| 11 | border-bottom: 3px solid rgba(100, 114, 125, 0.5); | ||
| 12 | color: white; | ||
| 13 | } | ||
| 14 | |||
| 15 | #workspaces button { | ||
| 16 | padding: 0 5px; | ||
| 17 | background: transparent; | ||
| 18 | color: white; | ||
| 19 | border-bottom: 3px solid transparent; | ||
| 20 | } | ||
| 21 | |||
| 22 | #workspaces button.focused { | ||
| 23 | background: #64727D; | ||
| 24 | border-bottom: 3px solid white; | ||
| 25 | } | ||
| 26 | |||
| 27 | #mode, #clock, #custom-clock, #battery { | ||
| 28 | padding: 0 10px; | ||
| 29 | margin: 0 5px; | ||
| 30 | } | ||
| 31 | #network, #pulseaudio, #backlight, #temperature, #memory, #cpu, #idle_inhibitor { | ||
| 32 | padding: 0 7px; | ||
| 33 | } | ||
| 34 | |||
| 35 | #mode { | ||
| 36 | background: #64727D; | ||
| 37 | border-bottom: 3px solid white; | ||
| 38 | } | ||
| 39 | |||
| 40 | #custom-clock, #clock { | ||
| 41 | background-color: #64727D; | ||
| 42 | } | ||
| 43 | |||
| 44 | /*#battery { | ||
| 45 | background-color: #ffffff; | ||
| 46 | color: black; | ||
| 47 | }*/ | ||
| 48 | |||
| 49 | #battery.charging { | ||
| 50 | color: white; | ||
| 51 | background-color: #26A65B; | ||
| 52 | } | ||
| 53 | |||
| 54 | @keyframes blink { | ||
| 55 | to { | ||
| 56 | background-color: #ffffff; | ||
| 57 | color: black; | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | #battery.warning:not(.charging) { | ||
| 62 | background: #f53c3c; | ||
| 63 | color: white; | ||
| 64 | animation-name: blink; | ||
| 65 | animation-duration: 0.5s; | ||
| 66 | animation-timing-function: linear; | ||
| 67 | animation-iteration-count: infinite; | ||
| 68 | animation-direction: alternate; | ||
| 69 | } | ||