1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-12-22 00:38:11 +00:00

Simplified monitor setup and locking

This commit is contained in:
J. Fernando Sánchez 2017-12-05 20:27:11 +01:00
parent 074f9bcb3c
commit 0cd98dd54b
13 changed files with 38 additions and 43 deletions

3
.gitmodules vendored
View File

@ -8,3 +8,6 @@
[submodule "prezto"]
path = zsh/.zprezto
url = https://github.com/sorin-ionescu/prezto.git
[submodule "i3/.config/i3/i3blocks-contrib"]
path = i3/.config/i3/i3blocks-contrib
url = https://github.com/vivien/i3blocks-contrib.git

View File

@ -34,7 +34,7 @@ bindsym Control+Mod1+g exec --no-startup-id gvim
bindsym Control+Mod1+e exec --no-startup-id myemacs -c
bindsym $mod+Tab exec --no-startup-id winmenu.sh
bindsym Mod1+Tab exec --no-startup-id winmenu.sh
bindsym $mod+p [class="Nemo"] scratchpad show
bindsym $mod+p [class="Nemo|Thunar|Ranger"] scratchpad show
bindsym $mod+period [instance="emacs" title="^(?!myagenda$)"] scratchpad show
bindsym $mod+shift+comma exec --no-startup-id myemacs -nc --eval '(progn (find-file "~/Dropbox/Todo/org/rules.org") (org-agenda-list) (set-frame-name "myagenda"))'
bindsym $mod+c exec myemacs -n -e '(make-capture-frame)'
@ -66,11 +66,12 @@ bindsym $mod+o exec --no-startup-id filemenu $HOME
# Arandr magic
bindsym Mod1+F5 exec --no-startup-id monitors single
bindsym Mod1+F6 exec --no-startup-id monitors single HDMI
bindsym Mod1+F7 exec --no-startup-id monitors dual mirror
bindsym Mod1+F8 exec --no-startup-id monitors dual home
bindsym Mod1+F6 exec --no-startup-id monitors single-hdmi
bindsym Mod1+F7 exec --no-startup-id monitors dual-mirror
bindsym Mod1+F8 exec --no-startup-id monitors dual-home
bindsym Mod1+F9 exec --no-startup-id monitors dual
bindsym Mod1+F10 exec --no-startup-id xrandr --auto
bindsym Mod1+F11 exec --no-startup-id monitors # auto
# Move to displays
bindsym $mod+Mod1+j move workspace to output down
@ -262,7 +263,7 @@ for_window [class="^termite"] border 1px
for_window [class="^lxterminal"] border 1px
for_window [class="^xfce4-terminal"] border 1px
for_window [title="^scratch"] move to scratchpad
for_window [class="^Nemo" title="Home"] move to scratchpad;
for_window [class="^Nemo|Thunar|Ranger"] move to scratchpad;
#KDE
for_window [class="Plasma-desktop"] border none
for_window [class="krunner"] border none
@ -314,7 +315,7 @@ exec --no-startup-id nm-applet
exec --no-startup-id pasystray
exec --no-startup-id syndaemon -i 0.5 -d
exec --no-startup-id i3-sensible-terminal --title=scratch -e 'tmux attach'
exec --no-startup-id xautolock -time 10 -corners "----" -locker 'i3lock -t -c 000000 -i ~/Images/Wallpapers/wallpaper.png'
exec --no-startup-id i3-exit.sh autolock
exec --no-startup-id xfce4-power-manager
exec --no-startup-id xfsettingsd --sm-client-disable &
exec --no-startup-id clipit -n

@ -0,0 +1 @@
Subproject commit 343f881878327d7071c170139de79085d9247a66

View File

@ -60,12 +60,6 @@ separator=true
interval=30
instance=MemFree:
[memory]
label=MemTotal
separator=true
interval=30
instance=MemTotal:
#[memory]
#label=SWAP
#instance=swap

View File

@ -3,4 +3,4 @@ SCRIPT_DIR=/usr/lib/i3blocks
if [ ! -d "$SCRIPT_DIR" ]; then
SCRIPT_DIR=/usr/share/i3blocks
fi
SCRIPT_DIR=$SCRIPT_DIR i3blocks -c $HOME/.config/i3/i3blocks.conf
CONTRIB_PATH=$HOME/.config/i3/i3blocks-contrib SCRIPT_DIR=$SCRIPT_DIR i3blocks -c $HOME/.config/i3/i3blocks.conf

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --same-as eDP1 --output VGA1 --off

View File

@ -0,0 +1,3 @@
#!/bin/sh
xrandr --output VIRTUAL1 --off --output DP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 1920x0 --rotate normal --output VGA1 --off
xrandr --output "DVI-1-0" --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP1 --off --output DVI-1 --off --output DP1 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 1080x1080 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate left --output DP2 --mode 2560x1080 --pos 1080x0 --rotate normal

View File

@ -1,6 +1,14 @@
#!/bin/bash
case "$1" in
locknow)
scrot /tmp/screen.png
convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png
i3lock -e -i /tmp/screen.png
;;
autolock)
xautolock -time 10 -corners "----" -locker "$0 locknow"
;;
lock)
xautolock -locknow
;;

View File

@ -1,34 +1,9 @@
#!/bin/sh
case $1 in
"single")
case $2 in
"HDMI")
~/.screenlayout/gsi-single.sh
xrandr --output eDP1 --off --output DVI-1 --off --output DP1 --off --output HDMI1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;;
*)
#xrandr --auto --output eDP1 --primary --output DP1 --off
~/.screenlayout/gsi-single.sh
xrandr --output HDMI1 --off --output DVI-1 --off --output DP1 --off --output eDP1 --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;;
esac
;;
"dual")
case $2 in
"mirror")
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --same-as eDP1 --output VGA1 --off
;;
"home")
xrandr --output DP1 --off --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 0x1080 --rotate normal --output HDMI1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA1 --off
;;
*)
#xrandr --auto --output eDP1 --primary --right-of DP1
xrandr --output VIRTUAL1 --off --output DP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI1 --off --output eDP1 --mode 1920x1080 --pos 1920x0 --rotate normal --output VGA1 --off
xrandr --output "DVI-1-0" --off
;;
esac
;;
esac
if [ "$#" -lt 1 ]; then
ls -1 ~/.screenlayout | rofi -dmenu | xargs -I '{}' sh "$HOME/.screenlayout/{}" || exit
else
sh $HOME/.screenlayout/$1.sh
fi
if [ `command -v nitrogen` ]; then
nitrogen --restore
fi