diff --git a/bin/executable_autostart b/bin/executable_autostart new file mode 100755 index 0000000..1a01f39 --- /dev/null +++ b/bin/executable_autostart @@ -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' & diff --git a/bin/executable_i3-blur-lock b/bin/executable_blur-lock similarity index 72% rename from bin/executable_i3-blur-lock rename to bin/executable_blur-lock index f8d9877..501fe55 100755 --- a/bin/executable_i3-blur-lock +++ b/bin/executable_blur-lock @@ -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' diff --git a/bin/executable_i3-blur-lock-and-screen-off b/bin/executable_blur-lock-and-screen-off similarity index 75% rename from bin/executable_i3-blur-lock-and-screen-off rename to bin/executable_blur-lock-and-screen-off index b2a2214..87438d0 100755 --- a/bin/executable_i3-blur-lock-and-screen-off +++ b/bin/executable_blur-lock-and-screen-off @@ -1,3 +1,3 @@ #!/bin/bash -i3-blur-lock +blur-lock sleep 1; xset dpms force off diff --git a/bin/executable_i3-blur-lock-and-suspend b/bin/executable_blur-lock-and-suspend similarity index 56% rename from bin/executable_i3-blur-lock-and-suspend rename to bin/executable_blur-lock-and-suspend index fb7370f..940219a 100755 --- a/bin/executable_i3-blur-lock-and-suspend +++ b/bin/executable_blur-lock-and-suspend @@ -1,3 +1,3 @@ #!/bin/bash -i3-blur-lock & sleep 5 +blur-lock & sleep 5 systemctl suspend diff --git a/bin/executable_drop b/bin/executable_drop index f6b752b..d6d1ca9 100644 --- a/bin/executable_drop +++ b/bin/executable_drop @@ -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' 'drop.bascht.space'") diff --git a/bin/executable_i3-dropshot b/bin/executable_dropshot similarity index 80% rename from bin/executable_i3-dropshot rename to bin/executable_dropshot index 3b245cc..86f937d 100644 --- a/bin/executable_i3-dropshot +++ b/bin/executable_dropshot @@ -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 diff --git a/bin/executable_gajim-gpg b/bin/executable_gajim-gpg deleted file mode 100755 index 22c9cbd..0000000 --- a/bin/executable_gajim-gpg +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -export GPG_AGENT_INFO=/home/bascht/.gnupg/S.gpg-agent:1729:1 -exec gajim diff --git a/bin/executable_i3-autostart b/bin/executable_i3-autostart deleted file mode 100755 index 79fccf4..0000000 --- a/bin/executable_i3-autostart +++ /dev/null @@ -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; diff --git a/bin/executable_i3-displayconfig b/bin/executable_i3-displayconfig deleted file mode 100755 index 5e00dca..0000000 --- a/bin/executable_i3-displayconfig +++ /dev/null @@ -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/ diff --git a/bin/executable_i3-inputconfig b/bin/executable_i3-inputconfig deleted file mode 100755 index 7998ad8..0000000 --- a/bin/executable_i3-inputconfig +++ /dev/null @@ -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 diff --git a/bin/executable_i3-polybar b/bin/executable_i3-polybar deleted file mode 100755 index c7aea61..0000000 --- a/bin/executable_i3-polybar +++ /dev/null @@ -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; - - diff --git a/bin/executable_i3-rofi b/bin/executable_i3-rofi deleted file mode 100755 index 623a311..0000000 --- a/bin/executable_i3-rofi +++ /dev/null @@ -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 diff --git a/bin/executable_i3-screenshot b/bin/executable_i3-screenshot deleted file mode 100755 index 8381e86..0000000 --- a/bin/executable_i3-screenshot +++ /dev/null @@ -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; diff --git a/bin/executable_screenshot b/bin/executable_screenshot new file mode 100755 index 0000000..d98c5c9 --- /dev/null +++ b/bin/executable_screenshot @@ -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 diff --git a/bin/executable_i3-mail b/bin/executable_unreadmail similarity index 100% rename from bin/executable_i3-mail rename to bin/executable_unreadmail diff --git a/dot_config/awesome/rc.lua b/dot_config/awesome/rc.lua index f948735..60e534c 100644 --- a/dot_config/awesome/rc.lua +++ b/dot_config/awesome/rc.lua @@ -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" } diff --git a/dot_config/sway/config b/dot_config/sway/config index bb0d115..3b83179 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -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