From 11e49f34e6f9f70306808fc8aff87c8b2a854698 Mon Sep 17 00:00:00 2001 From: Vlad Doster Date: Sun, 5 Apr 2020 01:50:48 -0500 Subject: [PATCH] Added new power script, updated i3 commands, and cleaned up xprofile until I figure out the imwheel issue --- .config/i3/config | 20 ++++++-------------- .local/bin/dmenu_systempoweroptions | 11 +++++++++++ .xprofile | 5 +---- 3 files changed, 18 insertions(+), 18 deletions(-) create mode 100755 .local/bin/dmenu_systempoweroptions diff --git a/.config/i3/config b/.config/i3/config index 92cb5e41..407a4985 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -5,20 +5,15 @@ # #---Variables---# # set $inner_gap 10 -set $outer_gap 5 - -# #---Polybar---# # -exec_always --no-startup-id launch_polybar - -# #---Basic Definitions---# # -for_window [class="^.*"] border pixel 2 -gaps inner $inner_gap -gaps outer $outer_gap +set $outer_gap 2 set $term --no-startup-id $TERMINAL set $mod Mod4 set $netrefresh --no-startup-id sudo -A systemctl restart NetworkManager set $stoprec --no-startup-id dmenu_record kill +# #---Polybar---# # +exec_always --no-startup-id launch_polybar + # #---Gaps---# # for_window [class="^.*"] border pixel 2 gaps inner $inner_gap @@ -35,7 +30,6 @@ for_window [instance="dropdown_dropdowncalc"] resize set 800 300 for_window [instance="dropdown_tmuxdd"] border pixel 3 for_window [instance="dropdown_dropdowncalc"] border pixel 2 for_window [instance="dropdown_*"] move position center -for_window [class="discord"] move to workspace $ws10 for_window [class="Pulse"] move to workspace $ws9 # #---Basic Bindings---# # @@ -47,10 +41,8 @@ bindsym $mod+Escape workspace prev bindsym $mod+grave exec --no-startup-id dmenu_unicode bindsym $mod+Insert exec --no-startup-id showclip -# #---Power Bindings---# # -bindsym $mod+Shift+Escape exec --no-startup-id prompt "Exit Xorg Session?" "i3 exit" -bindsym $mod+Shift+BackSpace exec --no-startup-id prompt "Reboot computer?" "$reboot" -bindsym $mod+Ctrl+x exec --no-startup-id prompt "Shutdown computer?" "$shutdown" +# #---User Session Bindings---# # +bindsym $mod+Shift+Escape exec --no-startup-id dmenu_systempoweroptions # #---Letter Key Bindings---# # # A diff --git a/.local/bin/dmenu_systempoweroptions b/.local/bin/dmenu_systempoweroptions new file mode 100755 index 00000000..ceed8126 --- /dev/null +++ b/.local/bin/dmenu_systempoweroptions @@ -0,0 +1,11 @@ +#!/bin/sh + +user_choice=$(printf "Logout\nPoweroff\nReboot\nCancel" | dmenu -i -p "What should the computer do?: ") +case "$user_choice" in + "Logout") i3 exit ;; + "Poweroff") notify-send "Shutting down in 10 seconds" && sleep 10 && shutdown ;; + "Reboot") notify-send "Rebooting!" && sleep 5 && reboot ;; + *) notify-send "No system power option selected" && return ;; +esac + + diff --git a/.xprofile b/.xprofile index 1a24c0df..c2e2ac96 100644 --- a/.xprofile +++ b/.xprofile @@ -3,13 +3,10 @@ # This file runs when a DM logs you into a graphical session. # If you use startx/xinit like a Chad, this file will also be sourced. -# Set computer date and time -ntpd -gq - remaps & # run the remaps script, switching caps/esc and more; check it for more info setbg & # set the background with the `setbg` script xcompmgr & # xcompmgr for transparency dunst & # dunst for notifications -imwheel & # imwheel for disabling scroll issues in st +#imwheel & # imwheel for disabling scroll issues in st xset r rate 300 50 & # Speed xrate up unclutter & # Remove mouse when idle