mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -05:00
x11: add monitors.sh
script
This commit is contained in:
parent
c40bc875bf
commit
a784801bad
@ -9,7 +9,7 @@ $HOME/.config/polybar/run_polybar.sh &
|
||||
ibus-daemon -drx &
|
||||
greenclip daemon &
|
||||
# emacs --daemon &
|
||||
# xrandr --output eDP-1 --primary --auto --output DP-2 --left-of eDP-1 --auto --output HDMI-2 --right-of eDP-1 --auto &
|
||||
# $HOME/.local/bin/X11/monitors.sh
|
||||
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
||||
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
||||
mpDris2 &
|
||||
|
@ -109,7 +109,7 @@
|
||||
(map! :map minibuffer-local-map
|
||||
"C-r" 'counsel-minibuffer-history)
|
||||
(use-package! all-the-icons-ivy-rich
|
||||
:after counsel-projectile
|
||||
:defer-incrementally counsel-projectile
|
||||
:init (all-the-icons-ivy-rich-mode 1)
|
||||
:config
|
||||
(setq all-the-icons-ivy-rich-icon-size 1.0))
|
||||
|
@ -36,12 +36,10 @@
|
||||
(exwm-layout-hide-mode-line))))
|
||||
|
||||
(defun follie/update-displays ()
|
||||
(lambda ()
|
||||
(start-process-shell-command
|
||||
"xrandr" nil "xrandr --output eDP-1 --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal"))
|
||||
(follie/run-in-background "~/.local/bin/X11/monitors.sh")
|
||||
(follie/set-wallpaper)
|
||||
(message "Updated displays: %s"
|
||||
(string-trim (shell-command-to-string "xrandr | grep \" connected\" | awk '{print $1}' | sed '$!N;s/\\n/ /'"))))
|
||||
(string-trim (shell-command-to-string "xrandr | grep \" connected\" | awk '{print $1}' | sed 's/^/ /' | tr -d '\\n'"))))
|
||||
|
||||
(defun follie/exwm-rename-buffer ()
|
||||
(exwm-workspace-rename-buffer
|
||||
|
@ -5,7 +5,7 @@ dunst &
|
||||
ibus-daemon -drx &
|
||||
greenclip daemon &
|
||||
# emacs --daemon &
|
||||
# xrandr --output eDP-1 --primary --auto --output DP-2 --left-of eDP-1 --auto --output HDMI-2 --right-of eDP-1 --auto &
|
||||
# $HOME/.local/bin/X11/monitors.sh
|
||||
# animatedwall --full ~/Pictures/Animated/fubuki.mp4 &
|
||||
feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/* &
|
||||
mpDris2 &
|
||||
|
18
home/.local/bin/X11/monitors.sh
Executable file
18
home/.local/bin/X11/monitors.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
status=$(xrandr | grep " connected")
|
||||
|
||||
# Built-int monitor
|
||||
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
|
||||
|
||||
if echo "$status" | grep "HDMI-1"; then
|
||||
xrandr --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate normal
|
||||
else
|
||||
xrandr --output HDMI-1 --off
|
||||
fi
|
||||
|
||||
if echo "$status" | grep "DP-2"; then
|
||||
xrandr --output DP-2 --mode 1920x1080 --pos -1920x0 --rotate normal
|
||||
else
|
||||
xrandr --output DP-2 --off
|
||||
fi
|
Loading…
Reference in New Issue
Block a user