remove waybar elements, add and modify scripts, add mult. monitor support
Christian Krinitsin code@krinitsin.xyz
Wed, 12 Jun 2024 20:04:26 +0200
6 files changed,
61 insertions(+),
12 deletions(-)
M
bin/bluetooth-devices
→
bin/bluetooth-devices
@@ -10,9 +10,9 @@ local MAC=$1
local DEVICE=$2 if bluetoothctl connect $MAC | grep -q 'successful' then - notify-send -t 5000 -r 2954 -u normal " Connected successfully from" " $DEVICE" + notify-send -t 5000 -r 2954 -u normal " Connected successfully to" " $DEVICE" else - notify-send -t 5000 -r 2954 -u normal " Couldn't connect from" " $DEVICE" + notify-send -t 5000 -r 2954 -u normal " Couldn't connect to" " $DEVICE" fi }
M
bin/screenshot
→
bin/screenshot
@@ -1,7 +1,7 @@
#!/bin/sh # -# Takes a screenshot with grimshot, in clipboard or in home directory +# Takes a screenshot with grimshot, in clipboard or in given directory # MODE=$(printf "copy\nsave" | dmenu)@@ -13,9 +13,29 @@ fi
case "$MODE" in *save*) - grimshot save area ~/"screenshot-$(date +%F)-$(date +%T).png" && notify-send "screenshot-$(date +%F)-$(date +%T).png" "saved" + cd $HOME + while true; do + selected_dir=$(ls | dmenu -i) + if [ -z "$selected_dir" ]; then + exit 0 + fi + + if [ -d "$selected_dir" ]; then + cd "$selected_dir" + continue + fi + + if [ -e "$selected_dir" ]; then + notify-send "Error: File exists!" + exit 0 + fi + + break + done + + grimshot save area "$PWD/$selected_dir.png" && notify-send "$PWD/$selected_dir.png" "saved" ;; *copy*) - grimshot copy area && notify-send "Screenshot copied" + grimshot copy area && notify-send "Screenshot copied" ;; esac
A
bin/toggle_monitor_focus
@@ -0,0 +1,21 @@
+#!/bin/bash + +# Get the currently focused output +current_output=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') + +# Get the list of outputs +outputs=($(swaymsg -t get_outputs | jq -r '.[].name')) + +# Find the index of the currently focused output +for i in "${!outputs[@]}"; do + if [[ "${outputs[$i]}" == "$current_output" ]]; then + current_index=$i + break + fi +done + +# Calculate the index of the next output +next_index=$(( (current_index + 1) % ${#outputs[@]} )) + +# Focus the next output +swaymsg focus output "${outputs[$next_index]}"
M
sway/.config/sway/config
→
sway/.config/sway/config
@@ -32,7 +32,6 @@ bindsym $mod+b split h
bindsym $mod+v split v bindsym $mod+f fullscreen toggle bindsym $mod+s layout stacking -bindsym $mod+g layout tabbed bindsym $mod+e layout toggle split bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle@@ -82,6 +81,17 @@ bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 +workspace 1 output DP-1 +workspace 2 output DP-1 +workspace 3 output DP-1 +workspace 4 output DP-1 +workspace 5 output DP-1 +workspace 6 output HDMI-A-2 +workspace 7 output HDMI-A-2 +workspace 8 output HDMI-A-2 +workspace 9 output HDMI-A-2 +workspace 0 output HDMI-A-2 + # resize mode bindsym $mod+r mode "resize" mode "resize" {@@ -135,6 +145,7 @@ bindsym $mod+w exec qtb-load-session
bindsym $mod+Shift+s exec run-spotify-player bindsym $mod+Shift+p exec passmenu bindsym $mod+Ctrl+w exec random-wallpaper +bindsym $mod+u exec toggle_monitor_focus # autostart exec --no-startup-id /usr/bin/dunst
M
waybar/.config/waybar/config
→
waybar/.config/waybar/config
@@ -4,7 +4,7 @@ "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 20, // Waybar height (to be removed for auto height) "spacing": 2, // Gaps between modules (4px) "modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad", "custom/media"], - "modules-right": ["custom/pacman", "mpd", "pulseaudio", "network", "cpu", "memory", "disk", "temperature", "battery", "clock", "tray"], + "modules-right": ["pulseaudio", "network", "cpu", "memory", "disk", "temperature", "battery", "clock"], "keyboard-state": { "numlock": true,
M
zathura/.config/zathura/zathurarc
→
zathura/.config/zathura/zathurarc
@@ -2,11 +2,8 @@ set window-title-basename "true"
set selection-clipboard "clipboard" set sandbox none -# Dracula color theme for Zathura -# Swaps Foreground for Background to get a light version if the user prefers - # -# Dracula color theme +# Everforest color theme # set notification-error-bg "#ff5555" # Red@@ -54,4 +51,4 @@ #
# Startup options # set adjust-open width -set recolor true +set recolor false