diff options
| -rw-r--r-- | .config/dunst/dunstrc | 20 | ||||
| -rw-r--r-- | .config/jgmenu/append.csv | 4 | ||||
| -rw-r--r-- | .config/openbox/autostart | 28 | ||||
| -rw-r--r-- | .config/openbox/rc.xml | 2 | ||||
| -rwxr-xr-x | .i3lock/lock.sh | 17 | ||||
| -rwxr-xr-x | .xsession | 3 | ||||
| -rw-r--r-- | .zshrc | 41 |
7 files changed, 69 insertions, 46 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc index 5411a22..d10c054 100644 --- a/.config/dunst/dunstrc +++ b/.config/dunst/dunstrc @@ -18,18 +18,9 @@ follow = mouse # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "400x5-30-20" + width = 400 + origin = bottom-right + offset = 30x20 # Turn on the progess bar progress_bar = true @@ -45,7 +36,7 @@ progress_bar_min_width = 150 # Set the maximum width for the progress bar - progress_bar_max_width = 300 + progress_bar_max_width = 400 # Show how many messages are currently hidden (because of geometry). @@ -104,6 +95,9 @@ # section for how to disable this if necessary idle_threshold = 120 + # Sort messages by urgency. + sort = no + ### Text ### font = Noto Sans 11 diff --git a/.config/jgmenu/append.csv b/.config/jgmenu/append.csv index 3d300ab..5d0627d 100644 --- a/.config/jgmenu/append.csv +++ b/.config/jgmenu/append.csv @@ -3,5 +3,5 @@ Log Out,pkill -KILL -u $USER,system-log-out Lock Now,~/.i3lock/lock.sh now,system-lock-screen ^sep() Suspend,~/.i3lock/lock.sh suspend,system-suspend -Reboot,systemctl -i reboot,system-reboot -Shutdown,systemctl -i poweroff,system-shutdown +Reboot,loginctl reboot,system-reboot +Shutdown,loginctl poweroff,system-shutdown diff --git a/.config/openbox/autostart b/.config/openbox/autostart index 86768da..7b0d62b 100644 --- a/.config/openbox/autostart +++ b/.config/openbox/autostart @@ -2,34 +2,32 @@ # These commands are ran when an Openbox X Session is started. # -xhost +si:localuser:root # fixes unable to open display errors: https://askubuntu.com/a/1130413 +# xhost +si:localuser:root # fixes unable to open display errors: https://askubuntu.com/a/1130413 ~/.fehbg & # wallpaper -lead & # hot corners, this is MageJohn's fork: https://github.com/MageJohn/lead +# lead & # hot corners, this is MageJohn's fork: https://github.com/MageJohn/lead xcape -e 'Super_L=Super_L|P' & # used for the "windows" menu dunst & # notification daemon lxpolkit & # polkit -barrier & # using mouse & keyboard on other computers while connected to wifi xautolock -detectsleep -secure -time 15 -locker ~/.i3lock/lock.sh & # auto lock screen -xss-lock -- .i3lock/lock.sh suspend & # lock screen on lid closing; you'll also need to uncomment the HandleLidSwitch variable and assign to it "lock" (HandleLidSwitch=lock) inside /etc/systemd/logind.conf +while :; do if grep -Fq "closed" /proc/acpi/button/lid/LID0/state; then ~/.i3lock/lock.sh suspend && sleep 3; fi; sleep 0.5; done & # lock screen on lid closing; you'll also need to uncomment the HandleLidSwitch variable and assign to it "lock" (HandleLidSwitch=lock) inside /etc/systemd/logind.conf tint2 & # taskbar picom & # compositor setxkbmap -layout "us,bg" -variant ",phonetic" -option "grp:alt_shift_toggle" & # keyboard switching - libinput-gestures-setup start & # start gestures -pnmixer & # volume applet -nm-applet & # network applet +pnmixer & # volume applet +nm-applet & # network applet +~/dunst-toggler-applet.sh & # notification toggler +blueberry & # bluetooth app + flameshot & # screenshot utility redshift-gtk & # screen color temperature changer copyq & # clipboard manager +barrier & # share mouse and keyboard between devices +nextcloud & # cloud/source control -gtk-launch min & +electron-mail & +rambox & gtk-launch discord & -gtk-launch nextcloud-desktop & -gtk-launch rambox & -gtk-launch electron-mail & -/opt/Caprine.AppImage & - -~/dunst-toggler-applet.sh & # notification toggler -blueberry & # bluetooth app +min & diff --git a/.config/openbox/rc.xml b/.config/openbox/rc.xml index 43b6471..1f6310b 100644 --- a/.config/openbox/rc.xml +++ b/.config/openbox/rc.xml @@ -193,7 +193,7 @@ </startupnotify> <command>brightnessctl set 5%-</command> </action> - </keybind> + </keybind> <keybind key="W-d"> <action name="Execute"> <startupnotify> diff --git a/.i3lock/lock.sh b/.i3lock/lock.sh index 277d727..9ec6d4c 100755 --- a/.i3lock/lock.sh +++ b/.i3lock/lock.sh @@ -1,11 +1,16 @@ #!/bin/bash +## Helper functions res () { pkill $@ nohup $@ 2>&1 & disown } +# ++=================================++ +# || Actions before and after unlock || +# ++=================================++ + before_locking () { # Disables dunst, my notification daemon, so I don't see notification on lock screen # https://github.com/dunst-project/dunst/issues/697 @@ -25,6 +30,10 @@ when_unlocked_after_suspend () { gtk-launch picom # sometimes my compositor stops working after suspend, this makes sure it's running } +# ++==================================++ +# || Prevent locking because of audio || +# ++==================================++ + # This makes sure to not lock the screen if audio is playing and there are no arguments given # It's mainly for preventing automatic screen locking while a video/music is playing # If you still want to lock, just give it some argument, doesn't matter what @@ -50,6 +59,10 @@ if [ $(grep -r 'RUNNING' /proc/asound | wc -l) -gt 1 ] && [[ "$1" == 'suspend' ] exit fi +# ++============================++ +# || Lock if not locked already || +# ++============================++ + if ! pgrep i3lock 1>&2; then # The first line of i3lock arguments uses standard arguments, while the rest of the lines are i3lock-color ones # If you want to use i3lock, remove those lines (and the \ at the end) @@ -65,6 +78,10 @@ if ! pgrep i3lock 1>&2; then ) & fi +# ++=========++ +# || Suspend || +# ++=========++ + if [[ "$1" == 'suspend' ]]; then # A file is created to indicate that the system was suspended # After i3lock is done (unlocked), existence of this file is checked to determine if @@ -1 +1,4 @@ +if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then + eval "$(dbus-launch --sh-syntax --exit-with-session)" +fi exec openbox-session @@ -15,7 +15,8 @@ device="desktop" # can be either "desktop" (default when empty), "server" or "an # General {{{ # Exports {{{ export PATH=$HOME/bin:/usr/local/bin:$PATH # Adds ~/bin and /usr/local/bin paths to PATH - export PATH="$PATH:$HOME/.npm-global/bin" # Adds ~/.npm-global/bin path to PATH + export PATH="$PATH:$HOME/.npm-global/bin" # Adds ~/.npm-global/bin path to PATH + export PATH="$PATH:$HOME/go/bin" # Adds ~/go/bin to PATH # export LANG=en_US.UTF-8 # You may need to manually set your language environment @@ -267,21 +268,27 @@ device="desktop" # can be either "desktop" (default when empty), "server" or "an # }}} # Aliases {{{ + # portage {{{ + alias seq="sudo emerge --quiet-build -v" + alias sep="sudo emerge -pv" + alias sen="sudo ego sync && sudo emerge --quiet-build -vuDN @world" + # }}} + # dnf {{{ - alias sdi="sudo dnf install -y" - alias sdr="sudo dnf remove -y" - alias sda="sudo dnf autoremove -y" - # If you're using dotnet from the "packages-microsoft-com-prod" repo, make sure to - # add "exclude=dotnet* aspnetcore* netstandard*" inside the /etc/yum.repos.d/fedora.repo, /etc/yum.repos.d/fedora-updates.repo and potentially /etc/yum.repos.d/fedora33.repo - alias sdu="sudo dnf upgrade -y && sudo dnf autoremove -y && sudo youtube-dl --update && wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash && needs-restarting -r" - - alias ds="dnf search" - alias dcs="dnf copr search" - alias dp="dnf provides" - alias di="dnf info" - - alias sdce="sudo dnf copr enable -y" - alias sdcei='f() { sudo dnf copr enable -y $1 && sudo dnf install -y $2; unset -f f }; f' + # alias sdi="sudo dnf install -y" + # alias sdr="sudo dnf remove -y" + # alias sda="sudo dnf autoremove -y" + # # If you're using dotnet from the "packages-microsoft-com-prod" repo, make sure to + # # add "exclude=dotnet* aspnetcore* netstandard*" inside the /etc/yum.repos.d/fedora.repo, /etc/yum.repos.d/fedora-updates.repo and potentially /etc/yum.repos.d/fedora33.repo + # alias sdu="sudo dnf upgrade -y && sudo dnf autoremove -y && sudo youtube-dl --update && wget -O - https://raw.githubusercontent.com/laurent22/joplin/master/Joplin_install_and_update.sh | bash && needs-restarting -r" + # + # alias ds="dnf search" + # alias dcs="dnf copr search" + # alias dp="dnf provides" + # alias di="dnf info" + # + # alias sdce="sudo dnf copr enable -y" + # alias sdcei='f() { sudo dnf copr enable -y $1 && sudo dnf install -y $2; unset -f f }; f' # }}} # apt {{{ @@ -338,6 +345,10 @@ device="desktop" # can be either "desktop" (default when empty), "server" or "an # }}} # Functions {{{ + ses () { + sudo emerge -S "%$@" + } + # Execute multiple commands mexec () { for cmd in "${@[@]}"; do |
