[bin] Get rid of no-longer used i3 switches & ifs

This commit is contained in:
Sebastian Schulze 2020-02-22 18:51:41 +01:00
parent 3954aee00a
commit cf88c1107e
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
17 changed files with 47 additions and 180 deletions

26
bin/executable_autostart Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
swaymsg exec volumeicon
swaymsg exec nm-applet
swaymsg exec nextcloud
swaymsg exec mako
swaymsg exec clipman -d
killall redshift; swaymsg exec "redshift -m wayland -l 48.15:11.64 -t 6500K:3000K"
swaymsg workspace "4: Docs"
swaymsg exec "emacs ~/"
swaymsg workspace "2: Web"
swaymsg exec "qutebrowser -r default"
swaymsg workspace "3: Comms"
swaymsg exec start-comms
swaymsg workspace "5: Media"
swaymsg exec alacritty -- -e "mux start music"
swaymsg workspace "1: Code"
swaymsg exec alacritty
swayidle \
timeout 300 'blur-lock' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'blur-lock' &

View File

@ -1,12 +1,7 @@
#!/bin/bash
if [ -z "$WAYLAND_DISPLAY" ]; then
SHOTTER="scrot"
LOCKER="i3lock"
else
SHOTTER="grim"
LOCKER="swaylock"
fi;
SHOTTER="grim"
LOCKER="swaylock"
$SHOTTER '/home/bascht/.lockbg.png'

View File

@ -1,3 +1,3 @@
#!/bin/bash
i3-blur-lock
blur-lock
sleep 1; xset dpms force off

View File

@ -1,3 +1,3 @@
#!/bin/bash
i3-blur-lock & sleep 5
blur-lock & sleep 5
systemctl suspend

View File

@ -16,10 +16,6 @@ Net::SCP.start("drop.bascht.space", "bascht") do |scp|
scp.upload(file.expand_path.to_s, "/home/bascht/drop/#{new_name}")
end
if ENV["WAYLAND_DISPLAY"].nil?
Open3.popen3( "xclip -i -selection clipboard" ){ |input, _, _| input << url }
else
system "wl-copy #{url}"
end
system "wl-copy #{url}"
system("notify-send 'Uploaded successfully' '<a href=\'#{url}\'>drop.bascht.space</a>'")

View File

@ -1,6 +1,6 @@
#!/bin/bash
SHOT=$(i3-screenshot -s)
SHOT=$(screenshot -s)
pngquant 64 --skip-if-larger --strip --ext=.png --force $SHOT
chmod o+r $SHOT
drop $SHOT

View File

@ -1,4 +0,0 @@
#!/bin/bash
export GPG_AGENT_INFO=/home/bascht/.gnupg/S.gpg-agent:1729:1
exec gajim

View File

@ -1,46 +0,0 @@
#!/bin/bash
if [ -z "$WAYLAND_DISPLAY" ]; then
i3-inputconfig &
i3-displayconfig &
numlockx on &
killall volumeicon; volumeicon &
killall tdrop
nm-applet &
killall greenclip; greenclip daemon &
dunst &
#killall compton; compton --config ~/.config/i3/compton.conf &
xsetroot -cursor_name left_ptr &
xautolock -time 6 -locker "i3-blur-lock --dpms" &
killall redshift; redshift -l 48.15:11.64 -t 6500K:3000K &
emacs ~/ &
firefox &
vivaldi-stable &
nextcloud &
else
swaymsg exec volumeicon
swaymsg exec nm-applet
swaymsg exec nextcloud
swaymsg exec mako
swaymsg exec clipman -d
killall redshift; swaymsg exec "redshift -m wayland -l 48.15:11.64 -t 6500K:3000K"
swaymsg workspace "4: Docs"
swaymsg exec "emacs ~/"
swaymsg workspace "2: Web"
swaymsg exec "qutebrowser -r default"
swaymsg workspace "3: Comms"
swaymsg exec start-comms
swaymsg workspace "5: Media"
swaymsg exec alacritty -- -e "mux start music"
swaymsg workspace "1: Code"
swaymsg exec alacritty
swayidle \
timeout 300 'i3-blur-lock' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'i3-blur-lock' &
fi;

View File

@ -1,32 +0,0 @@
#!/bin/bash
set -e
if xrandr | grep "^DP-2-3 connected" > /dev/null; then
if xrandr | grep "^DP-2-2 connected"; then
xrandr --output DP-2-2 --primary --mode 3440x1440 --pos 1200x215 --rotate normal --output DP-2-3 --mode 1920x1200 --pos 0x0 --rotate left --output eDP-1 --off
else
echo "Something went horribly wrong!"
fi
# sleep 0.2
bspc monitor %DP-2-2 -d work web files graphics
bspc monitor %DP-2-3 -d comm docs media dump
elif xrandr | grep "^DP-2-2-8 connected"; then
xrandr --output DP-2-2-8 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output eDP-1 --off --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
sleep 0.2
bspc monitor %DP-2-2-8 -d work web comm docs media files graphics dump
else
if xrandr | grep "^eDP-1 connected"; then
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
fi
sleep 0.2
bspc monitor -d work web comm docs media files graphics dump
fi
~/bin/i3-polybar &
feh --randomize --bg-fill ~/Pictures/Wallpapers/

View File

@ -1,12 +0,0 @@
#!/bin/bash
xinput set-prop $(xinput |grep -oP "TouchPad.*id=\K[0-9]+") "libinput Natural Scrolling Enabled" 1
xinput set-prop "pointer:Synaptics TM3381-002" "libinput Natural Scrolling Enabled" 1
xinput set-prop $(xinput |grep -oP "HUGE.*id=\K[0-9]+"|head -n 1) "libinput Natural Scrolling Enabled" 1
xinput set-button-map $(xinput |grep -oP "HUGE.*id=\K[0-9]+"|head -n 1) 1 10 3 4 5 6 7 8 9 2 11 12
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" 'libinput Button Scrolling Button' 12
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" 'libinput Scroll Method Enabled' 0 0 1
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Accel Profile Enabled" 0 1
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Accel Speed" -0.2
setxkbmap -option caps:super

View File

@ -1,38 +0,0 @@
#!/bin/bash
killall -9 polybar
if [[ $DESKTOP_SESSION == "i3" ]]; then
WINDOW_MODULE="internal/i3"
WS_LABEL="%name%"
else
WINDOW_MODULE="internal/bspwm"
WS_LABEL="%icon%"
fi;
export WINDOW_MODULE
export WS_LABEL
# Check if we're docked in
export BAR_PA_SINK=$(pactl info |grep -oP "^Default Sink: \K.*")
if xrandr |grep "HDMI2 connected" > /dev/null; then
export MONITOR=HDMI2
else
export MONITOR=eDP1
fi;
if xrandr | grep "^DP-2-3 connected" > /dev/null; then
export BAR_ETH_INTERFACE=enp0s31f6
export BAR_MODULES="mpd volume memory eth wlan temperature date"
unset MONITOR
MONITOR=DP-2-2 polybar bascht &
MONITOR=DP-2-3 polybar secondary &
elif xrandr | grep "^DP-2-2-8 connected" > /dev/null; then
export BAR_MODULES="mpd volume memory wlan temperature date"
unset MONITOR
MONITOR=DP-2-2-8 polybar bascht &
else
MONITOR=eDP-1 polybar bascht &
fi;

View File

@ -1,13 +0,0 @@
#!/bin/bash
# if pgrep plasma
# then
# WINDOWED=""
# elif pgrep awesome
# then
# WINDOWED=""
# else
# WINDOWED="-fullscreen -normal-window"
# fi
exec rofi -show combi $WINDOWED

View File

@ -1,12 +0,0 @@
#!/bin/bash
FOLDER="/home/bascht/Pictures/Screenshots/$(date +'%Y-%m')"
mkdir -p ${FOLDER}
if [ -z "$WAYLAND_DISPLAY" ]; then
NAME="${FOLDER}/Screenshot-%Y-%m-%d-%H%M%S-\$wx\$h.png"
exec escrotum "$NAME" $*
else
NAME="${FOLDER}/Screenshot-$(date +%Y-%m-%d-%H%M%S).png"
grim -g "$(slurp)" "$NAME";
echo $NAME
fi;

7
bin/executable_screenshot Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
FOLDER="/home/bascht/Pictures/Screenshots/$(date +'%Y-%m')"
mkdir -p ${FOLDER}
NAME="${FOLDER}/Screenshot-$(date +%Y-%m-%d-%H%M%S).png"
grim -g "$(slurp)" "$NAME";
echo $NAME

View File

@ -82,7 +82,7 @@ local editor = os.getenv("EDITOR") or "nano"
local gui_editor = "emacs"
local browser = "firefox"
local guieditor = "emacs"
local scrlocker = "i3-blur-lock"
local scrlocker = "blur-lock"
awful.util.terminal = terminal
awful.util.tagnames = { "1", "2", "3", "4", "5" }

View File

@ -36,7 +36,7 @@ set $right l
set $term alacritty
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
set $menu dmenu_path | i3-rofi | xargs swaymsg exec
set $menu dmenu_path | rofi | xargs swaymsg exec
set $display_laptop eDP-1
set $display_dell "Dell Inc. DELL U2415 7MT018BM1PGU"
set $display_lg "Goldstar Company Ltd 34UM95 0x00000101"
@ -143,10 +143,10 @@ bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioPlay exec mpc toggle
bindsym Print exec i3-screenshot
bindsym shift+Print exec i3-screenshot -s
bindsym control+shift+Print exec i3-dropshot
bindsym control+alt+l exec i3-blur-lock
bindsym Print exec screenshot
bindsym shift+Print exec screenshot -s
bindsym control+shift+Print exec dropshot
bindsym control+alt+l exec blur-lock
bindsym $mod+shift+o move workspace to output right
bindsym $mod+o focus output right
@ -321,7 +321,7 @@ mode "run" {
# start your launcher
bindsym $mod+d exec $menu; mode "default";
bindsym d exec $menu; mode "default";
bindsym r exec i3-rofi; mode "default";
bindsym r exec rofi; mode "default";
bindsym p exec rofi-pass; mode "default";
bindsym g exec sway-switch-window; mode "default";
@ -386,5 +386,5 @@ include /etc/sway/config.d/*
# See https://github.com/swaywm/sway/wiki#after-unplugging-an-external-display-some-applications-appear-too-large-on-my-hidpi-screen
exec xrdb -load ~/.Xresources
exec i3-autostart
exec autostart