I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

4.8 KiB

X11

X111 is a graphical display manager.

Setup

Install the required software on your system before loading the module. Installing X111 without any install recommends may not include all of the packages you need on your system. Make sure you don't need any GNOME software utilities before using this example.

RUN apt install -y xserver-xorg-core \
    --no-install-recommends \
    --no-install-suggests

Displays

Setup autorandr2 with pre-configured profiles for screen size and display output.

RUN apt install autorandr -y

Screen locking

If you want to be able to lock and unlock your screen when you're away from your machine, install xss-lock3. By default, it will show a blue screen, turning red if you input your password incorrectly, and returning to your previous screen when successful.

RUN apt install -y xss-lock slock

Desktop compositor

Download and install compton4, a desktop compositor for X111 that adds shadows, fading, translucency, and implements window frame opacity controls, inactive window transparency, and more.

RUN apt install -y compton

Desktop notifications

Make sure dbus5 is installed to receive desktop notifications, it's an IPC system used by lots of utilities.

RUN apt install -y dbus

Config

My workflow includes launching Emacs under X111 without the use of a display manager, controlling everything within Emacs, while still providing the functionality of a desktop environment.

compton &
xss-lock -- slock &
exec dbus-launch --exit-with-session emacs -mm --debug-init

Create symbolic link

By default xinit1 will read the configuration file at $HOME/.xinitrc. Override this location with a link to the custom configuration.

(dotfiles/symlink "~/.emacs.d/config/xinitrc"
                  "~/.xinitrc")

Desktop environment

Use the desktop-environment6 package to automatically bind well-known programs for controlling the volume, brightness, media playback, and many other XF86 functionality bindings.

(use-package desktop-environment
  :after exwm
  :custom (desktop-environment-brightness-small-increment "2%+")
          (desktop-environment-brightness-small-decrement "2%-")
          (desktop-environment-brightness-normal-decrement "5%-")
          (desktop-environment-brightness-normal-decrement "5%-")
          (desktop-environment-volume-small-increment "2%+")
          (desktop-environment-volume-small-decrement "2%-")
          (desktop-environment-volume-normal-increment "5%+")
          (desktop-environment-volume-normal-decrement "5%-")
  :config (desktop-environment-mode))

Swapping CAPS and CTRL

Use Xmodmap7 to swap CapsLock and Ctrl to keep common bindings on the home row.

clear lock
clear control

keycode 66 = Control_L

add control = Control_L
add Lock = Control_R

Override the configuration file.

(dotfiles/symlink "~/.emacs.d/config/xmodmap"
                  "~/.Xmodmap")

Frame transparency

Emacs supports frame transparency when running under the X Window System1.

(defun dotfiles/toggle-transparency ()
  (interactive)
  (let ((alpha (frame-parameter nil 'alpha)))
    (set-frame-parameter nil 'alpha
      (if (eql (cond ((numberp alpha) alpha)
                     ((numberp (cdr alpha)) (cdr alpha))
                     ((numberp (cadr alpha)) (cadr alpha)))
               100)
          '(85 . 80) '(100 . 100)))))

Enable frame transparency by default.

(set-frame-parameter (selected-frame) 'alpha '(85 . 80))
(add-to-list 'default-frame-alist '(alpha . (85 . 80)))

Shortcuts

Toggle frame transparency with SPC t r.

(dotfiles/leader
  "tr" '(dotfiles/toggle-transparency :which-key "Transparency"))

Footnotes