Switch to wayland
This commit is contained in:
parent
faea70b1d3
commit
b3e83db50b
36
bin/lock
36
bin/lock
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo RELOADAGENT | gpg-connect-agent
|
|
||||||
ssh-add -D
|
|
||||||
|
|
||||||
if [ "$(xrandr | grep 3440x1440)" != "" ]; then
|
|
||||||
SCALE="100%"
|
|
||||||
DIR=$(echo -e "+800+0\n-800+0" | sort -R | head -1)
|
|
||||||
else
|
|
||||||
SCALE="75%"
|
|
||||||
DIR=$(echo -e "+500+0\n-500+0" | sort -R | head -1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
IMAGE=/tmp/screenlock.png
|
|
||||||
|
|
||||||
IMG="$HOME/.LinuxConfig/imgs/fuyu-logo.png"
|
|
||||||
|
|
||||||
maim -m 1 $IMAGE
|
|
||||||
convert $IMAGE -filter gaussian -blur 0x9 \
|
|
||||||
-gravity center -matte \
|
|
||||||
"$IMG[$SCALE]" -geometry $DIR -composite \
|
|
||||||
~/.LinuxConfig/imgs/lock.png -composite \
|
|
||||||
-font Noto-Sans-CJK-JP-Regular -pointsize 25 -fill 'rgba(255,255,255,0.85)' -draw "text 0,150 'Enter password'" \
|
|
||||||
-font Noto-Sans-CJK-JP-Regular -pointsize 20 -fill 'rgba(255,255,255,0.60)' -draw "text 0,200 'パスワードを入力する'" \
|
|
||||||
$IMAGE
|
|
||||||
|
|
||||||
i3lock \
|
|
||||||
--textcolor=00000000 \
|
|
||||||
--separatorcolor=00000000 --linecolor=00000000 \
|
|
||||||
--keyhlcolor=22cc2288 --bshlcolor=cc222288 \
|
|
||||||
--insidecolor=33333344 --ringcolor=aaaaaa88 \
|
|
||||||
--insidevercolor=55555544 --ringvercolor=cccccc88 \
|
|
||||||
--insidewrongcolor=cc222244 --ringwrongcolor=cc222288 \
|
|
||||||
-eni $IMAGE
|
|
||||||
|
|
||||||
rm $IMAGE
|
|
14
bin/panel
14
bin/panel
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
while (true); do
|
|
||||||
SONG=
|
|
||||||
if [ "$(mpc | wc -l)" -eq "3" ]; then
|
|
||||||
SONG=$(mpc | head -1)" | "
|
|
||||||
if [ "$(mpc | grep '\[paused\]' | wc -l)" -eq "1" ]; then
|
|
||||||
SONG="⏸ $SONG"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
xsetroot -name " $SONG$(date '+%Y-%m-%d %H:%M:%S') "
|
|
||||||
sleep 0.3s;
|
|
||||||
done
|
|
18
bin/screenie
18
bin/screenie
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
NAME="ss-$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c${1:-32};)"
|
|
||||||
|
|
||||||
maim -m 10 -s /tmp/$NAME.jpg -c 1,0.25,0.25,0.6 --hidecursor
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e /tmp/$NAME.jpg ]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
scp /tmp/$NAME.jpg ss:ss
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo -n 'https://ss.fuyu.moe/nisevoid/'$NAME'.jpg' | xclip -selection "clip-board"
|
|
||||||
fi
|
|
||||||
rm /tmp/$NAME.jpg
|
|
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
IMG="$HOME/images/"$(ls ~/images/ | sort -R | head -1)
|
|
||||||
|
|
||||||
feh --bg-fill "$IMG"
|
|
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
xset s 300
|
|
||||||
xset dpms 300 450 600
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
sleep 1s;
|
|
||||||
if [ "$(xset q | grep 'Monitor is' | grep -v 'On' 2> /dev/null)" != "" ]; then
|
|
||||||
if [ "$(ps aux | grep '[i]3lock')" == "" ]; then
|
|
||||||
lock;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
@ -1,6 +1,5 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# Dependancies: feh maim slop mpv youtube-dl i3lock xset imagemagick dmenu neovim (lo)ksh mpd mpc fzf xsetroot NotoSans/Serif Hack
|
# Dependancies: grim slurp mpv youtube-dl sway swaylock swayidle bemenu neovim (lo)ksh mpd mpc fzf NotoSans/Serif Hack
|
||||||
# Build: dwm st
|
|
||||||
|
|
||||||
ln -s ~/.LinuxConfig/profile ~/.profile
|
ln -s ~/.LinuxConfig/profile ~/.profile
|
||||||
ln -s ~/.LinuxConfig/kshrc ~/.kshrc
|
ln -s ~/.LinuxConfig/kshrc ~/.kshrc
|
||||||
@ -15,5 +14,4 @@ ln -s ~/.LinuxConfig/mpv.conf ~/.config/mpv/
|
|||||||
mkdir ~/.config/fontconfig
|
mkdir ~/.config/fontconfig
|
||||||
ln -s ~/.LinuxConfig/fonts.conf ~/.config/fontconfig/fonts.conf
|
ln -s ~/.LinuxConfig/fonts.conf ~/.config/fontconfig/fonts.conf
|
||||||
|
|
||||||
ln -s ~/.LinuxConfig/xinitrc ~/.xinitrc
|
ln -s ~/.LinuxConfig/sway ~/.config/sway/config
|
||||||
ln -s ~/.LinuxConfig/picom.conf ~/.config/picom.conf
|
|
||||||
|
14
mpv.conf
14
mpv.conf
@ -1,6 +1,20 @@
|
|||||||
audio-device='alsa/front:CARD=Multibit,DEV=0'
|
audio-device='alsa/front:CARD=Multibit,DEV=0'
|
||||||
no-audio-display
|
no-audio-display
|
||||||
|
|
||||||
|
cache=yes
|
||||||
|
demuxer-max-bytes=650M
|
||||||
|
demuxer-readahead-secs=60
|
||||||
|
|
||||||
|
cursor-autohide=always
|
||||||
|
|
||||||
|
profile=opengl-hq
|
||||||
|
scale=ewa_lanczossharp
|
||||||
|
cscale=ewa_lanczossharp
|
||||||
|
|
||||||
|
correct-downscaling
|
||||||
|
temporal-dither
|
||||||
|
|
||||||
hwdec=vaapi
|
hwdec=vaapi
|
||||||
|
gpu-context=wayland
|
||||||
|
|
||||||
no-osc
|
no-osc
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#backend = "glx";
|
|
||||||
#glx-swap-method = "6";
|
|
||||||
|
|
||||||
inactive-opacity = 0.85;
|
|
||||||
focus-exclude = [ "name *= 'i3lock'", "class_g = 'dmenu'" ];
|
|
4
profile
4
profile
@ -1,6 +1,10 @@
|
|||||||
export PATH="$HOME/.LinuxConfig/bin:${PATH}:$HOME/go/bin"
|
export PATH="$HOME/.LinuxConfig/bin:${PATH}:$HOME/go/bin"
|
||||||
export EDITOR=/usr/bin/nvim
|
export EDITOR=/usr/bin/nvim
|
||||||
export PAGER=/bin/less
|
export PAGER=/bin/less
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export QT_QPA_PLATFORM=wayland-egl
|
||||||
|
export ELM_DISPLAY=wl
|
||||||
|
export WLR_RENDERER=vulkan
|
||||||
|
|
||||||
# SSH agent
|
# SSH agent
|
||||||
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
|
if [ ! -S ~/.ssh/ssh_auth_sock ]; then
|
||||||
|
113
sway
Normal file
113
sway
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
default_border pixel 1
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
# Logo key. Use Mod1 for Alt.
|
||||||
|
set $mod Mod4
|
||||||
|
|
||||||
|
set $left h
|
||||||
|
set $down j
|
||||||
|
set $up k
|
||||||
|
set $right l
|
||||||
|
|
||||||
|
set $term alacritty
|
||||||
|
set $menu bemenu-run | xargs swaymsg exec --
|
||||||
|
|
||||||
|
### Output configuration
|
||||||
|
|
||||||
|
output * bg /home/nisevoid/images/bg.png fill
|
||||||
|
|
||||||
|
output HDMI-A-1 scale 2 mode 3840x2160@60Hz adaptive_sync on pos 0 0
|
||||||
|
output DP-1 scale 1 transform 180 pos 0 1080
|
||||||
|
|
||||||
|
### Idle configuration
|
||||||
|
|
||||||
|
# exec swayidle -w \
|
||||||
|
# timeout 300 'swaylock -f -c 000000' \
|
||||||
|
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||||
|
# before-sleep 'swaylock -f -c 000000'
|
||||||
|
|
||||||
|
input type:tablet_tool {
|
||||||
|
tool_mode pen absolute
|
||||||
|
map_to_output DP-1
|
||||||
|
}
|
||||||
|
|
||||||
|
### Key bindings
|
||||||
|
|
||||||
|
# Drag floating windows by holding down $mod and left mouse button.
|
||||||
|
floating_modifier $mod normal
|
||||||
|
|
||||||
|
bindsym $mod+q kill
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
|
||||||
|
bindsym $mod+t exec $term
|
||||||
|
bindsym $mod+space exec $menu
|
||||||
|
|
||||||
|
bindsym $mod+grave exec $term -e song
|
||||||
|
bindsym Print exec grim -g "$(slurp)" -t png - | wl-copy -n -t image/png
|
||||||
|
|
||||||
|
bindsym $mod+b exec MOZ_ENABLE_WAYLAND=1 firefox
|
||||||
|
bindsym $mod+Shift+b exec chromium --incognito --ozone-platform=wayland
|
||||||
|
|
||||||
|
# Change focus
|
||||||
|
bindsym $mod+$left focus left
|
||||||
|
bindsym $mod+$down focus down
|
||||||
|
bindsym $mod+$up focus up
|
||||||
|
bindsym $mod+$right focus right
|
||||||
|
|
||||||
|
# Move focused window
|
||||||
|
bindsym $mod+Shift+$left move left
|
||||||
|
bindsym $mod+Shift+$down move down
|
||||||
|
bindsym $mod+Shift+$up move up
|
||||||
|
bindsym $mod+Shift+$right move right
|
||||||
|
|
||||||
|
# Switch to workspace
|
||||||
|
bindsym $mod+1 workspace number 1
|
||||||
|
bindsym $mod+2 workspace number 2
|
||||||
|
bindsym $mod+3 workspace number 3
|
||||||
|
bindsym $mod+4 workspace number 4
|
||||||
|
bindsym $mod+5 workspace number 5
|
||||||
|
bindsym $mod+6 workspace number 6
|
||||||
|
bindsym $mod+7 workspace number 7
|
||||||
|
bindsym $mod+8 workspace number 8
|
||||||
|
bindsym $mod+9 workspace number 9
|
||||||
|
bindsym $mod+0 workspace number 10
|
||||||
|
# Move to workspace
|
||||||
|
bindsym $mod+Shift+1 move container to workspace number 1
|
||||||
|
bindsym $mod+Shift+2 move container to workspace number 2
|
||||||
|
bindsym $mod+Shift+3 move container to workspace number 3
|
||||||
|
bindsym $mod+Shift+4 move container to workspace number 4
|
||||||
|
bindsym $mod+Shift+5 move container to workspace number 5
|
||||||
|
bindsym $mod+Shift+6 move container to workspace number 6
|
||||||
|
bindsym $mod+Shift+7 move container to workspace number 7
|
||||||
|
bindsym $mod+Shift+8 move container to workspace number 8
|
||||||
|
bindsym $mod+Shift+9 move container to workspace number 9
|
||||||
|
bindsym $mod+Shift+0 move container to workspace number 10
|
||||||
|
|
||||||
|
# Select place for next window
|
||||||
|
bindsym $mod+c splith
|
||||||
|
bindsym $mod+v splitv
|
||||||
|
|
||||||
|
# Make the focused window fullscreen
|
||||||
|
bindsym $mod+f fullscreen
|
||||||
|
|
||||||
|
# Toggle the between tiling and floating window
|
||||||
|
bindsym $mod+Return floating toggle
|
||||||
|
|
||||||
|
### Status Bar
|
||||||
|
|
||||||
|
bar {
|
||||||
|
position top
|
||||||
|
|
||||||
|
status_command while date +'%d %b | %H:%M:%S '; do sleep 1; done
|
||||||
|
|
||||||
|
colors {
|
||||||
|
statusline #ffffff
|
||||||
|
background #222222
|
||||||
|
inactive_workspace #111111 #111111 #777777
|
||||||
|
focused_workspace #773333 #773333 #ffffff
|
||||||
|
urgent_workspace #dd6666 #dd6666 #ffffff
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*
|
Loading…
Reference in New Issue
Block a user