mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-05-24 19:14:39 +02:00
[i3] remove old config files
This commit is contained in:
parent
9b00389e38
commit
3dd0d5ca25
4 changed files with 0 additions and 429 deletions
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
intern=LVDS1
|
|
||||||
extern=HDMI3
|
|
||||||
|
|
||||||
if xrandr | grep "$extern disconnected"; then
|
|
||||||
xrandr --output "$extern" --off --output "$intern" --auto --primary
|
|
||||||
else
|
|
||||||
xrandr --output "$intern" --auto --pos 0x180 --output "$extern" --primary --auto --pos 1600x0 --output VGA1 --auto --output HDMI1 --auto --output DP1 --auto
|
|
||||||
fi
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
FOCUSED=$(xprop -root _NET_ACTIVE_WINDOW | awk -F' ' '{print $NF}')
|
|
||||||
if xprop -id ${FOCUSED} _NET_WM_STATE | grep -q _NET_WM_STATE_FULLSCREEN; then
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
268
i3/i3config
268
i3/i3config
|
@ -1,268 +0,0 @@
|
||||||
set $mod Mod4
|
|
||||||
floating_modifier $mod
|
|
||||||
|
|
||||||
# keyboard layout
|
|
||||||
exec setxkbmap de -option ctrl:nocaps
|
|
||||||
|
|
||||||
# background
|
|
||||||
exec --no-startup-id xsetroot -solid "#2F343F"
|
|
||||||
#exec --no-startup-id hsetroot -center ~/.wallpaper
|
|
||||||
|
|
||||||
# startup programs
|
|
||||||
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
|
||||||
exec --no-startup-id nm-applet
|
|
||||||
exec --no-startup-id gnome-keyring-daemon --start --components secrets
|
|
||||||
exec --no-startup-id amixer set Capture nocap
|
|
||||||
exec --no-startup-id feedreader --headless
|
|
||||||
exec --no-startup-id ~/.local/bin/mon-toggle
|
|
||||||
exec --no-startup-id ~/.local/bin/lockscreen -d
|
|
||||||
exec --no-startup-id albert
|
|
||||||
exec --no-startup-id nextcloud
|
|
||||||
exec --no-startup-id QSyncthingTray
|
|
||||||
exec --no-startup-id telegram-desktop -startintray
|
|
||||||
exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent
|
|
||||||
exec --no-startup-id redshift-gtk
|
|
||||||
|
|
||||||
# font
|
|
||||||
font pango:Fira Sans Mono 12
|
|
||||||
|
|
||||||
# make some windows floating
|
|
||||||
for_window [class="Firefox" window_role="About"] floating enable
|
|
||||||
for_window [class="Nightly" window_role="About"] floating enable
|
|
||||||
for_window [class="evolution-alarm-notify"] floating enable
|
|
||||||
assign [title="^pdfpc- presentation"] output right
|
|
||||||
assign [title="^pdfpc- presenter"] output primary
|
|
||||||
for_window [class="Pavucontrol"] floating enable
|
|
||||||
|
|
||||||
# Stick windows to workspaces
|
|
||||||
assign [class="Feedreader"] 8
|
|
||||||
for_window [class="Feedreader"] move workspace 8
|
|
||||||
assign [class="Evolution"] 9
|
|
||||||
for_window [class="Evolution"] move workspace 9
|
|
||||||
assign [class="Thunderbird"] 9
|
|
||||||
for_window [class="Thunderbird"] move workspace 9
|
|
||||||
assign [class="Rhythmbox"] 10
|
|
||||||
for_window [class="Rhythmbox"] move workspace 10
|
|
||||||
|
|
||||||
hide_edge_borders both
|
|
||||||
focus_follows_mouse no
|
|
||||||
|
|
||||||
# to switch workspace-tabs
|
|
||||||
bindsym $mod+Tab workspace next
|
|
||||||
bindsym Shift+$mod+Tab workspace prev
|
|
||||||
|
|
||||||
bindsym $mod+m exec keepassxc
|
|
||||||
bindsym $mod+e exec subl3
|
|
||||||
bindsym $mod+w exec firefox
|
|
||||||
bindsym $mod+u exec feedreader
|
|
||||||
|
|
||||||
# to prevent gnome-help
|
|
||||||
bindsym F1 exec :
|
|
||||||
|
|
||||||
# ESP8266
|
|
||||||
bindsym $mod+F1 exec curl http://esp8266.local/socket0Toggle
|
|
||||||
bindsym $mod+Shift+F1 exec curl http://esp8266.local/socket0Off
|
|
||||||
bindsym $mod+F2 exec curl http://esp8266.local/socket1Toggle
|
|
||||||
bindsym $mod+Shift+F2 exec curl http://esp8266.local/socket1Off
|
|
||||||
|
|
||||||
bindsym $mod+F11 exec curl http://esp8266.local/socket2Toggle
|
|
||||||
bindsym $mod+Shift+F11 exec curl http://esp8266.local/socket2Off
|
|
||||||
bindsym $mod+F12 exec curl http://esp8266.local/socket3Toggle
|
|
||||||
bindsym $mod+Shift+F12 exec curl http://esp8266.local/socket3Off
|
|
||||||
|
|
||||||
# Screenshot
|
|
||||||
bindsym Print exec "scrot ~/Downloads/Screenshot%Y-%m-%d-%H:%M:%S.png -z"
|
|
||||||
bindsym Scroll_Lock exec ~/.local/bin/lockscreen -fl
|
|
||||||
|
|
||||||
# forward an backward at arrow-keys
|
|
||||||
bindsym --release XF86Back exec --no-startup-id xdotool key --clearmodifiers Ctrl+Page_Up
|
|
||||||
bindsym --release XF86Forward exec --no-startup-id xdotool key --clearmodifiers Ctrl+Page_Down
|
|
||||||
|
|
||||||
|
|
||||||
# Sreen brightness controls
|
|
||||||
#increase screen brightness
|
|
||||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 10
|
|
||||||
#decrease screen brightness
|
|
||||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 10
|
|
||||||
|
|
||||||
# Touchpad controls
|
|
||||||
#bindsym XF86TouchpadToggle exec /some/path/toggletouchpad.sh # toggle touchpad
|
|
||||||
|
|
||||||
# Pulse Audio controls
|
|
||||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
|
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
|
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
|
|
||||||
|
|
||||||
# Microphone
|
|
||||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle
|
|
||||||
bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id pactl set-source-volume 1 +5%
|
|
||||||
bindsym $mod+XF86AudioLowerVolume exec --no-startup-id pactl set-source-volume 1 -5%
|
|
||||||
|
|
||||||
# Media player controls
|
|
||||||
bindsym XF86AudioPlay exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
|
|
||||||
bindsym XF86AudioPause exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
|
|
||||||
bindsym XF86AudioNext exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
|
|
||||||
bindsym XF86AudioPrev exec dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
|
|
||||||
|
|
||||||
# main commands
|
|
||||||
bindsym $mod+Shift+c reload
|
|
||||||
bindsym $mod+Shift+r restart
|
|
||||||
bindsym $mod+Shift+e exit
|
|
||||||
|
|
||||||
# start a terminal
|
|
||||||
bindsym $mod+Return exec WINIT_HIDPI_FACTOR=1 TERMINAL=alacritty i3-sensible-terminal
|
|
||||||
|
|
||||||
# screensaver
|
|
||||||
bindsym $mod+z exec ~/.local/bin/lockscreen -fl
|
|
||||||
bindsym $mod+y exec ~/.local/bin/lockscreen -fl
|
|
||||||
|
|
||||||
# start dmenu (a program launcher)
|
|
||||||
bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop --entry-type=command
|
|
||||||
bindsym $mod+d exec --no-startup-id albert toggle || albert
|
|
||||||
|
|
||||||
# kill focused window
|
|
||||||
bindsym $mod+Shift+q kill
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
|
||||||
bindsym $mod+f fullscreen toggle
|
|
||||||
bindsym $mod+g fullscreen global
|
|
||||||
|
|
||||||
# change layouts
|
|
||||||
bindsym $mod+b split h
|
|
||||||
bindsym $mod+v split v
|
|
||||||
bindsym $mod+c layout toggle split
|
|
||||||
#bindsym $mod+z layout stacking
|
|
||||||
#bindsym $mod+t layout tabbed
|
|
||||||
|
|
||||||
# toggle tiling / floating
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
#bindsym $mod+space focus mode_toggle
|
|
||||||
bindsym $mod+space exec setxkbmap de -option ctrl:nocaps
|
|
||||||
# focus the child container
|
|
||||||
bindsym $mod+s focus child
|
|
||||||
# focus the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
|
|
||||||
bindsym Mod1+Left move workspace to output left
|
|
||||||
bindsym Mod1+Right move workspace to output right
|
|
||||||
bindsym Mod1+Up move workspace to output up
|
|
||||||
bindsym Mod1+Down move workspace to output down
|
|
||||||
|
|
||||||
# switch to workspace
|
|
||||||
bindsym $mod+1 workspace 1
|
|
||||||
bindsym $mod+2 workspace 2
|
|
||||||
bindsym $mod+3 workspace 3
|
|
||||||
bindsym $mod+4 workspace 4
|
|
||||||
bindsym $mod+5 workspace 5
|
|
||||||
bindsym $mod+6 workspace 6
|
|
||||||
bindsym $mod+7 workspace 7
|
|
||||||
bindsym $mod+8 workspace 8
|
|
||||||
bindsym $mod+9 workspace 9
|
|
||||||
bindsym $mod+0 workspace 10
|
|
||||||
|
|
||||||
# move focused container to workspace
|
|
||||||
bindsym $mod+Shift+1 move container to workspace 1
|
|
||||||
bindsym $mod+Shift+2 move container to workspace 2
|
|
||||||
bindsym $mod+Shift+3 move container to workspace 3
|
|
||||||
bindsym $mod+Shift+4 move container to workspace 4
|
|
||||||
bindsym $mod+Shift+5 move container to workspace 5
|
|
||||||
bindsym $mod+Shift+6 move container to workspace 6
|
|
||||||
bindsym $mod+Shift+7 move container to workspace 7
|
|
||||||
bindsym $mod+Shift+8 move container to workspace 8
|
|
||||||
bindsym $mod+Shift+9 move container to workspace 9
|
|
||||||
bindsym $mod+Shift+0 move container to workspace 10
|
|
||||||
|
|
||||||
# move windows to workspace and switch to it
|
|
||||||
bindsym Ctrl+1 move container to workspace 1; workspace 1
|
|
||||||
bindsym Ctrl+2 move container to workspace 2; workspace 2
|
|
||||||
bindsym Ctrl+3 move container to workspace 3; workspace 3
|
|
||||||
bindsym Ctrl+4 move container to workspace 4; workspace 4
|
|
||||||
bindsym Ctrl+5 move container to workspace 5; workspace 5
|
|
||||||
bindsym Ctrl+6 move container to workspace 6; workspace 6
|
|
||||||
bindsym Ctrl+7 move container to workspace 7; workspace 7
|
|
||||||
bindsym Ctrl+8 move container to workspace 8; workspace 8
|
|
||||||
bindsym Ctrl+9 move container to workspace 9; workspace 9
|
|
||||||
# for settings the zoom-level back to default in firefox
|
|
||||||
#bindsym Ctrl+0 move container to workspace 10; workspace 10
|
|
||||||
|
|
||||||
bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
|
|
||||||
|
|
||||||
#FOCUS
|
|
||||||
bindsym $mod+h focus left
|
|
||||||
bindsym $mod+j focus down
|
|
||||||
bindsym $mod+k focus up
|
|
||||||
bindsym $mod+l focus right
|
|
||||||
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+h move left
|
|
||||||
bindsym $mod+Shift+j move down
|
|
||||||
bindsym $mod+Shift+k move up
|
|
||||||
bindsym $mod+Shift+l move right
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# resize window (you can also use the mouse for that)
|
|
||||||
mode "resize" {
|
|
||||||
bindsym h resize shrink width 10 px or 10 ppt
|
|
||||||
bindsym j resize shrink height 10 px or 10 ppt
|
|
||||||
bindsym k resize grow height 10 px or 10 ppt
|
|
||||||
bindsym l resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
bindsym Left resize shrink width 10 px or 10 ppt
|
|
||||||
bindsym Up resize grow height 10 px or 10 ppt
|
|
||||||
bindsym Down resize shrink height 10 px or 10 ppt
|
|
||||||
bindsym Right resize grow width 10 px or 10 ppt
|
|
||||||
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
bindsym $mod+r mode "default"
|
|
||||||
}
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
mode "passthrough" {
|
|
||||||
bindsym Mod4+Escape mode "default"
|
|
||||||
}
|
|
||||||
bindsym Mod4+Escape mode "passthrough"
|
|
||||||
|
|
||||||
# colors
|
|
||||||
set $color_bg #2F343F
|
|
||||||
set $color_bg_inactive #2F343F
|
|
||||||
set $color_text #F3F4F5
|
|
||||||
set $color_text_inactive #676E7D
|
|
||||||
set $color_bg_urgent #E53935
|
|
||||||
set $color_indicator #00FF00
|
|
||||||
|
|
||||||
set $color_separator #666666
|
|
||||||
set $color_ws #5294E2
|
|
||||||
set $color_ws_inactive #2F343F
|
|
||||||
set $color_ws_text #FFFFFF
|
|
||||||
set $color_ws_text_inactive #D3DAE3
|
|
||||||
|
|
||||||
# window colors
|
|
||||||
client.focused $color_bg $color_bg $color_text $color_indicator
|
|
||||||
client.unfocused $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator
|
|
||||||
client.focused_inactive $color_bg_inactive $color_bg_inactive $color_text_inactive $color_indicator
|
|
||||||
client.urgent $color_bg_urgent $color_bg_urgent $color_text $color_indicator
|
|
||||||
|
|
||||||
bar {
|
|
||||||
status_command i3status
|
|
||||||
position top
|
|
||||||
workspace_buttons yes
|
|
||||||
tray_output primary
|
|
||||||
tray_padding 1
|
|
||||||
colors {
|
|
||||||
background $color_bg
|
|
||||||
statusline $color_ws_text_inactive
|
|
||||||
separator $color_separator
|
|
||||||
focused_workspace $color_ws $color_ws $color_ws_text
|
|
||||||
active_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
|
|
||||||
inactive_workspace $color_ws_inactive $color_ws_inactive $color_ws_text_inactive
|
|
||||||
urgent_workspace $color_bg_urgent $color_bg_urgent $color_ws_text
|
|
||||||
}
|
|
||||||
}
|
|
144
i3/lockscreen.sh
144
i3/lockscreen.sh
|
@ -1,144 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# shellcheck source=.lockvars
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
[ -f "$HOME/.lockvars" ] && [ -r "$HOME/.lockvars" ] && . ~/.lockvars
|
|
||||||
|
|
||||||
LOCK_TIME=${LOCK_TIME:-3}
|
|
||||||
LOCK_NOTIFY_TIME=${LOCK_NOTIFY_TIME:-15}
|
|
||||||
|
|
||||||
SOCK_PATH="/run/user/${UID}/i3/locksock-${XDG_SESSION_ID:-unknown}"
|
|
||||||
|
|
||||||
if [ -n "${WAYLAND_DISPLAY}" ]; then
|
|
||||||
LOCK_CMD="swaylock"
|
|
||||||
else
|
|
||||||
LOCK_CMD="i3lock"
|
|
||||||
fi
|
|
||||||
|
|
||||||
OUTPUT_IMAGE="$HOME/.lockscreen.png"
|
|
||||||
|
|
||||||
error(){
|
|
||||||
echo -e '\e[01;31m"$*"\e[0m' >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
usage(){
|
|
||||||
#TODO
|
|
||||||
cat >&2 <<-FIN
|
|
||||||
Usage:
|
|
||||||
-f force lock
|
|
||||||
-l execute the locker
|
|
||||||
-n send notification
|
|
||||||
-d execute the xautolock daemon
|
|
||||||
-h help
|
|
||||||
|
|
||||||
Mind, that the options are order-sensitive:
|
|
||||||
-lf != -fl && -l == -lf
|
|
||||||
|
|
||||||
(-fl is probably the thing you want)
|
|
||||||
FIN
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
checkfull(){
|
|
||||||
[ 1 -eq "$force" ] || ~/.local/bin/checknofullscreen
|
|
||||||
}
|
|
||||||
|
|
||||||
encrypt_the_chest(){
|
|
||||||
if command -v systemctl &>/dev/null; then
|
|
||||||
systemctl hibernate || shutdown now
|
|
||||||
else
|
|
||||||
shutdown now
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
lock(){
|
|
||||||
socat /dev/null "UNIX-LISTEN:${SOCK_PATH}" &
|
|
||||||
local socat_pid=$!
|
|
||||||
|
|
||||||
scrot -z "$OUTPUT_IMAGE"
|
|
||||||
convert "$OUTPUT_IMAGE" -resize 20% -level 0%,100%,0.9 -blur 0x2 -resize 500% "$OUTPUT_IMAGE"
|
|
||||||
|
|
||||||
${LOCK_CMD} \
|
|
||||||
-t \
|
|
||||||
-n \
|
|
||||||
-i "$OUTPUT_IMAGE"
|
|
||||||
|
|
||||||
rm "$OUTPUT_IMAGE"
|
|
||||||
kill ${socat_pid}
|
|
||||||
}
|
|
||||||
|
|
||||||
notification(){
|
|
||||||
notify-send \
|
|
||||||
-a lockscreen \
|
|
||||||
-c lock-warn \
|
|
||||||
-u critical \
|
|
||||||
-t 100 \
|
|
||||||
-i system-lock-screen \
|
|
||||||
"Locking Screen" \
|
|
||||||
"Will Lock Screen in 15s"
|
|
||||||
}
|
|
||||||
|
|
||||||
daemon_signallistener(){
|
|
||||||
dbus-monitor --system --profile path=/org/freedesktop/login1 2>/dev/null \
|
|
||||||
| while read -r _ _ _ _ _ _ _ signal _; do
|
|
||||||
case "${signal}" in
|
|
||||||
PrepareForSleep) $0 -fl & ;;
|
|
||||||
*) true;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
daemon_xautolock() {
|
|
||||||
# Do not use -secure option, as we have to use -locknow
|
|
||||||
xautolock \
|
|
||||||
-time "$LOCK_TIME" \
|
|
||||||
-locker "$0 -l" \
|
|
||||||
-nowlocker "$0 -fl" \
|
|
||||||
-notify "$LOCK_NOTIFY_TIME" \
|
|
||||||
-notifier "$0 -n" \
|
|
||||||
-noclose
|
|
||||||
}
|
|
||||||
|
|
||||||
# Listen for signals from the DBus Service as
|
|
||||||
# xautolock does not always catch system sleeps
|
|
||||||
daemon(){
|
|
||||||
daemon_signallistener &
|
|
||||||
local pid_signal=$!
|
|
||||||
|
|
||||||
daemon_xautolock &
|
|
||||||
local pid_xautolock=$!
|
|
||||||
|
|
||||||
trap 'kill "${pid_xautolock}" "${pid_signal}" && wait'
|
|
||||||
wait
|
|
||||||
}
|
|
||||||
|
|
||||||
force=0
|
|
||||||
|
|
||||||
while getopts ":hdfln" opt; do
|
|
||||||
case $opt in
|
|
||||||
h)
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
f)
|
|
||||||
force=1
|
|
||||||
;;
|
|
||||||
l)
|
|
||||||
[ -S "${SOCK_PATH}" ] \
|
|
||||||
|| (checkfull && (lock )) #|| encrypt_the_chest))
|
|
||||||
;;
|
|
||||||
n)
|
|
||||||
checkfull && notification
|
|
||||||
;;
|
|
||||||
d)
|
|
||||||
daemon
|
|
||||||
;;
|
|
||||||
\?)
|
|
||||||
error "Invalid option: -${opt}"
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
:)
|
|
||||||
error "Option -${opt} requires an argument."
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
Loading…
Add table
Add a link
Reference in a new issue