aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2022-05-27 13:20:17 -0500
committerToby Vincent <tobyv13@gmail.com>2022-05-27 13:20:17 -0500
commita88d84acbe033152b1b41fbc0c518a46c2d51ff2 (patch)
treec96088a4156195391008b0295d1ef53fb2db1e65
parent2900f76121e55c807d40b45ea44ce2cc6bdf5590 (diff)
feat(sway): added battery to swaybar and improved swaylock
-rw-r--r--sway/.config/i3status-rust/config.toml21
-rw-r--r--sway/.config/sway/config35
-rw-r--r--sway/.config/sway/config.d/zoom.conf17
-rw-r--r--sway/.config/yofi/yofi.config20
-rwxr-xr-xsway/.local/bin/lock19
5 files changed, 96 insertions, 16 deletions
diff --git a/sway/.config/i3status-rust/config.toml b/sway/.config/i3status-rust/config.toml
index 8b08368..a09b4e1 100644
--- a/sway/.config/i3status-rust/config.toml
+++ b/sway/.config/i3status-rust/config.toml
@@ -1,3 +1,5 @@
+# theme = "gruvbox-dark"
+
[[block]]
block = "disk_space"
path = "/"
@@ -27,10 +29,21 @@ format = "{1m}"
block = "sound"
[[block]]
-block = "time"
-interval = 5
-format = "%a %d/%m %R"
+block = "battery"
+device = "/sys/class/power_supply/BAT0"
+if_command = "test -e /sys/class/power_supply/BAT0"
[[block]]
block = "battery"
-if_command = "test -e /sys/class/power_supply/BAT0" \ No newline at end of file
+device = "/sys/class/power_supply/BAT1"
+if_command = "test -e /sys/class/power_supply/BAT1"
+
+[[block]]
+block = "battery"
+device = "/sys/class/power_supply/BAT2"
+if_command = "test -e /sys/class/power_supply/BAT2"
+
+[[block]]
+block = "time"
+interval = 5
+format = "%a %d/%m %R"
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index dabb227..1317826 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -2,7 +2,15 @@
# Set logo key as main modifier
set $mod Mod4
+
+# Terminal
+set $term $TERMINAL
+
+# Menu
set $menu yofi apps | xargs swaymsg exec --
+set $menu_all yofi binapps | xargs swaymsg exec --
+# set $menu exec app-launcher | xargs swaymsg exec --
+# set $menu j4-dmenu-desktop | wofi --show drun -i | xargs swaymsg exec --
# Home row direction keys, like vim
set $left h
@@ -13,9 +21,10 @@ set $right l
# Colors
set $foreground #c0caf5
set $highlight #bb9af7
-# set $wallpaper @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png
-# set $lock_cmd swaylock --daemonize --image $wallpaper
-set $lock_cmd swaylock --daemonize
+set $wallpaper ~/img/3840x2160-dark-archlinux.png
+
+# System commands
+set $lock_cmd ~/.local/bin/lock
set $sleep_cmd systemctl suspend
# Set color for focused window
@@ -24,8 +33,8 @@ client.focused $highlight $highlight $foreground
### Output configuration
# Set wallpaper
-# output * bg $wallpaper fill
-
+output * bg $wallpaper fill
+# output * bg `find $wallpapers -type f | shuf -n 1` fill
### Idle configuration
# Lock the screen after 300 seconds of inactivity, then turn off
@@ -42,6 +51,9 @@ exec swayidle -w \
# Inhibit idle if a window is in fullscreen
for_window [shell=".*"] inhibit_idle fullscreen
+# Set launcher window to floating
+for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 2
+
### Input configuration
# Mouse
@@ -68,7 +80,8 @@ input type:keyboard {
bindsym $mod+Shift+e exec swaynag -t warning -m 'Do you really want to exit sway?' -B 'Yes, exit sway' 'swaymsg exit'
# App launcher
-bindsym $mod+space exec $menu
+bindsym $mod+space exec $menu
+bindsym $mod+shift+space exec $menu_all
# Launch terminal
bindsym $mod+Return exec $TERMINAL
@@ -163,7 +176,7 @@ mode 'resize' {
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
-
+
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
@@ -185,7 +198,7 @@ default_border pixel
hide_edge_borders smart
# Start notification daemon
-# exec mako
+exec mako
# Start display management daemon
# exec kanshi
@@ -194,8 +207,8 @@ hide_edge_borders smart
# exec gammastep -l '46.95:7.45'
# Clipboard manager
-# exec wl-paste --type text --watch clipman store
-# bindsym $mod+v exec clipman pick --tool wofi
+exec wl-paste --type text --watch clipman store --no-persist
+bindsym $mod+v exec clipman pick --tool=CUSTOM --tool-args='yofi dialog'
-include @sysconfdir@/sway/config.d/* \ No newline at end of file
+include @sysconfdir@/sway/config.d/*
diff --git a/sway/.config/sway/config.d/zoom.conf b/sway/.config/sway/config.d/zoom.conf
new file mode 100644
index 0000000..a7684e6
--- /dev/null
+++ b/sway/.config/sway/config.d/zoom.conf
@@ -0,0 +1,17 @@
+# ~/.config/sway/config.d/zoom.us.conf
+#
+# Zoom Meeting App
+#
+# Default for all windows is non-floating.
+#
+
+# For pop up notification windows that don't use notifications api
+for_window [app_id="zoom" title="^zoom$"] border none, floating enable
+
+# For specific Zoom windows
+for_window [app_id="zoom" title="^(Zoom|About)$"] border pixel, floating enable
+for_window [app_id="zoom" title="Settings"] floating enable, floating_minimum_size 960 x 700
+
+# Open Zoom Meeting windows on a new workspace (a bit hacky)
+for_window [app_id="zoom" title="Zoom Meeting(.*)?"] workspace next_on_output --create, move container to workspace current, floating disable, inhibit_idle open
+
diff --git a/sway/.config/yofi/yofi.config b/sway/.config/yofi/yofi.config
index 0784178..34f3ae3 100644
--- a/sway/.config/yofi/yofi.config
+++ b/sway/.config/yofi/yofi.config
@@ -1 +1,19 @@
-font = "DejaVu Sans" \ No newline at end of file
+font = "DejaVu Sans"
+# font = "Fira Code Nerd Font"
+
+bg_color = 0x282828aa
+
+[input_text]
+font_color = 0xf8f8f2ff
+bg_color = 0x75715eff
+
+[list_items]
+font_color = 0xebdbb2ff
+selected_font_color = 0xfe8019ff
+# match_color = 0xd65d0eff
+# hide_actions = true
+
+[icon]
+size = 16
+theme = "Adwaita"
+fallback_icon_path = "/usr/share/icons/Adwaita/16x16/categories/applications-engineering-symbolic.symbolic.png"
diff --git a/sway/.local/bin/lock b/sway/.local/bin/lock
new file mode 100755
index 0000000..3568947
--- /dev/null
+++ b/sway/.local/bin/lock
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+swaylock \
+ --daemonize \
+ --screenshots \
+ --clock \
+ --indicator \
+ --indicator-radius 100 \
+ --indicator-thickness 7 \
+ --effect-blur 7x5 \
+ --effect-vignette 0.5:0.5 \
+ --ring-color bb00cc \
+ --key-hl-color 880033 \
+ --line-color 00000000 \
+ --inside-color 00000088 \
+ --separator-color 00000000 \
+ --grace 10 \
+ --fade-in 1
+