Created dedicated wallapers.sh script and added betterlockscreen to i3

This commit is contained in:
Random936 2024-02-14 21:38:42 -08:00
parent 64432a0a40
commit 5974ae879e
3 changed files with 23 additions and 31 deletions

View File

@ -3,10 +3,9 @@ set $mod Mod4
# Set font # Set font
font pango:monospace 8 font pango:monospace 8
# Init i3 lock and enable autolock # Configure betterlockscreen
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id "betterlockscreen -l dim -u $HOME/Pictures"
exec --no-startup-id xset dpms 600 bindsym $mod+Shift+x exec "betterlockscreen -l dim -w"
exec --no-startup-id xautolock -time 10 -locker i3lock
# Use pactl to adjust volume in PulseAudio. # Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status set $refresh_i3status killall -SIGUSR1 i3status
@ -37,24 +36,12 @@ bindsym $mod+k focus up
bindsym $mod+j focus down bindsym $mod+j focus down
bindsym $mod+l focus right bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window # move focused window
bindsym $mod+Shift+h move left bindsym $mod+Shift+h move left
bindsym $mod+Shift+k move up bindsym $mod+Shift+k move up
bindsym $mod+Shift+j move down bindsym $mod+Shift+j move down
bindsym $mod+Shift+l move right bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation # split in horizontal orientation
bindsym $mod+semicolon split h bindsym $mod+semicolon split h
@ -155,11 +142,11 @@ bindsym l resize shrink width 10 px or 10 ppt
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# Brightness keys setup # Brightness keys setup
bindsym XF86MonBrightnessDown exec --no-startup-id "sudo $HOME/.scripts/brightness.sh -5" bindsym XF86MonBrightnessDown exec --no-startup-id "doas $HOME/.scripts/brightness.sh -5"
bindsym XF86MonBrightnessUp exec --no-startup-id "sudo $HOME/.scripts/brightness.sh 5" bindsym XF86MonBrightnessUp exec --no-startup-id "doas $HOME/.scripts/brightness.sh 5"
# Window Cosmetic Changes # Window Cosmetic Changes
gaps inner 10 gaps inner 5
new_window pixel 3 new_window pixel 3
client.focused #555555 #555555 #ffffff #333333 #0000ff client.focused #555555 #555555 #ffffff #333333 #0000ff
client.focused_inactive #333333 #222222 #888888 #292d2e #eeeeee client.focused_inactive #333333 #222222 #888888 #292d2e #eeeeee

View File

@ -1,16 +1,11 @@
#!/bin/bash #!/bin/bash
# Load screen layout script if it exists function load_script() {
script="$HOME/.screenlayout/layout.sh" if [ -f "$1" ]; then
if [ -f "$script" ]; then $1
$script
fi fi
}
# Dynamically load background with feh load_script "$HOME/.screenlayout/layout.sh" # screen layout script
feh_command="feh --bg-fill" load_script "$HOME/.screenlayout/wallpapers.sh" # wallpapers script
while read resolution; do
feh_command="$feh_command ~/Pictures/wallpaper-$resolution.jpg"
done < <(xrandr | grep ' connected' | grep -oP '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+' | cut -d '+' -f 1)
echo "$feh_command"
eval "$feh_command"

View File

@ -0,0 +1,10 @@
#!/bin/bash
# Dynamically load background with feh
feh_command="feh --bg-fill"
while read resolution; do
feh_command="$feh_command ~/Pictures/wallpaper-$resolution.jpg"
done < <(xrandr | grep ' connected' | grep -oP '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+' | cut -d '+' -f 1)
echo "$feh_command"
eval "$feh_command"