dotfiles-x11b8c1f0f
hyprland: use kanshi for auto-management of monitors
+59 −151
8 files changed
- A .config/hypr/hypridle.conf +11 −0
- M .config/hypr/hyprland.conf +25 −50
- A .config/kanshi/config +22 −0
- M .config/shell/profile +1 −1
- D .config/wal/templates/dunstrc +0 −60
- D .local/bin/setwall +0 −5
- D .local/bin/sysact +0 −26
- D .local/bin/wrdm +0 −9
| @@ -0,0 +1,11 @@ | |||
| 1 | + | general { | |
| 2 | + | lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances. | |
| 3 | + | before_sleep_cmd = loginctl lock-session # lock before suspend. | |
| 4 | + | after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display. | |
| 5 | + | } | |
| 6 | + | ||
| 7 | + | listener { | |
| 8 | + | timeout = 330 # 5.5min | |
| 9 | + | on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed | |
| 10 | + | on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired. | |
| 11 | + | } | |
| @@ -1,35 +1,11 @@ | |||
| 1 | 1 | autogenerated = 0 | |
| 2 | 2 | ||
| 3 | − | env = HYPRSHOT_DIR,/home/krolyxon/pix/ss/ | |
| 4 | − | ||
| 5 | − | ||
| 6 | − | plugin { | |
| 7 | − | split-monitor-workspaces { | |
| 8 | − | count = 10 | |
| 9 | − | keep_focused = 1 | |
| 10 | − | enable_notifications = 0 | |
| 11 | − | enable_persistent_workspaces = 1 | |
| 12 | − | } | |
| 13 | − | } | |
| 14 | − | ||
| 15 | − | # This is an example Hyprland config file. | |
| 16 | − | # Refer to the wiki for more information. | |
| 17 | − | # https://wiki.hypr.land/Configuring/ | |
| 18 | − | ||
| 19 | − | # Please note not all available settings / options are set here. | |
| 20 | − | # For a full list, see the wiki | |
| 21 | − | ||
| 22 | − | # You can split this configuration into multiple files | |
| 23 | − | # Create your files separately and then link them to this file like this: | |
| 24 | − | source = ~/.config/hypr/monitors.conf | |
| 3 | + | # source = ~/.config/hypr/monitors.conf | |
| 25 | 4 | ||
| 26 | 5 | ||
| 27 | 6 | ################### | |
| 28 | 7 | ### MY PROGRAMS ### | |
| 29 | 8 | ################### | |
| 30 | − | # See https://wiki.hypr.land/Configuring/Keywords/ | |
| 31 | − | ||
| 32 | − | # Set programs that you use | |
| 33 | 9 | $terminal = alacritty | |
| 34 | 10 | $fileManager = pcmanfm | |
| 35 | 11 | # $menu = rofi -show drun | |
| @@ -40,12 +16,10 @@ $browser = brave | |||
| 40 | 16 | ################# | |
| 41 | 17 | ### AUTOSTART ### | |
| 42 | 18 | ################# | |
| 43 | − | ||
| 44 | − | # Autostart necessary processes (like notifications daemons, status bars, etc.) | |
| 45 | − | # Or execute your favorite apps at launch like this: | |
| 46 | − | ||
| 47 | 19 | exec-once = hyprpm reload -n | |
| 20 | + | exec-once = kanshi | |
| 48 | 21 | exec-once = waybar & hyprpaper & swaync & hyprsunset | |
| 22 | + | exec-once = hypridle | |
| 49 | 23 | exec-once = systemctl --user start hyprpolkitagent | |
| 50 | 24 | ||
| 51 | 25 | plugin { | |
| @@ -58,37 +32,40 @@ plugin { | |||
| 58 | 32 | ############################# | |
| 59 | 33 | ### ENVIRONMENT VARIABLES ### | |
| 60 | 34 | ############################# | |
| 61 | − | ||
| 62 | 35 | # See https://wiki.hypr.land/Configuring/Environment-variables/ | |
| 63 | − | ||
| 36 | + | env = HYPRSHOT_DIR,/home/krolyxon/pix/ss/ | |
| 64 | 37 | env = XCURSOR_SIZE,24 | |
| 65 | 38 | env = HYPRCURSOR_SIZE,24 | |
| 66 | 39 | ||
| 40 | + | ####################### | |
| 41 | + | ### PLUGIN SETTINGS ### | |
| 42 | + | ####################### | |
| 43 | + | plugin { | |
| 44 | + | split-monitor-workspaces { | |
| 45 | + | count = 10 | |
| 46 | + | keep_focused = 1 | |
| 47 | + | enable_notifications = 0 | |
| 48 | + | enable_persistent_workspaces = 1 | |
| 49 | + | } | |
| 50 | + | } | |
| 51 | + | ||
| 52 | + | ||
| 67 | 53 | ||
| 68 | 54 | ################### | |
| 69 | 55 | ### PERMISSIONS ### | |
| 70 | 56 | ################### | |
| 57 | + | ecosystem { | |
| 58 | + | enforce_permissions = 1 | |
| 59 | + | } | |
| 71 | 60 | ||
| 72 | − | # See https://wiki.hypr.land/Configuring/Permissions/ | |
| 73 | − | # Please note permission changes here require a Hyprland restart and are not applied on-the-fly | |
| 74 | − | # for security reasons | |
| 75 | − | ||
| 76 | − | # ecosystem { | |
| 77 | − | # enforce_permissions = 1 | |
| 78 | − | # } | |
| 79 | − | ||
| 80 | − | # permission = /usr/(bin|local/bin)/grim, screencopy, allow | |
| 81 | − | # permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow | |
| 82 | − | # permission = /usr/(bin|local/bin)/hyprpm, plugin, allow | |
| 61 | + | permission = /usr/(bin|local/bin)/grim, screencopy, allow | |
| 62 | + | permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow | |
| 63 | + | permission = /usr/(bin|local/bin)/hyprpm, plugin, allow | |
| 83 | 64 | ||
| 84 | 65 | ||
| 85 | 66 | ##################### | |
| 86 | 67 | ### LOOK AND FEEL ### | |
| 87 | 68 | ##################### | |
| 88 | − | ||
| 89 | − | # Refer to https://wiki.hypr.land/Configuring/Variables/ | |
| 90 | − | ||
| 91 | − | # https://wiki.hypr.land/Configuring/Variables/#general | |
| 92 | 69 | general { | |
| 93 | 70 | gaps_in = 10 | |
| 94 | 71 | gaps_out = 10 | |
| @@ -100,7 +77,6 @@ general { | |||
| 100 | 77 | layout = master | |
| 101 | 78 | } | |
| 102 | 79 | ||
| 103 | − | # https://wiki.hypr.land/Configuring/Variables/#decoration | |
| 104 | 80 | decoration { | |
| 105 | 81 | rounding = 0 | |
| 106 | 82 | ||
| @@ -115,7 +91,6 @@ decoration { | |||
| 115 | 91 | # shadow_render_power = 3 | |
| 116 | 92 | # col.shadow = rgba(1a1a1aee) | |
| 117 | 93 | } | |
| 118 | − | # https://wiki.hypr.land/Configuring/Variables/#animations | |
| 119 | 94 | ||
| 120 | 95 | animations { | |
| 121 | 96 | enabled = yes | |
| @@ -147,7 +122,7 @@ dwindle { | |||
| 147 | 122 | # See https://wiki.hypr.land/Configuring/Master-Layout/ for more | |
| 148 | 123 | master { | |
| 149 | 124 | new_status = master | |
| 150 | − | # new_on_top = true | |
| 125 | + | new_on_top = true | |
| 151 | 126 | ||
| 152 | 127 | } | |
| 153 | 128 | ||
| @@ -211,7 +186,7 @@ bind = $mainMod SHIFT, R, togglefloating, | |||
| 211 | 186 | bind = $mainMod, R, exec, $menu | |
| 212 | 187 | bind = $mainMod SHIFT, P, pseudo, # dwindle | |
| 213 | 188 | bind = $mainMod, J, togglesplit, # dwindle | |
| 214 | − | bind = $mainMod, tab, cyclenext | |
| 189 | + | bind = $mainMod, tab, cyclenext, prev | |
| 215 | 190 | bind = $mainMod, b, exec, killall waybar || waybar | |
| 216 | 191 | ||
| 217 | 192 | # Applications | |
| @@ -0,0 +1,22 @@ | |||
| 1 | + | profile laptop-only { | |
| 2 | + | output eDP-1 { | |
| 3 | + | enable | |
| 4 | + | mode 1920x1080 | |
| 5 | + | scale 1 | |
| 6 | + | position 0,0 | |
| 7 | + | } | |
| 8 | + | } | |
| 9 | + | ||
| 10 | + | profile docked { | |
| 11 | + | output eDP-1 { | |
| 12 | + | mode 1920x1080 | |
| 13 | + | scale 1 | |
| 14 | + | position 0,0 | |
| 15 | + | } | |
| 16 | + | ||
| 17 | + | output HDMI-A-1 { | |
| 18 | + | mode 1920x1080 | |
| 19 | + | scale 1 | |
| 20 | + | position 1920,0 | |
| 21 | + | } | |
| 22 | + | } | |
| @@ -56,4 +56,4 @@ export MPD_PORT="6600" | |||
| 56 | 56 | [ ! -s ~/.config/mpd/pid ] && mpd | |
| 57 | 57 | ||
| 58 | 58 | # Start graphical server on user's current tty if not already running. | |
| 59 | − | [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" | |
| 59 | + | [ "$(tty)" = "/dev/tty1" ] && ! pidof -s hyprland >/dev/null 2>&1 && exec hyprland | |
| @@ -1,60 +0,0 @@ | |||
| 1 | − | # New Start: A modern Arch workflow built with an emphasis on functionality. | |
| 2 | − | # Copyright (C) 2018 Donovan Glover | |
| 3 | − | ||
| 4 | − | # NOTE: This file is automatically generated by pywal. Do not edit it by hand. | |
| 5 | − | ||
| 6 | − | [global] | |
| 7 | − | # Make the width 3740 (3840 - 100), have 50 left margin and 95 above | |
| 8 | − | # geometry = "3740x5-50+95" | |
| 9 | − | offset = 3x20 | |
| 10 | − | ||
| 11 | − | # Show multiple notifications in the same box | |
| 12 | − | separator_height = 0 | |
| 13 | − | ||
| 14 | − | # Add vertical padding to the inside of the notification | |
| 15 | − | padding = 8 | |
| 16 | − | ||
| 17 | − | # Add horizontal padding for when the text gets long enough | |
| 18 | − | horizontal_padding = 8 | |
| 19 | − | ||
| 20 | − | # The frame color and width of the notification | |
| 21 | − | frame_color = "{color6}" | |
| 22 | − | frame_width = 2 | |
| 23 | − | ||
| 24 | − | # How long a user needs to be idle for sticky notifications | |
| 25 | − | idle_threshold = 120 | |
| 26 | − | ||
| 27 | − | # Font and typography settings | |
| 28 | − | font = JetBrainsMono Nerd Font 10 | |
| 29 | − | alignment = left | |
| 30 | − | word_wrap = yes | |
| 31 | − | ||
| 32 | − | # Format for how notifications will be displayed | |
| 33 | − | # Usage: `notify-send 'Title' 'Summary'` | |
| 34 | − | format = "<b>%s</b>\n%b" | |
| 35 | − | ||
| 36 | − | # Allow some HTML tags like <i> and <u> in notifications | |
| 37 | − | markup = full | |
| 38 | − | max_icon_size = 120 | |
| 39 | − | transparency = 5 | |
| 40 | − | ||
| 41 | − | # These are the keybindings used to control dunst notifications | |
| 42 | − | [shortcuts] | |
| 43 | − | close = ctrl+space | |
| 44 | − | close_all = ctrl+shift+space | |
| 45 | − | history = ctrl+grave | |
| 46 | − | ||
| 47 | − | # Set the background and foreground (text) color for all notifications | |
| 48 | − | [urgency_low] | |
| 49 | − | background = "{background}" | |
| 50 | − | foreground = "{foreground}" | |
| 51 | − | ||
| 52 | − | [urgency_normal] | |
| 53 | − | background = "{background}" | |
| 54 | − | foreground = "{foreground}" | |
| 55 | − | ||
| 56 | − | [urgency_critical] | |
| 57 | − | background = "{background}" | |
| 58 | − | foreground = "{foreground}" | |
| 59 | − | ||
| 60 | − | # vim:ft=cfg | |
| @@ -1,5 +0,0 @@ | |||
| 1 | − | #!/bin/sh | |
| 2 | − | xwallpaper --zoom ~/.local/share/bg.jpg | |
| 3 | − | wal -c | |
| 4 | − | wal -i ~/.local/share/bg.jpg | |
| 5 | − | xdotool key super+F5 | |
| @@ -1,26 +0,0 @@ | |||
| 1 | − | #!/bin/sh | |
| 2 | − | ||
| 3 | − | export WM="dwm" | |
| 4 | − | case "$(readlink -f /sbin/init)" in | |
| 5 | − | *systemd*) ctl='systemctl' ;; | |
| 6 | − | *) ctl='loginctl' ;; | |
| 7 | − | esac | |
| 8 | − | ||
| 9 | − | wmpid(){ # This function is needed if there are multiple instances of the window manager. | |
| 10 | − | tree="$(pstree -ps $$)" | |
| 11 | − | tree="${tree#*$WM(}" | |
| 12 | − | echo "${tree%%)*}" | |
| 13 | − | } | |
| 14 | − | ||
| 15 | − | ||
| 16 | − | case "$(printf " lock\n leave $WM\n renew $WM\n hibernate\n reboot\n shutdown\n sleep\n display off" | dmenu -i -l 15 -p 'Action: ')" in | |
| 17 | − | ' lock') slock ;; | |
| 18 | − | " leave $WM") kill -TERM "$(wmpid)" ;; | |
| 19 | − | " renew $WM") kill -HUP "$(wmpid)" ;; | |
| 20 | − | ' hibernate') slock $ctl hibernate -i ;; | |
| 21 | − | ' sleep') slock $ctl suspend -i ;; | |
| 22 | − | ' reboot') $ctl reboot -i ;; | |
| 23 | − | ' shutdown') $ctl poweroff -i ;; | |
| 24 | − | ' display off') xset dpms force off ;; | |
| 25 | − | *) exit 1 ;; | |
| 26 | − | esac | |
| @@ -1,9 +0,0 @@ | |||
| 1 | − | #!/bin/env bash | |
| 2 | − | ||
| 3 | − | # word=$(dmenu -p "Enter Word: " <&-) | |
| 4 | − | word=$(cat ~/.local/bin/words.txt | dmenu -l 25 -p "Choose Word: ") | |
| 5 | − | #$BROWSER https://www.merriam-webster.com/dictionary/$word | |
| 6 | − | if [[ -n $word ]]; then | |
| 7 | − | $BROWSER "https://www.google.com/search?hl=en&q=define+$word" | |
| 8 | − | fi | |
| 9 | − | ||