summaryrefslogtreecommitdiffstats
path: root/.config/i3
diff options
context:
space:
mode:
Diffstat (limited to '.config/i3')
-rw-r--r--.config/i3/config37
-rwxr-xr-x.config/i3/kb-lights.py35
-rw-r--r--.config/i3/lock.pngbin7897 -> 0 bytes
-rwxr-xr-x.config/i3/lock.sh34
4 files changed, 20 insertions, 86 deletions
diff --git a/.config/i3/config b/.config/i3/config
index e9d0f89..5724b1c 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -11,16 +11,19 @@
# YouTube: https://youtube.com/c/LukeSmithxyz
# Github: https://github.com/LukeSmithxyz
-# Be sure that you have your $BROWSER environmental variable set to your favorite browser.
-# E.g., put `export BROWSER="firefox"` into your ~/.bash_profile
+# This config file will use environmental variables such as $BROWSER and $TERMINAL.
+# You can set these variables in ~/.profile or ~/.bash_profile if you have it as below:
+#
+# export BROWSER="firefox"
+# export TERMINAL="st"
# #---Basic Definitions---# #
# Needed for i3-gaps
for_window [class="^.*"] border pixel 1
gaps inner 15
gaps outer 15
+set $term --no-startup-id $TERMINAL
set $mod Mod4
-set $term --no-startup-id st
set $stoprec --no-startup-id killrecording
set $shutdown sudo shutdown -h now
set $reboot sudo reboot
@@ -84,7 +87,7 @@ bar {
background $darkblack
statusline $darkwhite
separator $cyan
- focused_workspace $blue $darkblue $darkwhite
+ focused_workspace $blue $darkblue $darkblack
active_workspace $blue $blue $darkwhite
inactive_workspace $darkblack $darkblack $white
urgent_workspace $darkblack $darkblack $white
@@ -112,7 +115,7 @@ bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Are you sure you want
##bindsym $mod+asciitilde
#STOP/HIDE EVERYTHING:
-bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec $truepause ; workspace lmao ; exec $term -e htop ; exec $term -e ranger
+bindsym $mod+Shift+Delete exec --no-startup-id lmc truemute ; exec $truepause ; exec --no-startup-id pauseallmpv; workspace 0; exec $term -e htop ; exec $term -e ranger
# #---Letter Key Bindings---# #
bindsym $mod+q [con_id="__focused__" instance="^(?!math|dropdown).*$"] kill
@@ -143,7 +146,7 @@ bindsym $mod+o sticky toggle
bindsym $mod+Shift+o exec --no-startup-id "bash ~/.scripts/i3resize right"
bindsym $mod+p exec --no-startup-id lmc toggle
-#bindsym $mod+Shift+p
+bindsym $mod+Shift+p exec --no-startup-id lmc pause
bindsym $mod+a [instance="math"] scratchpad show; [instance="math"] move position center
bindsym $mod+Shift+a exec $term -e pulsemixer
@@ -179,7 +182,7 @@ bindsym $mod+Shift+l move right 30
bindsym $mod+z gaps outer current plus 5
bindsym $mod+Shift+z gaps outer current minus 5
-bindsym $mod+x exec --no-startup-id ~/.config/i3/lock.sh
+bindsym $mod+x exec --no-startup-id lockscreen
bindsym $mod+Shift+x exec --no-startup-id prompt "Are you sure you want to shutdown?" "$shutdown"
bindsym $mod+c exec --no-startup-id camtoggle
@@ -266,7 +269,7 @@ for_window [title="Default - Wine desktop"] floating enable
for_window [instance="dropdown"] floating enable
for_window [instance="dropdown"] resize set 625 400
for_window [instance="dropdown"] move scratchpad
-for_window [instance="dropdown"] border pixel 5
+for_window [instance="dropdown"] border pixel 3
# Runs the tmuxinit script, which searches for an earlier tmux instance,
# otherwise starts a new one (to prevent multiple dropdown sessions).
exec --no-startup-id $term -n dropdown -e tmuxinit
@@ -276,7 +279,7 @@ exec --no-startup-id $term -n dropdown -e tmuxinit
for_window [instance="math"] floating enable
for_window [instance="math"] resize set 800 300
for_window [instance="math"] move scratchpad
-for_window [instance="math"] border pixel 5
+for_window [instance="math"] border pixel 2
exec --no-startup-id $term -n math -f mono:pixelsize=24 -e dropdowncalc
# Bindings to make the webcam float and stick.
@@ -347,14 +350,14 @@ bindsym XF86PowerOff exec --no-startup-id prompt "Are you sure you want to shut
##bindsym XF86Cut exec
##bindsym XF86MenuKB exec
bindsym XF86Calculator exec $term -e R -q
-bindsym XF86Sleep exec $hibernate
+##bindsym XF86Sleep This binding is typically mapped by systemd automatically.
##bindsym XF86WakeUp exec
bindsym XF86Explorer exec $term -e ranger
##bindsym XF86Send exec
##bindsym XF86Xfer exec
bindsym XF86WWW exec --no-startup-id $BROWSER
##bindsym XF86DOS exec
-bindsym XF86ScreenSaver exec exec --no-startup-id ~/.config/i3/lock.sh
+bindsym XF86ScreenSaver exec exec --no-startup-id lockscreen
##bindsym XF86RotateWindows exec
##bindsym XF86TaskPane exec
##bindsym XF86Favorites exec
@@ -387,10 +390,10 @@ bindsym XF86Reload restart
##bindsym XF86Launch8 exec
##bindsym XF86Launch9 exec
#bindsym XF86AudioMicMute exec $micmute
-##bindsym XF86TouchpadToggle exec
-bindsym XF86TouchpadOn exec --no-startup-id exec synclient TouchpadOff=0
-bindsym XF86TouchpadOff exec --no-startup-id exec synclient TouchpadOff=1
-bindsym XF86Suspend exec --no-startup-id ~/.config/i3/lock.sh
+bindsym XF86TouchpadToggle exec --no-startup-id toggletouchpad
+bindsym XF86TouchpadOn exec --no-startup-id synclient TouchpadOff=0
+bindsym XF86TouchpadOff exec --no-startup-id synclient TouchpadOff=1
+bindsym XF86Suspend exec --no-startup-id lockscreen
bindsym XF86Close kill
bindsym XF86WebCam exec --no-startup-id camtoggle
bindsym XF86Mail exec $term -e neomutt
@@ -405,8 +408,8 @@ bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15
bindsym XF86AudioMedia exec --no-startup-id st -e ncmpcpp
bindsym XF86Display exec --no-startup-id arandr
#bindsym XF86KbdLightOnOff exec
-bindsym XF86KbdBrightnessDown exec --no-startup-id python3.6 ~/.i3/kb-lights.py -
-bindsym XF86KbdBrightnessUp exec --no-startup-id python3.6 ~/.i3/kb-lights.py +
+bindsym XF86KbdBrightnessDown exec --no-startup-id python3.6 ~/.scripts/kb-lights.py -
+bindsym XF86KbdBrightnessUp exec --no-startup-id python3.6 ~/.scripts/kb-lights.py +
##bindsym XF86Reply exec
##bindsym XF86MailForward exec
##bindsym XF86Save exec
diff --git a/.config/i3/kb-lights.py b/.config/i3/kb-lights.py
deleted file mode 100755
index f492de0..0000000
--- a/.config/i3/kb-lights.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python3
-# coding: utf-8
-
-from sys import argv
-import dbus
-
-
-def kb_light_set(delta):
- bus = dbus.SystemBus()
- kbd_backlight_proxy = bus.get_object('org.freedesktop.UPower', '/org/freedesktop/UPower/KbdBacklight')
- kbd_backlight = dbus.Interface(kbd_backlight_proxy, 'org.freedesktop.UPower.KbdBacklight')
-
- current = kbd_backlight.GetBrightness()
- maximum = kbd_backlight.GetMaxBrightness()
- new = max(0, current + delta)
-
- if 0 <= new <= maximum:
- current = new
- kbd_backlight.SetBrightness(current)
-
- # Return current backlight level percentage
- return 100 * current / maximum
-
-if __name__ == '__main__':
- if len(argv[1:]) == 1:
- if argv[1] == "--up" or argv[1] == "+":
- # ./kb-light.py (+|--up) to increment
- print(kb_light_set(1))
- elif argv[1] == "--down" or argv[1] == "-":
- # ./kb-light.py (-|--down) to decrement
- print(kb_light_set(-1))
- else:
- print("Unknown argument:", argv[1])
- else:
- print("Script takes exactly one argument.", len(argv[1:]), "arguments provided.")
diff --git a/.config/i3/lock.png b/.config/i3/lock.png
deleted file mode 100644
index b09875d..0000000
--- a/.config/i3/lock.png
+++ /dev/null
Binary files differ
diff --git a/.config/i3/lock.sh b/.config/i3/lock.sh
deleted file mode 100755
index f154487..0000000
--- a/.config/i3/lock.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-# Approximate timeout rate in milliseconds (checked every 5 seconds).
-timeout="10000"
-
-# Take a screenshot of every screen available:
-scrot -m -z /tmp/lock.png
-xdpyinfo -ext XINERAMA | sed '/^ head #/!d;s///' |
-{
- cmd="convert /tmp/lock.png"
- cmdend=""
- while IFS=' :x@,' read i w h x y; do
- cmd+=" -region ${w}x$h+$x+$y -paint 1 -swirl 360"
- xc=$((x+(w/2)-79))
- yc=$((y+(h/2)-79))
- cmdend+=" ~/.config/i3/lock.png -geometry +${xc}+${yc} -composite -matte"
- done
- cmd+="${cmdend} /tmp/screen.png"
-
- eval $cmd
-}
-
-# Pause music (mocp and mpd):
-mocp -P
-mpc pause
-
-# Lock it up!
-i3lock -e -f -c 000000 -i /tmp/screen.png
-
-# If still locked after $timeout milliseconds, turn off screen.
-while [[ $(pgrep -x i3lock) ]]; do
- [[ $timeout -lt $(xssstate -i) ]] && xset dpms force off
- sleep 5
-done