From 1be74d658471e9a4a049ffe9f9536c67f93d01dd Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Tue, 8 Jun 2021 06:41:23 +0530 Subject: switched to tint2 in XMonad --- .config/XMonad/xmonad.hs | 74 ++++++++++++++++++++++++------------------------ .config/openbox/menu.xml | 38 ++++++++++++++++++------- .config/tint2/tint2rc | 49 +++++++++++++++++++++----------- 3 files changed, 96 insertions(+), 65 deletions(-) (limited to '.config') diff --git a/.config/XMonad/xmonad.hs b/.config/XMonad/xmonad.hs index 8085a33..732cdaa 100644 --- a/.config/XMonad/xmonad.hs +++ b/.config/XMonad/xmonad.hs @@ -2,7 +2,10 @@ import XMonad import qualified XMonad.StackSet as W import XMonad.ManageHook --- xmonad-log imports import qualified DBus as D import qualified DBus.Client as D import qualified Codec.Binary.UTF8.String as UTF8 +-- xmonad-log imports +-- import qualified DBus as D +-- import qualified DBus.Client as D +-- import qualified Codec.Binary.UTF8.String as UTF8 -- data import Data.Tree @@ -26,6 +29,7 @@ import XMonad.Layout.WindowNavigation as WN import XMonad.Layout.Renamed as R (renamed, Rename(Replace)) import XMonad.Layout.Maximize -- import XMonad.Layout.PerWorkspace +import XMonad.Layout.Fullscreen -- Layouts import XMonad.Layout.BinarySpacePartition as BSP @@ -39,11 +43,12 @@ import XMonad.Layout.Accordion import XMonad.Layout.ZoomRow + -- hooks import XMonad.Hooks.SetWMName import XMonad.Hooks.ManageDocks import XMonad.Hooks.DynamicLog -import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.EwmhDesktops (ewmh) -- utilities import XMonad.Util.SpawnOnce @@ -91,20 +96,20 @@ myLockscreen :: String myLockscreen = "betterlockscreen -l -t 'Yo, Vidhu!'" myScreenshot :: String -myScreenshot = "scrot /zt/Screenshots/Screenshot-%Y-%d-%m--%T.png" +myScreenshot = "scrot /home/zt/Media/Screenshots/Screenshot-%Y-%d-%m--%T.png" myColorPicker :: String myColorPicker = "colorpicker --short --one-shot --preview | xsel -b" -- volume myVolUp :: String -myVolUp = "pulseaudio-ctl up && killall lemonblocks -5" +myVolUp = "pamixer -i 2 && killall lemonblocks -5" myVolDown :: String -myVolDown = "pulseaudio-ctl down && killall lemonblocks -5" +myVolDown = "pamixer -d 2 && killall lemonblocks -5" myVolMute :: String -myVolMute = "pulseaudio-ctl mute && killall lemonblocks -5" +myVolMute = "pamixer -m && killall lemonblocks -5" myFont :: String @@ -113,18 +118,18 @@ myFont = "xft:Hack:style=Regular:size=12" -- wm variables --- fBorder = "#bf00ff" +fBorder = "#bf00ff" -- fBorder = "#3804f4" -fBorder = "#00ff85" +-- fBorder = "#00ff85" nBorder = "#130F23" -myBorderWidth = 1 +myBorderWidth = 2 sGap = 1 -- screen gap wGap = 2 -- window gap -myExtraWorkspaces = [(xK_0, " 十 ")] -- , (xK_comma, " 十一 "), (xK_period, " 十二 "), (xK_slash, " 十三 ")] -myWorkspaces = [" 一 "," 二 "," 三 "," 四 "," 五 "," 六 "," 七 "," 八 ", " 九 "] ++ (map snd myExtraWorkspaces) +myExtraWorkspaces = [(xK_0, "十")] -- , (xK_comma, " 十一 "), (xK_period, " 十二 "), (xK_slash, " 十三 ")] +myWorkspaces = ["一", "二", "三", "四", "五", "六", "七", "八", "九"] ++ (map snd myExtraWorkspaces) -- treeselect config defaultNavigation = M.fromList @@ -160,7 +165,7 @@ myTSConfig = TS.TSConfig { TS.ts_hidechildren = False 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 "Section Screenshot" "Take screenshot of a section on the screen" (spawn "scrot -s /home/zt/Media/Screenshots/Screenshot-%Y-%d-%m--%T.png")) [] , Node (TS.TSNode "Utilities" "" (return())) [ Node (TS.TSNode "Pavucontrol" "" (spawn "pavucontrol")) [] , Node (TS.TSNode "Color Picker" "" (spawn myColorPicker)) [] @@ -204,6 +209,7 @@ myScratchpads = [ -- keybindings myKeys = [ ((myModMask, xK_Return), spawn (myTerminal)) + , ((0, xK_Print), spawn (myScreenshot)) , ((myModMask .|. shiftMask, xK_Return), spawn (myScreenshot)) , ((myModMask, xK_q), spawn (myLockscreen)) , ((myModMask, xK_n), spawn ("dunstctl close-all")) @@ -223,10 +229,6 @@ myKeys = [ , ((myModMask, xK_m), runOrCopy "vlc" (className =? "vlc")) , ((myModMask .|. shiftMask, xK_m), spawnOn " 十 " "vlc") - -- volume - , ((altMask, xK_0), spawn (myVolMute)) - , ((altMask, xK_minus), spawn (myVolDown)) - , ((altMask, xK_equal), spawn (myVolUp)) -- scratchpad keybindings , ((myModMask, xK_u), namedScratchpadAction myScratchpads "Phone") @@ -311,29 +313,27 @@ myKeys = [ ] -- Emacs style keybindings myKeys' :: [(String, X ())] -myKeys' = - [-- Running or copying browsers - ("M-i f", runOrCopy "librewolf" (className =? "Firefox")) - , ("M-i S-f", spawn "librewolf") +myKeys' = [-- Running or copying browsers + ("M-i f", runOrCopy "librewolf" (className =? "Firefox")) + , ("M-i S-f", spawn "librewolf") , ("M-i b", spawn "brave") , ("M-i S-b", spawn "brave --incognito") - -- this doesn't work when in myKeys - , ("M-c", spawn myColorPicker) - -- Launchers + -- this doesn't work when in myKeys + , ("M-c", spawn myColorPicker) + -- Launchers , ("M-p", myTreeMenu myTSConfig) - , ("M-S-p", spawn myLauncher) - -- GridSelect - , ("M-g g", goToSelected defaultGSConfig) - , ("M-g b", bringSelected defaultGSConfig) + , ("M-S-p", spawn myLauncher) + -- GridSelect + , ("M-g g", goToSelected defaultGSConfig) + , ("M-g b", bringSelected defaultGSConfig) + -- volume + , ("", spawn (myVolMute)) + , ("", spawn (myVolDown)) + , ("", spawn (myVolUp)) ] -- mouse keybindings --- 1, 2, 3 = left, middle, right -myMouseBindings = [((altMask, 2), \w -> kill1) - -- , ((altMask, 1), \w -> spawn "pcmanfm") - -- , ((altMask, 3), \w -> spawn "konqueror") - , ((altMask, 2), \w -> spawn myVolMute) - , ((altMask, 4), \w -> spawn myVolDown) - , ((altMask, 5), \w -> spawn myVolUp) +myMouseBindings = [ + ((altMask, 2), \w -> kill1) , ((myModMask, 4), \w -> prevWS) , ((myModMask, 5), \w -> nextWS) ] @@ -404,7 +404,7 @@ main = do -- Request access to the DBus name -- D.requestName dbus (D.busName_ "org.xmonad.Log") -- [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue] - xmonad $ docks def + xmonad $ ewmh $ docks $ fullscreenSupport def { terminal = myTerminal, focusFollowsMouse = True, @@ -414,8 +414,8 @@ main = do normalBorderColor = nBorder, focusedBorderColor = fBorder, layoutHook = myLayoutHook, - manageHook = manageSpawn <+> namedScratchpadManageHook myScratchpads, - handleEventHook = handleEventHook def <+> fullscreenEventHook, + manageHook = manageSpawn <+> namedScratchpadManageHook myScratchpads <+> manageDocks, + -- handleEventHook = handleEventHook def <+> fullscreenEventHook, -- logHook = dynamicLogWithPP (myLemonbarPP dbus), logHook = dynamicLogWithPP myLemonbarPP { ppOutput = \x -> hPutStrLn notXMobar x}, diff --git a/.config/openbox/menu.xml b/.config/openbox/menu.xml index d150235..d12a5b8 100644 --- a/.config/openbox/menu.xml +++ b/.config/openbox/menu.xml @@ -142,8 +142,25 @@ + + + blueman-manager + + yes + + + + + + st + + yes + + + + @@ -163,6 +180,14 @@ + + + blueman-manager + + yes + + + lxappearance @@ -175,7 +200,7 @@ - st -e bashtop + prime-run alacritty -e bashtop yes @@ -183,7 +208,7 @@ - st -e htop + prime-run alacritty -e htop yes @@ -193,14 +218,6 @@ - - - st - - yes - - - prime-run alacritty @@ -233,7 +250,6 @@ - diff --git a/.config/tint2/tint2rc b/.config/tint2/tint2rc index 3a5c0cd..f5eff27 100644 --- a/.config/tint2/tint2rc +++ b/.config/tint2/tint2rc @@ -1,14 +1,16 @@ -#---- Generated by tint2conf aeaf ---- +#---- Generated by tint2conf c27e ---- # See https://gitlab.com/o9000/tint2/wikis/Configure for # full documentation of the configuration options. #------------------------------------- # Gradients #------------------------------------- # Backgrounds -# Background 1: Panel +# Background 1: Battery, Panel rounded = 0 border_width = 0 border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 background_color = #171520 100 border_color = #171520 100 background_color_hover = #000000 60 @@ -20,6 +22,8 @@ border_color_pressed = #000000 30 rounded = 0 border_width = 1 border_sides = LR +border_content_tint_weight = 0 +background_content_tint_weight = 0 background_color = #9325e7 30 border_color = #9325e7 40 background_color_hover = #9325e7 90 @@ -31,6 +35,8 @@ border_color_pressed = #eaeaea 44 rounded = 0 border_width = 1 border_sides = LR +border_content_tint_weight = 0 +background_content_tint_weight = 0 background_color = #9325e7 100 border_color = #9325e7 100 background_color_hover = #ad5aed 100 @@ -42,6 +48,8 @@ border_color_pressed = #eaeaea 44 rounded = 0 border_width = 1 border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 background_color = #aa4400 100 border_color = #aa7733 100 background_color_hover = #cc7700 100 @@ -53,6 +61,8 @@ border_color_pressed = #aa7733 100 rounded = 1 border_width = 1 border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 background_color = #222222 100 border_color = #333333 100 background_color_hover = #ffffaa 100 @@ -62,13 +72,14 @@ border_color_pressed = #000000 100 #------------------------------------- # Panel -panel_items = LTSC -panel_size = 100% 30 +panel_items = TFSBC +panel_size = 100% 32 panel_margin = 0 0 panel_padding = 2 0 2 panel_background_id = 1 wm_menu = 1 panel_dock = 0 +panel_pivot_struts = 0 panel_position = bottom center horizontal panel_layer = top panel_monitor = all @@ -78,12 +89,14 @@ autohide_show_timeout = 0 autohide_hide_timeout = 0.5 autohide_height = 2 strut_policy = follow_size -panel_window_name = tint2 +panel_window_name = taskbar disable_transparency = 1 mouse_effects = 1 font_shadow = 0 mouse_hover_icon_asb = 100 0 10 mouse_pressed_icon_asb = 100 0 0 +scale_relative_to_dpi = 1 +scale_relative_to_screen_height = 1 #------------------------------------- # Taskbar @@ -97,26 +110,28 @@ taskbar_hide_inactive_tasks = 0 taskbar_hide_different_monitor = 0 taskbar_hide_different_desktop = 0 taskbar_always_show_all_desktop_tasks = 0 -taskbar_name_padding = 4 2 +taskbar_name_padding = 12 0 taskbar_name_background_id = 0 taskbar_name_active_background_id = 0 +taskbar_name_font = Source Han Sans JP Semi-Bold 12 taskbar_name_font_color = #e3e3e3 100 taskbar_name_active_font_color = #ffffff 100 taskbar_distribute_size = 0 -taskbar_sort_order = none +taskbar_sort_order = center task_align = left #------------------------------------- # Task task_text = 1 -task_icon = 1 +task_icon = 0 task_centered = 1 urgent_nb_of_blink = 100000 -task_maximum_size = 150 35 -task_padding = 2 2 4 +task_maximum_size = 220 0 +task_padding = 0 0 0 +task_font = Source Code Pro 14 task_tooltip = 1 task_thumbnail = 0 -task_thumbnail_size = 210 +task_thumbnail_size = 8 task_font_color = #ffffff 100 task_background_id = 2 task_active_background_id = 3 @@ -174,22 +189,22 @@ clock_dwheel_command = #------------------------------------- # Battery battery_tooltip = 1 -battery_low_status = 10 -battery_low_cmd = xmessage 'tint2: Battery low!' -battery_full_cmd = +battery_low_status = 25 +battery_low_cmd = notify-send "Battery Low!" "Charge yo laptop." +battery_full_cmd = notify-send "Battery Full!" "Disconnect yo charger." battery_font_color = #ffffff 100 bat1_format = bat2_format = battery_padding = 1 0 -battery_background_id = 0 +battery_background_id = 1 battery_hide = 101 battery_lclick_command = battery_rclick_command = battery_mclick_command = battery_uwheel_command = battery_dwheel_command = -ac_connected_cmd = -ac_disconnected_cmd = +ac_connected_cmd = notify-send "Charger Connected." "Yo laptop is now charging." +ac_disconnected_cmd = notify-send "Charger Disconnected." "Yo laptop aint charging" #------------------------------------- # Tooltip -- cgit v1.2.3