From 2b1696744fa839f9adf05337e810472c299e3652 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Wed, 23 Dec 2020 21:51:35 +0530 Subject: switching back to hlwm and addinf all the keybindings (back) to sxhkd --- .gitignore | 2 +- awesome/rc.lua | 2 +- herbstluftwm/autostart | 79 ++++------------------------------------------ sxhkd/sxhkdrc | 86 +++++++++++++++++++------------------------------- 4 files changed, 40 insertions(+), 129 deletions(-) diff --git a/.gitignore b/.gitignore index fa8d50b8..23c97fdf 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,4 @@ !sxhkd !XMonad !zsh -!scripts/ +!scripts diff --git a/awesome/rc.lua b/awesome/rc.lua index 8dc559cd..3436c68a 100755 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -41,7 +41,7 @@ modkey = "Mod4" -- app defaults terminal = "st" -launcher = "dmenu_run" +launcher = "run_dmenu" -- terminal apps editor = "nvim" diff --git a/herbstluftwm/autostart b/herbstluftwm/autostart index ff7afd37..9874f60e 100755 --- a/herbstluftwm/autostart +++ b/herbstluftwm/autostart @@ -1,82 +1,32 @@ #!/usr/bin/env bash - -# this is a simple config for herbstluftwm - hc() { herbstclient "$@" } - hc emit_hook reload -# xsetroot -solid '#ffffff' - # remove all existing keybindings hc keyunbind --all - +# focus follows mouse hc set focus_follows_mouse 1 -# keybindings -# if you have a super key you will be much happier with Mod set to Mod4 -# Mod=Mod1 # Use alt as the main modifier Mod=Mod4 # Use the super key as the main modifier -# hc keybind Mod1-Return spawn run_dmenu -# hc keybind Mod4-Shift-m spawn betterlockscreen -s -# hc keybind Mod1-s spawn scrot /zt/Screenshots/%Y-%d-%m-%T-screenshot.png -# hc keybind Mod4-Shift-Return spawn pcmanfm - -# autostart -firefox & -picom & -nitrogen --restore & -deadd-notification-center & -sxhkd & - -TERMINAL=st - +myTerminal=st +# keybindings (rest are handled by sxhkd) hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r reload hc keybind Mod1-w close -# hc keybind $Mod-Return spawn "${TERMINAL:-konsole}" # use your $TERMINAL with xterm as fallback - -# basic movement in tiling and floating mode -# focusing clients -hc keybind $Mod-Left focus left -hc keybind $Mod-Down focus down -hc keybind $Mod-Up focus up -hc keybind $Mod-Right focus right -hc keybind $Mod-h focus left -hc keybind $Mod-j focus down -hc keybind $Mod-k focus up -hc keybind $Mod-l focus right - -# moving clients in tiling and floating mode -hc keybind $Mod-Shift-Left shift left -hc keybind $Mod-Shift-Down shift down -hc keybind $Mod-Shift-Up shift up -hc keybind $Mod-Shift-Right shift right -hc keybind $Mod-Shift-h shift left -hc keybind $Mod-Shift-j shift down -hc keybind $Mod-Shift-k shift up -hc keybind $Mod-Shift-l shift right +hc keybind $Mod-Return spawn "${TERMINAL:-konsole}" # splitting frames # create an empty frame at the specified direction hc keybind $Mod-a split bottom 0.5 hc keybind $Mod-s split right 0.5 # let the current frame explode into subframes -hc keybind $Mod-f split explode +# hc keybind $Mod-f split explode -# resizing frames and floating clients +# for resizing frames and floating clients resizestep=0.02 -hc keybind Mod1-Mod4-h resize left +$resizestep -hc keybind Mod1-Mod4-j resize down +$resizestep -hc keybind Mod1-Mod4-k resize up +$resizestep -hc keybind Mod1-Mod4-l resize right +$resizestep -hc keybind $Mod-Control-Left resize left +$resizestep -hc keybind $Mod-Control-Down resize down +$resizestep -hc keybind $Mod-Control-Up resize up +$resizestep -hc keybind $Mod-Control-Right resize right +$resizestep # tags tag_names=( {1..9} 0 ) @@ -92,18 +42,8 @@ for i in "${!tag_names[@]}" ; do fi done -# cycle through tags -hc keybind Mod1-l use_index +1 --skip-visible -hc keybind Mod1-h use_index -1 --skip-visible -hc keybind Mod4-q use_index -1 --skip-visible -hc keybind Mod4-w use_index +1 --skip-visible - # layouting hc keybind $Mod-d remove -hc keybind Mod1-Shift-o floating toggle -hc keybind Mod1-p fullscreen toggle -hc keybind Mod1-o set_attr clients.focus.floating toggle -hc keybind Mod1-i pseudotile toggle # The following cycles through the available layouts within a frame, but skips # layouts, if the layout change wouldn't affect the actual window positions. # I.e. if there are two windows within a frame, the grid layout is skipped. @@ -118,13 +58,6 @@ hc mousebind $Mod-Button1 move hc mousebind $Mod-Button2 zoom hc mousebind $Mod-Button3 resize -# focus -hc keybind $Mod-BackSpace cycle_monitor -hc keybind Mod1-j cycle_all +1 -hc keybind Mod1-k cycle_all -1 -hc keybind Mod1-c cycle -hc keybind Mod1-u jumpto urgent - # theme hc attr theme.tiling.reset 1 hc attr theme.floating.reset 1 diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 13f5bc94..86b005eb 100755 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -1,69 +1,47 @@ -# wm-independent keybindings - # Restart hotkey damon super + shift + x killall sxhkd && sxhkd & -super + shift + w - nitrogen --restore - - -super + Return - st - -super + shift + Return - pcmanfm - -alt + Return - run_dmenu - -Print - scrot /zt/Screenshots/Screenshot-%Y-%d-%m--%T.png - -alt + F1 - betterlockscreen -l -t "pee pee poo poo" - -alt + F2 - pulseaudio-ctl mute - -alt + F3 - pulseaudio-ctl down - -alt + F4 - pulseaudio-ctl up - -alt + F8 - dnd -alt + F11 - pulseaudio-ctl -alt + F12 - kill -s USR1 $(pidof deadd-notification-center) -super + F1 - pcmanfm -super + F2 - pavucontrol -super + F3 - qbittorrent +# hlwm keybindings +# focus windows +super + {h,j,k,l} + herbstclient focus {left,down,up,right} -super + F4 - thunderbird +# move windows +super + shift + {h,j,k,l} + herbstclient shift {left,down,up,right} -super + F6 - gimp +# resizing frames / floating windows +super + alt + {h,j,k,l} + herbstclient resize {left,down,up,right} -super + F7 - nitrogen +# cycle through windows +alt + {j,k} + herbstclient cycle_all {+1,-1} -super + F10 - firefox +# cycle through workspaces +alt + {h,l} + herbstclient use_index {-1,+1} --skip-visible -super + F11 - st -e bashtop +# jump to urgent window +super + u + herbstclient jumpto urgent -super + F12 - st -e ranger +# layouting +# toggle fullscreen on current client +super + f + herbstclient fullscreen toggle +# toggle floating on current client +super + i + herbstclient set_attr clients.focus.floating toggle +# toggle floating on all clients on current ws +super + shift + i + herbstclient floating toggle +# toggle pseudotiling on current client +super + y + herbstclient pseudotile toggle -- cgit v1.2.3