From 1eb781ce84ac3c81e5a8aad2580a5a75309627dc Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 10 Jan 2024 15:29:37 +0800 Subject: [PATCH] Sway and xdg-desktop-portal-wlr --- .config/sway/conf.d/exec | 2 +- .config/sway/conf.d/keybinds | 8 ++++---- .config/systemd/user/ssh-agent.service | 10 ++++++++++ .config/xdg-desktop-portal-wlr/config | 6 ++++++ 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 .config/systemd/user/ssh-agent.service create mode 100644 .config/xdg-desktop-portal-wlr/config diff --git a/.config/sway/conf.d/exec b/.config/sway/conf.d/exec index b70e785..feb413a 100644 --- a/.config/sway/conf.d/exec +++ b/.config/sway/conf.d/exec @@ -4,7 +4,7 @@ # exec_always sh -c ~/.config/sway/scripts/update-wallpaper.sh exec mkfifo /tmp/kitty exec wlsunset -s 19:00 -S 07:00 -d 1800 -exec light -S 70 +exec xbacklight -set 70 exec playerctld daemon include /usr/local/etc/sway/config.d/* diff --git a/.config/sway/conf.d/keybinds b/.config/sway/conf.d/keybinds index 5dbb2d1..9a89c29 100644 --- a/.config/sway/conf.d/keybinds +++ b/.config/sway/conf.d/keybinds @@ -39,10 +39,10 @@ exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob bindsym XF86AudioRaiseVolume exec wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 2%+ && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1 | awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && ~/.config/sway/scripts/getmute.sh > $SWAYSOCK.wob -bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob -bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob -bindsym XF86KbdBrightnessUp exec light -s sysfs/leds/asus::kbd_backlight -S 67 -bindsym XF86KbdBrightnessDown exec light -s sysfs/leds/asus::kbd_backlight -S 0 +bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && xbacklight -get | cut -d'.' -f1 > $SWAYSOCK.wob +bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && xbacklight -get | cut -d'.' -f1 > $SWAYSOCK.wob +bindsym XF86KbdBrightnessUp exec xbacklight -ctrl asus::kbd_backlight -inc 33 +bindsym XF86KbdBrightnessDown exec xbacklight -ctrl asus::kbd_backlight -dec 33 bindsym XF86AudioPause exec 'playerctl pause' bindsym XF86AudioPlay exec 'playerctl play' diff --git a/.config/systemd/user/ssh-agent.service b/.config/systemd/user/ssh-agent.service new file mode 100644 index 0000000..9428410 --- /dev/null +++ b/.config/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=simple +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target diff --git a/.config/xdg-desktop-portal-wlr/config b/.config/xdg-desktop-portal-wlr/config new file mode 100644 index 0000000..8bf8ec7 --- /dev/null +++ b/.config/xdg-desktop-portal-wlr/config @@ -0,0 +1,6 @@ +[screencast] +max_fps=60 +exec_before=swaynag -m "Screen sharing enabled" -e bottom --background b16286 --text dbdbb2 --button-background b16286 --button-text ebdbb2 --border ebdbb2 --button-border-size 2 +; exec_after=enable_notifications.sh +chooser_type=simple +chooser_cmd=slurp -f %o -or