aboutsummaryrefslogtreecommitdiff
path: root/config/sway
diff options
context:
space:
mode:
Diffstat (limited to 'config/sway')
-rw-r--r--config/sway/bindsym-launch6
-rw-r--r--config/sway/bindsym-media4
-rw-r--r--config/sway/bindsym-system8
-rw-r--r--config/sway/daemons2
-rwxr-xr-xconfig/sway/scripts/notes2
-rwxr-xr-xconfig/sway/scripts/pass6
-rwxr-xr-xconfig/sway/scripts/screenshot19
7 files changed, 35 insertions, 12 deletions
diff --git a/config/sway/bindsym-launch b/config/sway/bindsym-launch
index 01d8061..8572004 100644
--- a/config/sway/bindsym-launch
+++ b/config/sway/bindsym-launch
@@ -3,6 +3,8 @@
bindsym $mod+Return exec alacritty
# Start Firefox
bindsym $mod+Shift+Return exec firefox
+# Python
+bindsym $mod+c exec alacritty -e ipython
# start a program
bindsym $mod+d exec --no-startup-id wofi -Imi -S drun
@@ -13,13 +15,11 @@ bindsym $mod+t exec alacritty -e btop
bindsym $mod+Shift+t exec alacritty -e sudo powertop
# Passwords
bindsym $mod+Shift+w exec --no-startup-id ~/.config/sway/scripts/pass
-# Calendar
-bindsym $mod+c exec alacritty -t "Calendar" -e ikhal
# Notes
bindsym $mod+Shift+n exec --no-startup-id ~/.config/sway/scripts/notes
for_window [ title="notes-terminal-window" ] floating enable sticky enable
# Mail client
-bindsym $mod+m exec astroid
+bindsym $mod+m exec dodo
# Run and configure synchronization
diff --git a/config/sway/bindsym-media b/config/sway/bindsym-media
index 13026fc..b1159ef 100644
--- a/config/sway/bindsym-media
+++ b/config/sway/bindsym-media
@@ -12,8 +12,8 @@ for_window [ title="Pulsemixer" ] move position center
# Screen brightness controls
-bindsym XF86MonBrightnessUp exec --no-startup-id light -A 10
-bindsym XF86MonBrightnessDown exec --no-startup-id light -U 10
+bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
+bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-
# Media player controls
bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
diff --git a/config/sway/bindsym-system b/config/sway/bindsym-system
index 7afcb4c..79094be 100644
--- a/config/sway/bindsym-system
+++ b/config/sway/bindsym-system
@@ -13,10 +13,12 @@ mode "$mode_system" {
bindsym $mod+Shift+q mode "$mode_system"
-set $screenshot Screenshot: (s)elect or (d)desktop
+set $screenshot Screenshot: (s)elect or (w)indow or (o)tput or (d)desktop
mode "$screenshot" {
- bindsym --release d exec --no-startup-id grim, mode "default"
- bindsym --release s exec --no-startup-id sh -c "slurp | grim -g -", mode "default"
+ bindsym --locked s exec --no-startup-id ~/.config/sway/scripts/screenshot select, mode "default"
+ bindsym --locked w exec --no-startup-id ~/.config/sway/scripts/screenshot window, mode "default"
+ bindsym --locked o exec --no-startup-id ~/.config/sway/scripts/screenshot output, mode "default"
+ bindsym --locked d exec --no-startup-id ~/.config/sway/scripts/screenshot desktop, mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
diff --git a/config/sway/daemons b/config/sway/daemons
index 786fa70..a6579da 100644
--- a/config/sway/daemons
+++ b/config/sway/daemons
@@ -2,8 +2,10 @@
exec --no-startup-id {
kanshi
swayidle
+ waybar
dunst
}
for_window [class="Ferdi"] move scratchpad
exec ferdium
+exec sh -c 'if commad -v openrgb >/dev/null; then exec openrgb --startminimized; fi'
diff --git a/config/sway/scripts/notes b/config/sway/scripts/notes
index ebe2684..8f025fb 100755
--- a/config/sway/scripts/notes
+++ b/config/sway/scripts/notes
@@ -1,5 +1,5 @@
#!/bin/sh
cd ~/notes
find * -type f | wofi -d -p 'notes' | while read -r note; do
- nohup alacritty -e vim ~/notes/"$note" >/dev/null 2>&1 &
+ nohup alacritty -e nvim ~/notes/"$note" >/dev/null 2>&1 &
done
diff --git a/config/sway/scripts/pass b/config/sway/scripts/pass
index 06383b3..11700e6 100755
--- a/config/sway/scripts/pass
+++ b/config/sway/scripts/pass
@@ -1,6 +1,6 @@
#!/bin/sh
-find ~/.password-store -name .git -prune -o -type f -printf '%P\n' | \
- sed 's/\.gpg$//' | wofi -d -p 'Pass:' | \
+find ~/.password-store -name .git -prune -o -type f -printf '%P\n' |
+ sed 's/\.gpg$//' | wofi -d -p 'Pass:' |
while read -r psw; do
pass -c "$psw"
-done
+ done
diff --git a/config/sway/scripts/screenshot b/config/sway/scripts/screenshot
new file mode 100755
index 0000000..45086f1
--- /dev/null
+++ b/config/sway/scripts/screenshot
@@ -0,0 +1,19 @@
+#!/bin/sh
+case "${1:-}" in
+desktop)
+ exec grim
+ ;;
+output)
+ exec grim -o "$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')"
+ ;;
+window)
+ exec grim -g "$(swaymsg -t get_tree |
+ jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')"
+ # TODO the second variant is newer but doesn't work with my version of sway
+ exec grim -T "$(swaymsg -t get_tree |
+ jq -j '.. | select(.type?) | select(.focused).foreign_toplevel_identifier')"
+ ;;
+select)
+ exec grim -g "$(slurp)"
+ ;;
+esac