From 24045012e69eb4d72b7a4344bca515e53412bba0 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 24 Nov 2022 20:20:08 +0530 Subject: added playerctl keybindings --- .config/XMonad/lib/Defaults.hs | 2 ++ .config/XMonad/lib/Keybindings.hs | 6 +++++- .config/alacritty/themes/dracula.yml | 6 +++--- .config/polybar/config.ini | 3 +-- .scripts/macli-keys | 6 ++++++ .scripts/secondmonitor.sh | 2 -- .xprofile | 15 +++++++++------ 7 files changed, 26 insertions(+), 14 deletions(-) create mode 100755 .scripts/macli-keys delete mode 100755 .scripts/secondmonitor.sh diff --git a/.config/XMonad/lib/Defaults.hs b/.config/XMonad/lib/Defaults.hs index 9c83de6..29fd87b 100644 --- a/.config/XMonad/lib/Defaults.hs +++ b/.config/XMonad/lib/Defaults.hs @@ -29,6 +29,8 @@ myTerminal = "open_terminal" myTerminal' = "WINIT_X11_SCALE_FACTOR=1.5 alacritty" myLauncher = "dmenu_run" +pausePlay = "playerctl play-pause" + volUp = "pamixer -i 5" volDown = "pamixer -d 5" volMute = "pamixer -t" diff --git a/.config/XMonad/lib/Keybindings.hs b/.config/XMonad/lib/Keybindings.hs index 708ae90..b839533 100644 --- a/.config/XMonad/lib/Keybindings.hs +++ b/.config/XMonad/lib/Keybindings.hs @@ -153,6 +153,9 @@ myKeybindingsP = [ , ("", spawn volUp) , ("", spawn volDown) , ("", spawn volMute) + , ("", spawn pausePlay) + , ("", spawn pausePlay) + , ("", spawn pausePlay) -- actions -- TODO: add reboot, shutdown, logout, copy, cut, paste , ("M-a w", spawn wifiOff) @@ -160,6 +163,7 @@ myKeybindingsP = [ , ("M-a s", spawn customScreenshot) , ("M-a S-s", spawn fullScreenshot) , ("M-a m", spawn volMute) + , ("M-a p", spawn pausePlay) -- media , ("M-m w", myScratchpad "wallpaper") , ("M-m o", spawn "obs") @@ -173,7 +177,7 @@ myKeybindingsP = [ -- system apps/scratchpads , ("M-b t", spawn myTorrentClient) , ("M-b i", spawn myBrowser) - , ("M-b d", myScratchpad "aarandr") + , ("M-b d", myScratchpad "arandr") , ("M-b c", myScratchpad "calc") , ("M-b b", myScratchpad "blueman") , ("M-b p", myScratchpad "pavucontrol") diff --git a/.config/alacritty/themes/dracula.yml b/.config/alacritty/themes/dracula.yml index 12fe23a..3866808 100644 --- a/.config/alacritty/themes/dracula.yml +++ b/.config/alacritty/themes/dracula.yml @@ -17,9 +17,9 @@ colors: focused_match: foreground: '0x44475a' background: '0xffb86c' - bar: - background: '0x282a36' - foreground: '0xf8f8f2' + bar: + background: '0x282a36' + foreground: '0xf8f8f2' line_indicator: foreground: None background: None diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index 4dc7b04..b87a081 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -256,7 +256,7 @@ label-connected-background = ${colors.ethernet-bg} label-connected-foreground = ${colors.ethernet-fg} format-connected-underline = #55aa55 -format-connected-prefix = "LAN: " +format-connected-prefix = "" format-connected-prefix-foreground = ${colors.foreground} label-connected = " %local_ip% " @@ -358,7 +358,6 @@ pin-workspaces = false enable-click = true enable-scroll = false format = -index-sort = true label-monitor = %name% diff --git a/.scripts/macli-keys b/.scripts/macli-keys new file mode 100755 index 0000000..4122c91 --- /dev/null +++ b/.scripts/macli-keys @@ -0,0 +1,6 @@ +#!/bin/sh + +choice="great teacher onizuka" + +notify-send "macli" "$(macli episodes -S 1 -s +1 $choice | sed -e 's/\x1b\[[0-9;]*m//g')" + diff --git a/.scripts/secondmonitor.sh b/.scripts/secondmonitor.sh deleted file mode 100755 index cc379c0..0000000 --- a/.scripts/secondmonitor.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -xrandr --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 1920x0 --rotate normal diff --git a/.xprofile b/.xprofile index 7853985..0ad8de4 100755 --- a/.xprofile +++ b/.xprofile @@ -6,10 +6,10 @@ if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then exec startx fi - -# makes optimus-manager work (probably) -# xrandr --setprovideroutputsource modesetting NVIDIA-0 -# xrandr --auto +# set screen layout +# this would fail when on integrated graphics +# that's the desired behaviour +xrandr --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal --output eDP-1-1 --primary --mode 1920x1080 --pos 1920x749 --rotate normal # makes gnome-keyring work dbus-update-activation-environment --all @@ -18,11 +18,14 @@ dbus-update-activation-environment --all xmodmap /home/zt/.Xmodmap & # autostart apps -secondmonitor.sh & blueman-applet & picom & dunst & emacs --daemon & -udiskie & +# udiskie messes up something in my system +# idk what it is but it's pretty bad +# basically it's temporarily disabled +# until I decide to troubleshoot it (I'm lazy) +# udiskie & nitrogen --restore & polystart & -- cgit v1.2.3