1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 | <?xml version="1.0" encoding="UTF-8"?>
<!--
HMIW's Openbox config
=====================
annotated as best i can, but open box is fairly straightforward
and the documentation is great.
-->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
<followMouse>no</followMouse>
<!-- move focus to a window when you move the mouse into it -->
<focusLast>yes</focusLast>
<!-- focus the last used window when changing desktops, instead of the one
under the mouse pointer. when followMouse is enabled -->
<underMouse>no</underMouse>
<!-- move focus under the mouse, even when the mouse is not moving -->
<focusDelay>50</focusDelay>
<!-- when followMouse is enabled, the mouse must be inside the window for
this many milliseconds (1000 = 1 sec) before moving focus to it -->
<raiseOnFocus>no</raiseOnFocus>
<!-- when followMouse is enabled, and a window is given focus by moving the
mouse into it, also raise the window -->
</focus>
<placement>
<policy>Smart</policy>
<!-- 'Smart' or 'UnderMouse' -->
<center>yes</center>
<!-- whether to place windows in the center of the free area found or
the top left corner -->
<monitor>Primary</monitor>
<!-- with Smart placement on a multi-monitor system, try to place new windows
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
the active window is, 'Primary' - only on the primary monitor -->
<primaryMonitor>1</primaryMonitor>
<!-- The monitor where Openbox should place popup dialogs such as the
focus cycling popup, or the desktop switch popup. It can be an index
from 1, specifying a particular monitor. Or it can be one of the
following: 'Mouse' - where the mouse is, or
'Active' - where the active window is -->
</placement>
<theme>
<name>Chrisarc</name>
<!-- chrisarc is a tweaked version of arc-dark, you can replace that with
whatever theme you use -->
<titleLayout>NLC</titleLayout>
<!--
available characters are NDSLIMC, each can occur at most once.
N: window icon
L: window label (AKA title).
I: iconify
M: maximize
C: close
S: shade (roll up/down)
D: omnipresent (on all desktops).
-->
<keepBorder>yes</keepBorder>
<animateIconify>no</animateIconify>
<font place="ActiveWindow">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveWindow">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuHeader">
<name>sans</name>
<size>11</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="MenuItem">
<name>sans</name>
<size>11</size>
<!-- font size in points -->
<weight>normal</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="ActiveOnScreenDisplay">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
<font place="InactiveOnScreenDisplay">
<name>sans</name>
<size>9</size>
<!-- font size in points -->
<weight>bold</weight>
<!-- 'bold' or 'normal' -->
<slant>normal</slant>
<!-- 'italic' or 'normal' -->
</font>
</theme>
<desktops>
<!-- this stuff is only used at startup, pagers allow you to change them
during a session
these are default values to use when other ones are not already set
by other applications, or saved in your session
use obconf if you want to change these without having to log out
and back in -->
<number>6</number>
<firstdesk>1</firstdesk>
<names>
<name>web</name>
<name>edt</name>
<name>faff</name>
<name>vid</name>
<name>muso</name>
<name>trnt</name>
</names>
<popupTime>1035</popupTime>
<!-- The number of milliseconds to show the popup for when switching
desktops. Set this to 0 to disable the popup. -->
</desktops>
<resize>
<drawContents>yes</drawContents>
<popupShow>Nonpixel</popupShow>
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
<popupPosition>Center</popupPosition>
<!-- 'Center', 'Top', or 'Fixed' -->
<popupFixedPosition>
<!-- these are used if popupPosition is set to 'Fixed' -->
<x>10</x>
<!-- positive number for distance from left edge, negative number for
distance from right edge, or 'Center' -->
<y>10</y>
<!-- positive number for distance from top edge, negative number for
distance from bottom edge, or 'Center' -->
</popupFixedPosition>
</resize>
<!-- You can reserve a portion of your screen where windows will not cover when
they are maximized, or when they are initially placed.
Many programs reserve space automatically, but you can use this in other
cases. -->
<margins>
<top>0</top>
<bottom>0</bottom>
<left>0</left>
<right>0</right>
</margins>
<dock>
<position>TopRight</position>
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
<floatingX>0</floatingX>
<floatingY>0</floatingY>
<noStrut>yes</noStrut>
<stacking>Above</stacking>
<!-- 'Above', 'Normal', or 'Below' -->
<direction>Vertical</direction>
<!-- 'Vertical' or 'Horizontal' -->
<autoHide>no</autoHide>
<hideDelay>300</hideDelay>
<!-- in milliseconds (1000 = 1 second) -->
<showDelay>300</showDelay>
<!-- in milliseconds (1000 = 1 second) -->
<moveButton>Middle</moveButton>
<!-- 'Left', 'Middle', 'Right' -->
</dock>
<keyboard>
<chainQuitKey>C-g</chainQuitKey>
<!-- misc -->
<!-- quit menu -->
<keybind key="W-C-S-q">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Quitmenu</name>
</startupnotify>
<command>rofi -show power-menu -modi power-menu:/home/chris/.local/bin/rofi-power-menu</command>
</action>
</keybind>
<!-- restart WM -->
<keybind key="W-C-r">
<action name="Execute">
<startupnotify>
<enabled>no</enabled>
<name>restart</name>
</startupnotify>
<command>openbox --restart</command>
</action>
</keybind>
<!--screen shot-->
<keybind key="Print">
<action name="Execute">
<startupnotify>
<enabled>no</enabled>
<name>Screenshot</name>
</startupnotify>
<command>flameshot gui</command>
</action>
</keybind>
<!--screen shot with scrot -->
<keybind key="S-Print">
<action name="Execute">
<startupnotify>
<enabled>no</enabled>
<name>Screenshot</name>
</startupnotify>
<command>scrot /home/chris/screenshots/screenshot_</command>
</action>
</keybind>
<!-- Keybindings for desktop switching -->
<!-- can also switch "next, last, north, up or left (and so on)"
see also "wrap on/off" -->
<keybind key="W-S-a">
<action name="SendToDesktop">
<to>1</to>
<follow>no</follow>
</action>
</keybind>
<keybind key="W-S-s">
<action name="SendToDesktop">
<to>2</to>
<follow>no</follow>
</action>
</keybind>
<keybind key="W-S-d">
<action name="SendToDesktop">
<to>3</to>
<follow>no</follow>
</action>
</keybind>
<keybind key="W-S-z">
<action name="SendToDesktop">
<to>4</to>
<follow>no</follow>
</action>
</keybind>
<keybind key="W-S-x">
<action name="SendToDesktop">
<to>5</to>
<follow>no</follow>
</action>
</keybind>
<keybind key="W-S-c">
<action name="SendToDesktop">
<to>6</to>
<follow>no</follow>
</action>
</keybind>
<!-- go to desktop -->
<keybind key="W-a">
<action name="GoToDesktop">
<to>1</to>
</action>
</keybind>
<keybind key="W-s">
<action name="GoToDesktop">
<to>2</to>
</action>
</keybind>
<keybind key="W-d">
<action name="GoToDesktop">
<to>3</to>
</action>
</keybind>
<keybind key="W-z">
<action name="GoToDesktop">
<to>4</to>
</action>
</keybind>
<keybind key="W-x">
<action name="GoToDesktop">
<to>5</to>
</action>
</keybind>
<keybind key="W-c">
<action name="GoToDesktop">
<to>6</to>
</action>
</keybind>
<!-- Keybindings for running applications -->
<!-- thunar sup f has been added to key chain -->
<keybind key="W-Return">
<action name="Execute">
<startupnotify>
<enabled>false</enabled>
<name>Rofi</name>
</startupnotify>
<command>/usr/bin/rofi -show drun -modi drun</command>
</action>
</keybind>
<!-- terminal added to key chain -->
<keybind key="W-b">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>firefox</name>
</startupnotify>
<command>firefox</command>
</action>
</keybind>
<keybind key="W-S-t">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>nvim</name>
</startupnotify>
<command>lxterminal -e nvim</command>
</action>
</keybind>
<keybind key="W-g">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>gimp</name>
</startupnotify>
<command>gimp</command>
</action>
</keybind>
<keybind key="W-period">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>clementine</name>
</startupnotify>
<command>clementine</command>
</action>
</keybind>
<!-- window control -->
<!-- this one takes a bit of getting used to. basics are
super for active desktop, alt for all desktops
mod + tab quickly switches, mod + grave (`) cycles
backwards through all windows on desktop/desktops-->
<!-- Keybindings for window switching -->
<!-- quickly cycle between two recent windows -->
<keybind key="W-Tab">
<action name="NextWindow">
<bar>no</bar>
<raise>yes</raise>
<interactive>no</interactive>
<finalactions>
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</finalactions>
</action>
</keybind>
<!-- cycle through all windows on WS -->
<keybind key="W-grave">
<action name="PreviousWindow">
<bar>no</bar>
<raise>yes</raise>
<finalactions>
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</finalactions>
</action>
</keybind>
<!-- quickly cycle between two windows from all workspaces -->
<keybind key="A-Tab">
<action name="NextWindow">
<bar>no</bar>
<raise>yes</raise>
<allDesktops>yes</allDesktops>
<interactive>no</interactive>
<finalactions>
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</finalactions>
</action>
</keybind>
<!-- cycle through all windows on all workspaces -->
<keybind key="A-grave">
<action name="PreviousWindow">
<bar>no</bar>
<raise>yes</raise>
<allDesktops>yes</allDesktops>
<interactive>yes</interactive>
<finalactions>
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</finalactions>
</action>
</keybind>
<!-- Keybindings for window actions-->
<keybind key="W-space">
<action name="ToggleShowDesktop"/>
</keybind>
<keybind key="W-q">
<action name="Close"/>
</keybind>
<keybind key="C-period">
<action name="Close"/>
</keybind>
<keybind key="W-KP_Subtract">
<action name="Iconify"/>
</keybind>
<keybind key="W-minus">
<action name="Iconify"/>
</keybind>
<keybind key="W-KP_Multiply">
<action name="ToggleOmnipresent"/>
<action name="ToggleAlwaysOnTop"/>
<action name="ToggleDecorations"/>
</keybind>
<keybind key="W-KP_Add">
<action name="ToggleMaximize"/>
</keybind>
<keybind key="W-equal">
<action name="ToggleMaximize"/>
</keybind>
<!-- poor man's tiling -->
<!-- you might need to mess around with these settings depending
on your screen size. mine is 1600x900. percentage values
account for the status bar, so 100% is 100% of whatever remains.-->
<!-- fake tile SW Corner -->
<keybind key="W-KP_End">
<action name="MoveResizeTo">
<x>8</x>
<y>-4</y>
<width>49%</width>
<height>49%</height>
</action>
</keybind>
<!-- fake tile bottom half -->
<keybind key="W-KP_Down">
<action name="MoveResizeTo">
<x>8</x>
<y>-4</y>
<width>99%</width>
<height>49%</height>
</action>
</keybind>
<!-- fake tile SE Corner -->
<keybind key="W-KP_Next">
<action name="MoveResizeTo">
<x>-8</x>
<y>-4</y>
<width>49%</width>
<height>49%</height>
</action>
</keybind>
<!-- fake tile left half -->
<keybind key="W-KP_Left">
<action name="MoveResizeTo">
<x>8</x>
<y>center</y>
<width>49%</width>
<height>99%</height>
</action>
</keybind>
<!-- fake tile right half -->
<keybind key="W-KP_Right">
<action name="MoveResizeTo">
<x>-8</x>
<y>center</y>
<width>49%</width>
<height>99%</height>
</action>
</keybind>
<!-- fake tile NW Corner -->
<keybind key="W-KP_Home">
<action name="MoveResizeTo">
<x>8</x>
<y>4</y>
<width>49%</width>
<height>49%</height>
</action>
</keybind>
<!-- fake tile top half -->
<keybind key="W-KP_Up">
<action name="MoveResizeTo">
<x>8</x>
<y>4</y>
<width>99%</width>
<height>49%</height>
</action>
</keybind>
<!-- fake tile NE Corner -->
<keybind key="W-KP_Prior">
<action name="MoveResizeTo">
<x>-8</x>
<y>4</y>
<width>49%</width>
<height>49%</height>
</action>
</keybind>
<!-- relative resize -->
<!-- mod + shift increases size in direction -->
<!-- expand SW -->
<keybind key="W-S-KP_End">
<action name="ResizeRelative">
<left>50</left>
<bottom>50</bottom>
</action>
</keybind>
<!-- expand S -->
<keybind key="W-S-KP_Down">
<action name="ResizeRelative">
<bottom>50</bottom>
</action>
</keybind>
<!-- expand SE -->
<keybind key="W-S-KP_Next">
<action name="ResizeRelative">
<right>50</right>
<bottom>50</bottom>
</action>
</keybind>
<!-- expand W -->
<keybind key="W-S-KP_Left">
<action name="ResizeRelative">
<left>100</left>
</action>
</keybind>
<!-- expand E -->
<keybind key="W-S-KP_Right">
<action name="ResizeRelative">
<right>100</right>
</action>
</keybind>
<!-- expand NW -->
<keybind key="W-S-KP_Home">
<action name="ResizeRelative">
<left>50</left>
<top>50</top>
</action>
</keybind>
<!-- expand N -->
<keybind key="W-S-KP_Up">
<action name="ResizeRelative">
<top>50</top>
</action>
</keybind>
<!-- expand NE -->
<keybind key="W-S-KP_Prior">
<action name="ResizeRelative">
<right>50</right>
<top>50</top>
</action>
</keybind>
<!-- super + control decreases size (maybe invert these)-->
<!-- shrink SW -->
<keybind key="W-C-KP_End">
<action name="ResizeRelative">
<left>-50</left>
<bottom>-50</bottom>
</action>
</keybind>
<!-- shrink S -->
<keybind key="W-C-KP_Down">
<action name="ResizeRelative">
<bottom>-50</bottom>
</action>
</keybind>
<!-- shrink SE -->
<keybind key="W-C-KP_Next">
<action name="ResizeRelative">
<right>-50</right>
<bottom>-50</bottom>
</action>
</keybind>
<!-- shrink W -->
<keybind key="W-C-KP_Left">
<action name="ResizeRelative">
<left>-100</left>
</action>
</keybind>
<!-- shrink E -->
<keybind key="W-C-KP_Right">
<action name="ResizeRelative">
<right>-100</right>
</action>
</keybind>
<!-- shrink NW -->
<keybind key="W-C-KP_Home">
<action name="ResizeRelative">
<left>-50</left>
<top>-50</top>
</action>
</keybind>
<!-- shrink N -->
<keybind key="W-C-KP_Up">
<action name="ResizeRelative">
<top>-50</top>
</action>
</keybind>
<!-- shrink NE -->
<keybind key="W-C-KP_Prior">
<action name="ResizeRelative">
<right>-50</right>
<top>-50</top>
</action>
</keybind>
<!-- relative move with super + alt key -->
<!-- move SW -->
<keybind key="W-A-KP_End">
<action name="MoveRelative">
<x>-50</x>
<y>50</y>
</action>
</keybind>
<!-- move S -->
<keybind key="W-A-KP_Down">
<action name="MoveRelative">
<x>0</x>
<y>50</y>
</action>
</keybind>
<!-- move SE -->
<keybind key="W-A-KP_Next">
<action name="MoveRelative">
<x>50</x>
<y>50</y>
</action>
</keybind>
<!-- move W -->
<keybind key="W-A-KP_Left">
<action name="MoveRelative">
<x>-50</x>
<y>0</y>
</action>
</keybind>
<!-- move E -->
<keybind key="W-A-KP_Right">
<action name="MoveRelative">
<x>50</x>
<y>0</y>
</action>
</keybind>
<!-- move NW -->
<keybind key="W-A-KP_Home">
<action name="MoveRelative">
<x>-50</x>
<y>-50</y>
</action>
</keybind>
<!-- move N -->
<keybind key="W-A-KP_Up">
<action name="MoveRelative">
<x>0</x>
<y>-50</y>
</action>
</keybind>
<!-- move NE -->
<keybind key="W-A-KP_Prior">
<action name="MoveRelative">
<x>50</x>
<y>-50</y>
</action>
</keybind>
<!-- key chains for commonly used directories -->
<!-- menu for dir -->
<keybind key="W-e">
<keybind key="W-e">
<action name="ShowMenu">
<menu>root-menu</menu>
</action>
</keybind>
<keybind key="W-d">
<action name="ShowMenu">
<menu>Downloads</menu>
</action>
</keybind>
<keybind key="W-h">
<action name="ShowMenu">
<menu>Not-Home</menu>
</action>
</keybind>
<keybind key="W-c">
<action name="ShowMenu">
<menu>config</menu>
</action>
</keybind>
<keybind key="W-b">
<action name="ShowMenu">
<menu>local/bin</menu>
</action>
</keybind>
<keybind key="W-n">
<action name="ShowMenu">
<menu>Notes</menu>
</action>
</keybind>
</keybind>
<!-- open a terminal in dir -->
<keybind key="W-t">
<keybind key="W-t">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal</command>
</action>
</keybind>
<keybind key="W-d">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal --working-directory=/mnt/80bac254-b6d3-40ac-b861-62ad16f7de4f/downloads</command>
</action>
</keybind>
<keybind key="W-h">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal --working-directory=/mnt/80bac254-b6d3-40ac-b861-62ad16f7de4f/Not-Home</command>
</action>
</keybind>
<keybind key="W-b">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal --working-directory=/home/chris/.local/bin</command>
</action>
</keybind>
<keybind key="W-n">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal --working-directory=/home/chris/.notes</command>
</action>
</keybind>
<keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>lxterminal</name>
</startupnotify>
<command>lxterminal --working-directory=/home/chris/.config</command>
</action>
</keybind>
</keybind>
<!-- open file mger in dir -->
<keybind key="W-f">
<keybind key="W-f">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar</command>
</action>
</keybind>
<keybind key="W-d">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar /mnt/80bac254-b6d3-40ac-b861-62ad16f7de4f/downloads</command>
</action>
</keybind>
<keybind key="W-h">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar /mnt/80bac254-b6d3-40ac-b861-62ad16f7de4f/Not-Home</command>
</action>
</keybind>
<keybind key="W-b">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar ~/.local/bin</command>
</action>
</keybind>
<keybind key="W-n">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar ~/.notes</command>
</action>
</keybind>
<keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>thunar</name>
</startupnotify>
<command>thunar ~/.config</command>
</action>
</keybind>
</keybind>
<!-- keybinds end -->
</keyboard>
<!-- Mouse bindings -->
<!-- after spending so long on tiling window managers i've become
used to rarely using the mouse so if anything these just get
in the way. they are all defaults so i might just take them
out if they continue to infuriate me!
-->
<mouse>
<dragThreshold>1</dragThreshold>
<!-- number of pixels the mouse must move before a drag begins -->
<doubleClickTime>500</doubleClickTime>
<!-- in milliseconds (1000 = 1 second) -->
<screenEdgeWarpTime>0</screenEdgeWarpTime>
<!-- Time before changing desktops when the pointer touches the edge of the
screen while moving a window, in milliseconds (1000 = 1 second).
Set this to 0 to disable warping -->
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
<!-- Set this to TRUE to move the mouse pointer across the desktop when
switching due to hitting the edge of the screen -->
<context name="Frame">
<mousebind button="W-Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="W-Left" action="Click">
<action name="Unshade"/>
</mousebind>
<mousebind button="W-Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="W-Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="W-Right" action="Drag">
<action name="Resize"/>
</mousebind>
<mousebind button="W-Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="W-Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="W-Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="C-W-Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="C-W-Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="W-S-Up" action="Click">
<action name="SendToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="W-S-Down" action="Click">
<action name="SendToDesktop"><to>next</to></action>
</mousebind>
</context>
<context name="Titlebar">
<mousebind button="Left" action="Drag">
<action name="Move"/>
</mousebind>
<mousebind button="Left" action="DoubleClick">
<action name="ToggleMaximize"/>
</mousebind>
<mousebind button="Up" action="Click">
<action name="if">
<shaded>no</shaded>
<then>
<action name="Shade"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
<action name="Lower"/>
</then>
</action>
</mousebind>
<mousebind button="Down" action="Click">
<action name="if">
<shaded>yes</shaded>
<then>
<action name="Unshade"/>
<action name="Raise"/>
</then>
</action>
</mousebind>
</context>
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Lower"/>
<action name="FocusToBottom"/>
<action name="Unfocus"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="Top">
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>top</edge></action>
</mousebind>
</context>
<context name="Left">
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>left</edge></action>
</mousebind>
</context>
<context name="Right">
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>right</edge></action>
</mousebind>
</context>
<context name="Bottom">
<mousebind button="Left" action="Drag">
<action name="Resize"><edge>bottom</edge></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="TRCorner BRCorner TLCorner BLCorner">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Drag">
<action name="Resize"/>
</mousebind>
</context>
<context name="Client">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Icon">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="ShowMenu"><menu>client-menu</menu></action>
</mousebind>
</context>
<context name="AllDesktops">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleOmnipresent"/>
</mousebind>
</context>
<context name="Shade">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleShade"/>
</mousebind>
</context>
<context name="Iconify">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Iconify"/>
</mousebind>
</context>
<context name="Maximize">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Middle" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="ToggleMaximize"/>
</mousebind>
<mousebind button="Middle" action="Click">
<action name="ToggleMaximize"><direction>vertical</direction></action>
</mousebind>
<mousebind button="Right" action="Click">
<action name="ToggleMaximize"><direction>horizontal</direction></action>
</mousebind>
</context>
<context name="Close">
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
<action name="Unshade"/>
</mousebind>
<mousebind button="Left" action="Click">
<action name="Close"/>
</mousebind>
</context>
<context name="Desktop">
<mousebind button="Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="W-Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="W-Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="C-A-Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="C-A-Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="Left" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
<mousebind button="Right" action="Press">
<action name="Focus"/>
<action name="Raise"/>
</mousebind>
</context>
<context name="Root">
<!-- Menus -->
<mousebind button="Middle" action="Press">
<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
</mousebind>
<mousebind button="Right" action="Press">
<action name="ShowMenu"><menu>root-menu</menu></action>
</mousebind>
</context>
<context name="MoveResize">
<mousebind button="Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
<mousebind button="W-Up" action="Click">
<action name="GoToDesktop"><to>previous</to></action>
</mousebind>
<mousebind button="W-Down" action="Click">
<action name="GoToDesktop"><to>next</to></action>
</mousebind>
</context>
</mouse>
<menu>
<!-- You can specify more than one menu file in here and they are all loaded,
just don't make menu ids clash or, well, it'll be kind of pointless -->
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
<file>menu.xml</file>
<hideDelay>200</hideDelay>
<!-- if a press-release lasts longer than this setting (in milliseconds), the
menu is hidden again -->
<middle>no</middle>
<!-- center submenus vertically about the parent entry -->
<submenuShowDelay>50</submenuShowDelay>
<!-- time to delay before showing a submenu after hovering over the parent
entry.
if this is a negative value, then the delay is infinite and the
submenu will not be shown until it is clicked on -->
<submenuHideDelay>400</submenuHideDelay>
<!-- time to delay before hiding a submenu when selecting another
entry in parent menu
if this is a negative value, then the delay is infinite and the
submenu will not be hidden until a different submenu is opened -->
<showIcons>yes</showIcons>
<!-- controls if icons appear in the client-list-(combined-)menu -->
<manageDesktops>yes</manageDesktops>
<!-- show the manage desktops section in the client-list-(combined-)menu -->
</menu>
<!-- application rules -->
<!-- see info at bottom of page -->
<applications>
<!-- Match all windows and remove their decorations -->
<application class="*"> <decor>no</decor> </application>
<!-- application-specific rules, mainly desktop spawning -->
<application class="firefox">
<desktop>1</desktop>
</application>
<application class="Gimp">
<desktop>2</desktop>
</application>
<application class="vlc">
<desktop>4</desktop>
</application>
<application class="Clementine">
<desktop>5</desktop>
</application>
<application class="Transmission-gtk">
<desktop>6</desktop>
</application>
<application class="qBittorrent">
<desktop>6</desktop>
</application>
<!-- misc app rules -->
<application class="mpv">
<decor>no</decor>
</application>
<application class="firefox">
<decor>no</decor>
</application>
<!-- turns off titlebars for all child windows-->
<!-- (doesn't seem to work)-->
<application>
<decor>no</decor>
</application>
<!--
# this is an example with comments through out. use these to make your
# own rules, but without the comments of course.
# you may use one or more of the name/class/role/title/type rules to specify
# windows to match
<application name="the window's _OB_APP_NAME property (see obxprop)"
class="the window's _OB_APP_CLASS property (see obxprop)"
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
role="the window's _OB_APP_ROLE property (see obxprop)"
title="the window's _OB_APP_TITLE property (see obxprop)"
type="the window's _OB_APP_TYPE property (see obxprob)..
(if unspecified, then it is 'dialog' for child windows)">
# you may set only one of name/class/role/title/type, or you may use more
# than one together to restrict your matches.
# the name, class, role, and title use simple wildcard matching such as those
# used by a shell. you can use * to match any characters and ? to match
# any single character.
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
# or desktop
# when multiple rules match a window, they will all be applied, in the
# order that they appear in this list
# each rule element can be left out or set to 'default' to specify to not
# change that attribute of the window
<decor>yes</decor>
# enable or disable window decorations
<shade>no</shade>
# make the window shaded when it appears, or not
<position force="no">
# the position is only used if both an x and y coordinate are provided
# (and not set to 'default')
# when force is "yes", then the window will be placed here even if it
# says you want it placed elsewhere. this is to override buggy
# applications who refuse to behave
<x>center</x>
# a number like 50, or 'center' to center on screen. use a negative number
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
# the right edge (or bottom). use 'default' to specify using value
# provided by the application, or chosen by openbox, instead.
<y>200</y>
<monitor>1</monitor>
# specifies the monitor in a xinerama setup.
# 1 is the first head, or 'mouse' for wherever the mouse is
</position>
<size>
# the size to make the window.
<width>20</width>
# a number like 20, or 'default' to use the size given by the application.
# you can use fractions such as 1/2 or percentages such as 75% in which
# case the value is relative to the size of the monitor that the window
# appears on.
<height>30%</height>
</size>
<focus>yes</focus>
# if the window should try be given focus when it appears. if this is set
# to yes it doesn't guarantee the window will be given focus. some
# restrictions may apply, but Openbox will try to
<desktop>1</desktop>
# 1 is the first desktop, 'all' for all desktops
<layer>normal</layer>
# 'above', 'normal', or 'below'
<iconic>no</iconic>
# make the window iconified when it appears, or not
<skip_pager>no</skip_pager>
# asks to not be shown in pagers
<skip_taskbar>no</skip_taskbar>
# asks to not be shown in taskbars. window cycling actions will also
# skip past such windows
<fullscreen>yes</fullscreen>
# make the window in fullscreen mode when it appears
<maximized>true</maximized>
# 'Horizontal', 'Vertical' or boolean (yes/no)
</application>
# end of the example
-->
</applications>
</openbox_config>
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | <?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://openbox.org/">
<menu id="root-menu" label="Applications">
<item label="File Manager"><action name="Execute"><command><![CDATA[xdg-open .]]></command></action></item>
<item label="Terminal"><action name="Execute"><command><![CDATA[lxterminal]]></command></action></item>
<item label="Web Browser"><action name="Execute"><command><![CDATA[xdg-open http://]]></command></action></item>
<separator label="Frequent Folders"/>
<!-- pipe menus -->
<!-- NotHome folder -->
<menu execute="~/.config/openbox/scripts/dm-nothome.py" id="Not-Home" label="Not-Home"/>
<!-- Downloads folder -->
<menu execute="~/.config/openbox/scripts/dm-downloads.py" id="Downloads" label="Downloads"/>
<!-- Configs folder -->
<menu execute="~/.config/openbox/scripts/dir-menu.py" id="config" label=".config"/>
<!-- Notes folder -->
<menu execute="~/.config/openbox/scripts/dm-notes.py" id="Notes" label="Notes"/>
<!-- Local/bin folder -->
<menu execute="~/.config/openbox/scripts/dm-locbin.py" id="local/bin" label="local/bin"/>
<separator/>
<item label="Nitrogen"><action name="Execute"><command>nitrogen</command></action></item>
<separator/>
<item label="Lock"><action name="Execute"><command><![CDATA[slock]]></command></action></item>
<item label="Exit"><action name="Exit"/></item>
</menu>
</openbox_menu>
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #!/usr/bin/python
import os
import random
from sys import argv
mypath = argv[0]
def ext_resolver(filename):
ext = filename.split('.')[-1]
ext = ext.lower()
ext_list = {'nes':'tuxnes -E --js1=/dev/input/js0 --joystick-map=1:B2,B1,B9,B8,,,,,B3',
'smc':'zsnes -m -v 18 -y',
'gba':'VisualBoyAdvance',
'bin':'dgen -f -j',
'ape':'xdg-open ',
'flac':'xdg-open ',
'ogg':'xdg-open ',
'ogm':'xdg-open ',
'mp3':'xdg-open ',
'avi':'xdg-open ',
'divx':'xdg-open ',
'm4a':'xdg-open ',
'm4v':'xdg-open ',
'mkv':'xdg-open ',
'mp4':'xdg-open ',
'vob':'xdg-open ',
'py' : 'xdg-open ',
'png':'xdg-open ',
'jpg':'xdg-open ',
'bmp':'xdg-open ',
'gif':'xdg-open ',
'svg':'xdg-open ',
'tex':'xdg-open ',
'txt':'xdg-open ',
'xml':'xdg-open ',
'pdf':'xournal',
'ps':'xournal',
'html':'x-www-browser',
'html5':'x-www-browser',
'deb':'gdebi',
'desktop':'gksudo geany',
'sh':'xdg-open geany',
'exe':'wine start /unix',
'jar':'java -jar'}
if ext in ext_list:
return ext_list[ext]
else:
return 'echo'
def dir_list(dircontent):
dirs = []
files = []
for item in dircontent:
if os.path.isdir(currentpath + '/' + item):
dirs.append(item)
else:
files.append(item)
dirs.sort()
files.sort()
return dirs, files
def replacer(string):
return string.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''')
def gen_menu(dirs, files):
curpath = replacer(currentpath)
print('<openbox_pipe_menu>')
print('<item label="Open in Terminal"><action name="execute"><execute>lxterminal --working-directory="' + curpath + '"</execute></action></item>')
print('<item label="Open in File Browser"><action name="execute"><execute>thunar "' + curpath + '"</execute></action></item>')
print('<separator />')
for thisdir in dirs:
thisdir = replacer(thisdir)
menuid = str(random.randrange(1,99,1)).zfill(2)
print(' <menu execute="' + mypath + ' ' + curpath + '/' + thisdir + '" id="' + thisdir + "-" + menuid + '" label="' + thisdir + '"/>')
for thisfile in files:
thisfile = replacer(thisfile)
print(' <item label="' + thisfile + '">')
print(' <action name="execute">')
print(' <execute>')
print(' ' + ext_resolver(thisfile) + ' "' + curpath + '/' + thisfile + '"')
print(' </execute>')
print(' </action>')
print(' </item>')
print('</openbox_pipe_menu>')
if len(argv) > 1:
currentpath = ' '.join(argv[1:])
else:
currentpath = "/home/chris/.config"
try:
content = [x for x in os.listdir(currentpath) if x[0] != '.']
parts = dir_list(content)
gen_menu(parts[0], parts[1])
except OSError:
print('<openbox_pipe_menu>')
print('<separator label="No access" />')
print('</openbox_pipe_menu>')
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | ;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #00040405
background-alt = #282a2e
foreground = #cbd4e2
foreground-alt = #94928f
blue = #46a8c3
green = #7ac82e
yellow = #ffef7a
alert = #f80000
[bar/example]
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 21
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = #000
border-size = 0
border-color = #00000000
padding-left = 0
padding-right = 0
module-margin-left = 2
module-margin-right = 2
font-0 = "Noto Sans:size=13;2:antialias=false"
font-1 = "Noto Sans:size=11;0:antialias=false"
font-2 = "Noto Sans:style=bold:size=12;2:antialias=false"
font-3 = "Noto Sans:size=10;2:antialias=false"
font-4 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid:pixelsize=11;2:antialias=false"
font-5 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid:pixelsize=11;2:antialias=false"
modules-left = ewmh polywins
modules-center =
modules-right = wlan1 wlan2 mem2 cpu temperature date
tray-position = right
tray-padding = 3
cursor-click = pointer
cursor-scroll = ns-resize
;================================================================
[module/ewmh]
type = internal/xworkspaces
enable-click = true
enable-scroll = false
format = "<label-state>"
icon-0 = web;
icon-1 = edt;
icon-2 = faff;
icon-3 = vid;
icon-4 = muso;
icon-5 = trnt;
label-active = " %icon% "
label-active-foreground = ${colors.blue}
label-active-underline = ${colors.blue}
label-occupied = " %icon% "
label-occupied-foreground = ${colors.foreground-alt}
label-occupied-underline = ${colors.blue}
label-urgent = " %icon% "
label-urgent-foreground = ${colors.alert}
label-empty = " %icon% "
label-empty-foreground = ${colors.foreground-alt}
;================================================================
[module/polywins]
type = custom/script
exec = ~/.config/polybar/scripts/polywins.sh 2>/dev/null
format = <label>
label = %{T2}%output%%{T-}
label-padding = 0
tail = true
interval = 5
;================================================================
[module/wlan1]
type = internal/network
interface = wlan0
interval = 3.0
format-connected = <label-connected>
label-connected = %{T4} %downspeed%%{T-}
label-connected-foreground = ${colors.blue}
;label-connected-underline = ${colors.blue}
format-disconnected = <label-disconnected>
label-disconnected = nc
label-disconnected-foreground = ${colors.alert}
label-disconnected-underline = ${colors.alert}
;================================================================
[module/wlan2]
type = internal/network
interface = wlan0
interval = 3.0
format-connected = <label-connected>
label-connected = %{T4} %upspeed%%{T-}
label-connected-foreground = ${colors.green}
;label-connected-underline = ${colors.green}
format-disconnected = <label-disconnected>
label-disconnected = nc
label-disconnected-foreground = ${colors.alert}
label-disconnected-underline = ${colors.alert}
;================================================================
; [module/memory]
; type = internal/memory
; interval = 2
; format-prefix = "Mem: "
; format-prefix-foreground = ${colors.foreground-alt}
; ;format-underline = #4bffdc
; label = %mb_used%/%gb_total%
;================================================================
[module/mem2]
type = custom/script
exec = free --mega | awk '/^Mem/ {print $3}'
format = <label>
label = %{T4}%output% MB%{T-}
interval = 5
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
;================================================================
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #f90000
label = %{T4}%percentage%%%{T-}
;================================================================
[module/temperature]
type = internal/temperature
thermal-zone = 0
warn-temperature = 75
format = <label>
format-warn = <label-warn>
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label = %{T4}%temperature-c%%{T-}
label-warn = %{T3}%temperature-c%%{T-}
label-warn-foreground = ${colors.alert}
;================================================================
[module/date]
type = internal/date
interval = 1
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-foreground = ${colors.foreground}
label = %time%
time = "%{T3}%H:%M%{T-} "
time-alt = "%{T4}%A, %B %e %{T-} %{T3}%H:%M:%S%{T-} "
;================================================================
[settings]
screenchange-reload = true
;compositing-background = xor
;compositing-background = screen
;compositing-foreground = source
;compositing-border = over
;pseudo-transparency = false
;================================================================
[global/wm]
margin-top = 5
margin-bottom = 2
;================================================================
; vim:ft=dosini
|
x
Notes
Instructions
.xml files go in ~/.config/openbox/
(optional menu scripts) .py files go in ~/.config/openbox/scripts/
(optional polybar) config goes in ~/.config/polybar/
I use an alternative window list widget as which can be found here. It’s very customizable so do read up on it.
most people want to create their own right click menus but I’ve included mine to be used as a template, should anybody want a hacky sort of folder bookmarks menu.
Useful Features
- Keyboard-driven.
- Pseudo tiling can be achieved with the keypad. I actually prefer this as a happy medium between dynamic tiling and manual tiling.
- Move and resize windows with the keypad.
- Key chains to open frequently used directories in terminal or file browser. Obviously if you’re borrowing this config and while not being me, you’ll want to change these, but the template is there.
Not-so important dependencies
- A bar! Polybar, tint2 and lxpanel seem to be the bars of choice with OpenBox. I prefer Polybar.
- A startup script. The startup script included in this directory just runs the universal startup script I have in local/bin. You can grab that or make your own.
Key Bindings
| Action | Key |
|————————————-|————————–|
| Quit menu | Mod, ctrl, shift + q |
| Restart wm | Mod, ctrl + r |
| Screenshot | Print |
| Send do desktop a,s,d,z,x,c | Mod, shift + a,s,d,z,x,c |
| Switch to desktop a,s,d,z,x,c | Mod + a,s,d,z,x,c |
| Launch Rofi | Mod + Return |
| Launch Nemo | Mod + f |
| Launch Termite | Mod + t |
| Launch Firefox | Mod + b |
| Launch Gimp | Mod + g |
| Launch Clementine | Mod + period |
| Quickly switch between last two windows | Mod + tab |
| Cycle backwards through windows | Mod + grave |
| Quickly switch between last two windows | Alt + tab |
| Cycle backwards through windows on all | Alt + grave |
| Show desktop | Mod + space |
| Close window | Mod + q |
| Iconify | Mod + minus (or kp_subtract) |
| Toggle omnipresent | Mod + kp_multiply |
| Maximize | Mod + plus (or kp_add) |
Pseudo tiling and relative window resize/move
Imagining the keypad as a compass, each key corresponds to a direction.
- Tiling is uses just the super key modifier
- Relative expanding uses the super and shift modifiers
- Relative shrinking uses the super and control modifiers
- Relative move uses the super and alt modifiers
Example Key Chaining
You’ll probably have a .config folder, so this will be my example. Pressing mod, ctrl + t will initiate a key chain, if it’s followed by c it will open a terminal in my config folder.
I also have a similar key chain set up to open a graphical file manager in the same locations.