i3 config revamp; updated wallpaper references to live in ~/.config/wryn
This commit is contained in:
parent
05dd913b1d
commit
a2290edec2
155
config/i3/config
155
config/i3/config
@ -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)
|
# i3 config file (v4)
|
||||||
#
|
#
|
||||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
|
||||||
set $mod Mod4
|
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
|
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).
|
## Media Keys ##################################################################
|
||||||
#font pango:DejaVu Sans Mono 8
|
################################################################################
|
||||||
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
# Audio
|
||||||
# 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.
|
|
||||||
set $refresh_i3status killall -SIGUSR1 i3status
|
set $refresh_i3status killall -SIGUSR1 i3status
|
||||||
|
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_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 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 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 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 XF86AudioRewind exec --no-startup-id $CONFIG/prev
|
||||||
bindsym XF86AudioForward exec --no-startup-id youtube-media-controls next
|
bindsym XF86AudioPrev exec --no-startup-id $CONFIG/prev
|
||||||
bindsym XF86AudioPlay exec --no-startup-id youtube-media-controls playpause
|
|
||||||
|
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
|
# Screen brightness
|
||||||
floating_modifier $mod
|
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
|
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+h focus left
|
||||||
bindsym $mod+j focus down
|
bindsym $mod+j focus down
|
||||||
bindsym $mod+k focus up
|
bindsym $mod+k focus up
|
||||||
bindsym $mod+l focus right
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
bindsym $mod+Shift+h move left
|
bindsym $mod+Shift+h move left
|
||||||
bindsym $mod+Shift+j move down
|
bindsym $mod+Shift+j move down
|
||||||
bindsym $mod+Shift+k move up
|
bindsym $mod+Shift+k move up
|
||||||
bindsym $mod+Shift+l move right
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
# split in horizontal/vertical orientation
|
|
||||||
bindsym $mod+b split h
|
bindsym $mod+b split h
|
||||||
bindsym $mod+v split v
|
bindsym $mod+v split v
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
bindsym $mod+f fullscreen toggle
|
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)
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
bindsym $mod+s layout stacking
|
bindsym $mod+s layout stacking
|
||||||
bindsym $mod+w layout tabbed
|
bindsym $mod+w layout tabbed
|
||||||
bindsym $mod+e layout toggle split
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
# toggle tiling / floating
|
||||||
bindsym $mod+Shift+space floating toggle
|
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
|
# change focus between tiling / floating windows
|
||||||
bindsym $mod+d focus mode_toggle
|
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 $ws1 "1"
|
||||||
set $ws2 "2"
|
set $ws2 "2"
|
||||||
set $ws3 "3"
|
set $ws3 "3"
|
||||||
@ -99,7 +104,6 @@ set $ws8 "8"
|
|||||||
set $ws9 "9"
|
set $ws9 "9"
|
||||||
set $ws10 "10"
|
set $ws10 "10"
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
bindsym $mod+1 workspace number $ws1
|
bindsym $mod+1 workspace number $ws1
|
||||||
bindsym $mod+2 workspace number $ws2
|
bindsym $mod+2 workspace number $ws2
|
||||||
bindsym $mod+3 workspace number $ws3
|
bindsym $mod+3 workspace number $ws3
|
||||||
@ -111,7 +115,6 @@ bindsym $mod+8 workspace number $ws8
|
|||||||
bindsym $mod+9 workspace number $ws9
|
bindsym $mod+9 workspace number $ws9
|
||||||
bindsym $mod+0 workspace number $ws10
|
bindsym $mod+0 workspace number $ws10
|
||||||
|
|
||||||
# move focused container to workspace
|
|
||||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
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+9 move container to workspace number $ws9
|
||||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
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
|
bindsym $mod+Shift+r restart
|
||||||
# exit i3 (logs you out of your X session)
|
bindsym $mod+Shift+c reload
|
||||||
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'"
|
|
||||||
|
|
||||||
# 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 window’s width.
|
# i3-gaps settings
|
||||||
# Pressing right will grow the window’s width.
|
|
||||||
# Pressing up will shrink the window’s height.
|
|
||||||
# Pressing down will grow the window’s 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
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape or $mod+r
|
for_window [class="^.*"] border pixel 2
|
||||||
bindsym Return mode "default"
|
gaps inner 5
|
||||||
bindsym Escape mode "default"
|
gaps outer 5
|
||||||
bindsym $mod+r mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
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 {
|
bar {
|
||||||
status_command i3status
|
status_command i3status
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use gmux_backlight to increase/decrease brightness
|
|
||||||
bindsym XF86MonBrightnessUp exec gmux_backlight +100
|
|
||||||
bindsym XF86MonBrightnessDown exec gmux_backlight -100
|
|
||||||
|
|
||||||
# Microphone Toggle
|
# Terminal / Application Launcher
|
||||||
bindsym $mod+backslash exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
||||||
|
|
||||||
# Composite
|
bindsym $mod+Return exec i3-sensible-terminal
|
||||||
exec --no-startup-id compton
|
|
||||||
|
|
||||||
# Settings for gaps
|
bindsym $mod+space exec --no-startup-id dmenu_run -fn 'DejaVu Sans Mono-25'
|
||||||
for_window [class="^.*"] border pixel 2
|
|
||||||
gaps inner 5
|
|
||||||
gaps outer 5
|
################################################################################
|
||||||
|
## 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
|
||||||
|
1
config/i3/utils/gmux-backlight-down.sh
Executable file
1
config/i3/utils/gmux-backlight-down.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
gmux_backlight -100
|
1
config/i3/utils/gmux-backlight-up.sh
Executable file
1
config/i3/utils/gmux-backlight-up.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
gmux_backlight +100
|
28
config/i3/utils/lock-screen.sh
Executable file
28
config/i3/utils/lock-screen.sh
Executable 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\
|
||||||
|
;
|
1
config/i3/utils/xbacklight-down.sh
Executable file
1
config/i3/utils/xbacklight-down.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
xbacklight - 10
|
1
config/i3/utils/xbacklight-up.sh
Executable file
1
config/i3/utils/xbacklight-up.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
xbacklight + 10
|
@ -17,4 +17,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$CURRENT_M
|
|||||||
xrandr --output $display --off;
|
xrandr --output $display --off;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
feh --bg-fill --randomize $HOME/.wallpaper;
|
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh NATIVE_MONITOR='eDP1';
|
||||||
NATIVE_MONITOR='eDP1';
|
|
||||||
CONNECTED_MONITOR=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1);
|
CONNECTED_MONITOR=$(xrandr | grep ' connect' | awk '{print $1;}' | grep -v "$NATIVE_MONITOR" | head -n 1);
|
||||||
|
|
||||||
MONITOR_DIRECTION='--above'; # left-of, below, above, right-of
|
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;}')\
|
--mode $(xrandr | grep -A 2 "$NATIVE_MONITOR" | sed -n '2 p' | awk '{print $1;}')\
|
||||||
;
|
;
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
|
||||||
xrandr\
|
xrandr\
|
||||||
--output "$CONNECTED_MONITOR"\
|
--output "$CONNECTED_MONITOR"\
|
||||||
--rotate normal\
|
--rotate normal\
|
||||||
$MONITOR_DIRECTION $NATIVE_MONITOR\
|
$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;
|
xrandr --output $display --off;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
feh --recursive --bg-fill --randomize $HOME/.wallpaper;
|
feh --recursive --bg-fill --randomize $HOME/.config/wryn/wallpaper;
|
||||||
|
@ -15,4 +15,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$HOMEDOCK_
|
|||||||
xrandr --output $display --off;
|
xrandr --output $display --off;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
feh --bg-fill --randomize $HOME/.wallpaper;
|
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;
|
||||||
|
@ -12,4 +12,4 @@ for display in $(xrandr | grep connect | awk '{print $1;}' | grep -v "$NATIVE_MO
|
|||||||
xrandr --output $display --off;
|
xrandr --output $display --off;
|
||||||
done;
|
done;
|
||||||
|
|
||||||
feh --bg-fill --randomize $HOME/.wallpaper;
|
feh --bg-fill --randomize $HOME/.config/wryn/wallpaper;
|
||||||
|
@ -2,29 +2,18 @@
|
|||||||
source $HOME/.wryn/env/env.zsh
|
source $HOME/.wryn/env/env.zsh
|
||||||
XSERVER_DIR="$DOTWRYN/config/xserver"
|
XSERVER_DIR="$DOTWRYN/config/xserver"
|
||||||
|
|
||||||
|
|
||||||
AT_HOME(){
|
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() {
|
CONNECTED_TO_MONITOR() {
|
||||||
xrandr -q | grep -q 'HDMI-0 connected';
|
xrandr -q | grep ' connected' | grep -v 'eDP1' -q;
|
||||||
}
|
|
||||||
|
|
||||||
AT_RENT() {
|
|
||||||
xrandr -q | grep -q 'DP-[0134] connected';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if AT_HOME; then
|
if AT_HOME; then
|
||||||
"$XSERVER_DIR/screenlayout/homedock_hdmionly.sh";
|
"$XSERVER_DIR/screenlayout/homedock.sh";
|
||||||
elif CONNECTED_TO_MONITOR; then
|
elif CONNECTED_TO_MONITOR; then
|
||||||
if AT_RENT; then
|
"$XSERVER_DIR/screenlayout/hdmidock.sh" '--right-of';
|
||||||
"$XSERVER_DIR/screenlayout/workplus.sh";
|
|
||||||
else
|
|
||||||
"$XSERVER_DIR/screenlayout/hdmidock.sh";
|
|
||||||
fi
|
|
||||||
elif AT_RENT; then
|
|
||||||
"$XSERVER_DIR/screenlayout/workdock.sh";
|
|
||||||
else;
|
else;
|
||||||
"$XSERVER_DIR/screenlayout/undock.sh";
|
"$XSERVER_DIR/screenlayout/undock.sh";
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user