i3 config revamp; updated wallpaper references to live in ~/.config/wryn

This commit is contained in:
Wryn Wagner 2020-09-17 22:12:05 -06:00
parent 05dd913b1d
commit a2290edec2
12 changed files with 116 additions and 107 deletions

View File

@ -1,93 +1,98 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $CONFIG /home/w0ryn/.config/wryn
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 6
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
################################################################################
## Media Keys ##################################################################
################################################################################
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
# Audio
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
bindsym XF86AudioRewind exec --no-startup-id youtube-media-controls prev
bindsym XF86AudioForward exec --no-startup-id youtube-media-controls next
bindsym XF86AudioPlay exec --no-startup-id youtube-media-controls playpause
bindsym XF86AudioRewind exec --no-startup-id $CONFIG/prev
bindsym XF86AudioPrev exec --no-startup-id $CONFIG/prev
bindsym XF86AudioForward exec --no-startup-id $CONFIG/next
bindsym XF86AudioNext exec --no-startup-id $CONFIG/next
bindsym XF86AudioPlay exec --no-startup-id $CONFIG/playpause
bindsym $mod+backslash exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Screen brightness
bindsym XF86MonBrightnessUp exec $CONFIG/backlightup
bindsym XF86MonBrightnessDown exec $CONFIG/backlightdown
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
################################################################################
## Window Management and Navigation ############################################
################################################################################
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+space exec --no-startup-id dmenu_run
# change focus and move window
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# split in horizontal/vertical orientation
bindsym $mod+b split h
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
bindsym $mod+Shift+f focus parent; fullscreen; focus child
mode "resize" {
bindsym h resize grow width 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# change focus between tiling / floating windows
bindsym $mod+d focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
################################################################################
## Workspace Management and Navigation #########################################
################################################################################
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
@ -99,7 +104,6 @@ set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
@ -111,7 +115,6 @@ bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
@ -123,56 +126,40 @@ bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
################################################################################
## i3 Settings #################################################################
################################################################################
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -B 'Yes' 'i3-msg exit'"
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Do you really want to exit i3 and end X session?' -B 'Yes' 'i3-msg exit'"
bindsym $mod+Shift+c reload
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym h resize grow width 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink width 10 px or 10 ppt
# i3-gaps settings
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
for_window [class="^.*"] border pixel 2
gaps inner 5
gaps outer 5
bindsym $mod+r mode "resize"
bindsym $mod+p exec --no-startup-id feh --recursive --randomize --bg-fill /home/w0ryn/.wallpaper/*
# Set parent container to full screen
bindsym $mod+Shift+f focus parent; fullscreen; focus child
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
# Use gmux_backlight to increase/decrease brightness
bindsym XF86MonBrightnessUp exec gmux_backlight +100
bindsym XF86MonBrightnessDown exec gmux_backlight -100
# Microphone Toggle
bindsym $mod+backslash exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Terminal / Application Launcher
# Composite
exec --no-startup-id compton
bindsym $mod+Return exec i3-sensible-terminal
# Settings for gaps
for_window [class="^.*"] border pixel 2
gaps inner 5
gaps outer 5
bindsym $mod+space exec --no-startup-id dmenu_run -fn 'DejaVu Sans Mono-25'
################################################################################
## Miscellaneous ###############################################################
################################################################################
exec --no-startup-id nm-applet # network-manager-applet
exec --no-startup-id compton # composite
bindsym $mod+p exec feh --recursive --randomize --bg-fill $CONFIG/wallpaper/*
bindsym $mod+Shift+minus exec $CONFIG/lock

View File

@ -0,0 +1 @@
gmux_backlight -100

View File

@ -0,0 +1 @@
gmux_backlight +100

28
config/i3/utils/lock-screen.sh Executable file
View File

@ -0,0 +1,28 @@
# requires i3lock-color
INSIDE_VER='001020'
RING_VER='004040'
INSIDE_WRONG='200010'
RING_WRONG='4a0020'
INSIDE='002010'
RING='103020'
LINE='8888ff'
KEYDOWN='44ff44'
KEYREMOVE='4444ff'
TIME='aaaaaa'
DATE='888888'
i3lock\
-e\
--pass-screen-keys --pass-media-keys --pass-volume-keys --pass-power-keys\
-B 6\
--force-clock\
--insidevercolor=$INSIDE_VER --ringvercolor=$RING_VER --verifcolor=$INSIDE_VER\
--insidewrongcolor=$INSIDE_WRONG --ringwrongcolor=$RING_WRONG --wrongcolor=$INSIDE_WRONG\
--insidecolor=002010 --ringcolor=103020\
--linecolor=$LINE\
--timecolor=$TIME --datecolor=$DATE\
--keyhlcolor=$KEYDOWN --bshlcolor=$KEYREMOVE\
;

View File

@ -0,0 +1 @@
xbacklight - 10

View File

@ -0,0 +1 @@
xbacklight + 10

View File

@ -17,4 +17,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$CURRENT_M
xrandr --output $display --off;
done;
feh --bg-fill --randomize $HOME/.wallpaper;
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;

View File

@ -1,5 +1,4 @@
#!/bin/sh
NATIVE_MONITOR='eDP1';
#!/bin/sh NATIVE_MONITOR='eDP1';
CONNECTED_MONITOR=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1);
MONITOR_DIRECTION='--above'; # left-of, below, above, right-of
@ -14,11 +13,13 @@ xrandr\
--mode $(xrandr | grep -A 2 "$NATIVE_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
;
sleep 0.5
xrandr\
--output "$CONNECTED_MONITOR"\
--rotate normal\
$MONITOR_DIRECTION $NATIVE_MONITOR\
--mode $(xrandr | grep -A 2 "$CONNECTED_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
--mode $(xrandr | grep -A 2 "^$CONNECTED_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
;
@ -26,4 +27,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$NATIVE_MO
xrandr --output $display --off;
done;
feh --recursive --bg-fill --randomize $HOME/.wallpaper;
feh --recursive --bg-fill --randomize $HOME/.config/wryn/wallpaper;

View File

@ -15,4 +15,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$HOMEDOCK_
xrandr --output $display --off;
done;
feh --bg-fill --randomize $HOME/.wallpaper;
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;

View File

@ -12,4 +12,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$NATIVE_MO
xrandr --output $display --off;
done;
feh --bg-fill --randomize $HOME/.wallpaper;
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;

View File

@ -2,29 +2,18 @@
source $HOME/.wryn/env/env.zsh
XSERVER_DIR="$DOTWRYN/config/xserver"
AT_HOME(){
xrandr -q | grep -q 'HDMI-0 connected' && xrandr -q | grep -q '3840';
xrandr -q | grep -q 'DP2-1 connected' && xrandr -q | grep -q '3840';
}
CONNECTED_TO_MONITOR() {
xrandr -q | grep -q 'HDMI-0 connected';
}
AT_RENT() {
xrandr -q | grep -q 'DP-[0134] connected';
xrandr -q | grep ' connected' | grep -v 'eDP1' -q;
}
if AT_HOME; then
"$XSERVER_DIR/screenlayout/homedock_hdmionly.sh";
"$XSERVER_DIR/screenlayout/homedock.sh";
elif CONNECTED_TO_MONITOR; then
if AT_RENT; then
"$XSERVER_DIR/screenlayout/workplus.sh";
else
"$XSERVER_DIR/screenlayout/hdmidock.sh";
fi
elif AT_RENT; then
"$XSERVER_DIR/screenlayout/workdock.sh";
"$XSERVER_DIR/screenlayout/hdmidock.sh" '--right-of';
else;
"$XSERVER_DIR/screenlayout/undock.sh";
fi

View File

@ -1,6 +1,6 @@
#!/bin/sh
CUSTOM_DMENU_COMMANDS="$HOME/.local/custom_dmenu"
[ ! -d $CUSTOM_DMENU_COMMANDS] && mkdir $CUSTOM_DMENU_COMMANDS
[ ! -d $CUSTOM_DMENU_COMMANDS ] && mkdir $CUSTOM_DMENU_COMMANDS
export PATH="$CUSTOM_DMENU_COMMANDS:$PATH"