i3: add scripts for display management

This commit is contained in:
Julian Mutter 2022-11-17 15:24:31 +01:00
parent 87f267e55d
commit 32eb67ed95
5 changed files with 42 additions and 4 deletions

View File

@ -255,14 +255,15 @@ bindsym $mod+Print mode "$mode_screenshot_clipboard"
#bindsym $mod+c exec xfce4-terminal --role floating --hide-scrollbar --title Calculator -e qalc
bindsym $mod+c exec qalculate-gtk
bindsym $mod+p exec xwacomcalibrate
bindsym $mod+t exec pcmanfm
bindsym $mod+Shift+p exec xwacomcalibrate
bindsym $mod+t exec thunar
# bindsym $mod+t exec krusader
#bindsym $mod+m exec xfce4-terminal -x mc
bindsym $mod+Shift+c exec $scripts/jupyter-calculator
bindsym $mod+b exec firefox
#bindsym $mod+s exec pavucontrol
bindsym $mod+u exec pamac-manager
bindsym $mod+p exec $scripts/display-toggle-mirror
# read 1 character and mark the current window with this character
# bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
@ -373,7 +374,8 @@ exec --no-startup-id msm_notifier
exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id pa-applet
# Background
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
exec --no-startup-id nitrogen --restore
# exec --no-startup-id nitrogen --restore; sleep 1; picom -b
#exec --no-startup-id feh --randomize --bg-fill /home/julian/Pictures/Hintergrundbilder/*
# exec --no-startup-id feh --bg-fill /home/julian/Bilder/background.jpg
# Notifications
@ -385,7 +387,7 @@ exec --no-startup-id dunst -config /home/julian/.config/dunst/dunstrc
exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor
exec_always --no-startup-id ~/.screenlayout/layoutpicker.sh
exec_always --no-startup-id $scripts/display-layoutpicker
# Default workspaces at startup (no need because autostart applications get always focused)
#exec --no-startup-id i3-msg workspace $ws1

View File

@ -0,0 +1,11 @@
#!/bin/sh
xrandr | grep -q "HDMI-1 connected"
if [ "$?" -eq "0" ]; then
echo "Two screens available"
~/.screenlayout/twoscreens.sh
else
echo "Only one screen available"
~/.screenlayout/onescreen.sh
fi

View File

@ -0,0 +1,21 @@
#!/bin/sh
xrandr | grep -q "HDMI-1 connected"
if [ "$?" -eq "0" ]; then
echo "Two screens available"
MIRROR_FILE=~/.screenlayout/mirror-primary
if [ -e "$MIRROR_FILE" ]; then
echo "Mode set to mirror"
rm "$MIRROR_FILE"
~/.screenlayout/twoscreens-mirror.sh
else
echo "Mode set to left-right"
touch "$MIRROR_FILE"
~/.screenlayout/twoscreens.sh
fi
else
echo "Only one screen available"
~/.screenlayout/onescreen.sh
fi

3
i3/i3/scripts/mymatlab.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
matlab -desktop -sd ~/dev/simulation

View File

@ -18,6 +18,7 @@ start_program()
$program & > /dev/null
}
i3-msg 'workspace 9; append_layout ~/.config/i3/workspace-chat2.json'
start_program schildichat-desktop
start_program telegram-desktop
start_program thunderbird