Skip to content

Instantly share code, notes, and snippets.

View danilrwx's full-sized avatar
🏠
Working from home

Daniil Antoshin danilrwx

🏠
Working from home
View GitHub Profile
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbModel" "pc105"
Option "XkbOptions" "grp:alt_shift_toggle"
Option "XkbOptions" "caps:swapescape"
EndSection
@danilrwx
danilrwx / i3_screenshot_config
Created August 1, 2021 09:28 — forked from schtibe/i3_screenshot_config
Screenshot keybindings with i3 and scrot that are copied to the clipboard
bindsym Print exec "scrot -e 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'; sleep 1; exec notify-send 'screenshot has been saved to ~/tmp'"
bindsym $mod+Print --release exec "scrot -ue 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'; sleep 1; exec notify-send 'screenshot has been saved to ~/tmp'"
bindsym $mod+Shift+Print --release exec "notify-send 'selection will be saved to ~/tmp'; scrot -se 'mv $f ~/tmp && xclip -selection clipboard -t image/png -i ~/tmp/$n'"
Section "Monitor"
Identifier "eDP-1"
Option "Primary" "true"
EndSection
Section "Monitor"
Identifier "VGA-1"
Option "Above" "eDP-1"
EndSection
#!/bin/bash
my_laptop_external_monitor=$(xrandr --query | grep 'VGA-1')
while true; do
if [[ $my_laptop_external_monitor = *connected* ]]; then
xrandr --output VGA-1 --mode 1920x1080 --above eDP-1
#xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x1080 --rotate normal --output VGA-1 --mode 1920x1080 --pos 0x0 --rotate normal --output DP-1 --off --output HDMI-1 --off --output DP-2 --off --output HDMI-2 --off
fi
Section "ServerLayout"
Identifier "Layout0"
Option "AllowNVIDIAGPUScreens"
Screen 0 "iGPU" 0 0
EndSection
Section "Device"
Identifier "iGPU"
Driver "modesetting"
BusID "PCI:0:2:0" #Проверьте BusID
# Use localectl(1) to instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbModel""thinkpad"
Option "XkbLayout" "us, ru"
Option "XKbOptions""grp:alt_shift_toggle"
EndSection