new dmenu screen/display selection

This commit is contained in:
Luke Smith 2018-04-06 23:22:10 -07:00
parent c69028fa0d
commit 1a09b34fe5
4 changed files with 37 additions and 3 deletions

View file

@ -40,7 +40,7 @@ exec --no-startup-id compton --xrender-sync-fence
#Try to load VGA screen if available:
exec --no-startup-id screen.sh v
#Launch Polybar where appropriate:
exec_always --no-startup-id ~/.config/polybar/launch.sh
exec_always --no-startup-id ~/.scripts/polybar_launch
#Runs the key remapping scripts
exec --no-startup-id ~/.scripts/remaps
#Unclutter makes the mouse invisible after a brief period
@ -329,7 +329,7 @@ no_focus [title="mpvfloat"]
# #---Function Buttons---# #
bindsym $mod+F1 exec --no-startup-id mupdf ~/.config/i3/i3_guide.pdf
bindsym $mod+F2 restart
bindsym $mod+F3 exec --no-startup-id arandr
bindsym $mod+F3 exec --no-startup-id displayselect
bindsym $mod+F4 exec --no-startup-id sudo zzz
bindsym $mod+F5 exec --no-startup-id $netrefresh
bindsym $mod+F6 exec --no-startup-id $term -e transmission-remote-cli

View file

@ -60,6 +60,8 @@ Be sure you play around with these. Be flexible with the basic commands and the
+ Mod+T -- Restore gaps to default (15 pixels)
+ Mod+Shift+Space -- Make a window float (you can still resize and move floating windows with the same keys above)
+ Mod+Space -- Switch focus from a floating window to a non-floating one (or vice versa)
+ Mod+o -- Make floating window sticky (will stay on active workspace)
+ Mod+b -- Make window float in bottom left corner (good for video watched intermittently)
## Basic Programs
@ -92,7 +94,7 @@ Be sure you play around with these. Be flexible with the basic commands and the
+ Mod+Shift+Escape -- exit i3 (will give a dmenu confirm prompt)
+ Mod+F1 -- Shows this document
+ Mod+F2 -- Refresh i3
+ Mod+F3 -- arandr (For adding screens/HDMI/VGA connections)
+ Mod+F3 -- Select screen/display to use
+ Mod+F4 -- Hibernate
+ Mod+F6 -- transmission torrent client (cli)
+ Mod+F5 -- Reset Network Manager, search for new networks

16
.scripts/displayselect Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
choices="laptop\nlaptopdual\nVGA\nHDMI\nManual selection"
chosen=$(echo -e "$choices" | dmenu -i
)
case "$chosen" in
laptopdual) xrandr --output LVDS-1 --auto --output VGA-1 --auto --right-of LVDS-1 ;;
laptop) xrandr --output LVDS-1 --auto --output VGA-1 --off ;;
VGA) xrandr --output VGA-1 --auto --output LVDS-1 --off ;;
HDMI) xrandr --output HDMI-1 --auto --output LVDS-1 --off ;;
"Manual selection") arandr ;;
esac
polybar_launch

16
.scripts/polybar_launch Executable file
View file

@ -0,0 +1,16 @@
#!/bin/sh
#!/usr/bin/env sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
#polybar example &
for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar example -c ~/.config/polybar/config & done
feh --bg-scale ~/.config/wall.png
echo "Bars launched..."