From aa1e80d0113585a8b63c2c2181848150351616ed Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 18 Feb 2021 21:25:54 +0530 Subject: played around with XMonad TreeSelect --- XMonad/xmonad.hs | 31 ++++++++++++++++++++++++++++--- scripts/autostart | 3 --- scripts/clear-nf | 4 ---- scripts/clear-nfcenter | 4 ---- scripts/dnd | 13 ------------- scripts/launch-lemonbar | 15 --------------- scripts/launch_terminals_ke-site | 12 ++++++++++++ 7 files changed, 40 insertions(+), 42 deletions(-) delete mode 100755 scripts/autostart delete mode 100755 scripts/clear-nf delete mode 100755 scripts/clear-nfcenter delete mode 100755 scripts/dnd delete mode 100755 scripts/launch-lemonbar create mode 100755 scripts/launch_terminals_ke-site diff --git a/XMonad/xmonad.hs b/XMonad/xmonad.hs index 3092b7da..c6724517 100644 --- a/XMonad/xmonad.hs +++ b/XMonad/xmonad.hs @@ -173,11 +173,35 @@ myTSConfig = TS.TSConfig { TS.ts_hidechildren = False myPowerMenu :: TS.TSConfig (X ()) -> X () myPowerMenu a = TS.treeselectAction a - [Node (TS.TSNode "SHUTDOWN" "It's not like I'm gonna miss you, b- baka!" (spawn "xmessage bye!")) [] - , Node (TS.TSNode "REBOOT" "Be quick, okay?" (spawn "st")) [] + [Node (TS.TSNode "SHUTDOWN" "It's not like I'm gonna miss you, b- baka!" (spawn "shutdown now")) [] + , Node (TS.TSNode "REBOOT" "Be quick, okay?" (spawn "reboot")) [] , Node (TS.TSNode "CANCEL" "Do nothing" (return ())) [] ] +myTreeMenu :: TS.TSConfig (X ()) -> X () +myTreeMenu a = TS.treeselectAction a + [ Node (TS.TSNode "Section Screenshot" "Take screenshot of a section on the screen" (spawn "scrot -s /zt/Screenshots/Screenshot-%Y-%d-%m--%T.png")) [] + , Node (TS.TSNode "Terminals" "Launch terminals for various tasks" (return())) + [ Node (TS.TSNode "Web dev" "for websites" (return())) + [ Node (TS.TSNode "KE-Site" "Kalawati Enterprises Site" (spawn "launch_terminals_ke-site")) [] + ] + ] + , Node (TS.TSNode "GUI Apps" "Shitty apps that require a mouse" (return())) + [ Node (TS.TSNode "Torrents" "" (spawn "qbittorrent")) [] + , Node (TS.TSNode "Pavucontrol" "" (spawn "Pavucontrol")) [] + , Node (TS.TSNode "Discord" "" (spawn "discord-canary")) [] + , Node (TS.TSNode "LibreOffice" "" (spawn "libreoffice")) [] + , Node (TS.TSNode "Vivaldi" "" (spawn "vivaldi-stable")) [] + , Node (TS.TSNode "Firefox" "" (spawn "firefox")) [] + ] + , Node (TS.TSNode "Terminal Apps" "Command line apps" (return())) + [ Node (TS.TSNode "Htop" "" (spawn "st -e htop")) [] + , Node (TS.TSNode "Bashtop" "" (spawn "st -e bashtop")) [] + , Node (TS.TSNode "Ranger" "" (spawn "st -e ranger")) [] + ] + ] + + -- scratchpad config myScratchpads = [ @@ -200,7 +224,8 @@ myKeys = [ , ((myModMask, xK_a), withFocused $ windows . W.sink) -- unfloat windows -- TreeSelect - , ((mod1Mask, xK_F4), myPowerMenu myTSConfig) + , ((altMask, xK_F4), myPowerMenu myTSConfig) + , ((myModMask, xK_n), myTreeMenu myTSConfig) -- launch apps/execute scripts -- , ((myModMask, xK_i), spawn (myBrowser)) diff --git a/scripts/autostart b/scripts/autostart deleted file mode 100755 index 802a1820..00000000 --- a/scripts/autostart +++ /dev/null @@ -1,3 +0,0 @@ -picom & -firefox & -nitrogen --restore & diff --git a/scripts/clear-nf b/scripts/clear-nf deleted file mode 100755 index 4cb96e8d..00000000 --- a/scripts/clear-nf +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh - -notify-send.py a --hint boolean:deadd-notification-center:true \ - string:type:clearPopups diff --git a/scripts/clear-nfcenter b/scripts/clear-nfcenter deleted file mode 100755 index 4acfe9c1..00000000 --- a/scripts/clear-nfcenter +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh - -notify-send.py a --hint boolean:deadd-notification-center:true \ - string:type:clearInCenter diff --git a/scripts/dnd b/scripts/dnd deleted file mode 100755 index 92722f7f..00000000 --- a/scripts/dnd +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/zsh -STATUS=$( /tmp/dnd_status -elif [ $( /tmp/dnd_status -fi - diff --git a/scripts/launch-lemonbar b/scripts/launch-lemonbar deleted file mode 100755 index 3ee28cbe..00000000 --- a/scripts/launch-lemonbar +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# this script executes the mainbar script -# then pipes it into lemonbar -# and pipes the lemonbar's output -# to the button-actions script -# which handles all the button actions - -cd /home/zt/.config/lemonbar - -./ws_bar | lemonbar -g 1366x21 -b -B '#171520' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "mainbar" -o 0 | ./ws_button_actions - -notify-send "Lemonbar" "Bar(s) crashed/killed" - -exit diff --git a/scripts/launch_terminals_ke-site b/scripts/launch_terminals_ke-site new file mode 100755 index 00000000..d375fb83 --- /dev/null +++ b/scripts/launch_terminals_ke-site @@ -0,0 +1,12 @@ +#!/bin/bash +# this script launches four terminals where +# the website I'm currently working upon is + +cd /zt/Docs/web/KEsite/KE-website/ +st & st & + +cd templates/ +st & + +cd ../static/css/ +st & -- cgit v1.2.3