New way of handling screens
Still not handled in workspace affectation though.
This commit is contained in:
parent
b3ae2e9a96
commit
694e8bffe3
10
config/i3/autorandrdefaultmenu
Executable file
10
config/i3/autorandrdefaultmenu
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
|
profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Default profile" "$@")
|
||||||
|
|
||||||
|
[[ -n $profile ]] || exit
|
||||||
|
|
||||||
|
autorandr --default "$profile"
|
||||||
|
|
10
config/i3/autorandrloadmenu
Executable file
10
config/i3/autorandrloadmenu
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
|
profile=$(echo -e "common\nhorizontal\nvertical\n$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Load profile" "$@")
|
||||||
|
|
||||||
|
[[ -n $profile ]] || exit
|
||||||
|
|
||||||
|
autorandr --load "$profile"
|
||||||
|
|
10
config/i3/autorandrremovemenu
Executable file
10
config/i3/autorandrremovemenu
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
|
profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Remove profile" "$@")
|
||||||
|
|
||||||
|
[[ -n $profile ]] || exit
|
||||||
|
|
||||||
|
autorandr --remove "$profile"
|
||||||
|
|
10
config/i3/autorandrsavemenu
Executable file
10
config/i3/autorandrsavemenu
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
shopt -s nullglob globstar
|
||||||
|
|
||||||
|
profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Save profile" "$@")
|
||||||
|
|
||||||
|
[[ -n $profile ]] || exit
|
||||||
|
|
||||||
|
autorandr --save "$profile"
|
||||||
|
|
|
@ -39,7 +39,7 @@ bindsym $mod+F2 exec --no-startup-id ~/.config/i3/dmenu_run
|
||||||
bindsym Mod1+F2 exec --no-startup-id ~/.config/i3/dmenu_run
|
bindsym Mod1+F2 exec --no-startup-id ~/.config/i3/dmenu_run
|
||||||
|
|
||||||
bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu
|
bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu
|
||||||
bindsym $mod+x exec --no-startup-id ~/.config/i3/clipmenu
|
#bindsym $mod+x exec --no-startup-id ~/.config/i3/clipmenu
|
||||||
bindsym $mod+asterisk exec --no-startup-id ~/.config/i3/sshmenu
|
bindsym $mod+asterisk exec --no-startup-id ~/.config/i3/sshmenu
|
||||||
bindsym $mod+dollar exec --no-startup-id ~/.config/i3/sshmenu root
|
bindsym $mod+dollar exec --no-startup-id ~/.config/i3/sshmenu root
|
||||||
|
|
||||||
|
@ -302,47 +302,21 @@ mode "Resize" {
|
||||||
|
|
||||||
bindsym $mod+r mode "Resize"
|
bindsym $mod+r mode "Resize"
|
||||||
|
|
||||||
set $background exec --no-startup-id feh --bg-fill $HOME/.config/i3/bg.jpg
|
set $mode_screen Screen setup [A] Auto [L] Load [S] Save [R] Remove [D] Default
|
||||||
bindsym $mod+Shift+a $background
|
bindsym $mod+t mode "$mode_screen"
|
||||||
set $mode_screen_select [V] VGA1 [H] HDMI1
|
mode "$mode_screen" {
|
||||||
mode "$mode_screen_select" {
|
bindsym a exec autorandr --change --force, mode "default"
|
||||||
bindsym v mode "$mode_screen_VGA1"
|
bindsym l exec ~/.config/i3/autorandrloadmenu, mode "default"
|
||||||
bindsym h mode "$mode_screen_HDMI1"
|
bindsym s exec ~/.config/i3/autorandrsavemenu, mode "default"
|
||||||
|
bindsym r exec ~/.config/i3/autorandrremovemenu, mode "default"
|
||||||
# back to normal: Enter or Escape
|
bindsym d exec ~/.config/i3/autorandrdefaultmenu, mode "default"
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+t mode "$mode_screen_select"
|
|
||||||
|
|
||||||
set $mode_screen_VGA1 VGA [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off
|
|
||||||
mode "$mode_screen_VGA1" {
|
|
||||||
bindsym r exec xrandr --output VGA1 --auto --right-of LVDS1; $background
|
|
||||||
bindsym l exec xrandr --output VGA1 --auto --left-of LVDS1; $background
|
|
||||||
bindsym u exec xrandr --output VGA1 --auto --above LVDS1; $background
|
|
||||||
bindsym d exec xrandr --output VGA1 --auto --below LVDS1; $background
|
|
||||||
bindsym c exec xrandr --output VGA1 --auto --same-as LVDS1; $background
|
|
||||||
bindsym o exec xrandr --output VGA1 --auto --off; $background
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
set $mode_screen_HDMI1 HDMI [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off
|
|
||||||
mode "$mode_screen_HDMI1" {
|
|
||||||
bindsym r exec xrandr --output HDMI1 --auto --right-of LVDS1; $background
|
|
||||||
bindsym l exec xrandr --output HDMI1 --auto --left-of LVDS1; $background
|
|
||||||
bindsym u exec xrandr --output HDMI1 --auto --above LVDS1; $background
|
|
||||||
bindsym d exec xrandr --output HDMI1 --auto --below LVDS1; $background
|
|
||||||
bindsym c exec xrandr --output HDMI1 --auto --same-as LVDS1; $background
|
|
||||||
bindsym o exec xrandr --output HDMI1 --auto --off; $background
|
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
# back to normal: Enter or Escape
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Screen temperature ("redness") setting
|
||||||
bindsym $mod+y mode "$mode_temp"
|
bindsym $mod+y mode "$mode_temp"
|
||||||
set $mode_temp Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue
|
set $mode_temp Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue
|
||||||
mode "$mode_temp" {
|
mode "$mode_temp" {
|
||||||
|
@ -378,26 +352,6 @@ set $13 #ae82ff
|
||||||
set $14 #66efd5
|
set $14 #66efd5
|
||||||
set $15 #cfd0c2
|
set $15 #cfd0c2
|
||||||
|
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status if available)
|
|
||||||
bar {
|
|
||||||
i3bar_command ~/.config/polybar/launch.sh
|
|
||||||
#mode hide
|
|
||||||
#status_command ~/c.sh
|
|
||||||
# wheel_up_cmd nop
|
|
||||||
# wheel_down_cmd nop
|
|
||||||
font pango:DejaVu Sans Mono 9
|
|
||||||
font pango:Sans 8
|
|
||||||
colors {
|
|
||||||
separator $08
|
|
||||||
background $00
|
|
||||||
statusline $fg
|
|
||||||
focused_workspace $02 $02 $bg
|
|
||||||
active_workspace $00 $03 $08
|
|
||||||
inactive_workspace $00 $08 $fg
|
|
||||||
urgent_workspace $00 $01 $fg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Inactivity settings
|
# Inactivity settings
|
||||||
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
|
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
|
||||||
bindsym $mod+F4 exec --no-startup-id xautolock -disable
|
bindsym $mod+F4 exec --no-startup-id xautolock -disable
|
||||||
|
@ -405,25 +359,17 @@ bindsym $mod+F5 exec --no-startup-id xautolock -enable
|
||||||
|
|
||||||
|
|
||||||
# Autostart applications
|
# Autostart applications
|
||||||
$background
|
exec --no-startup-id autorandr --change # Screen configuration and everything that depends on it
|
||||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Password remembering
|
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Password remembering
|
||||||
exec --no-startup-id gnome-keyring-daemon # Password remembering
|
exec --no-startup-id gnome-keyring-daemon # Password remembering
|
||||||
exec --no-startup-id numlockx on # Activate Num lock
|
exec --no-startup-id numlockx on # Activate Num lock
|
||||||
#exec --no-startup-id nm-applet # Network manager tray icon
|
#exec --no-startup-id nm-applet # Network manager tray icon
|
||||||
#exec --no-startup-id compton -b # Compositing manager
|
#exec --no-startup-id compton -b # Compositing manager
|
||||||
#exec --no-startup-id conky -c $HOME/.conky/status # Desktop widget
|
|
||||||
exec --no-startup-id unclutter # Hide mouse cursor after some time
|
exec --no-startup-id unclutter # Hide mouse cursor after some time
|
||||||
exec --no-startup-id dunst # Notifications
|
exec --no-startup-id dunst # Notifications
|
||||||
exec --no-startup-id $HOME/.config/i3/clipmenud # Clipboard manager
|
#exec --no-startup-id $HOME/.config/i3/clipmenud # Clipboard manager
|
||||||
exec --no-startup-id mpd # Music Player Daemon
|
exec --no-startup-id mpd # Music Player Daemon
|
||||||
|
|
||||||
# Autostart programs
|
|
||||||
#exec --no-startup-id i3-msg 'workspace $WS8; exec firefox --new-window tweetdeck.twitter.com'
|
|
||||||
#exec --no-startup-id i3-msg 'workspace $WS9; exec firefox --new-window rss.frogeye.fr'
|
|
||||||
#exec --no-startup-id clementine
|
|
||||||
#exec --no-startup-id evolution
|
|
||||||
#exec --no-startup-id pidgin
|
|
||||||
|
|
||||||
set $ignore #ff00000
|
set $ignore #ff00000
|
||||||
|
|
||||||
# Theme colors
|
# Theme colors
|
||||||
|
|
|
@ -31,14 +31,10 @@ whiteF = #cfd0c2
|
||||||
background = ${theme.blackB}
|
background = ${theme.blackB}
|
||||||
foreground = ${theme.foreground}
|
foreground = ${theme.foreground}
|
||||||
|
|
||||||
[bar/example]
|
[bar/base]
|
||||||
;separator = |
|
monitor = ${env:display:LVDS1}
|
||||||
monitor = ${env:MONITOR:LVDS1}
|
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 20
|
height = 20
|
||||||
;offset-x = 1%
|
|
||||||
;offset-y = 1%
|
|
||||||
;radius = 6.0
|
|
||||||
fixed-center = false
|
fixed-center = false
|
||||||
|
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
|
@ -60,12 +56,6 @@ font-1 = "DejaVu Sans:size=10;0"
|
||||||
font-2 = "DejaVu Sans Mono for Powerline:pixelsize=10;0"
|
font-2 = "DejaVu Sans Mono for Powerline:pixelsize=10;0"
|
||||||
|
|
||||||
modules-left = i3
|
modules-left = i3
|
||||||
modules-center = mpd
|
|
||||||
modules-right = cpu memory temperature eth wlan filesystem xbacklight volume battery date
|
|
||||||
|
|
||||||
tray-position = right
|
|
||||||
tray-padding = 2
|
|
||||||
tray-transparent = false
|
|
||||||
|
|
||||||
;wm-restack = bspwm
|
;wm-restack = bspwm
|
||||||
wm-restack = i3
|
wm-restack = i3
|
||||||
|
@ -82,6 +72,21 @@ bottom = true
|
||||||
|
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
|
|
||||||
|
[bar/primary]
|
||||||
|
inherit = bar/base
|
||||||
|
|
||||||
|
modules-right = cpu memory temperature eth wlan xbacklight volume battery date
|
||||||
|
|
||||||
|
tray-position = right
|
||||||
|
tray-padding = 2
|
||||||
|
tray-transparent = false
|
||||||
|
|
||||||
|
[bar/secondary]
|
||||||
|
inherit = bar/base
|
||||||
|
modules-center = mpd
|
||||||
|
modules-right = ethMore wlanMore filesystem xbacklight volume date
|
||||||
|
|
||||||
|
|
||||||
[module/filesystem]
|
[module/filesystem]
|
||||||
type = internal/fs
|
type = internal/fs
|
||||||
interval = 25
|
interval = 25
|
||||||
|
@ -148,7 +153,7 @@ format-paused = ${self.format-online}
|
||||||
format-stopped = <toggle>
|
format-stopped = <toggle>
|
||||||
|
|
||||||
label-song = %title% - %artist%
|
label-song = %title% - %artist%
|
||||||
label-song-maxlen = 25
|
label-song-maxlen = 35
|
||||||
label-song-ellipsis = true
|
label-song-ellipsis = true
|
||||||
|
|
||||||
label-time = %elapsed%/%total%
|
label-time = %elapsed%/%total%
|
||||||
|
@ -172,7 +177,7 @@ toggle-off-foreground = #55
|
||||||
|
|
||||||
[module/xbacklight]
|
[module/xbacklight]
|
||||||
type = internal/xbacklight
|
type = internal/xbacklight
|
||||||
output = LVDS1
|
output = ${env:display:LVDS1}
|
||||||
enable-scroll = true
|
enable-scroll = true
|
||||||
format = <ramp>
|
format = <ramp>
|
||||||
ramp-0 = 🌕
|
ramp-0 = 🌕
|
||||||
|
@ -213,19 +218,21 @@ interface = eth0
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|
||||||
format-connected = <label-connected>
|
format-connected = <label-connected>
|
||||||
;label-connected = %local_ip% (↑%upspeed% ↓%downspeed%)
|
|
||||||
label-connected = %local_ip%
|
label-connected = %local_ip%
|
||||||
format-connected-foreground = ${theme.blueF}
|
format-connected-foreground = ${theme.blueF}
|
||||||
|
|
||||||
format-disconnected =
|
format-disconnected =
|
||||||
|
|
||||||
|
[module/ethMore]
|
||||||
|
inherit = module/eth
|
||||||
|
label-connected = ↑%upspeed% ↓%downspeed%
|
||||||
|
|
||||||
[module/wlan]
|
[module/wlan]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
interface = wlan0
|
interface = wlan0
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|
||||||
format-connected = <ramp-signal> <label-connected>
|
format-connected = <ramp-signal> <label-connected>
|
||||||
;label-connected = %local_ip% %essid% (↑%upspeed% ↓%downspeed%)
|
|
||||||
label-connected = %local_ip% %essid%
|
label-connected = %local_ip% %essid%
|
||||||
format-connected-foreground = ${theme.cyanF}
|
format-connected-foreground = ${theme.cyanF}
|
||||||
|
|
||||||
|
@ -244,15 +251,16 @@ animation-packetloss-0 =
|
||||||
animation-packetloss-1 =
|
animation-packetloss-1 =
|
||||||
animation-packetloss-framerate = 500
|
animation-packetloss-framerate = 500
|
||||||
|
|
||||||
|
[module/wlanMore]
|
||||||
|
inherit = module/wlan
|
||||||
|
label-connected = ↑%upspeed% ↓%downspeed%
|
||||||
|
|
||||||
[module/date]
|
[module/date]
|
||||||
type = internal/date
|
type = internal/date
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|
||||||
date =
|
date = " %d/%m/%Y"
|
||||||
date-alt = " %d/%m/%Y"
|
time = %H:%M:%S
|
||||||
|
|
||||||
time = %H:%M
|
|
||||||
time-alt = %H:%M:%S
|
|
||||||
|
|
||||||
format = <label>
|
format = <label>
|
||||||
format-foreground = ${theme.cyanF}
|
format-foreground = ${theme.cyanF}
|
||||||
|
@ -304,7 +312,7 @@ ramp-capacity-4 =
|
||||||
[module/temperature]
|
[module/temperature]
|
||||||
type = internal/temperature
|
type = internal/temperature
|
||||||
thermal-zone = 2
|
thermal-zone = 2
|
||||||
warn-temperature = 60
|
warn-temperature = 70
|
||||||
|
|
||||||
format = <ramp> <label>
|
format = <ramp> <label>
|
||||||
format-foreground = ${theme.yellowB}
|
format-foreground = ${theme.yellowB}
|
||||||
|
|
|
@ -7,9 +7,17 @@ killall -q polybar
|
||||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||||
|
|
||||||
# Launch bar for each display
|
# Launch bar for each display
|
||||||
|
primary=$(xrandr | grep primary | head -1 | cut -d' ' -f1)
|
||||||
polybar -m | cut -d':' -f1 | while read display
|
polybar -m | cut -d':' -f1 | while read display
|
||||||
do
|
do
|
||||||
MONITOR=$display polybar example &
|
export display=$display
|
||||||
|
if [ "$display" == "$primary" ]
|
||||||
|
then
|
||||||
|
bar="primary"
|
||||||
|
else
|
||||||
|
bar="secondary"
|
||||||
|
fi
|
||||||
|
polybar $bar &
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Bars launched..."
|
echo "Bars launched..."
|
||||||
|
|
|
@ -229,9 +229,9 @@ if [ $GUI == 1 ]; then
|
||||||
# Desktop manager
|
# Desktop manager
|
||||||
inst i3 i3lock i3status dunst unclutter xautolock feh numlockx scrot
|
inst i3 i3lock i3status dunst unclutter xautolock feh numlockx scrot
|
||||||
if [ $ARCH == 1 ]; then
|
if [ $ARCH == 1 ]; then
|
||||||
altInst polybar-git ttf-font-awesome
|
altInst polybar-git ttf-font-awesome autorandr-git
|
||||||
else
|
else
|
||||||
echo "TODO compile polybar-git"
|
echo "TODO compile polybar-git autorandr-git"
|
||||||
fi
|
fi
|
||||||
if [ $DEBIAN == 1 ]; then
|
if [ $DEBIAN == 1 ]; then
|
||||||
inst suckless-tools
|
inst suckless-tools
|
||||||
|
|
Loading…
Reference in a new issue